crossbridge-community / crossbridge

C/C++ Compiler for the ActionScript Virtual Machine (AVM2)
http://sourceforge.net/projects/crossbridge-community/
Other
151 stars 35 forks source link

binutils: Make fails to build binutils.info recipe #69

Closed wvxvw closed 9 years ago

wvxvw commented 9 years ago

I was able to track the error down to this:

while executing /build/linux/binutils/binutils/doc/Makefile

Making info in doc
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:4260: warning: @itemx should not begin @table
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:4267: @itemx must follow @item
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:4271: @itemx must follow @item
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:4277: @itemx must follow @item
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:4281: @itemx must follow @item
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:4290: @itemx must follow @item
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:2329: warning: node next `ranlib' in menu `readelf' and in sectioning `size' differ
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:2382: warning: node prev `size' in menu `readelf' and in sectioning `ranlib' differ
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:2606: warning: node next `strip' in menu `elfedit' and in sectioning `c++filt' differ
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:3112: warning: node next `nlmconv' in menu `windres' and in sectioning `windmc' differ
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:3217: warning: node next `windmc' in menu `dlltool' and in sectioning `windres' differ
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:3217: warning: node prev `windmc' in menu `windres' and in sectioning `nlmconv' differ
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:3378: warning: node next `windres' in menu `windmc' and in sectioning `dlltool' differ
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:3378: warning: node prev `windres' in menu `nlmconv' and in sectioning `windmc' differ
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:3572: warning: node next `dlltool' in menu `Common Options' and in sectioning `readelf' differ
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:3572: warning: node prev `dlltool' in menu `windmc' and in sectioning `windres' differ
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:3966: warning: node next `readelf' in menu `size' and in sectioning `elfedit' differ
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:3966: warning: node prev `readelf' in menu `ranlib' and in sectioning `dlltool' differ
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:4220: warning: node next `elfedit' in menu `c++filt' and in sectioning `Common Options' differ
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:4220: warning: node prev `elfedit' in menu `strip' and in sectioning `readelf' differ
/home/wvxvw/projects/crossbridge/binutils/binutils/doc/binutils.texi:4312: warning: node prev `Common Options' in menu `dlltool' and in sectioning `elfedit' differ
Makefile:350: recipe for target 'binutils.info' failed
make[7]: *** [binutils.info] Error 1
Making info in po
Makefile:872: recipe for target 'info-recursive' failed
make[6]: *** [info-recursive] Error 1
Makefile:3382: recipe for target 'all-binutils' failed
make[5]: *** [all-binutils] Error 2
Makefile:815: recipe for target 'all' failed
make[4]: *** [all] Error 2
Makefile:796: recipe for target 'binutils_build' failed
make[3]: *** [binutils_build] Error 2
Makefile:791: recipe for target 'binutils' failed
make[2]: *** [binutils] Error 2

Judging from warnings, there must be something... missing in the Texinfo sources? I'm not really sure. I also don't see any error messages, only warnings :S I can't understand why it fails.

JoeDupuis commented 9 years ago

Which branch/version of the sources are you using ? Also you are building on Linux ? I could try to help a bit, but the linux build is not supported at the moment. You'll have to put more time into it before it works. If you do manage to make it work. You should make a pull request.

wvxvw commented 9 years ago

I'm building from master, but this isn't exactly the problem of Crossbridge as it appears... It's because I have texinfo 5.1, and the binutils here must be a somewhat older version. I've searched GCC bugtracker - this appears to be a known problem: these two won't play together. I need to look now for ways to disable texinfo completely (I won't need it anyway), but it seems like quite a bit of manual labor, since the build doesn't seem to have such an option. I'm not a Make / Autotools pro... so it's taking time, and I'm sure I won't make it very well :( And, after all, this will have to be upgraded some day, so disabling it isn't a permanent solution by any means.

JoeDupuis commented 9 years ago

There is some works to build a crossbridge version of clang/llvm. Which might solve it all, but it still in the pipe at the moment I would not count on it if you need something in the near future.

The texinfo version was what I suspected. What you could do is install the needed texinfo version in a custom folder and put it in front of your PATH temporarily just to build the tool.

The exec called on osx seems to be texi2pdf here is my version if you want an idea of what you should aim for:

twistedjoe-mbp:crossbridge twistedjoe$ texi2pdf -v
texi2dvi (GNU Texinfo 4.8) 1.34

So, 4.8 should do it.

I am doing a full build at the moment, just to be sure there is no problem on supported platforms too. It might take a while.

wvxvw commented 9 years ago

Hey, thanks for reply! I did manage to bypass the texinfo (just edited the Makefiles), now there're other things... and I'm not sure if I should bug you here with it, since it seems like I'll probably encounter more of these. This is something to do with Crossbirdge:

gcc -DHAVE_CONFIG_H -I.  -I. -I. -I../bfd -I./config -I./../include -I./.. -I./../bfd -DLOCALEDIR="\"/usr/local/share/locale\""  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT as.o -MD -MP -MF .deps/as.Tpo -c -o as.o as.c
as.c:151:1: error: data definition has no type or storage class [-Werror]
 flag_target_player = 0;
 ^
as.c:151:1: error: type defaults to ‘int’ in declaration of ‘flag_target_player’ [-Werror=implicit-int]
as.c:152:1: error: data definition has no type or storage class [-Werror]
 flag_save_temps = 0;
 ^
as.c:152:1: error: type defaults to ‘int’ in declaration of ‘flag_save_temps’ [-Werror=implicit-int]
as.c:1032:1: error: ‘close_output_file’ defined but not used [-Werror=unused-function]
 close_output_file (void)
 ^
cc1: all warnings being treated as errors
make[4]: *** [as.o] Error 1

I've looked into as.h and I see that it should have defined these variables, but I'm guessing that it is probably because COMMON haven't been defined yet, by the time Make got to build this file.

Another problem: I had to add #include <sys/wait.h> to as.c because it didn't have the definition for waitpid - or is it some other waitpid?

JoeDupuis commented 9 years ago

There is gonna be a lot of problem like that. I won't be able to help you on all of them, but I might give you some tips.

Maybe, I will put more resources into the linux build some day (part of the team here is on linux), so if you give up, maybe one day...

A solution in the meantime if you need this would be a virtual machine with either windows or osx. You could even use reach it by SSH and never use the UI. (After all you this is a console tool).

vpmedia commented 9 years ago

You can try to downgrade textinfo package to Lower! version. I've recieved a pull request for Linux support but it seems does not solved the problem: https://github.com/crossbridge-community/crossbridge/pull/1

vpmedia commented 9 years ago

Closing this one.