rtv/Stage — Issue #20: cmake finds playercore, but then make yields "cannot find -lplayercore"
Author: dukedave
Created: 2012-01-12 01:15:07+00:00
State: open

Firstly I grabbed the latest player from SVN:

$ svn info
URL: https://playerstage.svn.sourceforge.net/svnroot/playerstage/code/player/trunk
Last Changed Date: 2012-01-04 22:18:25 +0000 (Wed, 04 Jan 2012)

I did `mkdir build`, `cd build`, `cmake ../`, `make`, `sudo checkinstall`, and player appeared to install co
rrectly:

$ player
Player v.3.1.0-svn

Next I pulled the latest stage from `https://github.com/rtv/Stage.git`.

I apply some fixes which have a pending pull request: `curl https://github.com/rtv/Stage/pull/19.patch | git am`

Then I `cmake .` and see:

- checking for one of the modules 'playercore>=2.1.0'
-- found playercore, version 3.1.0-svn
-- * Player version 3.1.0-svn detected at /usr/local
-- PLAYER_CFLAGS: -I/usr/local/include/player-3.1
-- PLAYER_LDFLAGS: -L/usr/local/lib;-lplayercore;-lpthread;-lltdl;-ldl;-lplayerinterface;-lplayercommon

However, `make` then fails with:

Linking CXX shared module stageplugin.so
/usr/bin/ld: cannot find -lplayercore
collect2: ld returned 1 exit status
make[2]: *** [libstageplugin/stageplugin.so] Error 1
make[1]: *** [libstageplugin/CMakeFiles/stageplugin.dir/all] Error 2
make: *** [all] Error 2

To resolve this issue I had to create the necessary symlinks by hand:

$ sudo ln -s /usr/local/lib/libplayercore.so.3.1 libplayercore.so
$ sudo ln -s /usr/local/lib/libplayerinterface.so.3.1 libplayerinterface.so
$ sudo ln -s /usr/local/lib/libplayercommon.so.3.1 libplayercommon.so

After doing this I can `make` successfully.

I assume this is due to a problem with `ldconfig`, but I thought I'd mention it here before investigating further.
I'm using Ubuntu 10.04 and the only other noticeable difference is that I'm using `checkinstall` instead of `make install`.