Guzunty / Pi

This repository contains resources to support the Guzunty Pi IO expansion board
110 stars 32 forks source link

Error making Guzunty loader #29

Closed MrEngman closed 10 years ago

MrEngman commented 10 years ago

I'm going through the "Get your Pi set up" page on the wiki. When I try to make the Guzunty loader I am receiving an error running make.

make
gcc -o gz_load -Wl lenval.o micro.o ports.o -L/usr/local/lib -lbcm2835 -lrt
gcc: error: unrecognized command line option â-Wlâ
make: *** [gz_load] Error 1

Anyone any idea why? gcc version 4.7.2

campbellsan commented 10 years ago

Hmm, I haven't tried this yet, but at first glance the switch should be -Wall, not -Wl.

The make file on github looks ok, so maybe the file got corrupted locally?

Try 'git status' to see if git thinks anything got changed.

campbellsan commented 10 years ago

Correction, the makefile does specify -Wl in the final link stage.

It runs fine under gcc-4.6, which is the raspbian default compiler at this time.

Please let me know if you need to use gcc-4.7 and I will investigate more deeply. Raspbian does support gcc-4.7, but it is not the default.

campbellsan commented 10 years ago

I looked a little deeper anyway, and confirmed that the error message is specific to gcc-4.7.

I removed the -Wl option from line 30 of Makefile and gz_load builds and runs fine.

I will wait to change the github Makefile until gcc-4.7 becomes the Raspbian default.

Thank you for noticing this :-)

MrEngman commented 10 years ago

Thanks, I edited Makefile and changed -Wl to -Wall, as it appears in line 8 of the file, and I got it to compile OK as well with that change. Finished setting up my Pi and ran the test on Guzunty and it all looks good. A really neat little add-on.

Just to explain why I'm using gcc-4.7. I updated to gcc-4.7 quite a long time ago as raspbian is compiled using gcc-4.7 and I compile several wifi modules not included in the standard image and they do not work correctly if compiled using gcc-4.6.

Thanks for all your efforts.

campbellsan commented 10 years ago

Aha! I knew there would be a reason. :-)

Thanks for the kind comments on the Guzunty, we put a lot of thought into it.

I'm delighted you're off and running, if you wish, please do let us know what you're doing with it.