bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

incorrect definition of no_undefined_flag on solaris?


From: Diab Jerius
Subject: incorrect definition of no_undefined_flag on solaris?
Date: Fri, 23 Mar 2001 15:10:54 -0500 (EST)

Hi,

Currently Solaris has no_undefined_flag set to "-z text".  I'm trying to
compile ImageMagick 5.3 on Solaris, and there seems
to be a problem when creating a shareable library from code linking
against static libraries.

Here's the code being emitted:

=======================================================================

/bin/sh ../libtool --mode=link \
cc  -O  -L/proj/axaf/lib -L/proj/axaf/pkgs/hdf/sun4u-SunOS-5/lib \
-L/proj/axaf/lib/sun4u-SunOS-5 \
-R/proj/axaf/lib/sun4u-SunOS-5 -L/proj/axaf/lib/sparc-SunOS-5 \
-R/proj/axaf/lib/sparc-SunOS-5 \
-L/proj/axaf/pkgs/ImageMagick-5.3.0/sun4u-SunOS-5/lib
-L/usr/openwin/lib \
-R/usr/openwin/lib \
-o hdf.la \
-rpath 
/proj/axaf/pkgs/ImageMagick-5.3.0/sun4u-SunOS-5/lib/ImageMagick/modules/coders \
-no-undefined -module -avoid-version hdf.lo ../magick/libMagick.la -ldf -ljpeg 
-lz 

/usr/ccs/bin/ld -G -z text -h hdf.so -o .libs/hdf.so  .libs/hdf.o -z allextract 
\
/proj/axaf/lib/sparc-SunOS-5/libjpeg.a -z defaultextract \
-R/proj/axaf/import/imagemagick/ImageMagick-5.3.0/magick/.libs \
-R/proj/axaf/pkgs/ImageMagick-5.3.0/sun4u-SunOS-5/lib \
-R/proj/axaf/lib/sun4u-SunOS-5 -R/proj/axaf/lib/sparc-SunOS-5 \
-R/usr/openwin/lib  -L/proj/axaf/lib -L/proj/axaf/pkgs/hdf/sun4u-SunOS-5/lib \
-L/proj/axaf/lib/sun4u-SunOS-5 -L/proj/axaf/lib/sparc-SunOS-5 \
-L/proj/axaf/pkgs/ImageMagick-5.3.0/sun4u-SunOS-5/lib \
-L/usr/openwin/lib ../magick/.libs/libMagick.so -ldf \
/proj/axaf/lib/sparc-SunOS-5/libjpeg.a -lz  -lc 

Text relocation remains                         referenced
    against symbol                  offset      in file
tbbtprint                           0x17dc      
/proj/axaf/pkgs/hdf/sun4u-SunOS-5/lib/libdf.a(tbbt.o)

[add infinitum for about 1000 lines]

=======================================================================

This only seems to occur when there's a static library involved.

The offending part of the ld line is "-z text"  which, according to
the Solaris docs does this:

     -z text
           In dynamic mode only, forces  a  fatal  error  if  any
           relocations against non-writable, allocatable sections
           remain.


The "-z text" part comes from the definition in libtool for
no_undefined_flag.  I don't think this is the correct definition.
I believe it should be "-z defs".  From the Solaris docs:

     -z defs
           Forces a fatal error if any undefined  symbols  remain
           at  the  end  of the link. This is the default when an
           executable is built. It is also useful when building a
           shared  object  to  assure  that  the  object is self-
           contained, that is, that all its  symbolic  references
           are resolved internally.









reply via email to

[Prev in Thread] Current Thread [Next in Thread]