After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 75452 - libintl linking problems on Tru64Unix and FreeBSD
libintl linking problems on Tru64Unix and FreeBSD
Status: VERIFIED FIXED
Product: GIMP
Classification: Other
Component: Internationalisation
1.x
Other OSF/1
: Normal normal
: ---
Assigned To: GIMP Bugs
Daniel Egger
: 78678 (view as bug list)
Depends on:
Blocks: 75742
 
 
Reported: 2002-03-19 16:15 UTC by olle
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
makefile in app (with my modification) (153.68 KB, patch)
2002-03-20 11:50 UTC, olle
none Details | Review

Description olle 2002-03-19 16:15:06 UTC
When starting GIMP 1.2.3 built either with native CC or GCC 3.0.4 a
lot of error messages are given. They read

LibGimp-WARNING **: gimp: wire_read: unexpected EOF
384843:/usr/lib/perl-5.6.0/bin/perl: /sbin/loader: Fatal Error: call to
unresolved symbol from
/usr/lib/perl-5.6.0/lib/site_perl/5.6.0/alpha-dec_osf/auto/Gimp/Gimp.so
(pc=0x30000003da4)
Comment 1 Raphaël Quinet 2002-03-19 16:31:17 UTC
The message "gimp: wire_read: unexpected EOF" means that the GIMP has
detected that a plug-in has crashed instead of sending the expected
data (during the initial handshake, in this case).  In your output,
the error message from the plug-in is printed next: it shows that the
Perl plug-in was not able to start because of some unresolved symbols
in the Gimp-Perl module (Gimp.so).

This is probably happening for all Perl scripts on your system.  This
could be due to the fact that Perl or Gimp-Perl was compiled with a
different compiler or with different settings than the GIMP itself.
You should re-install the Gimp-Perl module (and maybe re-configure
and re-install the GIMP afterwards - not that it is important to
re-configure the GIMP _after_ the new Gimp-Perl is installed).
Please report if this solves the problem or not.
Comment 2 olle 2002-03-19 21:33:04 UTC
I did try to reconfigure GIMP-PERL. I did then get a complaint about
unresolved external references in libgimpui.so, the symbol is 
dgettext.

I then rememebered that when I built gimp, a number of unresolved 
references were reported on the  program gimp-2. These were all
libintl symbols so I added -L../intl -lintl -liconv to the makefile
and tried a rebuild that succeeded.

Tru64Unix have no libintl. All the shared libs (libgimp and libgimpui
and also Gimp.so) refers libintl modules, but they cannot be resolved
because they are not included in any library

Any thoughts about this?
Comment 3 Raphaël Quinet 2002-03-20 08:53:38 UTC
Have you tried configuring the GIMP with --with-included-gettext?
Adding (or removing) this option might solve your linking problems.

If that does not work, you could try installing libiconv-1.7 and
gettext-0.10.40.  Both of them are available from any GNU mirror and
should compile without problems on your system.
Comment 4 olle 2002-03-20 10:15:51 UTC
In the first place I did the following

setenv CPPFLAGS -I/usr/local/include
setenv LDFLAGS -L/usr/local/include
./configure
/usr/local/bin/gmake

On your suggestion I added --with-included-gettext
to configure but that didn't do any difference.

The problem is the following:

Configure doesn't find any libintl.a on this system so it sets
up for the local lib ./intl instead. When running make the local
libintl.a is successfully built.

When building the rest, proper -I../intl flags have been added and
in most cases proper -L../intl -lintl -liconv are added.

There are two exceptions to this. The libgimp.so and the gimp itself
(gimp-1.2) is not setup to link with libintl.a. The -I flags are
there but no -L flags. This causes an invalid libgimp.so to be
built and make to terminate because of unresolved references in
gimp-1.2

I did a manual change in two places, then built everything and it 
ended up with a working gimp

in gimp-1.2.3/app/Makefile I changed

GTK_LIBS = -L/usr/local/lib -lgtk -lgdk -lgmodule -lglib -lXext -lXext
-lX11 -ldnet_stub -lm

into


GTK_LIBS = -L/usr/local/lib -lgtk -lgdk -lgmodule -lglib -lXext -lXext
-lX11 -ldnet_stub -L../intl -lintl -liconv -lm


in gimp-1.2.3/libgimp/Makefile I changed

libgimp_la_LIBADD = $(GLIB_LIBS) -lm

into

libgimp_la_LIBADD = $(GLIB_LIBS) -L../intl -lintl -liconv -lm


After that everything is fine!



Comment 5 Sven Neumann 2002-03-20 10:50:23 UTC
This is strange indeed since app/Makefile.am contains $(INTLLIBS) in
gimp_1_2_LDADD which should expand to the proper linker flags. The
Makefile.am in libgimp shouldn't need $(INTLLIBS) since there's no
executable build here.

Also passing --with-included-gettext to configure is supposed to work.
However if no libintl is found on your system configure should be able
to detect that and fall back to the included gettext even if you
didn't explicetely specify --with-included-gettext.
Comment 6 Raphaël Quinet 2002-03-20 11:21:34 UTC
For some strange reason, app/Makefile.am contains a very suspicious
line 13:
  INTLLIBS = 
This clears any definition of INTLLIBS.  This line should probably be
removed, but I am curious to know why it was added there.

