libtool
[Top][All Lists]
Advanced

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

Re: Link error for blahS.c when used in multiple GCC environment.


From: Brendon Costa
Subject: Re: Link error for blahS.c when used in multiple GCC environment.
Date: Tue, 03 Apr 2007 07:42:29 +1000
User-agent: Thunderbird 1.5.0.10 (Windows/20070221)

Ok, I installed libtool 1.5.23b and re-bootstrapped my example project.

I have since changed the place where GCC 4.0.1 is installed to avoid
confusion with my modified version:

GCC 3.3.3 prefix: /usr/
GCC 4.0.1 prefix: /home/bcosta/gcc/install/

set the environment variables:
export PATH=/home/bcosta/gcc/install/bin:$PATH
export LD_LIBRARY_PATH=/home/bcosta/gcc/install/lib:$LD_LIBRARY_PATH
export LDFLAGS=-L/home/bcosta/gcc/install/lib

re-ran configure:

mkdir -p /home/bcosta/gcc/example
cd /home/bcosta/gcc/example
../../dev/edoc/example/configure LDFLAGS=-L/home/bcosta/gcc/install/lib
2>&1 | tee out.txt


Giving configure output:

checking for doxygen... /usr/pkg/bin/doxygen
checking for perl... /usr/pkg/bin/perl
checking for dot... /usr/pkg/bin/dot
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking build system type... i386-unknown-netbsdelf3.0
checking host system type... i386-unknown-netbsdelf3.0
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... match_pattern
/lib[^/]+(\.so|_pic\.a)$
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared
libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... NetBSD ld.elf_so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared
libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared
libraries... yes
checking dynamic linker characteristics... NetBSD ld.elf_so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 static flag -static works... no
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/bin/ld) supports shared
libraries... yes
checking dynamic linker characteristics... NetBSD ld.elf_so
checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating src/apps/library_user/Makefile
config.status: creating src/apps/simple/Makefile
config.status: creating src/apps/function_pointer/Makefile
config.status: creating src/apps/virtual_function/Makefile
config.status: creating src/apps/Makefile
config.status: creating src/libs/myshared/Makefile
config.status: creating src/libs/mystatic/Makefile
config.status: creating src/libs/riddled/Makefile
config.status: creating src/libs/Makefile
config.status: creating src/plugins/myplugin/Makefile
config.status: creating src/plugins/Makefile
config.status: creating src/Makefile
config.status: creating docs/Makefile
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
configure: configuring in libltdl
configure: running /usr/pkg/bin/bash
'../../../dev/edoc/example/libltdl/configure' --prefix=/usr/local
'LDFLAGS=-L/home/bcosta/gcc/install/lib' --enable-ltdl-convenience
--cache-file=/dev/null --srcdir=../../../dev/edoc/example/libltdl
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p...
../../../dev/edoc/example/libltdl/./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking build system type... i386-unknown-netbsdelf3.0
checking host system type... i386-unknown-netbsdelf3.0
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... match_pattern
/lib[^/]+(\.so|_pic\.a)$
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared
libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... NetBSD ld.elf_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
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared
libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared
libraries... yes
checking dynamic linker characteristics... NetBSD ld.elf_so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 static flag -static works... no
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/bin/ld) supports shared
libraries... yes
checking dynamic linker characteristics... NetBSD ld.elf_so
checking how to hardcode library paths into programs... immediate
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking which extension is used for loadable modules... .so
checking which variable specifies run-time library path... LD_LIBRARY_PATH
checking for the default library search path... /lib /usr/lib
checking for objdir... .libs
checking whether libtool supports -dlopen/-dlpreopen... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen in -ldl... no
checking for dlerror... yes
checking for _ prefix in compiled symbols... no
checking whether deplibs are loaded by dlopen... yes
checking argz.h usability... no
checking argz.h presence... no
checking for argz.h... no
checking for error_t... no
checking for argz_append... no
checking for argz_create_sep... no
checking for argz_insert... no
checking for argz_next... no
checking for argz_stringify... no
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for memory.h... (cached) yes
checking for stdlib.h... (cached) yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for unistd.h... (cached) yes
checking dl.h usability... no
checking dl.h presence... no
checking for dl.h... no
checking sys/dl.h usability... no
checking sys/dl.h presence... no
checking for sys/dl.h... no
checking dld.h usability... no
checking dld.h presence... no
checking for dld.h... no
checking mach-o/dyld.h usability... no
checking mach-o/dyld.h presence... no
checking for mach-o/dyld.h... no
checking for string.h... (cached) yes
checking for strchr... yes
checking for strrchr... yes
checking for memcpy... yes
checking for memmove... yes
checking for strcmp... yes
checking for closedir... yes
checking for opendir... yes
checking for readdir... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands




./libtool --tag=CXX --config

# Libtool was configured on host server.costas.idx.com.au:

# Shell to use when invoking shell scripts.
SHELL="/usr/pkg/bin/bash"

# Whether or not to build shared libraries.
build_libtool_libs=yes

# Whether or not to build static libraries.
build_old_libs=yes

# Whether or not to add -lc for building shared libraries.
build_libtool_need_lc=yes

# Whether or not to disallow shared libs when runtime libs are static
allow_libtool_libs_with_static_runtimes=no

# Whether or not to optimize for fast installation.
fast_install=needless

# The host system.
host_alias=
host=i386-unknown-netbsdelf3.0
host_os=netbsdelf3.0

# The build system.
build_alias=
build=i386-unknown-netbsdelf3.0
build_os=netbsdelf3.0

# An echo program that does not interpret backslashes.
echo="echo"

# The archiver.
AR="ar"
AR_FLAGS="cru"

# A C compiler.
LTCC="gcc"

# LTCC compiler flags.
LTCFLAGS="-g -O2"

# A language-specific compiler.
CC="gcc"

# Is the compiler the GNU C compiler?
with_gcc=yes

# An ERE matcher.
EGREP="grep -E"

# The linker used to build libraries.
LD="/usr/bin/ld"

# Whether we need hard or soft links.
LN_S="ln -s"

# A BSD-compatible nm program.
NM="/usr/bin/nm -B"

# A symbol stripping program
STRIP="strip"

# Used to examine libraries when file_magic_cmd begins "file"
MAGIC_CMD=file

# Used on cygwin: DLL creation program.
DLLTOOL="dlltool"

# Used on cygwin: object dumper.
OBJDUMP="objdump"

# Used on cygwin: assembler.
AS="as"

# The name of the directory that contains temporary libtool files.
objdir=.libs

# How to create reloadable object files.
reload_flag=" -r"
reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"

# How to pass a linker flag through the compiler.
wl="-Wl,"

# Object file suffix (normally "o").
objext="o"

# Old archive suffix (normally "a").
libext="a"

# Shared library suffix (normally ".so").
shrext_cmds='.so'

# Executable file suffix (normally "").
exeext=""

# Additional compiler flags for building library objects.
pic_flag=" -fPIC -DPIC"
pic_mode=default

# What is the maximum length of a command?
max_cmd_len=196608

# Does compiler simultaneously support -c and -o options?
compiler_c_o="yes"

# Must we lock files when doing compilation?
need_locks="no"

# Do we need the lib prefix for modules?
need_lib_prefix=no

# Do we need a version for libraries?
need_version=no

# Whether dlopen is supported.
dlopen_support=yes

# Whether dlopen of programs is supported.
dlopen_self=yes

# Whether dlopen of statically linked programs is supported.
dlopen_self_static=no

# Compiler flag to prevent dynamic linking.
link_static_flag="-static"

# Compiler flag to turn off builtin functions.
no_builtin_flag=" -fno-builtin"

# Compiler flag to allow reflexive dlopens.
export_dynamic_flag_spec="\${wl}--export-dynamic"

# Compiler flag to generate shared objects directly from archives.
whole_archive_flag_spec="\${wl}--whole-archive\$convenience
\${wl}--no-whole-archive"

# Compiler flag to generate thread-safe objects.
thread_safe_flag_spec=""

# Library versioning type.
version_type=sunos

# Format of library name prefix.
libname_spec="lib\$name"

# List of archive names.  First name is the real one, the rest are links.
# The last name is the one that the linker finds with -lNAME.
library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix
\${libname}\${release}\${shared_ext}\$major \${libname}\${shared_ext}"

# The coded name of the library, if different from the real name.
soname_spec="\${libname}\${release}\${shared_ext}\$major"

# Commands used to build and install an old-style archive.
RANLIB="ranlib"
old_archive_cmds="\$AR \$AR_FLAGS
\$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
old_postuninstall_cmds=""

