[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuradio-discuss
Subject:    Re: [Discuss-gnuradio] Cross compile for ARM with GCC 4.9
From:       "West, Nathan" <natw () ostatemail ! okstate ! edu>
Date:       2017-02-27 16:00:33
Message-ID: CALkxiL+fXyNayD7eUU-aKBLPTU6rcPSWXoCEUNyVYSiNArOTXg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


This is the dual ABI problem. See
https://gcc.gnu.org/onlinedocs/libstdc%2B%2B/manual/using_dual_abi.html

It was first reported to me June of last year (
https://github.com/gnuradio/volk/issues/92). I tried to play around with
the macro they define, but I could never get anything working (I think
boost et al would need to be compiled with the macro to use the old ABI).
For you I think you might be in luck... just compile GNU Radio with
that _GLIBCXX_USE_CXX11_ABI=0.
The downside is that you might need to recompile *everything* that touches
a string, list, and vector with that macro defined.

I've found the best solution on a desktop OS is to install gcc5 and use it
to build everything. If you really need gcc4 (for example, I keep it around
for CUDA) then you should use Debian's alternatives system:

sudo update-alternatives --config gcc
sudo update-alternatives --config g++
sudo update-alternatives --config cc
sudo update-alternatives --config c++

And just switch back and forth between gcc4 and gcc5 depending on what
you're doing that hour. It's annoying, but c'est la vie.

On Sat, Feb 25, 2017 at 8:48 PM, Cinaed Simson <cinaed.simson@gmail.com>
wrote:

> On 02/25/2017 07:56 AM, Bradley Conn (RIT Student) wrote:
> > Hello,
> >
> > I am trying to add Gnu Radio as a static library to a Xilinx SDSoC
> > project. SDSoC uses a special compiler and linker which is based off of
> > gcc 4.9. The issue is  when it goes to link there are a bunch of errors
> > like this
> > /
> > /
> > /undefined reference to `std::__cxx11:: /.../
> > /
> > /
> > /
> > because when I cross compiled GnuRadio it used gcc 5.2 which includes
> > the __cxx11 namespace to be more compatible with the c++ 11 standard. I
> > was wondering if there was a way to compile the library (and its
> > dependencies) with gcc 4.9. Or possibly some other workaround anyone
> > knew about?
>
> Possible work around:
>
> 1) build the gcc 4.9 cross compiler from source on your machine - see
>
>    http://wiki.osdev.org/Building_GCC
>
> 2) use a VM and install Debian Jessie 8 which uses gcc-4.9. I presume
> you're using Ubuntu - which is a fork of Debian - and very similar to
> Ubuntu.
>
> >
> > When I compiled I used the openembedded environments provided here.
> > http://gnuradio.org/data/sdk/
>
> When I went to this URL it indicated there were no matching records found.
>
>
> >
> > Thank you!
> >
> >
> >
> > _______________________________________________
> > Discuss-gnuradio mailing list
> > Discuss-gnuradio@gnu.org
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> >
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>

[Attachment #5 (text/html)]

<div dir="ltr">This is the dual ABI problem. See  <a \
href="https://gcc.gnu.org/onlinedocs/libstdc%2B%2B/manual/using_dual_abi.html">https:/ \
/gcc.gnu.org/onlinedocs/libstdc%2B%2B/manual/using_dual_abi.html</a><div><br></div><div>It \
was first reported to me June of last year (<a \
href="https://github.com/gnuradio/volk/issues/92">https://github.com/gnuradio/volk/issues/92</a>). \
I tried to play around with the macro they define, but I could never get anything \
working (I think boost et al would need to be compiled with the macro to use the old \
ABI). For you I think you might be in luck... just compile GNU Radio with that  <span \
style="color:rgb(0,0,0);font-family:&quot;times new \
roman&quot;;font-size:medium">_GLIBCXX_USE_CXX11_ABI=0. The downside is that you \
might need to recompile *everything* that touches a string, list, and vector with \
that macro defined.</span></div><div><br></div><div>I&#39;ve found the best solution \
on a desktop OS is to install gcc5 and use it to build everything. If you really need \
gcc4 (for example, I keep it around for CUDA) then you should use Debian&#39;s \
alternatives system:</div><div><br></div><div>sudo update-alternatives --config \
gcc<br></div><div>sudo update-alternatives --config g++<br></div><div>sudo \
update-alternatives --config cc<br></div><div>sudo update-alternatives --config \
c++<br></div><div><br></div><div>And just switch back and forth between gcc4 and gcc5 \
depending on what you&#39;re doing that hour. It&#39;s annoying, but c&#39;est la \
vie.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 25, \
2017 at 8:48 PM, Cinaed Simson <span dir="ltr">&lt;<a \
href="mailto:cinaed.simson@gmail.com" \
target="_blank">cinaed.simson@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="">On 02/25/2017 07:56 AM, Bradley Conn (RIT \
Student) wrote:<br> &gt; Hello,<br>
&gt;<br>
&gt; I am trying to add Gnu Radio as a static library to a Xilinx SDSoC<br>
&gt; project. SDSoC uses a special compiler and linker which is based off of<br>
&gt; gcc 4.9. The issue is   when it goes to link there are a bunch of errors<br>
&gt; like this<br>
</span>&gt; /<br>
&gt; /<br>
&gt; /undefined reference to `std::__cxx11:: /.../<br>
&gt; /<br>
&gt; /<br>
&gt; /<br>
<span class="">&gt; because when I cross compiled GnuRadio it used gcc 5.2 which \
includes<br> &gt; the __cxx11 namespace to be more compatible with the c++ 11 \
standard. I<br> &gt; was wondering if there was a way to compile the library (and \
its<br> &gt; dependencies) with gcc 4.9. Or possibly some other workaround anyone<br>
&gt; knew about?<br>
<br>
</span>Possible work around:<br>
<br>
1) build the gcc 4.9 cross compiler from source on your machine - see<br>
<br>
     <a href="http://wiki.osdev.org/Building_GCC" rel="noreferrer" \
target="_blank">http://wiki.osdev.org/<wbr>Building_GCC</a><br> <br>
2) use a VM and install Debian Jessie 8 which uses gcc-4.9. I presume<br>
you&#39;re using Ubuntu - which is a fork of Debian - and very similar to<br>
Ubuntu.<br>
<span class=""><br>
&gt;<br>
&gt; When I compiled I used the openembedded environments provided here.<br>
&gt; <a href="http://gnuradio.org/data/sdk/" rel="noreferrer" \
target="_blank">http://gnuradio.org/data/sdk/</a><br> <br>
</span>When I went to this URL it indicated there were no matching records found.<br>
<br>
<br>
&gt;<br>
&gt; Thank you!<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ______________________________<wbr>_________________<br>
&gt; Discuss-gnuradio mailing list<br>
&gt; <a href="mailto:Discuss-gnuradio@gnu.org">Discuss-gnuradio@gnu.org</a><br>
&gt; <a href="https://lists.gnu.org/mailman/listinfo/discuss-gnuradio" \
rel="noreferrer" target="_blank">https://lists.gnu.org/mailman/<wbr>listinfo/discuss-gnuradio</a><br>
 &gt;<br>
<br>
<br>
______________________________<wbr>_________________<br>
Discuss-gnuradio mailing list<br>
<a href="mailto:Discuss-gnuradio@gnu.org">Discuss-gnuradio@gnu.org</a><br>
<a href="https://lists.gnu.org/mailman/listinfo/discuss-gnuradio" rel="noreferrer" \
target="_blank">https://lists.gnu.org/mailman/<wbr>listinfo/discuss-gnuradio</a><br> \
</blockquote></div><br></div>



_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic