Menu

#84 Fix library linking

closed
nobody
None
5
2012-07-03
2006-12-31
No

Each library have to be linked with all libraries contains used symbols. It is broken way to link result binaries only. This path fixes build order, adds missed libexpat detecting in configure.

Discussion

  • Vitaly Lipatov

    Vitaly Lipatov - 2006-12-31
     
  • Bernhard Wymann

    Bernhard Wymann - 2006-12-31

    Logged In: YES
    user_id=318462
    Originator: NO

    Hmm, why do you require expat, there must be something wrong, the xml lib is shipped in the TORCS tree. The linking worked so far everywhere, so changing this is a bad idea. The bug is rejected, thank you for the report anyway.

    Bye, Bernhard.

     
  • Vitaly Lipatov

    Vitaly Lipatov - 2006-12-31

    Logged In: YES
    user_id=930161
    Originator: YES

    If you wish I can explain why the current linking model is broken on modern systems and will obsoleted in near future.
    You can read
    http://sourceware.org/ml/binutils/2006-03/msg00259.html
    http://sourceware.org/ml/binutils/2006-03/msg00344.html
    http://www.gentoo.org/proj/en/qa/asneeded.xml
    for instance.

    If you wish ship libexpat in sources, do it as optional. I build TORCS for distro which already contains libexpat and by distro rules I need turn off internal expat library.

    Repeat: it is incorrectly to have libraries with undefined references (check the libraries with ldd -r libsomething.so) in the project.

     
  • Vitaly Lipatov

    Vitaly Lipatov - 2006-12-31

    Logged In: YES
    user_id=930161
    Originator: YES

    I guess it is still open issue.

     
  • Bernhard Wymann

    Bernhard Wymann - 2006-12-31

    Logged In: YES
    user_id=318462
    Originator: NO

    It is not an issue and it is not open. I think the current linking model is not broken, but if people want to obsolete it, we can fix it when the time has come. For now there is no issue for TORCS open, it is just fine. Thanks, bye

    Bernhard.