# Create an old-style archive from a shared archive.
old_archive_from_new_cmds=""

# Create a temporary old-style archive to link instead of a shared archive.
old_archive_from_expsyms_cmds=""

# Commands used to build and install a shared archive.
archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags
\${wl}-soname \$wl\$soname -o \$lib"
archive_expsym_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags
\${wl}-soname \$wl\$soname \${wl}-retain-symbols-file
\$wl\$export_symbols -o \$lib"
postinstall_cmds=""
postuninstall_cmds=""

# Commands used to build a loadable module (assumed same as above if empty)
module_cmds=""
module_expsym_cmds=""

# Commands to strip libraries.
old_striplib="strip --strip-debug"
striplib="strip --strip-unneeded"

# Dependencies to place before the objects being linked to create a
# shared library.
predep_objects=""

# Dependencies to place after the objects being linked to create a
# shared library.
postdep_objects=""

# Dependencies to place before the objects being linked to create a
# shared library.
predeps=""

# Dependencies to place after the objects being linked to create a
# shared library.
postdeps=""

# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=""

# Method to check whether dependent libraries are shared objects.
deplibs_check_method="match_pattern /lib[^/]+(\\.so|_pic\\.a)\$"

# Command to use when deplibs_check_method == file_magic.
file_magic_cmd="\$MAGIC_CMD"

# Flag that allows shared libraries with undefined symbols to be built.
allow_undefined_flag=""

# Flag that forces no undefined symbols.
no_undefined_flag=""

# Commands used to finish a libtool library installation in a directory.
finish_cmds=""

# Same as above, but a single script fragment to be evaled but not shown.
finish_eval=""

# Take the output of nm and produce a listing of raw symbols and C names.
global_symbol_pipe="sed -n -e 's/^.*[
]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[       ][
]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"

# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"

# Transform the output of nm in a C name address pair
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/
{\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^
]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'"

# This is the shared library runtime path variable.
runpath_var=LD_RUN_PATH

# This is the shared library path variable.
shlibpath_var=LD_LIBRARY_PATH

# Is shlibpath searched before the hard-coded library search path?
shlibpath_overrides_runpath=yes

# How to hardcode a shared library path into an executable.
hardcode_action=immediate

# Whether we should hardcode library paths into libraries.
hardcode_into_libs=yes

# Flag to hardcode $libdir into a binary during linking.
# This must work even if $libdir does not exist.
hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"

# If ld is used when linking, flag to hardcode $libdir into
# a binary during linking. This must work even if $libdir does
# not exist.
hardcode_libdir_flag_spec_ld=""

# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator=""

# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
# resulting binary.
hardcode_direct=no

# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L=no

# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
# the resulting binary.
hardcode_shlibpath_var=unsupported

# Set to yes if building a shared library automatically hardcodes DIR
into the library
# and all subsequent libraries and executables linked against it.
hardcode_automatic=no

# Variables whose values should be saved in libtool wrapper scripts and
# restored at relink time.
variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH
GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"

# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=unknown

# Compile-time system search path for libraries
sys_lib_search_path_spec="/home/bcosta/gcc/install/lib/gcc/i386-unknown-netbsdelf3.0/4.0.1
/home/bcosta/gcc/install/lib /lib /usr/lib"

# Run-time system search path for libraries
sys_lib_dlsearch_path_spec="/lib /usr/lib"

# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""

# Set to yes if exported symbols are required.
always_export_symbols=no

# The commands to list exported symbols.
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe
| \$SED 's/.* //' | sort | uniq > \$export_symbols"

# The commands to extract the exported symbol list from a shared archive.
extract_expsyms_cmds=""

# Symbols that should not be listed in the preloaded symbols.
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"

# Symbols that must always be exported.
include_expsyms=""

# ### BEGIN LIBTOOL TAG CONFIG: CXX

# Libtool was configured on host server.costas.idx.com.au:

# Shell to use when invoking shell scripts.
SHELL="/usr/pkg/bin/bash"

# Whether or not to build shared libraries.
build_libtool_libs=yes

# Whether or not to build static libraries.
build_old_libs=yes

# Whether or not to add -lc for building shared libraries.
build_libtool_need_lc=no

# Whether or not to disallow shared libs when runtime libs are static
allow_libtool_libs_with_static_runtimes=no

# Whether or not to optimize for fast installation.
fast_install=needless

# The host system.
host_alias=
host=i386-unknown-netbsdelf3.0
host_os=netbsdelf3.0

# The build system.
build_alias=
build=i386-unknown-netbsdelf3.0
build_os=netbsdelf3.0

# An echo program that does not interpret backslashes.
echo="echo"

# The archiver.
AR="ar"
AR_FLAGS="cru"

# A C compiler.
LTCC="gcc"

# LTCC compiler flags.
LTCFLAGS="-g -O2"

# A language-specific compiler.
CC="g++"

# Is the compiler the GNU C compiler?
with_gcc=yes

# An ERE matcher.
EGREP="grep -E"

# The linker used to build libraries.
LD="/usr/bin/ld"

# Whether we need hard or soft links.
LN_S="ln -s"

# A BSD-compatible nm program.
NM="/usr/bin/nm -B"

# A symbol stripping program
STRIP="strip"

# Used to examine libraries when file_magic_cmd begins "file"
MAGIC_CMD=file

# Used on cygwin: DLL creation program.
DLLTOOL="dlltool"

# Used on cygwin: object dumper.
OBJDUMP="objdump"

# Used on cygwin: assembler.
AS="as"

# The name of the directory that contains temporary libtool files.
objdir=.libs

# How to create reloadable object files.
reload_flag=" -r"
reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"

# How to pass a linker flag through the compiler.
wl="-Wl,"

# Object file suffix (normally "o").
objext="o"

# Old archive suffix (normally "a").
libext="a"

# Shared library suffix (normally ".so").
shrext_cmds='.so'

# Executable file suffix (normally "").
exeext=""

# Additional compiler flags for building library objects.
pic_flag=" -fPIC -DPIC"
pic_mode=default

# What is the maximum length of a command?
max_cmd_len=196608

# Does compiler simultaneously support -c and -o options?
compiler_c_o="yes"

# Must we lock files when doing compilation?
need_locks="no"

# Do we need the lib prefix for modules?
need_lib_prefix=no

# Do we need a version for libraries?
need_version=no

# Whether dlopen is supported.
dlopen_support=yes

# Whether dlopen of programs is supported.
dlopen_self=yes

# Whether dlopen of statically linked programs is supported.
dlopen_self_static=no

# Compiler flag to prevent dynamic linking.
link_static_flag="-static"

# Compiler flag to turn off builtin functions.
no_builtin_flag=" -fno-builtin"

# Compiler flag to allow reflexive dlopens.
export_dynamic_flag_spec="\${wl}--export-dynamic"

# Compiler flag to generate shared objects directly from archives.
whole_archive_flag_spec="\${wl}--whole-archive\$convenience
\${wl}--no-whole-archive"

# Compiler flag to generate thread-safe objects.
thread_safe_flag_spec=""

# Library versioning type.
version_type=sunos

# Format of library name prefix.
libname_spec="lib\$name"

# List of archive names.  First name is the real one, the rest are links.
# The last name is the one that the linker finds with -lNAME.
library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix
\${libname}\${release}\${shared_ext}\$major \${libname}\${shared_ext}"

# The coded name of the library, if different from the real name.
soname_spec="\${libname}\${release}\${shared_ext}\$major"

# Commands used to build and install an old-style archive.
RANLIB="ranlib"
old_archive_cmds="\$AR \$AR_FLAGS
\$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
old_postuninstall_cmds=""

# Create an old-style archive from a shared archive.
old_archive_from_new_cmds=""

# Create a temporary old-style archive to link instead of a shared archive.
old_archive_from_expsyms_cmds=""

