Building from source, octave failure


#1

Hi all,

I cloned the github repo and I’m rebuilding the LimeSuite code from source, it fails in the octave plugin step with this:

[100%] Building LimeSuite Octave plugin
/usr/bin/ld: cannot find -lLimeSuite
collect2: error: ld returned 1 exit status
octave/CMakeFiles/LimeSuiteOctave.dir/build.make:60: recipe for target ‘octave/LimeSuite.oct’ failed
make[2]: *** [octave/LimeSuite.oct] Error 1
CMakeFiles/Makefile2:728: recipe for target ‘octave/CMakeFiles/LimeSuiteOctave.dir/all’ failed
make[1]: *** [octave/CMakeFiles/LimeSuiteOctave.dir/all] Error 2
Makefile:127: recipe for target ‘all’ failed
make: *** [all] Error 2

I’ve got octave installed not sure why it is trying to link to a LimeSuite library?

–Chuck


#2

Really hoping this is a quick one. I changed the line 25 in the octave/CMakeLists.txt script to say -oLimeSuite rather than -lLimeSuite this allowed the build to complete but after the install everything works except the octave pluging. If I type ‘LoadLimeSuite;’ into octave it tells me:

 LoadLimeSuite at line 1 column 1
warning: autoload: 'LimeSuite.oct' is not an absolute file name
... this repeats 11 times.

So clearly the octave plugin is not correctly built. If anyone could take a look at this and tell me how to correct that line so that the plugin builds correctly it would be super helpful.

To reproduce just clone the repo, cd to build cmake ../; make and it fails.


#3

Octave plugin is just a wrapper of the main LimeSuite library, that’s why it is linking against -lLimeSuite.
Did you do make install after compiling the main library, are you building shared or static library?


#4

Thanks @ricardas, a solid clue.

So this is the bug in a nutshell:

When you clone the repo and try to build it, the build fails because the octave plugin is expecting the libLimeSuite.so file to already be installed. But it isn’t because it hasn’t been built. If you disable that, make install (now libLimeSuite.so is installed) and then re-enable building the octave plugin, it works (because it can find the library).

What this means builds are broken, the octave plugin links against the libLimeSuite that is already installed and not the one that was built. @andrewback this should be fixed in the octave build scripts to add either a -L../xx option to point the linker at the freshly built libLImeSuite.so or you could use the runpath option. But either way, without this change you risk building with a mismatched library.

–Chuck


#5

Fixed: f0616e11


#6

:+1: