Forum: GNU Radio Status of GNU Radio with OSX 10.9

49c4e5d024c18583bd6ca53aba800d29?d=identicon&s=25 Michael Dickens (Guest)
on 2013-11-05 14:43
(Received via mailing list)
Or, rather, with Apple's new libc++ runtime.  I'm working on the
MacPorts ticket: <  https://trac.macports.org/ticket/41162 >.

The high level advice right now is: If you update to 10.9, you won't be
using GNU Radio for a while.

It looks like there is will be 2 issues encountered when compiling GNU
Radio on OSX 10.9 using libc++ and clang:

1) As with the ticket, there will be errors caused by something to do
with boost.  This is typical, and we're seeing it in a bunch of other
ports too (incuding UHD, which I have patched temporarily within
MacPorts to work around the issue).  I'm not sure what the solution is,
but it does not happen to everyone so it's likely the way boost is
installed.

2) Even if you did get past the first boost issue, you'd get to the SWIG
one, which isn't easily fixable -- we can't patch SWIG-generated code,
since it is created during runtime.  The issue is that SWIG works with
C++04 compliant c++ runtime, but not with C++11 compliant runtime, and
libc++ is the latter, and the 2 are not totally backwards compatible.
SWIG has a ticket open at < http://sourceforge.net/p/swig/bugs/1331/ >
with this issue since August 27, 2013; it has LOTS of tickets open right
now with various issue, and, while I'm sure the SWIG programmers are
making progress, progress does not seem to be very fast.

With the above in mind, I recommend that you do NOT update to 10.9 if
you're going to be using GNU Radio; not at this time.  I think the
"best" temporary solution right now to get GNU Radio working with 10.9
is to uninstall -everything- from MacPorts and rebuild from go using
libstdc++ (the default in 10.9 is to use Apple's new libc++; libstdc++
is provided by libgcc).  I'm not sure how to do that yet; I'll
experiment & post back once I've figured it out. - MLD



--

Michael Dickens, Mac OS X Programmer

Ettus Research Technical Support

Email: support@ettus.com

Web: http://www.ettus.com
49c4e5d024c18583bd6ca53aba800d29?d=identicon&s=25 Michael Dickens (Guest)
on 2013-11-05 21:06
(Received via mailing list)
On Nov 5, 2013, at 8:41 AM, Michael Dickens <michael.dickens@ettus.com>
wrote:
> I'm not sure how to do that yet; I'll experiment & post back once I've figured
it out.

I'm pretty sure we can use the legacy libstdc++ provided by Apple, but
it requires that "port" be either from the SVN trunk (as of a few days
ago) or that you wait for the next release (probably 2.3), which I'm not
sure when that will be.

Once you have "port" from the SVN trunk installed, you then do:
{{{
sudo port -f uninstall installed
sudo port clean all
sudo port install gnuradio +gcc48 +atlas configure.cxx_stdlib=libstdc++
}}}
and, then go off and wait for a day.  Feel free to substitute other
variants you want everything to have, or some other +gcc4X instead of
what I put there.  I do recommend +atlas, since Apple's Accelerate
framework, at least up through 10.8, has bugs in it here and Apple is
both slow to fix and push out fixes; atlas has regular updates and bug
fixes, and generally works much better than Accelerate.

The "down side" to doing this method is that, from now on, you'll need
to add configure.cxx_stdlib=libstdc++ to any port install command.
There's probably a way to set this variable in a configuration file, but
it is so new I'm not sure it's there yet.

Thus, as I wrote before, my high level advice is to not update to 10.9
yet if you truly need GNU Radio.  We will continue to work on these bugs
and fix them, but it will take some time, likely months, to track down
enough to make GNU Radio and 10.9 play nicely together using libc++. -
MLD
49c4e5d024c18583bd6ca53aba800d29?d=identicon&s=25 Michael Dickens (Guest)
on 2013-11-06 14:26
(Received via mailing list)
One final update: You're not supposed to change configure.cxx_stdlib,
even though you are allowed to do so.  It is set to libc++ by default in
10.9, and libstdc++ in 10.8 and earlier.  Even trying to override it per
the below does not work, because some ports are now designed internally
to assume libc++ on 10.9 (those dealing with compiling code: ld64,
cctools; for example).

