linker - CMake keeps linking to libraries under /usr/lib64 even full paths to another libraries are given -


i building package cmake (3.0.2). package relies on boost_python , others. there older version in /usr/lib64 , have newer version in own directory /home/x/opt/boost-1.56/lib. there symbol link /home/x/opt/boost-1.56/lib64 deal multi-arch gcc.

however, if set boost_root=/home/x/opt/boost-1.56/lib, , in cmakecache.txt there

//boost python library (release) boost_python_library_release:filepath=/home/x/opt/boost-1.56/lib/libboost_python.a 

the generated link.txt contains such line, instead of full path:

-wl,-bstatic -lboost_python 

and when make, links 1 under /usr/lib64/, wrong.

question:

  1. how make cmake use full path? documented, when libraries under system default folders dealt -bstatic, should not case.
  2. why -wl,-bstatic -lboost_python not work have "/home/x/opt/boost-1.56/lib" in ld_library_path , library_path? limited knowledge should override system default.

information:

gcc --print-search-dir gives:

/home/x/opt/boost-1.56/lib/x86_64-unknown-linux-gnu/4.9.2/ /home/x/opt/boost-1.56/lib/../lib64/ /lib/x86_64-unknown-linux-gnu/4.9.2/ /lib/../lib64/ /usr/lib/x86_64-unknown-linux-gnu/4.9.2/ /usr/lib/../lib64/ /home/x/opt/boost-1.56/lib/ /lib/ /usr/lib/ 

set(boost_no_system_paths on) 

this allow ignore boost_root


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -