Raspberry Pi compiling propgcc
dustfinger
Posts: 7
in Propeller 2
Hi,
I am trying to compile propgcc on a Raspberry Pi 3 (Kano). Here is what I have done so far:
I then ran the following code to resolve the issue discussed here: https://www.linuxquestions.org/questions/linux-from-scratch-13/make-error-in-compiling-binutils-4175476855/
I then ran make which resulted in the following errors:
Then the first errors I see in ../build/binutils/config.log
I would really appreciate any insight on how to resolve or get around this issue.
Cheers!
dustfinger.
I am trying to compile propgcc on a Raspberry Pi 3 (Kano). Here is what I have done so far:
$ git clone https://github.com/parallaxinc/propgcc $ sudo apt-get update $ sudo apt-get upgrade $ sudo apt-get install mercurial $ sudo apt-get install texinfo $ sudo apt-get install bison $ sudo apt-get install flex $ sudo mkdir /opt/parallax/
I then ran the following code to resolve the issue discussed here: https://www.linuxquestions.org/questions/linux-from-scratch-13/make-error-in-compiling-binutils-4175476855/
$ cd propgcc/binutils/ $ sudo sed -i -e 's/@colophon/@@colophon/' \ -e 's/doc@cygnus.com/doc@@cygnus.com/' bfd/doc/bfd.texinfo
I then ran make which resulted in the following errors:
Making all in po make[5]: Entering directory '/home/swan/dev/build/binutils/bfd/po' make[5]: Nothing to be done for 'all'. make[5]: Leaving directory '/home/swan/dev/build/binutils/bfd/po' make[5]: Entering directory '/home/swan/dev/build/binutils/bfd' /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I/home/swan/dev/propgcc/binutils/bfd -I. -I/home/swan/dev/propgcc/binutils/bfd -I/home/swan/dev/propgcc/binutils/bfd/../include -DHAVE_bfd_elf32_propeller_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR='"/opt/parallax/bin"' -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT opncls.lo -MD -MP -MF .deps/opncls.Tpo -c -o opncls.lo /home/swan/dev/propgcc/binutils/bfd/opncls.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I/home/swan/dev/propgcc/binutils/bfd -I. -I/home/swan/dev/propgcc/binutils/bfd -I/home/swan/dev/propgcc/binutils/bfd/../include -DHAVE_bfd_elf32_propeller_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR=\"/opt/parallax/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT opncls.lo -MD -MP -MF .deps/opncls.Tpo -c /home/swan/dev/propgcc/binutils/bfd/opncls.c -o opncls.o In file included from /home/swan/dev/propgcc/binutils/bfd/opncls.c:26:0: /home/swan/dev/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/swan/dev/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 Makefile:1575: recipe for target 'opncls.lo' failed make[5]: *** [opncls.lo] Error 1 make[5]: Leaving directory '/home/swan/dev/build/binutils/bfd' Makefile:1617: recipe for target 'all-recursive' failed make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory '/home/swan/dev/build/binutils/bfd' Makefile:1108: recipe for target 'all' failed make[3]: *** [all] Error 2 make[3]: Leaving directory '/home/swan/dev/build/binutils/bfd' Makefile:2505: recipe for target 'all-bfd' failed make[2]: *** [all-bfd] Error 2 make[2]: Leaving directory '/home/swan/dev/build/binutils' Makefile:837: recipe for target 'all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory '/home/swan/dev/build/binutils' Makefile:162: recipe for target '/home/swan/dev/propgcc/../build/binutils/binutils-built' failed make: *** [/home/swan/dev/propgcc/../build/binutils/binutils-built] Error 2
Then the first errors I see in ../build/binutils/config.log
Thread model: posix gcc version 4.9.2 (Raspbian 4.9.2-10) configure:4047: $? = 0 configure:4036: gcc -V >&5 gcc: error: unrecognized command line option '-V' gcc: fatal error: no input files compilation terminated. configure:4047: $? = 4 configure:4036: gcc -qversion >&5 gcc: error: unrecognized command line option '-qversion' gcc: fatal error: no input files compilation terminated.
I would really appreciate any insight on how to resolve or get around this issue.
Cheers!
dustfinger.
Comments
forums.parallax.com/discussion/160009/error-when-building-gcc
Also, look here:
https://sourceforge.net/p/sdcc/mailman/message/32589131/
JonM, You are correct, I should have done more research on these forums before posting. Thank you kindly for those links.
I added the following line to fix-xcode-warnings.sh.
Then ran:
But I am getting exactly the same complaint about:
for some reason my cflags are not being applied to gcc or they are being overridden somewhere? Am I using the script incorrectly?
I think you will need to 'source' the fix-warnings file...
Before sourcing the fix-warnings file & after running:
I got no response. But, when I sourced the fix-warnings file I get:
export (which is in the fix-warnings) file, needs to be 'sourced'.
Try:
dgately
TIL;
I have only ever used the source command for updating /etc/profile or ~/.profile, I never thought to use it targeting the fix-warnings.sh. Thank you. I realize that Bill Henning mentions that he sourced this file in this thread, but I did not understand at the time what he meant.
So I got a lot farther, but have run into another issue. The following is what I did:
Removed -Wno-string-plus-int and -Wno-sometimes-uninitialized from fix-xcode-warnings since they are not valid CFLAGS on my system. My fix-xcode-warnings.sh now contains:
I installed the following additional packages:
I found I needed to source the CFLAGS as root since it will need to output the binary to the /opt/parallax folder.
It seems to be complaining that there is no such file or directory named libtool-soversion. I found that file at binutils/bfd/libtool-soversion. Any idea what the problem is here? Do I need to make a sym link of that file in another directory so that it can be found maybe? It is weird because the last directory it enters before the failure is the same directory that libtool-soversion is in so I am thinking that I must be miss interpreting the error.
I'm not sure why you've got to 'sudo' in order to make propgcc. That may be a small part of the problems and may also cause problems once you do get propgcc to build. "/opt/parallax" & "/opt/parallax/bin" should not require root access, else you may not be able to execute "propeller-elf-gcc" from those directories. I am on a Mac OS system, but permissions should be the same as Linux/Unix. As the only user of my system, I set those directories (from /opt on down) to myUser:wheel, which gave me access and no longer needing to 'sudo' my commands.
Also, when I had similar issue in building the entire propgcc from the top level, I cd'd down a few layers and ran configure & make to get a closer look at the issues. Maybe try:
This might make it a little easier to debug what's going on. Once you get bfd to build, move up to binutils & do the same.
dgately
Result of running 'gcc -V on command line:
I attempted to down rev texinfo from 6.3.0 that was installed to 4.13 as is listed on the Parallax GCC page, but did not change the results for me.
https://github.com/parallaxinc/propgcc-docs/blob/master/doc/BuildPreReq.md
-dgately
There is no 'configure' file in the 'build/binutils/bfd' folder in my config.
I'm still trying to track this down.
Thanks again!
However, there is no package for Raspian thus this will fail. Also, it appears that PWL was merged into PPL "Parma Polyhedra Library" and is no longer a separate download:
cs.unipr.it/pipermail/ppl-devel/2012-February/017944.html
I have installed "libppl-dev" but did not have any affect on resolving this.
There is a Patch for 'configure.ac' that should lists adding '-lpwl' to PPL but I have not tried this and not sure if it is applicable in this situation. But then again this could be the source of the issue where '-lpwl' was added.
https://patchwork.ozlabs.org/patch/83630/