So, the bottom line is truly that GNU Radio (in full) will not work with
10.9 until either (1) SWIG is updated to be C++11 compliant; or (2) GNU
Radio moves away from using SWIG to some other means for interfacing to
Python.  Today I will see if the C++ parts of GNU Radio work on 10.9,
without the SWIG Python interface.

Sorry for the bummer news, you OSX 10.9 users!  Go ahead and downgrade
to 10.8 for now, and GNU Radio should install and work out of the box
via MacPorts. - MLD
49c4e5d024c18583bd6ca53aba800d29?d=identicon&s=25 Michael Dickens (Guest)
on 2013-11-07 19:00
(Received via mailing list)
On Nov 6, 2013, at 8:25 AM, Michael Dickens <michael.dickens@ettus.com>
wrote:
> Today I will see if the C++ parts of GNU Radio work on 10.9, without the SWIG
Python interface.

I finally got all of the dependencies installed, and have verified that
the GNU Radio codebase does indeed work with 10.9's clang and libc++.
So, the issue is purely that SWIG is not generating C++11 compliant
code.  I will next look into whether SWIG can even do that (at all; some
special flag) or whether OSX 10.9 users are "out on a limb" for using
the GRC and Python interfaces to GNU Radio. - MLD
--

Michael Dickens, Mac OS X Programmer

Ettus Research Technical Support

Email: support@ettus.com

Web: http://www.ettus.com
957af25c9ce3b86669992f439b823607?d=identicon&s=25 Carles Fernandez (Guest)
on 2013-11-07 22:45
(Received via mailing list)
Hi Michael,

thanks so much for your efforts and for keeping us updated on your
progress. I'm some steps behind of you but reproducing the path the best
I
can. I successfully built GNU Radio runtime, pmt, blocks, fft, filter,
uhd,
fec, trellis, analog, and volk libraries with 10.9's clang and libc++,
which is enough for my C++ application. Any one else would be interested
in
a 'gnuradio-devel-mavericks' port with the libraries that compile well
by
now?




On Thu, Nov 7, 2013 at 6:58 PM, Michael Dickens
49c4e5d024c18583bd6ca53aba800d29?d=identicon&s=25 Michael Dickens (Guest)
on 2013-11-08 19:07
(Received via mailing list)
I just pushed < https://trac.macports.org/changeset/113092 >, which
allows exactly what you wrote there Carles: just the C++ API and
runtime.  No SWIG Python or GRC.  Python is used during the build, but
not used for runtime.  It should be live by ~1:30 PM/US/ET.  I'm love to
hear feedback from anyone trying to use GNU Radio on 10.9 via MacPorts.
- MLD

On Nov 7, 2013, at 4:44 PM, Carles Fernandez
<carles.fernandez@gmail.com> wrote:
> thanks so much for your efforts and for keeping us updated on your progress. I'm
some steps behind of you but reproducing the path the best I can. I successfully
built GNU Radio runtime, pmt, blocks, fft, filter, uhd, fec, trellis, analog, 
and
volk libraries with 10.9's clang and libc++, which is enough for my C++
application. Any one else would be interested in a 'gnuradio-devel-mavericks' 
port
with the libraries that compile well by now?
--

Michael Dickens, Mac OS X Programmer

Ettus Research Technical Support

Email: support@ettus.com

Web: http://www.ettus.com
49c4e5d024c18583bd6ca53aba800d29?d=identicon&s=25 Michael Dickens (Guest)
on 2013-11-09 03:16
(Received via mailing list)
One further update: I played around with the SWIG provided includes for
std, and it seems possible to tweak them to allow GNU Radio to be fully
usable on 10.9.  It's something that needs to come from upstream (the
SWIG folks), since they need to "#ifdef CXX11" or something around the
code.  But, it works with only a minor change to gnuradio.i which is
fully backwards compatible.  I probably won't get back to this before
Monday (busy weekend), but I wanted to extend the hope to others of
using GRC with OSX 10.9. - MLD

