kastnermario / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

make install doesn't run ldconfig #113

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. cmake, make, sudo make install
2. Write a program that uses libyaml-cpp
3. compile and link it with flags -L /usr/local/lib/ -lyaml-cpp

What is the expected output? What do you see instead?
The expected output is a working program. What I see is:
$ ./test_program
./test_program: error while loading shared libraries: libyaml-cpp.so.0.2: 
cannot open shared object file: No such file or directory
$ ldd test_program
        linux-vdso.so.1 =>  (0x00007fff181ff000)
        libyaml-cpp.so.0.2 => not found
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f59275e1000)
        libm.so.6 => /lib/libm.so.6 (0x00007f592735d000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f5927147000)
        libc.so.6 => /lib/libc.so.6 (0x00007f5926dc4000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f5928065000)
$ sudo ldconfig
$ ldd test_program
        linux-vdso.so.1 =>  (0x00007fff3cfff000)
        libyaml-cpp.so.0.2 => /usr/local/lib/libyaml-cpp.so.0.2 (0x00007f3fc520d000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f3fc47ab000)
        libm.so.6 => /lib/libm.so.6 (0x00007f3fc4527000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f3fc4311000)
        libc.so.6 => /lib/libc.so.6 (0x00007f3fc3f8e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f3fc5480000)

What version of the product are you using? On what operating system?
Version 0.2.6.
Ubuntu 10.10
g++ 4.4.5

Original issue reported on code.google.com by nemesk...@gmail.com on 18 Aug 2011 at 1:27

GoogleCodeExporter commented 8 years ago
What would you recommend we do? It looks like cmake just doesn't run ldconfig 
in 'make install':

http://www.cmake.org/pipermail/cmake/2007-February/013032.html

Original comment by jbe...@gmail.com on 24 Aug 2011 at 6:43

GoogleCodeExporter commented 8 years ago
Well, that's certainly inconvenient. Maybe you could add a dependency for the 
'install' target that runs ldconfig?

Original comment by nemesk...@gmail.com on 25 Aug 2011 at 5:58

GoogleCodeExporter commented 8 years ago
(Resurrecting this old thread.)

The conventional wisdom seems to be that the package manager should run 
ldconfig, not "make install", since you often want to run "make install" as 
non-root.

E.g., https://bugs.launchpad.net/hidravfx/+bug/1025262

Original comment by jbe...@gmail.com on 24 Jan 2015 at 9:48