# Commands used to build and install a shared archive.
archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs
\$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname
-o \$lib"
archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs
\$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname
\${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
postinstall_cmds=""
postuninstall_cmds=""

# Commands used to build a loadable module (assumed same as above if empty)
module_cmds=""
module_expsym_cmds=""

# Commands to strip libraries.
old_striplib="strip --strip-debug"
striplib="strip --strip-unneeded"

# Dependencies to place before the objects being linked to create a
# shared library.
predep_objects="/usr/lib/crti.o
/home/bcosta/gcc/install/lib/gcc/i386-unknown-netbsdelf3.0/4.0.1/crtbeginS.o"

# Dependencies to place after the objects being linked to create a
# shared library.
postdep_objects="/home/bcosta/gcc/install/lib/gcc/i386-unknown-netbsdelf3.0/4.0.1/crtendS.o
/usr/lib/crtn.o"

# Dependencies to place before the objects being linked to create a
# shared library.
predeps=""

# Dependencies to place after the objects being linked to create a
# shared library.
postdeps="-lstdc++ -lm"

# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path="-L/home/bcosta/gcc/install/lib/gcc/i386-unknown-netbsdelf3.0/4.0.1
-L/home/bcosta/gcc/install/lib/gcc/i386-unknown-netbsdelf3.0/4.0.1/../../.."

# Method to check whether dependent libraries are shared objects.
deplibs_check_method="match_pattern /lib[^/]+(\\.so|_pic\\.a)\$"

# Command to use when deplibs_check_method == file_magic.
file_magic_cmd="\$MAGIC_CMD"

# Flag that allows shared libraries with undefined symbols to be built.
allow_undefined_flag=""

# Flag that forces no undefined symbols.
no_undefined_flag=""

# Commands used to finish a libtool library installation in a directory.
finish_cmds=""

# Same as above, but a single script fragment to be evaled but not shown.
finish_eval=""

# Take the output of nm and produce a listing of raw symbols and C names.
global_symbol_pipe="sed -n -e 's/^.*[
]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[       ][
]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"

# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"

# Transform the output of nm in a C name address pair
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/
{\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^
]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'"

# This is the shared library runtime path variable.
runpath_var=LD_RUN_PATH

# This is the shared library path variable.
shlibpath_var=LD_LIBRARY_PATH

# Is shlibpath searched before the hard-coded library search path?
shlibpath_overrides_runpath=yes

# How to hardcode a shared library path into an executable.
hardcode_action=immediate

# Whether we should hardcode library paths into libraries.
hardcode_into_libs=yes

# Flag to hardcode $libdir into a binary during linking.
# This must work even if $libdir does not exist.
hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"

# If ld is used when linking, flag to hardcode $libdir into
# a binary during linking. This must work even if $libdir does
# not exist.
hardcode_libdir_flag_spec_ld=""

# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator=""

# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
# resulting binary.
hardcode_direct=no

# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L=no

# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
# the resulting binary.
hardcode_shlibpath_var=unsupported

# Set to yes if building a shared library automatically hardcodes DIR
into the library
# and all subsequent libraries and executables linked against it.
hardcode_automatic=no

# Variables whose values should be saved in libtool wrapper scripts and
# restored at relink time.
variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH
GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"

# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=unknown

# Compile-time system search path for libraries
sys_lib_search_path_spec="/home/bcosta/gcc/install/lib/gcc/i386-unknown-netbsdelf3.0/4.0.1
/home/bcosta/gcc/install/lib /lib /usr/lib"

# Run-time system search path for libraries
sys_lib_dlsearch_path_spec="/lib /usr/lib"

# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""

# Set to yes if exported symbols are required.
always_export_symbols=no

# The commands to list exported symbols.
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe
| \$SED 's/.* //' | sort | uniq > \$export_symbols"

# The commands to extract the exported symbol list from a shared archive.
extract_expsyms_cmds=""

# Symbols that should not be listed in the preloaded symbols.
exclude_expsyms=""

# Symbols that must always be exported.
include_expsyms=""

# ### END LIBTOOL TAG CONFIG: CXX






Then compiled the project:

gmake
... lots of output...