On Nov 8, 2013, at 1:02 PM, Michael Dickens <michael.dickens@ettus.com>
wrote:
> I just pushed < https://trac.macports.org/changeset/113092 >, which allows
exactly what you wrote there Carles: just the C++ API and runtime.  No SWIG 
Python
or GRC.  Python is used during the build, but not used for runtime.  It should 
be
live by ~1:30 PM/US/ET.  I'm love to hear feedback from anyone trying to use GNU
Radio on 10.9 via MacPorts.
--

Michael Dickens, Mac OS X Programmer

Ettus Research Technical Support

Email: support@ettus.com

Web: http://www.ettus.com
957af25c9ce3b86669992f439b823607?d=identicon&s=25 Carles Fernandez (Guest)
on 2013-11-09 11:01
(Received via mailing list)
Hi Michael,

I've tried 'sudo port install gnuradio-devel' on OSX 10.9 and it works
fine. The C++ API and runtime are completely usable; when linked from an
out-of-tree project, everything runs smoothly.

Best regards,
Carles





On Sat, Nov 9, 2013 at 3:15 AM, Michael Dickens
49c4e5d024c18583bd6ca53aba800d29?d=identicon&s=25 Michael Dickens (Guest)
on 2013-11-09 21:22
(Received via mailing list)
That's great, Carles!  Did you have issues with Boost, as per some
reports in MacPorts ticket < https://trac.macports.org/ticket/41162 >?
If so, do you remember what you did to work around them?  Thanks for the
feedback. - MLD

On Nov 9, 2013, at 5:00 AM, Carles Fernandez
<carles.fernandez@gmail.com> wrote:
> I've tried 'sudo port install gnuradio-devel' on OSX 10.9 and it works fine. The
C++ API and runtime are completely usable; when linked from an out-of-tree
project, everything runs smoothly.
--
Michael Dickens, Mac OS X Programmer
Ettus Research Technical Support
Email: support@ettus.com
Web: http://www.ettus.com
957af25c9ce3b86669992f439b823607?d=identicon&s=25 Carles Fernandez (Guest)
on 2013-11-10 12:13
(Received via mailing list)
Hi Michael,

Issues with boost disappeared with your last push. However, it seems
that
all the code you link to boost/gnuradio libraries needs "-stdlib=libc++
-std=c++11" to work properly.

This is an example of a C++ out-of-tree project linked to GNU Radio
installed via macports in Mavericks:

http://gnss-sdr.org/documentation/building-guide#MacOSX

Best regards,
Carles






On Sat, Nov 9, 2013 at 9:21 PM, Michael Dickens
49c4e5d024c18583bd6ca53aba800d29?d=identicon&s=25 Michael Dickens (Guest)
on 2013-11-13 21:49
(Received via mailing list)
--
Michael Dickens, Mac OS X Programmer
Ettus Research Technical Support
Email: support@ettus.com
Web: http://www.ettus.com
49c4e5d024c18583bd6ca53aba800d29?d=identicon&s=25 Michael Dickens (Guest)
on 2013-11-14 19:26
(Received via mailing list)
I just pushed r113379 < https://trac.macports.org/changeset/113379 > to
MacPorts, which works for me on 10.8 and 10.9, to get full GNU Radio
with GRC working.  For folks using OSX / MacPorts for GNU Radio and UHD,
I invite you to try out these changes to see if they work for you;
you'll want to do "sudo port selfupdate" to get the changes.  Enjoy! -
MLD
--
Michael Dickens, Mac OS X Programmer
Ettus Research Technical Support
Email: support@ettus.com
Web: http://www.ettus.com
E38fb1e2c9e790767ba3f0fc537c3cd7?d=identicon&s=25 George S. (george_s)
on 2013-11-15 00:03
Attachment: main-log.txt.bz2 (10 KB)
Mike,

I just tried

sudo port upgrade outdated

and got the following

--->  Fetching distfiles for gnuradio
--->  Verifying checksums for gnuradio
--->  Extracting gnuradio
--->  Applying patches to gnuradio
--->  Configuring gnuradio
--->  Building gnuradio
Error: org.macports.build for port gnuradio returned: command execution
failed
Please see the log file for port gnuradio for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_gnuradio/gnuradio/main.log
Error: Unable to upgrade port: 1


I am attaching the log file.

-George
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.