Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#28 libmcrypt-2.5.8 fails to build on Solaris 2.10 x86_64

Production/Stable
open
nobody
5
2013-08-06
2007-11-25
Bob
No

Configure fails to get all of the way through dies when configuring libltdl. Problem appears to be related to the passing of CFLAGS, LDFLAGS into the main configure script:

Main configure script is called as follows:

CFLAGS=-O2 -m64 -march=opteron -I/opt/include -L/opt/lib/amd64 -R/opt/lib/amd64 \ CXXFLAGS=-O2 -m64 -march=opteron -I/opt/include -L/opt/lib/amd64 -R/opt/lib/amd64 \ LDFLAGS=-m64 -L/opt/lib/amd64 -R/opt/lib/amd64 \ ./configure --prefix=/opt --disable-static \ --libdir=/opt/lib/amd64 --enable-dynamic-loading

All goes well until:

configure: configuring in libltdl
configure: running /bin/bash './configure' --prefix=/opt '--prefix=/opt' '--disable-static' '--libdir=/opt/lib/amd64' '--enable-dynamic-loading' 'CFLAGS=-O2 -m64 -march=opteron -I/opt/include -L/opt/lib/amd64 -R/opt/lib/amd64' 'CXXFLAGS=-O2 -m64 -march=opteron -I/opt/include -L/opt/lib/amd64 -R/opt/lib/amd64' 'LDFLAGS=-m64 -L/opt/lib/amd64 -R/opt/lib/amd64' --enable-ltdl-install --cache-file=/dev/null --srcdir=.
configure: warning: CFLAGS=-O2 -m64 -march=opteron -I/opt/include -L/opt/lib/amd64 -R/opt/lib/amd64: invalid host type
configure: warning: CXXFLAGS=-O2 -m64 -march=opteron -I/opt/include -L/opt/lib/amd64 -R/opt/lib/amd64: invalid host type
configure: error: can only configure for one host and one target at a time
configure: error: /bin/bash './configure' failed for libltdl

Strange complaint from the configure script in libltdl

When configure is run manually for libltdl it seems to work just fine:

cd libltdl
CFLAGS=-O2 -m64 -march=opteron -I/opt/include -L/opt/lib/amd64 -R/opt/lib/amd64 \ CXXFLAGS=-O2 -m64 -march=opteron -I/opt/include -L/opt/lib/amd64 -R/opt/lib/amd64 \ LDFLAGS=-m64 -L/opt/lib/amd64 -R/opt/lib/amd64 \ ./configure --prefix=/opt --disable-static \ --libdir=/opt/lib/amd64 --enable-dynamic-loading \ --enable-ltdl-install

checking for a BSD compatible install... /opt/bin/install -c
checking whether build environment is sane... yes
: :
updating cache /dev/null
creating ./config.status
creating Makefile
creating config.h

Finally even when manually getting the configure script run the build still fails to link the 64 bit objects for libltdl at:

/opt/bin/make all-recursive
make[1]: Entering directory /db/src/mcrypt/libmcrypt-2.5.8_64bit' Making all in libltdl make[2]: Entering directory/db/src/mcrypt/libmcrypt-2.5.8_64bit/libltdl'
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -O2 -m64 -march=opteron -I/opt/include -L/opt/lib/amd64 -R/opt/lib/amd64 -c ltdl.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I. -I. -O2 -m64 -march=opteron -I/opt/include -L/opt/lib/amd64 -R/opt/lib/amd64 -c ltdl.c -fPIC -o .libs/ltdl.o
/bin/sh ./libtool --mode=link gcc -O2 -m64 -march=opteron -I/opt/include -L/opt/lib/amd64 -R/opt/lib/amd64 -m64 -L/opt/lib/amd64 -R/opt/lib/amd64 -o libltdl.la -rpath /opt/lib/amd64 -no-undefined -version-info 4:0:1 ltdl.lo -ldl
creating reloadable object files...
creating a temporary reloadable object file: .libs/libltdl.la-1.o
/opt/i386-pc-solaris2.10/bin/ld -r -o .libs/libltdl.la-1.o .libs/ltdl.o
/opt/i386-pc-solaris2.10/bin/ld: Relocatable linking with relocations from format elf64-x86-64 (.libs/ltdl.o) to format elf32-i386 (.libs/libltdl.la-1.o) is not supported
make[2]: [libltdl.la] Error 1
make[2]: Leaving directory /db/src/mcrypt/libmcrypt-2.5.8_64bit/libltdl' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/db/src/mcrypt/libmcrypt-2.5.8_64bit'
make:
[all] Error 2

