bug-libtool
[Top][All Lists]
Advanced

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

Options for 64 bit missing in linkmode during symbol table compilation


From: Dagobert Michelsen
Subject: Options for 64 bit missing in linkmode during symbol table compilation
Date: Fri, 11 Sep 2009 13:38:23 +0200

Hi,

I have a problem mit the current libtool provided by OpenLDAP 2.4.17 when
linking 64 bit. Obviously, the flags to turn on 64 bit compilation are
not passed (-xarch=v9 or -m64)

This is what the call looks like:

/bin/sh ../../libtool --mode=link /opt/studio/SOS11/SUNWspro/bin/cc - static -xO3 -xarch=v9 -xarch=v9 -L/opt/csw/lib/64 -dlopen self -o slapd main.o globals.o bconfig.o config.o daemon.o connection.o search.o filter.o add.o cr.o attr.o entry.o backend.o backends.o result.o operation.o dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o value.o ava.o bind.o unbind.o abandon.o filterentry.o phonetic.o acl.o str2filter.o aclparse.o init.o user.o lock.o controls.o extended.o passwd.o schema.o schema_check.o schema_init.o schema_prep.o schemaparse.o ad.o at.o mr.o syntax.o oc.o saslauthz.o oidm.o starttls.o index.o sets.o referral.o root_dse.o sasl.o module.o mra.o mods.o sl_malloc.o zn_malloc.o limits.o operational.o matchedValues.o cancel.o syncrepl.o backglue.o backover.o ctxcsn.o ldapsync.o frontend.o slapadd.o slapcat.o slapcommon.o slapdn.o slapindex.o slappasswd.o slaptest.o slapauth.o slapacl.o component.o aci.o alock.o txn.o slapschema.o version.o libbackends.a liboverlays.a ../../libraries/liblunicode/liblunicode.a ../../ libraries/librewrite/librewrite.a ../../libraries/liblutil/ liblutil.a ../../libraries/libldap_r/libldap_r.la ../../libraries/ liblber/liblber.la -lltdl -ldb-4.7 -lodbc -lslp -lssl - lcrypto -lresolv -lgen -lnsl -lsocket -lpthread \

mkdir .libs
rm -f .libs/slapd.nm .libs/slapd.nmS .libs/slapd.nmT
creating .libs/slapdS.c
(cd .libs && /opt/studio/SOS11/SUNWspro/bin/cc   -c "slapdS.c")
rm -f .libs/slapdS.c .libs/slapd.nm .libs/slapd.nmS .libs/slapd.nmT
/opt/studio/SOS11/SUNWspro/bin/cc -xO3 -xarch=v9 -xarch=v9 .libs/ slapdS.o -o slapd main.o globals.o bconfig.o config.o daemon.o connection.o search.o filter.o add.o cr.o attr.o entry.o backend.o backends.o result.o operation.o dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o value.o ava.o bind.o unbind.o abandon.o filterentry.o phonetic.o acl.o str2filter.o aclparse.o init.o user.o lock.o controls.o extended.o passwd.o schema.o schema_check.o schema_init.o schema_prep.o schemaparse.o ad.o at.o mr.o syntax.o oc.o saslauthz.o oidm.o starttls.o index.o sets.o referral.o root_dse.o sasl.o module.o mra.o mods.o sl_malloc.o zn_malloc.o limits.o operational.o matchedValues.o cancel.o syncrepl.o backglue.o backover.o ctxcsn.o ldapsync.o frontend.o slapadd.o slapcat.o slapcommon.o slapdn.o slapindex.o slappasswd.o slaptest.o slapauth.o slapacl.o component.o aci.o alock.o txn.o slapschema.o version.o -L/opt/csw/lib/64 libbackends.a liboverlays.a ../../ libraries/liblunicode/liblunicode.a ../../libraries/librewrite/ librewrite.a ../../libraries/liblutil/liblutil.a ../../libraries/ libldap_r/.libs/libldap_r.a /home/dam/mgar/pkg/openldap/trunk/work/ build-isa-sparcv9/openldap-2.4.17/libraries/liblber/.libs/ liblber.a ../../libraries/liblber/.libs/liblber.a -lltdl -ldb-4.7 / opt/csw/lib/sparcv9/libodbc.so -L/usr/lib/64 -ldl -liconv -lthread - lslp -lssl -lcrypto -lresolv -lgen -lnsl -lsocket -lpthread
ld: fatal: file .libs/slapdS.o: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to slapd


Executing libtool with -x reveals the wrong compiler call:

+ pic_flag_for_symtable=
+ echo '(cd .libs && /opt/studio/SOS11/SUNWspro/bin/cc -c "slapdS.c")'
(cd .libs && /opt/studio/SOS11/SUNWspro/bin/cc   -c "slapdS.c")
+ eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag $pic_flag_for_symtable "$dlsyms")'
++ cd .libs
++ /opt/studio/SOS11/SUNWspro/bin/cc -c slapdS.c
+ echo 'rm -f .libs/slapdS.c .libs/slapd.nm .libs/slapd.nmS .libs/ slapd.nmT'
rm -f .libs/slapdS.c .libs/slapd.nm .libs/slapd.nmS .libs/slapd.nmT
+ rm -f .libs/slapdS.c .libs/slapd.nm .libs/slapd.nmS .libs/slapd.nmT

Something like this seems to be needed, although I am pretty sure that I have
done it wrong:

          pic_flag_for_symtable=
          case $host in
          # compiling the symbol table file with pic_flag works around
          # a FreeBSD bug that causes programs to crash when -lm is
          # linked before any other PIC object.  But we must not use
          # pic_flag when linking with -static.  The problem exists in
          # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
          *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
            case "$compile_command " in
            *" -static "*) ;;
*) pic_flag_for_symtable=" $pic_flag - DFREEBSD_WORKAROUND";;
            esac;;
          *-*-hpux*)
            case "$compile_command " in
            *" -static "*) ;;
            *) pic_flag_for_symtable=" $pic_flag";;
            esac;;
          *-*-solaris*)                         <-- New lines
            LTCFLAGS="$compiler_flags"                <--
            ;;
          esac

It would be greate if you could do a permanent fix for this.


Best regards

  -- Dagobert





reply via email to

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