Making all in library_user
gmake[4]: Entering directory
`/home/bcosta/gcc/example/src/apps/library_user'
if g++ -DHAVE_CONFIG_H -I.
-I../../../../../dev/edoc/example/src/apps/library_user -I../../..
-I../../.. -I../../../../../dev/edoc/example/src/include
-I../../../../../dev/edoc/example/libltdl
-DBJC_LIBEXECDIR=\"/usr/local/libexec\" -DBJC_LIBDIR=\"/usr/local/lib\"
  -g -O2 -MT library_user-main.o -MD -MP -MF
".deps/library_user-main.Tpo" -c -o library_user-main.o `test -f
'main.cpp' || echo
'../../../../../dev/edoc/example/src/apps/library_user/'`main.cpp; \
then mv -f ".deps/library_user-main.Tpo" ".deps/library_user-main.Po";
else rm -f ".deps/library_user-main.Tpo"; exit 1; fi
/usr/pkg/bin/bash ../../../libtool --tag=CXX --mode=link g++  -g -O2
-L/home/bcosta/gcc/install/lib -o library_user  library_user-main.o
../../../src/libs/myshared/libmyshared.la
../../../src/libs/mystatic/libmystatic.la ../../../libltdl/libltdlc.la
-dlopen ../../../src/plugins/myplugin/myplugin.la
mkdir .libs
rm -f .libs/library_user.nm .libs/library_user.nmS .libs/library_user.nmT
creating .libs/library_userS.c
extracting global C symbols from
`../../../src/plugins/myplugin/.libs/myplugin.a'
extracting global C symbols from
`/home/bcosta/gcc/example/src/libs/mystatic/.libs/libmystatic.a'
extracting global C symbols from `/home/bcosta/gcc/install/lib/libstdc++.a'
(cd .libs && gcc -c -fno-builtin "library_userS.c")
rm -f .libs/library_userS.c .libs/library_user.nm .libs/library_user.nmS
.libs/library_user.nmT
g++ -g -O2 -o .libs/library_user library_user-main.o
.libs/library_userS.o  -L/home/bcosta/gcc/install/lib
-L/home/bcosta/gcc/build/i386-unknown-netbsdelf3.0/libstdc++-v3/src
-L/home/bcosta/gcc/build/i386-unknown-netbsdelf3.0/libstdc++-v3/src/.libs
-L/home/bcosta/gcc/build/gcc
../../../src/plugins/myplugin/.libs/myplugin.a
/home/bcosta/gcc/example/src/libs/mystatic/.libs/libmystatic.a -lm
../../../src/libs/myshared/.libs/libmyshared.so
../../../src/libs/mystatic/.libs/libmystatic.a
/home/bcosta/gcc/install/lib/libstdc++.so
../../../libltdl/.libs/libltdlc.a -Wl,--rpath -Wl,/usr/local/lib
-Wl,--rpath -Wl,/home/bcosta/gcc/install/lib
.libs/library_userS.o(.rodata+0x8414): undefined reference to
`__gnu_internal::palloc_init_mutex'
.libs/library_userS.o(.rodata+0x841c): undefined reference to
`__gnu_cxx::__pool_alloc_base::_S_end_free'
.libs/library_userS.o(.rodata+0x842c): undefined reference to
`__gnu_cxx::__pool_alloc_base::_S_free_list'
.libs/library_userS.o(.rodata+0x8434): undefined reference to
`__gnu_cxx::__pool_alloc_base::_S_heap_size'
.libs/library_userS.o(.rodata+0x843c): undefined reference to
`__gnu_cxx::__pool_alloc_base::_S_start_free'
.libs/library_userS.o(.rodata+0x844c): undefined reference to
`__gnu_cxx::__pool_alloc_base::_M_allocate_chunk(unsigned int, int&)'
.libs/library_userS.o(.rodata+0x845c): undefined reference to
`__gnu_internal::freelist_key'
.libs/library_userS.o(.rodata+0x8464): undefined reference to
`__gnu_internal::freelist_mutex'
.libs/library_userS.o(.rodata+0x860c): undefined reference to
`__gnu_debug::_S_debug_messages'

... many more link errors ...



Ralf Wildenhues wrote:
> Hello Brendon,
> 
> * Brendon Costa wrote on Sat, Mar 31, 2007 at 03:53:12AM CEST:
>> I am having troubles linking an application in a project that uses
>> libtool in an environment that has two versions of the GCC compiler.
> [...]
>> When i want to build using the development GCC i do the following:
>>
>> export PATH="/home/bcosta/build/install_gcc/bin:$PATH"
>> export LD_LIBRARY_PATH="/home/bcosta/build/install_gcc/lib:$LD_LIBRARY_PATH"
> 
> Did you do this before running configure?  Please post the configure
> output, and
>   ./libtool --tag=CXX --config
>   
> Could you also please try adding this to the configure args:
>   ./configure LDFLAGS=-L/home/bcosta/build/install_gcc/lib
> 
> and see how it fares (i.e., again post the --config output as above, and
> try to build)?
> 
>> I am using libtool version: 1.5.18
> 
> Well, if you want to try out 1.5.23b, that would be of help, too;
> however, I don't see anything jumping right at me that we changed
> that would fix this.
> 
> Thanks,
> Ralf
> 
> 
> 
> 






reply via email to

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