On Sun, 27 Jul 2003, Jon LaBadie wrote:
> On Mon, Jul 28, 2003 at 02:47:58AM +1000, Craig Dewick wrote:
> >
> > This might not be directly related to Amanda, but I've tried to build
> > the 2.4.4p1 source package using a natively-built gcc-3.3 installation
> > under Solaris 9 and it's failing at the same point each time I try
> > building from scratch using my regular Amanda source configuration script:
> >
> > ---- start ----
> >
> > source='genversion.c' object='genversion.o' libtool=no \
> > depfile='.deps/genversion.Po' tmpdepfile='.deps/genversion.TPo' \
> > depmode=gcc3 /bin/bash ../config/depcomp \
> > gcc -DHAVE_CONFIG_H -I. -I. -I../config -I./../regex-src
> > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> > -D_FILE_OFFSET_BITS=64 -g -O2 -c `test -f 'genversion.c' || echo
> > './'`genversion.c
> > /bin/bash ../libtool --mode=link gcc -D_LARGEFILE_SOURCE
> > -D_FILE_OFFSET_BITS=64 -g -O2
> > -L/usr/sfw/lib:/usr/openwin/lib:/usr/local/lib
> > -R/usr/sfw/lib:/usr/openwin/lib:/usr/local/lib -o genversion
> > genversion.o alloc.o clock.o debug.o error.o util.o file.o versuff.o -lgen
> > -ldb -ldb -lm -lreadline -ltermcap -lsocket -lnsl -lintl
> > gcc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -o genversion
> > genversion.o alloc.o clock.o debug.o error.o util.o file.o versuff.o
> > -L/usr/sfw/lib:/usr/openwin/lib:/usr/local/lib -lgen -ldb -lm -lreadline
> > -ltermcap -lsocket -lnsl -lintl
> > -R/usr/sfw/lib:/usr/openwin/lib:/usr/local/lib
> > rm -f version.c
> > ./genversion > version.c
> > ld.so.1: ./genversion: fatal: libgcc_s.so.1: open failed: No such file or
> > directory
> > gmake[1]: *** [version.c] Error 137
> > gmake[1]: Leaving directory `/home/azwan/amanda-2.4.4p1/common-src'
> > gmake: *** [all-recursive] Error 1
> >
> > ---- stop ----
> >
> > Is this something wrong in the Amanda source, or a more generic problem
> > relating to gcc? The library in question exists in /usr/local/lib and
> > /usr/local/lib/sparcv9, so could there be something wrong with the
> > genversion source? I don't use LD_LIBRARY_PATH but instead pass -L and R
> > linker flags to the compiler via the LDFLAGS environment variable (which I
> > standardise for all software I compile).
>
> It looks correct, but fails at genversion execution.
>
> It isn't a permissions problem on the lib is it?
I will check that. I used the pre-compiled gcc-3.3 from sunfreeware.com
and then built it again from source. The pre-comp packages were fully
uninstalled before the native-built compiler was installed, so there
should be no problems with files not being where they're supposed to be.
The file permissions on /usr/local/lib/libgcc_s.so.1 are 0644, and the
64-bit version of the library in /usr/local/lib/sparcv9 has the same
setting.
What is different though is that /usr/local/lib/libgcc_s.so is a symlink
to libgcc_s.so.1 in the same directory, while with the 64-bit version the
symlink is named /usr/local/lib/sparcv9/libgcc_s_sparcv9.so (pointing to
libgcc_s.so.1 in the same directory).
Still, the linker (Sun's - I don't have GNU's binutils package) should
look for the generic library though it could be looking for libgcc_s.so
instead of libgcc_s_sparv9.so in the /usr/local/lib/sparcv9 directory.
> Does 'ldd genversion' also report failure to find the lib?
Yes it does.
> How about a "file libgcc_s.so.1". Is it for the correct architecture?
> Be sure to check the one that ldd finds if it finds any.
394 root@lios #----> file /usr/local/lib/libgcc_s.so.1
/usr/local/lib/libgcc_s.so.1: ELF 32-bit MSB dynamic lib SPARC Version
1, dynamically linked, not stripped
'file' under Solaris doesn't report a filetype for the 64-bit version.
I might have a go at building and installing the GNU binutils package or
whatever it's called now and see if using GNU's linker works around the
problem. Anyone else had issues building under Solaris 9 with recent gcc
3.x versions?
Craig.
PS. SpamAssassin seems to have been catching some of the replies so if
you're getting bounces, I apologise. I've got sick of getting 95 percent
spam so now I'm dumping everything marked as spam after it's checked by
SA.
--
Email by Craig Dewick (tm). Home page at "lios.apana.org.au/~cdewick".
"cdewick AT spam.lios.apana.org DOT au" or "cdewick AT spam.sunshack
DOT org".
Explore and enjoy my public-domain Sun Microsystems technical data archive at
"www.sunshack.org", "www.sunshack.net" or "www.sunshack.info".
|