Question to Olle: did you remove config.cache before running configure
--with-included-gettext?  Maybe the configure script took some cached
values from a previous build.
Comment 7 Raphaël Quinet 2002-03-20 11:30:18 UTC
Oops, forget my previous comment: this suspicious line is inside
"if OS_WIN32" so it should not affect UNIX builds.  So I do not
understand why INTLLIBS was not correctly expanded in app/Makefile.

Olle, could you do a "grep INTLLIBS config.status" and report what
value has been set for this variable (maybe try with and without the
--with-included-gettext option)?
Comment 8 olle 2002-03-20 11:50:19 UTC
Created attachment 7263 [details] [review]
makefile in app (with my modification)
Comment 9 olle 2002-03-20 11:59:59 UTC
I did reconfigure from a clean distribution so there were no
cache file there. 

A grep of config.status gives

s%@INTLLIBS@%$(top_builddir)/intl/libintl.a -liconv%g

looks alright to me but there is no defition i app/Makefile. There
are in the toplevel Makefile and also in others like plug-ins/Makefile

You are probably right about libgimp in most cases. But the symbols
have to be define somewhere and if they are not defined in the
shared lib they have to be defined in the application. I did
find 2 occasions where unresolved referecences occured.

1) When doing

perl Makefile.PL in plug-ins/perl

libgimpui.so reported gettext are unresolved. Apparently is isn't
define anywhere

2) When browsing plugins at startup Gimp.so reported an unresolved
reference. That is also because is missing both in the library and
in the application.

Comment 10 Raphaël Quinet 2002-03-20 12:30:50 UTC
One more question...  Instead of grep'ing for INTLLIBS in
config.status, could you just grep for INTL and include the results
here?  I would be interested in the value of BUILD_INCLUDED_LIBINTL
and USE_INCLUDED_LIBINTL.  Both should be set to yes in your case,
but I would like to be sure about that.

Regarding your points 1) and 2), this looks like a problem in the
Perl directory.  In principle, you should not have to run
perl Makefile.PL yourself, because this should be done when you
configure (and it should use the correct options).  And the generated
Makefile should use libintl correctly, but it looks like it doesn't...

Comment 11 olle 2002-03-20 13:08:37 UTC
search for intl in config.status

skalman.cb.uu.se> grep INTL config.status
s%@INTLDEPS@%%g
s%@INTLLIBS@%$(top_builddir)/intl/libintl.a -liconv%g
s%@INTLOBJS@%$(GETTOBJS)%g
s%@INTLBISON@%bison%g
s%@BUILD_INCLUDED_LIBINTL@%yes%g
s%@USE_INCLUDED_LIBINTL@%yes%g
s%@INTL_LIBTOOL_SUFFIX_PREFIX@%%g
Comment 12 Raphaël Quinet 2002-03-20 14:18:35 UTC
Thanks.  So everything looks correct for the configure script.  I
think that I have located the problem, but I am not sure about the
root cause: the file app/Makefile.in generated from app/Makefile.am
does not contain the definition of INTLLIBS, and this definition is
therefore not included in the final app/Makefile.

If you look at line 122 of app/Makefile.in, you will find this:
INTLBISON = @INTLBISON@
INTLDEPS = @INTLDEPS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
IN_GIMP = @IN_GIMP@
[...]

In the other directories, Makefile.in contains this:
INTLBISON = @INTLBISON@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
IN_GIMP = @IN_GIMP@
[...]

Note that the line defining INTLLIBS is missing from app/Makefile.in.
This could be a bug in automake.  Maybe it was confused by the
empty definition of INTLLIBS inside the "if OS_WIN32" section?  This
is the only significant difference that I could find between the
Makefile.am in the app directory and in the other directories.
Comment 13 Sven Neumann 2002-03-20 14:30:03 UTC
Most interestingly, no other Makefile.am than the one in app contains
the suspicous line

 INTLLIBS =

inside if OS_WIN32 so it seems that it is actually not needed at all.
I have added Tor to the Cc: list so hopefully he can comment on this.


Comment 14 Tor Lillqvist 2002-03-21 20:25:22 UTC
I really don't know any longer why I added the INTLLIBS= line inside 
the if OS_WIN32. It can safely be removed, will do that.
Comment 15 Raphaël Quinet 2002-04-15 08:27:47 UTC
*** Bug 78678 has been marked as a duplicate of this bug. ***
Comment 16 Raphaël Quinet 2002-04-15 08:36:12 UTC
According to bug #78678 the same problem occurs on FreeBSD so I have
changed the summary of this bug report accordingly.  I suspect that
it occurs on many operating systems (all those that require libintl,
so almost all UNIX variants except for Linux) but I cannot test that
because I have already installed GNU gettext in the default include
path and library path on all my Solaris workstations.
Comment 17 Sven Neumann 2002-08-28 03:38:50 UTC
2002-03-21  Tor Lillqvist  <tml@iki.fi>

 * app/Makefile.am: Remove unnecessary empty assignment to INTLLIBS
 from inside "if OS_WIN32".
Comment 18 Sven Neumann 2002-08-28 03:40:52 UTC
Did this change solve the problem? Can be tested with gimp-1.2.4-pre1.
Feedback would be highly appreciated.
Comment 19 Sven Neumann 2002-12-14 19:12:49 UTC
We got no reply but I will assume that Tor's change was the right fix
and thus mark this report as FIXED.
Comment 20 Raphaël Quinet 2003-06-20 18:30:54 UTC
The fix is part of the stable release 1.2.4 (hopefully).  Closing this
bug.