# Can't link against libgnuradio-core (cmake)

**URL:** <https://www.ruby-forum.com/t/cant-link-against-libgnuradio-core-cmake/213387>\
**Category:** GNU Radio\
**Created:** [October 31, 2011, 9:51pm UTC](https://www.ruby-forum.com/t/cant-link-against-libgnuradio-core-cmake/213387 "2011-10-31T21:51:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [October 31, 2011, 9:51pm UTC](https://www.ruby-forum.com/t/cant-link-against-libgnuradio-core-cmake/213387/1 "2011-10-31T21:51:32Z")

</div>

Greetings,

I’m trying to rebuild my gr-fcd block  
([GitHub - csete/gr-fcd: This repository is obsolete since gr-fcd is now included in GNU Radio.](https://github.com/csete/gr-fcd)) with gnuradio v3.5.0rc0-1-g037c5f60  
When I build gnuradio using the autotools everything is fine and I can  
build gr-fcd without problems.  
When I build using cmake gnuradio still builds and install fine, but  
when I try to build gr-fcd I get:

libtool: link:  
`/opt/gnuradio/v3.5.0rc0-1-g037c5f60/lib/libgnuradio-core.la' is not a valid libtool archive make[3]: *** [libgnuradio-fcd.la] Error 1 make[3]: Leaving directory `/home/alexc/gnuradio/gr-fcd.git/lib’  
make[2]: \*\*\* [all] Error 2  
make[2]: Leaving directory `/home/alexc/gnuradio/gr-fcd.git/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/alexc/gnuradio/gr-fcd.git’  
make: \*\*\* [all] Error 2

Looking at the contents of gnuradio-core.la from the two builds I can  
indeed see many differences, actually they seem to be more different  
than similar.

Alex

---

<div class="post-metadata">

**Author:** ![copot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/49beb7/32.png) [@copot](https://www.ruby-forum.com/u/copot)\
**Post date:** [October 31, 2011, 11:45pm UTC](https://www.ruby-forum.com/t/cant-link-against-libgnuradio-core-cmake/213387/2 "2011-10-31T23:45:15Z")

</div>

On 10/31/2011 01:50 PM, Alexandru C. wrote:

> is not a valid libtool archive  
> than similar.

Basically, the build system is generating .la files for each library  
using this macro: [http://www.vtk.org/Wiki/CMakeMacroLibtoolFile](http://www.vtk.org/Wiki/CMakeMacroLibtoolFile)  
I dont know why we are doing this or why we want it.

If you link against libraries in the normal way, everything should be  
fine. So my best guess is that the generated la files are confusing for  
autotools.

Try deleting the la files. You can also turn the generation off w/  
-DLIBRARY\_EXTRAS=OFF

-Josh

---

<div class="post-metadata">

**Author:** ![copot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/49beb7/32.png) [@copot](https://www.ruby-forum.com/u/copot)\
**Post date:** [November 1, 2011, 12:54am UTC](https://www.ruby-forum.com/t/cant-link-against-libgnuradio-core-cmake/213387/3 "2011-11-01T00:54:25Z")

</div>

On Mon, Oct 31, 2011 at 11:44 PM, Josh B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Looking at the contents of gnuradio-core.la from the two builds I can  
> > autotools.
> 
> Try deleting the la files. You can also turn the generation off w/  
> -DLIBRARY\_EXTRAS=OFF

Thanks for the tip! Using -DLIBRARY\_EXTRAS=OFF works 🙂

Alex

---

<div class="post-metadata">

**Author:** ![copot](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/49beb7/32.png) [@copot](https://www.ruby-forum.com/u/copot)\
**Post date:** [November 1, 2011, 1:11am UTC](https://www.ruby-forum.com/t/cant-link-against-libgnuradio-core-cmake/213387/4 "2011-11-01T01:11:04Z")

</div>

On Mon, Oct 31, 2011 at 15:44, Josh B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 

You’re right, I don’t think the .la files are necessary for linking  
against  
when using cmake.

Johnathan
