parallaxinc / OpenSpin

Spin/PASM compiler for the Parallax Propeller.
56 stars 19 forks source link

Openspin Build Fails on Fedora21 #28

Closed jsdenson closed 6 years ago

jsdenson commented 8 years ago

Getting this error, my hair is wet, and I can't do a thing with either of them .... gcc and gcc-c++ are definitely installed.

ar: creating /home/sdenson/git/propeller-gcc/propeller-gcc/openspin/build/PropellerCompiler/libopenspin.a make[1]: Leaving directory '/home/sdenson/git/propeller-gcc/propeller-gcc/openspin/PropellerCompiler' g++ -o ./build/openspin -Wall -g -static ./build/openspin.o ./build/flexbuf.o ./build/preprocess.o ./build/textconvert.o ./build/pathentry.o ./build/objectheap.o ./build/PropellerCompiler/libopenspin.a /usr/bin/ld: cannot find -lstdc++ /usr/bin/ld: cannot find -lm /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status Makefile:44: recipe for target 'all' failed make: *\ [all] Error 1 [sdenson@localhost openspin]$

reltham commented 8 years ago

Can you compile any other C++ programs? -lstdc++ -lm & -lc equate to libstdc++ libm & libc. You can't build any C or C++ programs without those...

jsdenson commented 8 years ago

Everything else works fine including gcc/c++ builds.

Best Regards, --Steve

On Wed, May 11, 2016 at 4:12 AM, Roy Eltham notifications@github.com wrote:

Can you compile any other C++ programs? -lstdc++ -lm & -lc equate to libstdc++ libm & libc. You can't build any C or C++ programs without those...

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/parallaxinc/OpenSpin/issues/28#issuecomment-218429611

jsdenson commented 8 years ago

This may be a case where the i686 library is needed. I'll check that.

Best Regards, --Steve

On Wed, May 11, 2016 at 7:31 AM, Steve Denson jsdenson@gmail.com wrote:

Everything else works fine including gcc/c++ builds.

Best Regards, --Steve

On Wed, May 11, 2016 at 4:12 AM, Roy Eltham notifications@github.com wrote:

Can you compile any other C++ programs? -lstdc++ -lm & -lc equate to libstdc++ libm & libc. You can't build any C or C++ programs without those...

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/parallaxinc/OpenSpin/issues/28#issuecomment-218429611

jsdenson commented 8 years ago

Finally, apparently Fedora-21 doesn't like -static in the CFLAGS.

Installed i686 libraries first, but no joy.

Best Regards, --Steve

On Wed, May 11, 2016 at 10:08 AM, Steve Denson jsdenson@gmail.com wrote:

This may be a case where the i686 library is needed. I'll check that.

Best Regards, --Steve

On Wed, May 11, 2016 at 7:31 AM, Steve Denson jsdenson@gmail.com wrote:

Everything else works fine including gcc/c++ builds.

Best Regards, --Steve

On Wed, May 11, 2016 at 4:12 AM, Roy Eltham notifications@github.com wrote:

Can you compile any other C++ programs? -lstdc++ -lm & -lc equate to libstdc++ libm & libc. You can't build any C or C++ programs without those...

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/parallaxinc/OpenSpin/issues/28#issuecomment-218429611

reltham commented 8 years ago

Is it safe to just remove the -static option in the make files? Might it cause other linux versions to fail?

bweir commented 8 years ago

Not only is it safe, but it's a good idea. Most distributions don't even allow statically built executables into their package managers. =P

On Mon, May 30, 2016 at 6:41 PM, Roy Eltham notifications@github.com wrote:

Is it safe to just remove the -static option in the make files? Might it cause other linux versions to fail?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/parallaxinc/OpenSpin/issues/28#issuecomment-222574887, or mute the thread https://github.com/notifications/unsubscribe/AJEcGBT7fFQ2Ff0dIuEohl-YiEEg_CVqks5qG5G-gaJpZM4Ibrtk .

Brett Weir, Founder

Engineering Made Awesome 310.245.1775 • brett@lamestation.com • lamestation.com

reltham commented 8 years ago

I didn't make these make files, they were contributions from others. I don't have linux or mac, or whatever else they are used for to even test changes to them on. I just rely on the TeamCity builds David Zemon has setup to check those builds. I'll go ahead and remove the -static in my next commit.

jsdenson commented 8 years ago

Static makes it easier to distribute a program.

Maybe it's best to be static by default and allow override with an environment variable. On May 30, 2016 6:41 PM, "Roy Eltham" notifications@github.com wrote:

Is it safe to just remove the -static option in the make files? Might it cause other linux versions to fail?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/parallaxinc/OpenSpin/issues/28#issuecomment-222574887, or mute the thread https://github.com/notifications/unsubscribe/APun8khMwjblJH2Tq0F4i6EcQiS5JEgMks5qG5G-gaJpZM4Ibrtk .

jsdenson commented 8 years ago

Roy why don't you make static optional with an environment variable like this?

Warning untested, but "should" work ....

ifeq ($(OS),Darwin) CFLAGS+=-Wall -g -Wno-self-assign else CFLAGS+=-Wall -g $(MSTATIC) endif

That way if static is needed, the user can do this:

$ make MSTATIC=-static

Best Regards, --Steve

On Mon, May 30, 2016 at 8:31 PM, Steve Denson jsdenson@gmail.com wrote:

Static makes it easier to distribute a program.

Maybe it's best to be static by default and allow override with an environment variable. On May 30, 2016 6:41 PM, "Roy Eltham" notifications@github.com wrote:

Is it safe to just remove the -static option in the make files? Might it cause other linux versions to fail?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/parallaxinc/OpenSpin/issues/28#issuecomment-222574887, or mute the thread https://github.com/notifications/unsubscribe/APun8khMwjblJH2Tq0F4i6EcQiS5JEgMks5qG5G-gaJpZM4Ibrtk .

reltham commented 6 years ago

@jsdenson I went ahead and did you suggestion for -static