These same types of build problems go back to v2.5.7. Effectively the build process is completely broken when attempting to build 64 bit libraries.

Discussion

  • Bob
    Bob
    2007-12-04

    Logged In: YES
    user_id=1569123
    Originator: YES

    I can confirm that libmcrypt-2.5.8 will build both 64 bit and 32 bit libraries successfully on both SunOS 5.8 and 5.10 on sparc architectures however, the configure error for libltdl still occurs for both 32 and 64 bit builds even though it does not seem to have a negative effect onthe build process:

    configure: configuring in libltdl
    configure: running /bin/bash './configure' --prefix=/opt '--prefix=/opt' '--disable-static' '--libdir=/opt/lib/sparcv9' '--enable-dynamic-loading' 'CFLAGS=-O2 -m64 -mcpu=ultrasparc -I/opt/include -L/opt/lib/sparcv9 -R/opt/lib/sparcv9' 'CXXFLAGS=-O2 -m64 -mcpu=ultrasparc -I/opt/include -L/opt/lib/sparcv9 -R/opt/lib/sparcv9' 'LDFLAGS=-m64 -L/opt/lib/sparcv9 -R/opt/lib/sparcv9' --enable-ltdl-install=no --cache-file=/dev/null --srcdir=.
    configure: warning: CFLAGS=-O2 -m64 -mcpu=ultrasparc -I/opt/include -L/opt/lib/sparcv9 -R/opt/lib/sparcv9: invalid host type
    configure: warning: CXXFLAGS=-O2 -m64 -mcpu=ultrasparc -I/opt/include -L/opt/lib/sparcv9 -R/opt/lib/sparcv9: invalid host type
    configure: error: can only configure for one host and one target at a time
    configure: error: /bin/bash './configure' failed for libltdl

     
  • rlink
    rlink
    2008-04-02

    Logged In: YES
    user_id=1199759
    Originator: NO

    The libltdl errors result from autoconf 2.5x being incompatible with autoconf 2.1x.

    The top-level configure script is built with autoconf 2.5x, while the libltdl configure script is built with autoconf-2.1x. The top-level configure script incorrectly assumes that all subordinate configure scripts are also 2.5x and thus accept things like CC= and LDFLAGS= on the command line rather than passing them in the environment. Unfortunately, 2.1x configure scripts don't actually accept this, and throw the above warnings/errors.

    The workaround is to remove the configure script from the libltdl/ directory and run a post-2.50 autoconf there, then do your top-level configure.

    The fix is for this to be done in the distribution.

     
  • Randal Rioux
    Randal Rioux
    2009-05-27

    Same problem on Solaris 10 (SPARC) with the following configure line:

    ./configure CC="gcc -m64 -mcpu=ultrasparc" CXX="g++ -m64 -mcpu=ultrasparc" LDFLAGS="-R/usr/sfw/lib/sparcv9" --prefix=/usr/local/lib/libmcrypt --enable-dynamic-loading

    Has anything been checked into CVS that addresses this bug? I have some software that needs this (64-bit) but am stuck until I can get this to compile.

    Thanks,
    Randy

     
  • cgoubert
    cgoubert
    2011-01-06

    I confirm that the problem can be solved using rlink's procedure. Please fix the distribution.

    Thanks

     
  • Roger Collins
    Roger Collins
    2013-08-06

    I can confirm that this issue still exists in 2.5.8/Solaris10 and the fix is rerunning autoconf in the libltdl directory.

    This is an easy fix. Please add it to the distribution.

     
    Last edit: Roger Collins 2013-08-06