From: SourceForge.net <no...@so...> - 2009-07-31 20:11:10
|
Bugs item #2033008, was opened at 2008-07-30 13:09 Message generated for change (Settings changed) made by maynardj You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116191&aid=2033008&group_id=16191 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Daniel Fishman (daniel_fishman) Assigned to: Maynard Johnson (maynardj) Summary: oprofile fails to link when --with-binutils option is used. Initial Comment: If 'configure' is executed with '--with-binutils' option, then 'make' fails during linkage stage. For example, suppose that 'configure' is ran like that: ./configure --with-kernel-support --with-binutils=/usr then when 'make' is ran, it fails with the following message: g++ -W -Wall -fno-common -ftemplate-depth-50 -g -O2 -I /usr/include /usr/lib -Wl,-R -Wl,/usr/lib -o opimport opimport.o -L/home/dima/a/down/oprofile-0.9.4/libabi libabi.a ../libdb/libodb.a ../libopt++/libopt++.a ../libutil++/libutil++.a ../libutil/libutil.a /usr/lib/libpopt.so -liberty -ldl /usr/bin/ld: /usr/lib: No such file: File format not recognized collect2: ld returned 1 exit status make[3]: *** [opimport] Error 1 (note: it was unnecessary to ran 'configure' above with '--with-binutils' option in that particular case because binutils headers and libraries were located in a standard place and 'configire' could have found it without the option - the example is just a simulation of a case when binutils' headers/libraries are located in a non-standard place and '--with-binutils' is required). The problem occurs because path to binutils' libraries is passed to g++ without '-L' switch - preceding a first occurrence of '/usr/lib' above with '-L' solves the problem. ---------------------------------------------------------------------- Comment By: Maynard Johnson (maynardj) Date: 2008-07-31 15:18 Message: Logged In: YES user_id=1355714 Originator: NO Thanks for reporting this problem. The --with-binutils configure option used to work not so long ago, and I determined that the point at which it broke was when we introduced the use of libtool to our project. I contacted a libtool developer, and he responded as follows: "Your configure script adds spaces after -I and -L before the directory. GCC is ok with this, libtool not so much." I patched OProfile's configure.in to remove the spaces and successfully tested it. I will commit this fix. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116191&aid=2033008&group_id=16191 |