error when building gcc
Bill Henning
Posts: 6,445
/home/odroid/buildgcc/propgcc/binutils/bfd/opncls.c: In function bfd_fopen:
./bfd.h:529:65: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
^
/home/odroid/buildgcc/propgcc/binutils/bfd/opncls.c:257:5: note: in expansion of macro bfd_set_cacheable
bfd_set_cacheable (nbfd, TRUE);
^
cc1: all warnings being treated as errors
make[5]: *** [opncls.lo] Error 1
I agree with the compiler, that looks like an error.
Comments
Basically,
#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
is bad code, first bool is a reserved keyword, second there is no place for the TRUE to go.
Needs to be fixed in bfd-in.h and bfd-in2.h located in /home/odroid/buildgcc/propgcc/binutils/bfd
This should be fixed in the mainline branch.
bfd_set_section_vma() generates illegal code, does not even reference first argument, part of libtool.
I even tried adding -Wno-unused-value to the fixit script, no joy.
Looks like some multi-legged creatures creeped into the macro definitions in mainline.
UPS dropped off my Pi2B's a couple of hours ago and I've got one running right now on another port of my KVM.
Unlike the older Pi's it is actually very usable for browsing the web (except videos).. Pi2 review will follow ODROID review.
PM Leon, he bought a few extra Pi 2's when he heard Heater and I could not source any here, meanwhile I found a couple, so you could get the one earmarked for me from him if you like, as I don't really need one more yet.
I understand about unfinished code, I just wish the last full release was forked for a test branch, because it is very frustrating not to be able to build it.
Based on the errors I found while trying to compile, the same errors would show up when compiling on X86.
Building the CROSS=rpi, I got an error because I didn't have the binutils-arm-linux-gnueabihf prerequisite installed. Then I got this error:
Then it was time for bed...
Today I am benchmarking my Pi2B, and editing the ODROID-C1 photos and review. Then I'll be trying RoboPi on the Pi2B, editing photos etc for the Pi2B review.
I'll try to get back to compiling propgcc soon.
Pi2B first impression: A world of difference in usability from the single core Pi's. It is actually a usable desktop, with fast enough web browsing.
Ray
I'll try to compile it for Ubuntu, as C1 runs Ubuntu, hopefully that will produce a usable compiler.
As RPi, C1, Banana, CI20 all run Linux, I think it is reasonable to expect that propgcc would compile - heck, that is exactly what a non-propellerhead would expect
I agree with you - and also hope that Parallax assigns someone to fix this.
No, it's not reasonable to expect any particular open source project to build and run easily on any open source platform. Despite the tremendous efforts many people put into making this possible.
I don't think Parallax, or anybody has the resources to make this so.
prop-gcc has compiled for me fine on Debian Wheezy on the PC and on the Rasperry Pi.
It has failed, eventually worked around, on Debian Jessie and Ubuntu.
In this open source world we are subject to upgrades of libs and other dependencies that tend to brake things. Not to mention the difference between different Linux distributions.
prop-gcc is no doubt falling behind the current versions because the Propeller target is not integrated back into the upstream GCC. Which may or may not ever happen.
Often posting such error messages into google will uncover somebody on Stackoverflow who has had the same issue a hopefully received answers as to how to get around it.
As nearly as I could tell, the errors are due to changes made in the sources used for libtool that were not completed, ie incorrect new macro definitions that do not compile correctly when built. I fixed one, as the error was pretty obvious, however the second was not obvious to me - and until I get past that one, there is no way to know how many more are lurking in there.
I had hoped to use the time required to build gcc (with various number of parallel compiles) as a real-world benchmark between multicore SBC's, but that is not likely to happen for this round of new reviews (ODROID-C1 and Pi2B).
I was following the instructions precisely, and got those errors. I'll try again as I did do one thing differently - I was compiling on an ODROID-C1.
The problem is, the errors I was running into were defines being incorrectly ... defined, and were generating errors not warnings.
I was following the instructions from the propgcc wiki exactly, and made sure I had all the prerequisites.
I thought the error was valid, as after the preprocessor it would be equivalent to:
a = b, TRUE
which could leave a value dangling on the stack.
On the other hand, gcc is pretty smart... and I might have been a bit paranoid.
This is exactly the same thing. The fclose function returns a value which is being ignored.
From the instructions, it installs in /opt/parallax/bin on Linux machines and C:\propeller-gcc\bin on Windows.
And if you've followed all the steps you should have PropGCC available on your path, so `propeller-elf-gcc --version` should give you a helpful output.
https://github.com/totalspectrum/binutils-propeller
I've been building this on Ubuntu 12.04 LTS, which doesn't have the compile warning issues that others have run into, but presumably the most recent binutils sources will build well on more recent versions of Ubuntu.