koolhazz / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

skipping incompatible library when searching for -lprofiler #623

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have build profiler library on RH6 64bit server
$uname -a
Linux ldnpsr37695 2.6.32-358.6.1.el6.x86_64 #1 SMP Fri Mar 29 16:51:51 EDT 2013 
x86_64 x86_64 x86_64 GNU/Linux

Build Commands:
    ./configure CXXFLAGS=-m64 --prefix=/users/fox_dev/shahgau1/local/ --enable-frame-pointers
    make 
    make install

2. Then I made changes into makefile to link by source with libprofiler.a
3. Tried to compile my source on the same linux host and gets error although 
library exist on the link path.

    Linking server OWCommunicatorServer at 07:16:08
g++ -o OWCommunicatorServer OWSocketEventHandler.o OWSocketCommunicator.o 
XMLMessageParser.o IOWCoordinator.o HTTP_Payload_Extractor.o HTTP_Msgs.o 
HTTPSocketReadWriter.o OW_HTTP_Validator.o RRSocketReadWriter.o RRPlain.o 
RRTimed.o Main.o boost_http/request_parser.o OWCommunicatorServer.v.o   
-pthread -m32 -lpthread -Xlinker -s   -L/vobs/FO_FOX/fo_fx_fox/appl.phoenix/lib 
-lPhoenixDataPackages -lGenericEventThrottler -lPhoenixSharedTools -lFoxSocket 
-lFoxSSLSocket -lFoxWeb -lFoxXML -lFoxThread -lFoxRegex -lPhoenixSystem 
-lFoxTime -lframework -L/vobs/FO_FOX/fo_fx_fox/appl/lib/RedHat6/zlib -lz 
-L/vobs/FO_FOX/fo_fx_fox/appl/lib/RedHat6 -lopenssl -lcrypto 
-L/vobs/FO_FOX/fo_fx_fox/appl/lib/boost -lboost_system -lrt 
-L/users/fox_dev/shahgau1/local/lib  -lprofiler
/usr/bin/ld: skipping incompatible 
/users/fox_dev/shahgau1/local/lib/libprofiler.so when searching for -lprofiler
/usr/bin/ld: skipping incompatible 
/users/fox_dev/shahgau1/local/lib/libprofiler.a when searching for -lprofiler
/usr/bin/ld: cannot find -lprofiler
collect2: ld returned 1 exit status

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by gaurav...@gmail.com on 27 May 2014 at 6:43

GoogleCodeExporter commented 9 years ago
This issue is resolved. My compile host is 64bit, hence the lbprofile library 
got compiled with "-m64" option by default. 
However, my server was getting compiled with "-m32" flag, hence libprofile was 
not compatible.

I reconfigured profile library with CXXFLAGS=-m32 and clean compiled it. This 
has resolved the issue

Original comment by gaurav...@gmail.com on 27 May 2014 at 4:09

GoogleCodeExporter commented 9 years ago

Original comment by alkondratenko on 27 May 2014 at 6:29