bugCERTI - Bugs: bug #23325, CERTI binaries should be linked...

 
 

bug #23325: CERTI binaries should be linked using full path to CERTI/RTI library

Submitter:  Petr Gotthard <gotthardp>
Submitted:  Fri 23 May 2008 09:52:55 AM UTC
 
Category:  CERTI Severity:  * 2 - Minor
Item Group:  Compilation error Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release:  * CVS
Reproducibility:  Every Time Fixed Release:  * 3.4.0
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Wed 01 Oct 2008 05:09:17 PM UTC, comment #5: 

I had a problem during 'make', but I cannot reproduce it anymore, so I would consider this bug as fixed. There is one bug less. ;-)

Petr Gotthard <gotthardp>
Project Member
Wed 01 Oct 2008 01:56:33 PM UTC, comment #4: 

Petr,

Is this bug still here with current CERTI?
normally for RTIA and RTIG we have

TARGET_LINK_LIBRARIES(rtia ${SOCKET_LIBRARY} ${LIBXML2_LIBRARIES} CERTI RTI)
TARGET_LINK_LIBRARIES(rtig ${SOCKET_LIBRARY} ${LIBXML2_LIBRARIES} CERTI)

which should link to full rpath libCERTI and libRTI from within
the project because CERTI and RTI are target of the current
project.

However when doing make install then the default CMake behavior
is to leave a "blank" rpath such that you may get
lib mismatch if you have several installed CERTI.

In this case you should use the
USE_FULL_RPATH option of CERTI build in order to enforce
full rpath during "make install".

The default value of USE_FULL_RPATH is OFF
you may force it to ON using command line
-DUSE_FULL_RPATH:BOOL=ON
or ccmake/cmake-gui

We may change this default behavior but I think
multiple CERTI install is a "developper" issue not
really a user one.

What do you think?

Eric NOULARD <erk>
Project Administrator
Wed 01 Oct 2008 08:10:26 AM UTC, comment #3: 

Renamed to reflect the actual problem.

I agree that better solution is to follow the CMake 2.6 suggestion and use "full path to library".

Petr Gotthard <gotthardp>
Project Member
Mon 26 May 2008 12:21:17 PM UTC, comment #2: 

I have 2.4-patch 8 on Fedora 8.

Binding directly to the target may also be a solution. I don't insist on my suggestion ;-) I just want to get rid of the false errors I get whenever a library changes.

Petr Gotthard <gotthardp>
Project Member
Mon 26 May 2008 11:37:59 AM UTC, comment #1: 

Hi Petr,

Which version of CMake are you using?
When using target_link_libraries
CMake should preferably bind to target
(and not the lib found in the path)

Moreover in CMake 2.6 it is advised to use
"full path to library" and not adding -L flags
which are precisely to be avoided:

http://www.cmake.org/HTML/cmake-2.6.html#policy:CMP0003

Eric NOULARD <erk>
Project Administrator
Fri 23 May 2008 09:52:55 AM UTC, original submission:  

When re-building CERTI binaries after the CERTI libraries has changed, the binaries are linked against the OLD libraries that have been installed into /usr/local/lib.

This is because there is -L/usr/local/lib as the first item in the list of link directories. It comes from CMAKE_*_LINK_FLAGS.

I suggest to prepend "-L..." to the CMAKE_*_LINK_FLAGS so the NEW libraries are used when linking CERTI binaries.

For example, in CMakeLists.txt for RTIA there should be
SET(CMAKE_EXE_LINKER_FLAGS "-L../libCERTI -L../libRTI ${CMAKE_EXE_LINKER_FLAGS})

(Please let me know, if you want me to make a patch.)

Petr Gotthard <gotthardp>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by erk (Posted a comment)
  • -email is unavailable- added by gotthardp (Submitted the item)
  •  

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-11-11 erk Open/ClosedOpen Closed
        Fixed ReleaseUnknown 3.4.0
    2008-10-01 gotthardp StatusNone Fixed
    2008-10-01 gotthardp SummaryWrong LINK_DIRECTORIES order CERTI binaries should be linked using full path to CERTI/RTI library

    Back to the top


    Powered by Savane 3.9