MichaelRColton / PSDR

PortableSDR - A Stand Alone HF Software Defined Transciever.
Other
366 stars 84 forks source link

Linux setup instructions #10

Closed sanamon closed 7 years ago

sanamon commented 7 years ago

Hi, Trying to setup the build environment for ubuntu 14.04. Got eclipse installed including the addons. Checked out the project. But when trying to build, i get an error saying "fatal error: cstdlib: No such file or directory _cxx.cpp /PSDR/system/src/newlib line 13 C/C++ Problem"

Is there some other prereq that i've missed, or something else? Newbie to eclipse and to cross-compilation so any tips/ideas welcome!

Cheers, Jonas

pwarren commented 7 years ago

Hi Jonas,

in PR #5, there's a commit to fix that: af4d1fa94eeb1e4b0ad401f3e1b09837f69a9066. Michael has not merged that into the project yet, and it may well break compilation with other toolchains.

It's a simple fix though, in Source/system/src/newlib/_cxx.cpp change the line #include <cstilb> to be #include <stdlib.h>

And you should be good to go!

sanamon commented 7 years ago

Thanks Paul!

I changed the line in _cxx.cpp from to but now the linker fails instead:

/usr/lib/gcc/arm-none-eabi/4.8.2/../../../arm-none-eabi/bin/ld: cannot find -lstdc++ collect2: error: ld returned 1 exit status

08:36:03 Build Finished (took 47s.892ms)

I'm sure it's just me who cant use the eclipse system... Regards, Jonas

sanamon commented 7 years ago

I figured it out myself. It seems that for ubuntu 14.04 the gcc-arm-none-eabi package doesnt include the libstdc++ lib. A known but unfixed bug apparently.

Fixed by manually downloading http://de.archive.ubuntu.com/ubuntu/pool/universe/libs/libstdc++-arm-none-eabi/libstdc++-arm-none-eabi-newlib_4.9.3+svn227297-1+8_all.deb and installing.

Now builds!

sanamon commented 7 years ago

marked as closed

sanamon commented 7 years ago

Update: could not build the project anyway. Had to de-install gcc-arm-none-eabi package and instead install gcc-arm-embedded following the instructions here: link