|
From: Jonathan D. <im...@ya...> - 2006-05-29 03:38:16
|
Interesting. It looks as though this might explain some other bugs people have reported with regards compiling on Solaris. From what you're describing, it looks like it is not inserting the right flags for 64-bit systems. (This is probably not related to the endian bug, as I've been able to reproduce that on systems that have no 32-bit libraries.) I'm probably going to end up having to test individual systems to see if the default flags are correct. I don't like that, because there are lots of systems out there and I'd rather have something that didn't need a specific hack for each one. (If anyone has a clean fix for this, let me know!) --- hle...@FH... wrote: > Hello! > > I such libmhash for Solaris-10. > A package is not avaible at > http://sunfreeware.com/indexsparc10.html > > I compile mhash (with any patches) now. > But libmhash compiled with 64-bit, but linked to > 32-bit Library. > (Details see Attachment 060524.mhash.m64 Error: > err_mhash_wrong_elf) > > Whats going wrong? > > regards Heiko > Launoc > > > 060524.mhash.m64 > - zu 060519.aide-0.11 ff. > > > compile mhash on solaris-10 64-bit > > > ------------------------------------------------------------------------ > - mhash > - req by aide > > > #VER="0.9.2" > VER="0.9.6" > > wget > http://heanet.dl.sourceforge.net/sourceforge/mhash/mhash-$VER.tar.gz > gunzip -c mhash-$VER.tar.gz | tar -xvf - > cd mhash-$VER > > ## - add patch mhash.mutils.false.patch > ## - add patch mhash.configure.64.patch > > ## - solaris not supported static-libs > #./configure --prefix=/usr --disable-static > ## - s. libdir-64 > ./configure --prefix=/usr --disable-static --libdir > /usr/lib/64 > > make clean > make > make install > cd .. > > -> Error: s. err_mhash_wrong_elf > > ------------------------------------------------------------------------ > - details > -------- > > > - patch mhash.mutils.false.patch > > ## diff -u include/mutils/mutils.h.org > include/mutils/mutils.h > f=/tmp/mhash.mutils.false.patch > cat > $f <<\EOF > --- include/mutils/mutils.h.org Tue Jan 10 04:25:16 > 2006 > +++ include/mutils/mutils.h Tue May 23 17:07:38 > 2006 > @@ -77,6 +77,18 @@ > > #endif > > +// fix Sol-10: > +// mhash.c:547: error: `false' undeclared (first > use in this function) > +// > http://sourceforge.net/mailarchive/message.php?msg_id=14682889 > + > +#ifndef false > +#define false 0 > +#endif > + > +#ifndef true > +#define true 1 > +#endif > + > #if defined(HAVE__BOOL) > > #define mutils_boolean _Bool > EOF > > cat $f | patch > > > ------------------------------------------------------------------------ > - patch mhash.configure.64.patch > > # diff -u configure.old configure > --- configure.old Wed Mar 15 20:41:39 2006 > +++ configure Wed May 24 16:01:38 2006 > @@ -2801,7 +2801,7 @@ > CFLAGS=$ac_save_CFLAGS > elif test $ac_cv_prog_cc_g = yes; then > if test "$GCC" = yes; then > - CFLAGS="-g -O2" > + CFLAGS="-m64 -L/lib/64 -L/usr/sfw/lib/64 -g > -O2" > else > CFLAGS="-g" > fi > > > > ------------------------------------------------------------------------ > - info libdir-64 > > ## using conftest.c mhash_get_block_size > nt1:root # /tmp/aide-0.11 # gcc -o conftest -g -O2 > conftest.c -lmhash -lz > ld: fatal: file /usr/lib/libmhash.so: wrong ELF > class: ELFCLASS64 > ld: fatal: File processing errors. No output written > to conftest > collect2: ld returned 1 exit status > nt1:root # /tmp/aide-0.11 # gcc -o conftest -m64 -g > -O2 conftest.c -lmhash -l > z > ld: fatal: library -lmhash: not found > ld: fatal: File processing errors. No output written > to conftest > collect2: ld returned 1 exit status > > nt1:root # /tmp/aide-0.11 # crle > > Default configuration file (/var/ld/ld.config) not > found > Default Library Path (ELF): /lib:/usr/lib > (system default) > Trusted Directories (ELF): > /lib/secure:/usr/lib/secure (system default) > nt1:root # /tmp/aide-0.11 # > > > nt1:root # /tmp/aide-0.11 # crle -64 > > Default configuration file (/var/ld/64/ld.config) > not found > Default Library Path (ELF): /lib/64:/usr/lib/64 > (system default) > Trusted Directories (ELF): > /lib/secure/64:/usr/lib/secure/64 (system defau > lt) > > -> compile with "-m64" > using libdir=/lib/64:/usr/lib/64 only > -> you must install lib-64 to /usr/lib/64 > and not to /usr/lib > -> using configure-switches: > # ./configure --prefix=/usr --disable-static > --libdir /usr/lib/64 > > ------------------- > # cd mhash-0.9.6 > # ./configure --prefix=/usr --disable-static > --libdir /usr/lib/64 > # make clean > # make > ... > gcc -m64 -g -O2 -o .libs/frag_test frag_test.o > -L/lib/64 -L/usr/sfw/lib/64 ../l > ib/.libs/libmhash.so -R/usr/lib/64 > ... > > > ------------------------------------------------------------------------ > - err_mhash_wrong_elf > > # LDFLAGS="-m64 -L/lib/64 -L/usr/sfw/lib/64" make > # ldd ./lib/.libs/libmhash.so.2.0.0 > libc.so.1 => /lib/64/libc.so.1 > libgcc_s.so.1 => > /usr/sfw/lib/libgcc_s.so.1 - wrong ELF class: > ELFCLASS32 > libm.so.2 => /lib/64/libm.so.2 > > /platform/SUNW,UltraAX-i2/lib/sparcv9/libc_psr.so.1 > > # file ./lib/.libs/libmhash.so.2.0.0 > ./lib/.libs/libmhash.so.2.0.0: ELF 64-bit MSB > dynamic lib SPARCV9 Version 1, dy > namically linked, not stripped > > -> libmhash 64-bit, but linked to 32-bit > > ------------------------------------------------------------------------ __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |