X-Loop: help-debbugs@HIDDEN Subject: bug#9095: libtool is picking the wrong path for dependent libraries Resent-From: Roger Nichols <rnichols@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-To: owner <at> debbugs.gnu.org Resent-CC: bug-libtool@HIDDEN Resent-Date: Sat, 16 Jul 2011 03:07:01 +0000 Resent-Message-ID: <handler.9095.B.131078557410331 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 9095 X-GNU-PR-Package: libtool X-GNU-PR-Keywords: To: 9095 <at> debbugs.gnu.org X-Debbugs-Original-To: <bug-libtool@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.131078557410331 (code B ref -1); Sat, 16 Jul 2011 03:07:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Jul 2011 03:06:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1QhvCn-0002gZ-Fg for submit <at> debbugs.gnu.org; Fri, 15 Jul 2011 23:06:14 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <rnichols@HIDDEN>) id 1Qhv5Z-0002Vi-Co for submit <at> debbugs.gnu.org; Fri, 15 Jul 2011 22:58:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <rnichols@HIDDEN>) id 1Qhv5S-0000JP-FU for submit <at> debbugs.gnu.org; Fri, 15 Jul 2011 22:58:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:40308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rnichols@HIDDEN>) id 1Qhv5S-0000JH-Du for submit <at> debbugs.gnu.org; Fri, 15 Jul 2011 22:58:38 -0400 Received: from eggs.gnu.org ([140.186.70.92]:54840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <rnichols@HIDDEN>) id 1Qhv5Q-0000LK-DM for bug-libtool@HIDDEN; Fri, 15 Jul 2011 22:58:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <rnichols@HIDDEN>) id 1Qhv5O-0000Iw-8h for bug-libtool@HIDDEN; Fri, 15 Jul 2011 22:58:36 -0400 Received: from iris-63.mc.com ([63.96.239.141]:52014 helo=chm-mail.mc.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rnichols@HIDDEN>) id 1Qhv5O-0000Is-32 for bug-libtool@HIDDEN; Fri, 15 Jul 2011 22:58:34 -0400 Received: from chm-cashub1.ad.mc.com (exchange [172.18.12.34]) by chm-mail.mc.com (8.13.8+Sun/8.13.8) with ESMTP id p6G2wW6q008740 for <bug-libtool@HIDDEN>; Fri, 15 Jul 2011 22:58:32 -0400 (EDT) Received: from lx-rnichols1 (172.18.252.226) by chm-cashub1.ad.mc.com (172.18.12.34) with Microsoft SMTP Server id 8.2.254.0; Fri, 15 Jul 2011 22:58:31 -0400 Date: Fri, 15 Jul 2011 22:58:26 -0400 From: Roger Nichols <rnichols@HIDDEN> Message-ID: <20110715225826.49b910cb@lx-rnichols1> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.18.3; i486-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.6 (------) X-Mailman-Approved-At: Fri, 15 Jul 2011 23:06:12 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.6 (------) hi, i dont know if i have a bug, or user error. i am cross compiling openhpi (and openipmi) into a root file system. the libtool command does not have the build host system's libraries in the -L arguments, yet the libraries are explicitly pathed to the build host's versions. even if i use --with-openipmi=/path/to/openipmi, since the libs are added to the link line with -L -l -l, libtool seems to search for the libs and explicitly path them. is this a bug? or how do i get libtool to use the cross compiled libraries? here is the libtool command, and the resultant link line. (the spacing is mine so i could see what was happening. the output's order _is_ preserved.) thanks for your help --roger /bin/sh ../../libtool --tag=CC --mode=link /opt/timesys/toolchains/ppc86xx-linux/bin/ppc86xx-linux-gcc -m32 -mhard-float -mmultiple -mno-string -mcpu=7450 -O0 -D_REENTRANT -I/opt/timesys/toolchains/ppc86xx-linux/powerpc-timesys-linux-gnu/include/glib-2.0 -I/opt/timesys/toolchains/ppc86xx-linux/powerpc-timesys-linux-gnu/lib/glib-2.0/include -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-format-y2k -Wcast-qual -Wcast-align -Wno-strict-aliasing -Wno-unused-value -Werror -D_GNU_SOURCE -D_REENTRANT -fexceptions -I/opt/timesys/toolchains/ppc86xx-linux/powerpc-timesys-linux-gnu/include -m32 -mhard-float -mmultiple -mno-string -mcpu=7450 -O0 -D_REENTRANT -I/opt/timesys/toolchains/ppc86xx-linux/powerpc-timesys-linux-gnu/include/glib-2.0 -I/opt/timesys/toolchains/ppc86xx-linux/powerpc-timesys-linux-gnu/lib/glib-2.0/include -Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wformat=2 -Wformat-security -Wformat-nonliteral -Wno-format-y2k -Wcast-qual -Wcast-align -Wno-strict-aliasing -Wno-unused-value -Werror -D_GNU_SOURCE -D_REENTRANT -fexceptions -module -version-info 12:2:10 -export-dymanic ./ipmi.sym -L/opt/timesys/toolchains/ppc86xx-linux/powerpc-timesys-linux-gnu/lib -L/home/rnichols/rnichols_gen3p/build_output/PS7100_TOS/openhpi/linux-MPC8641D/install/usr/lib -o libipmi.la -rpath /usr/lib/openhpi ipmi.lo ipmi_close.lo ipmi_connection.lo ipmi_event.lo ipmi_entity_event.lo ipmi_mc_event.lo ipmi_inventory_event.lo ipmi_sensor_event.lo ipmi_control_event.lo ipmi_entity.lo ipmi_sensor.lo ipmi_sel.lo ipmi_inventory.lo ipmi_controls.lo ipmi_util.lo ipmi_drv.lo hotswap.lo sync.lo posix_vlog.lo atca_shelf_rdrs.lo atca_slot_rdrs.lo atca_vshm_rdrs.lo atca_fru_rdrs.lo atca_shelf_fru.lo ../../utils/libopenhpiutils.la -luuid -lncurses -lOpenIPMI -lOpenIPMIposix -L/opt/timesys/toolchains/ppc86xx-linux/powerpc-timesys-linux-gnu/lib -lOpenIPMIutils -lOpenIPMI -lltdl -L/opt/timesys/toolchains/ppc86xx-linux/powerpc-timesys-linux-gnu/lib -lgthread-2.0 -lpthread -lrt -lglib-2.0 -lm -lpthread libtool: link: warning: `/home/rnichols/rnichols_gen3p/build_output/PS7100_TOS/openhpi/linux-MPC8641D/install/usr/lib/libOpenIPMIutils.la' seems to be moved libtool: link: warning: `/home/rnichols/rnichols_gen3p/build_output/PS7100_TOS/openhpi/linux-MPC8641D/install/usr/lib/libOpenIPMIutils.la' seems to be moved /opt/timesys/toolchains/ppc86xx-linux/bin/ppc86xx-linux-gcc -shared .libs/ipmi.o .libs/ipmi_close.o .libs/ipmi_connection.o .libs/ipmi_event.o .libs/ipmi_entity_event.o .libs/ipmi_mc_event.o .libs/ipmi_inventory_event.o .libs/ipmi_sensor_event.o .libs/ipmi_control_event.o .libs/ipmi_entity.o .libs/ipmi_sensor.o .libs/ipmi_sel.o .libs/ipmi_inventory.o .libs/ipmi_controls.o .libs/ipmi_util.o .libs/ipmi_drv.o .libs/hotswap.o .libs/sync.o .libs/posix_vlog.o .libs/atca_shelf_rdrs.o .libs/atca_slot_rdrs.o .libs/atca_vshm_rdrs.o .libs/atca_fru_rdrs.o .libs/atca_shelf_fru.o -Wl,--rpath -Wl,/home/rnichols/rnichols_gen3p/build_output/PS7100_TOS/openhpi/linux-MPC8641D/openhpi-2.10.2/utils/.libs -Wl,--rpath -Wl,/usr/lib -L/opt/timesys/toolchains/ppc86xx-linux/powerpc-timesys-linux-gnu/lib -L/home/rnichols/rnichols_gen3p/build_output/PS7100_TOS/openhpi/linux-MPC8641D/install/usr/lib ../../utils/.libs/libopenhpiutils.so -luuid -lncurses /usr/lib/libOpenIPMIposix.so /usr/lib/libOpenIPMIutils.so /usr/lib/libOpenIPMI.so -lltdl -lgthread-2.0 -lrt -lglib-2.0 -lm -lpthread -m32 -mhard-float -mmultiple -mno-string -mcpu=7450 -m32 -mhard-float -mmultiple -mno-string -mcpu=7450 -Wl,-soname -Wl,libipmi.so.2 -o .libs/libipmi.so.2.10.2 /usr/lib/libOpenIPMIposix.so: could not read symbols: File in wrong format $ ./libtool --version ltmain.sh (GNU libtool) 1.5.24 (1.1220.2.456 2007/06/24 02:25:32) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ ./libtool --config link # Libtool was configured on host williams: # Shell to use when invoking shell scripts. SHELL="/bin/sh" # 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=yes # The host system. host_alias=powerpc-linux host=powerpc-unknown-linux-gnu host_os=linux-gnu # The build system. build_alias= build=x86_64-unknown-linux-gnu build_os=linux-gnu # An echo program that does not interpret backslashes. echo="echo" # The archiver. AR="/opt/timesys/toolchains/ppc86xx-linux/bin/ppc86xx-linux-ar" AR_FLAGS="cru" # A C compiler. LTCC="/opt/timesys/toolchains/ppc86xx-linux/bin/ppc86xx-linux-gcc" # LTCC compiler flags. LTCFLAGS="-m32 -mhard-float -mmultiple -mno-string -mcpu=7450 -O0" # A language-specific compiler. CC="/opt/timesys/toolchains/ppc86xx-linux/bin/ppc86xx-linux-gcc" # Is the compiler the GNU C compiler? with_gcc=yes # An ERE matcher. EGREP="/bin/grep -E" # The linker used to build libraries. LD="/opt/timesys/toolchains/ppc86xx-linux/bin/ppc86xx-linux-ld" # Whether we need hard or soft links. LN_S="ln -s" # A BSD-compatible nm program. NM="nm" # A symbol stripping program STRIP="/opt/timesys/toolchains/ppc86xx-linux/bin/ppc86xx-linux-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="/opt/timesys/toolchains/ppc86xx-linux/bin/ppc86xx-linux-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=98304 # 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=unknown # Whether dlopen of statically linked programs is supported. dlopen_self_static=unknown # 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=linux # 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="/opt/timesys/toolchains/ppc86xx-linux/bin/ppc86xx-linux-ranlib" old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$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="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~ cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~ \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~ \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -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="/opt/timesys/toolchains/ppc86xx-linux/bin/ppc86xx-linux-strip --strip-debug" striplib="/opt/timesys/toolchains/ppc86xx-linux/bin/ppc86xx-linux-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="pass_all" # 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="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" # 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=no # 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="/opt/timesys/toolchains/lib/gcc/powerpc-timesys-linux-gnu/4.2.1/74xx /opt/timesys/toolchains/powerpc-timesys-linux-gnu/lib/74xx /opt/timesys/toolchains/lib/gcc/powerpc-timesys-linux-gnu/4.2.1 /opt/timesys/toolchains/powerpc-timesys-linux-gnu/lib /opt/timesys/toolchains/powerpc-timesys-linux-gnu/libc/74xx/lib /opt/timesys/toolchains/powerpc-timesys-linux-gnu/libc/74xx/usr/lib" # Run-time system search path for libraries sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/qt-3.3/lib /usr/lib64/qt-3.3/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=""
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Roger Nichols <rnichols@HIDDEN> Subject: bug#9095: Acknowledgement (libtool is picking the wrong path for dependent libraries) Message-ID: <handler.9095.B.131078557410331.ack <at> debbugs.gnu.org> References: <20110715225826.49b910cb@lx-rnichols1> X-Gnu-PR-Message: ack 9095 X-Gnu-PR-Package: libtool Reply-To: 9095 <at> debbugs.gnu.org Date: Sat, 16 Jul 2011 03:07:02 +0000 Thank you for filing a new bug report with GNU. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-libtool@HIDDEN If you wish to submit further information on this problem, please send it to 9095 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 9095: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D9095 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.