Hi. I am having getting log4cplus compile with Solaris Studio 12.3 compiler using Libtool 2.4.2, Autoconf 2.69 and Automake 1.12. The problems I am having is that despite configuration with --with-pic no -KPIC or -fPIC option is being passed to the compiler. (...some time passes...) I am not sure whose bug is this anymore. I have reduced the problem to the -v option that I was passing to the compiler, which was itself added by detection by configure.in. First the output configure script shows the problem: checking for /opt/solarisstudio12.3/bin/cc option to produce PIC... -KPIC -DPIC checking if /opt/solarisstudio12.3/bin/cc PIC flag -KPIC -DPIC works... yes checking if /opt/solarisstudio12.3/bin/cc static flag -Bstatic works... yes checking if /opt/solarisstudio12.3/bin/cc supports -c -o file.o... yes checking if /opt/solarisstudio12.3/bin/cc supports -c -o file.o... (cached) yes checking whether the /opt/solarisstudio12.3/bin/cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking how to run the C++ preprocessor... /opt/solarisstudio12.3/bin/CC -E checking whether the /opt/solarisstudio12.3/bin/CC linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking for /opt/solarisstudio12.3/bin/CC option to produce PIC... -KPIC -DPIC checking if /opt/solarisstudio12.3/bin/CC PIC flag -KPIC -DPIC works... no checking if /opt/solarisstudio12.3/bin/CC static flag -Bstatic works... no checking if /opt/solarisstudio12.3/bin/CC supports -c -o file.o... no checking if /opt/solarisstudio12.3/bin/CC supports -c -o file.o... (cached) no checking whether the /opt/solarisstudio12.3/bin/CC linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes As you can see above, for C compiler, the PIC support is detected fine. But for C++ compiler it says no. If I remove the -v option detection and the option is not present on the command line then PIC supports gets correctly detected for C++ compiler as well. Here is the interesting part from config.log showing the "result: no" (full log is attached): configure:17042: checking for /opt/solarisstudio12.3/bin/CC option to produce PIC configure:17049: result: -KPIC -DPIC configure:17057: checking if /opt/solarisstudio12.3/bin/CC PIC flag -KPIC -DPIC works configure:17075: /opt/solarisstudio12.3/bin/CC -c -L/lib/x86_64-linux-gnu/ -L/usr/lib/x86_64-linux-gnu/ -mt=yes -O -v -library=stlport4 -library=Crun -D_REENTRANT -KPIC -DPIC -DPIC conftest.cpp >&5 ### CC: Note: NLSPATH = /opt/solarisstudio12.3/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/solarisstudio12.3/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat ### command line files and options (expanded): ### -c -L/lib/x86_64-linux-gnu/ -L/usr/lib/x86_64-linux-gnu/ -mt=yes -O3 -v -library=Crun,stlport4 -D_REENTRANT -xcode=pic32 -DPIC -DPIC conftest.cpp /opt/solarisstudio12.3/prod/bin/ccfe -xarch=amd64 -D__SUNPRO_CC=0x5120 -D__unix -D__unix__ -Dlinux -D__linux -D__linux__ -D__gnu__linux__ "-D__builtin_expect(e,x)=e" -D__x86_64 -D__x86_64__ -D__amd64 -D__amd 64__ -D_LP64 -D__LP64__ -D__BUILTIN_VA_STRUCT -Dunix -D_REENTRANT -D__SUN_PREFETCH -D__SUNPRO_CC_COMPAT=5 -I-xbuiltin -I/opt/solarisstudio12.3/prod/lib/compilers/rtlibs/usr/include -I/opt/solarisstudio12.3/p rod/include/CC/stlport4 -I/opt/solarisstudio12.3/prod/include/CC -I/opt/solarisstudio12.3/prod/include/cc -D_REENTRANT -DPIC -DPIC -ptf /tmp/ccfe.1335561892.25089.04.%1.%2 -ptx /opt/solarisstudio12.3/prod/bi n/CC -ptk "-c -mt=yes -O3 -v -library=stlport4 -library=Crun -D_REENTRANT -xcode=pic32 -DPIC -DPIC " -compat=5 -instlib=/opt/solarisstudio12.3/prod/lib/stlport4/amd64/libstlport.a -xdbggen=no%stabs+dwarf2+us edonly -xF=%none -xbuiltin=%default -pic -xldscope=global -xivdep=loop -xdepend -O3 conftest.cpp -o /tmp/ccfe.1335561892.25089.01.ir -s /tmp/ccfe.1335561892.25089.02.sd 2> /tmp/ccfe.1335561892.25089.03.err /opt/solarisstudio12.3/prod/bin/iropt -Qy -O3 -fstore -xarch=sse2 -m64 -xchip=generic -xcache=generic -fsimple=0 -fstore -depend -mt -k -xbuiltin=%default -I -xprefetch=auto,explicit -xprefetch_level=1 -xpre fetch_auto_type=no%indirect_array_access -xvector=simd -F -o /tmp/iropt.1335561892.25089.05.ir -is /tmp/ccfe.1335561892.25089.02.sd /tmp/ccfe.1335561892.25089.01.ir 2> /tmp/iropt.1335561892.25089.06.err rm /tmp/ccfe.1335561892.25089.01.ir /opt/solarisstudio12.3/prod/bin/ir2hf -Qy -O3 -xbuiltin=%default -m64 /tmp/iropt.1335561892.25089.05.ir /tmp/ccfe.1335561892.25089.02.sd /tmp/ir2hf.1335561892.25089.07.hf rm /tmp/ccfe.1335561892.25089.02.sd rm /tmp/ccfe.1335561892.25089.03.err rm /tmp/iropt.1335561892.25089.05.ir rm /tmp/iropt.1335561892.25089.06.err /opt/solarisstudio12.3/prod/bin/ube -Qy -verbose -iropt -O3 -fstore -comdat -m64 -xarch=sse2 -xchip=generic -xcache=generic -fsimple=0 -ZW -fstore -PIC -xbuiltin=%default -xprefetch=auto,explicit -xprefetch_ level=1 -xthreadvar=dynamic -mt -fbe /opt/solarisstudio12.3/prod/bin/fbe -ipo conftest.o -S /tmp/ube.1335561892.25089.08.s /tmp/ir2hf.1335561892.25089.07.hf rm /tmp/ir2hf.1335561892.25089.07.hf /opt/solarisstudio12.3/prod/bin/fbe -Qy -xarch=amd64 -xchip=generic -warn=%none -o conftest.o /tmp/ube.1335561892.25089.08.s rm /tmp/ube.1335561892.25089.08.s configure:17079: $? = 0 configure:17092: result: no -- VZ
Attachment:
config.log.bad.txt.bz2
Description: application/bzip
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf