kubilus1 / gendev

Genesis development environment for Linux.
BSD 3-Clause "New" or "Revised" License
208 stars 23 forks source link

binutils compilation failed #7

Closed yoyz closed 8 years ago

yoyz commented 9 years ago

Hi,

I use debian 8.0 and gcc 4.9.2, when I git clone gendev and do a make I fall into an issue at this step :

+++ Building binutils-2.24 to build-binutils-m68k-elf-2.24...
mkdir -p build-binutils-m68k-elf-2.24
> /home/yoyz/build/gendev/work/logs/build-binutils-m68k-elf-2.24.log
cd build-binutils-m68k-elf-2.24; ../binutils-2.24/configure --target=m68k-elf --prefix=/opt/toolchains/gen/m68k-elf --enable-install-libbfd >> /home/yoyz/build/gendev/work/logs/build-binutils-m68k-elf-2.24.log 2>&1
make -C build-binutils-m68k-elf-2.24 all install DESTDIR= >> /home/yoyz/build/gendev/work/logs/build-binutils-m68k-elf-2.24.log 2>&1
../gen_gcc/makefile-gen:93: recipe for target 'build-m68k-binutils' failed
make[1]: *** [build-m68k-binutils] Error 2
make[1]: Leaving directory '/home/yoyz/build/gendev/work'
Makefile:49: recipe for target 'toolchain_build' failed
make: *** [toolchain_build] Error 2

I browse the web and found other guy who have the same issue. Don't know if this workaround could harm.

$ rm -rf work/build-binutils-m68k-elf-2.24/
$ export CFLAGS="-Wno-error=unused-value"
$ make

EDIT : oopps, I've missed the error and lost my log file. Anyway the problem is related to this kind of error which is describe in a lot of place :


../bfd/bfd.h:303:83: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
^
/home/mafm/prj/riscv/riscv-gnu-toolchain/src/binutils/gas/write.c:366:5: note: in expansion of macro ‘bfd_set_section_alignment’
bfd_set_section_alignment (stdoutput, seg, align);
https://github.com/riscv/riscv-gnu-toolchain/issues/3
ne0ndrag0n commented 9 years ago

Having the same issue on a variety of distros (Debian, Ubuntu) =(

kubilus1 commented 9 years ago

It's gcc 4.9 that is the culprit. This has a good description of the issue: https://sourceware.org/ml/binutils/2014-01/msg00333.html

I suppose you could do as you suggest and simply ignore the error for unused-value, but I'm not sure if that might cover up things you do want to warn about.

It looks like there is an update to binutils 2.25, not sure if if fixes this, but might be worth looking into.

kubilus1 commented 9 years ago

Okay, I've followed what ChillyWilly has done here: http://gendev.spritesmind.net/forum/viewtopic.php?f=7&t=889

....deep within the scripts and set the compilation to not raise an error for warning. --disable-werror.

Since I haven't reproduced this in my environment, pull the latest change and let me know if this works!!! Thanks!

ghost commented 9 years ago

First of all, thank you for the linux environment. SGDK is the only reason why i still used windows. Unfortunately, it still doesn't work for me and keeps outputting error 2. Chilly Willy's solution doesn't work. :'(

kubilus1 commented 9 years ago

Ahh, too bad. A couple "workarounds" for the time being. You could grab the pre-canned Dockerimage for this project: https://hub.docker.com/r/kubilus1/gendev/

Or roll back GCC to an earlier version since the issue appears to occur on 4.9. Once my day-job slows down just a tiny bit I'll spend some more time fixing this for good. Super busy ATM!!

ghost commented 9 years ago

ok, gl with the work! :3 still getting same issue even using gcc 4.4.3, man.

yoyz commented 9 years ago

Hi all,

Here is what I think should "simplify" the whole process, just idea :

Maybe the compile could be 00-binutils, 01-gcc... You see the idea.

My laptop is a real trash and it took hours to relaunch the whole process over and over because my laptop is a mess.

Hope you understand the idea, and definitely good works.

Johann

Envoyé de mon iPhone

Le 9 sept. 2015 à 17:02, "Mileena :3" notifications@github.com a écrit :

ok, gl with the work! :3 still getting same issue even using gcc 4.4.3, man. My friend, who have same error, also tried docker but with no luck :(

— Reply to this email directly or view it on GitHub.

ghost commented 9 years ago

can somebody just give me binaries, please? nothing is working, still getting error 2 with any ways to compile it.

andwn commented 9 years ago

I got a 32-bit build working after making a couple changes (see 2d528b79a80c9abd62276d6a100202fbb37241b5): https://my.mixtape.moe/uzfwkw.tar.bz2

This is what I am using since SGDK's wavtoraw segfaults on 64-bit. In the archive are the installed /opt/toolchains/gen files. You still need to copy the .gendev script from the repository and put it in ~/, then run it like . ~/.gendev before make-ing a project.

ghost commented 9 years ago

thanks! :3

kubilus1 commented 9 years ago

I've tarred up the /opt/toolchains/gen build directory from the docker build and posted this as a release here: https://github.com/kubilus1/gendev/releases/tag/v0.1

Hopefully this helps those with build troubles.

btimofeev commented 9 years ago

yoyz, show last lines in file /home/yoyz/build/gendev/work/logs/build-binutils-m68k-elf-2.24.log

btimofeev commented 9 years ago

I had the same error.

The log has been written that the script can not copy the binary to the directory /opt.

I run make with administrator privileges (sudo make) and the compilation and installation were successful.

ghost commented 8 years ago

There are dependencies to compile gendev. Add this step to installation guide, please. sudo apt-get install subversion build-essential texinfo Now i can build gendev.

kubilus1 commented 8 years ago

Noted in the instructions now!