# Building from source, octave failure

**URL:** https://discourse.myriadrf.org/t/building-from-source-octave-failure/3698
**Category:** Lime Suite
**Created:** [19 November 2018 22:32 UTC](https://discourse.myriadrf.org/t/building-from-source-octave-failure/3698 "2018-11-19T22:32:02Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ChuckM](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@ChuckM](https://discourse.myriadrf.org/u/ChuckM)
#### Post date: [19 November 2018 22:32 UTC](https://discourse.myriadrf.org/t/building-from-source-octave-failure/3698/1 "2018-11-19T22:32:02Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ChuckM](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@ChuckM](https://discourse.myriadrf.org/u/ChuckM)
#### Post date: [20 November 2018 08:05 UTC](https://discourse.myriadrf.org/t/building-from-source-octave-failure/3698/2 "2018-11-20T08:05:35Z")

</div>

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:

```auto
 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.

---

<div class="post-metadata">

### Author: ![ricardas](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/ricardas/32/86_2.png) [@ricardas](https://discourse.myriadrf.org/u/ricardas)
#### Post date: [20 November 2018 10:21 UTC](https://discourse.myriadrf.org/t/building-from-source-octave-failure/3698/3 "2018-11-20T10:21:26Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![ChuckM](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@ChuckM](https://discourse.myriadrf.org/u/ChuckM)
#### Post date: [20 November 2018 18:29 UTC](https://discourse.myriadrf.org/t/building-from-source-octave-failure/3698/4 "2018-11-20T18:29:46Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ricardas](https://yyz2.discourse-cdn.com/flex034/user_avatar/discourse.myriadrf.org/ricardas/32/86_2.png) [@ricardas](https://discourse.myriadrf.org/u/ricardas)
#### Post date: [20 November 2018 20:20 UTC](https://discourse.myriadrf.org/t/building-from-source-octave-failure/3698/5 "2018-11-20T20:20:44Z")

</div>

Fixed: [f0616e11](https://github.com/myriadrf/LimeSuite/commit/f0616e11650db47a5f2d7943f2fe8477b9708f6b)

---

<div class="post-metadata">

### Author: ![ChuckM](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@ChuckM](https://discourse.myriadrf.org/u/ChuckM)
#### Post date: [21 November 2018 00:32 UTC](https://discourse.myriadrf.org/t/building-from-source-octave-failure/3698/6 "2018-11-21T00:32:23Z")

</div>

👍
