Opened 14 years ago

Closed 14 years ago

#6329 closed bug (fixed)

GCC2 compilation failure under Ubuntu Linux 10.04 (Lucid).

Reported by: bga Owned by: bga
Priority: normal Milestone: R1
Component: Build System Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

today I tried to compile Haiku under Ubuntu 10.04 (64 bit) using the following configure command:

linux32 ../haiku/configure --alternative-gcc-output-dir ../haiku-gcc4 --build-cross-tools ../buildtools --include-gpl-addons --include-patented-code --target=haiku --use-gcc-pipe --use-32bit --use-xattr

At some point it failed when trying to generate a info file with makeinfo:

gcc -o c++filt -DCROSS_COMPILE -DIN_GCC     -O2 -U_FORTIFY_SOURCE  -DHAVE_CONFIG_H  \
	  cxxmain.o underscore.o obstack.o        ../libiberty/libiberty.a
/home/bga/haiku-dev/haiku-gcc2/cross-tools-build/gcc/texinfo/makeinfo/makeinfo   -I/home/bga/haiku-dev/buildtools/legacy/gcc/gcc -o cpp.info /home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi
Making info file `cpp.info' from `/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:10: Bad argument to `end', `direnryy', using `direntry'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:134: Bad argument to `end', `mnuu', using `menu'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:264: Bad argument to `end', `mnuu', using `menu'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:308: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:308: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:308: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:328: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:328: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:328: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:345: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:345: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:345: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:360: Bad argument to `end', `talle', using `table'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:553: Bad argument to `end', `mnuu', using `menu'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:814: Bad argument to `end', `mnuu', using `menu'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:827: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:827: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:827: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:833: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:833: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:833: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:849: Bad argument to `end', `smallxaample', using `smallexample'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:862: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:862: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:862: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:870: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:870: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:870: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:876: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:876: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:876: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:890: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:890: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:890: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:902: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:902: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:902: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:910: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:910: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:910: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:920: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:920: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:920: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:926: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:926: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:926: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:933: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:933: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:933: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:941: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:941: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:941: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:947: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:947: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:947: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:955: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:955: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:955: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:961: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:961: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:961: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:969: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:969: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:969: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:979: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:979: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:979: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:988: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:988: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:988: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:997: Bad argument to `end', `talle', using `table'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1013: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1013: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1013: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1017: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1017: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1017: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1021: Bad argument to `end', `talle', using `table'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1027: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1027: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1027: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1031: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1031: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1031: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1036: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1036: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1036: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1043: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1043: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1043: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1049: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1049: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1049: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1051: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1051: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1051: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1056: Unknown command `cdde'.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1056: Misplaced {.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1056: Misplaced }.
/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:1060: Bad argument to `end', `talle', using `table'.
Too many errors!  Gave up.
make[1]: ** [cpp.info] Erro 4
make[1]: Saindo do diretório `/haiku-dev/haiku-gcc2/cross-tools-build/gcc/gcc'
make: ** [cross] Erro 2
ERROR: Building gcc failed.

it seems the problem is that the generated makeinfo is, somehow, broken. For instance, the first error says:

/home/bga/haiku-dev/buildtools/legacy/gcc/gcc/cpp.texi:10: Bad argument to `end', `direnryy', using `direntry'.

But line 10 of cpp.texi is:

@end ifinfo

The previous line is:

@end direntry

Which is probably what it refers to, but notice that while the file has "direntry", the error message is mentioning "direnryy".

Any ideas about this one?

Attachments (1)

makeinfo-strcpy-overlap.patch (899 bytes ) - added by Shisui 14 years ago.

Download all attachments as: .zip

Change History (8)

in reply to:  description comment:1 by bonefish, 14 years ago

Replying to bga:

Any ideas about this one?

No, sorry. As a solution, since the documentation is utterly superfluous when building the cross-compiler, you could look whether there's an option to disable it, or, if not, hack the gcc build system to always not build it in cross-compilation mode.

comment:2 by bga, 14 years ago

Oh well... I installed the 32 bit version and, then, it worked. I will try to investigate it a bit more.

by Shisui, 14 years ago

comment:3 by Shisui, 14 years ago

patch: 01

comment:4 by Shisui, 14 years ago

I got the same error when re-configuring my Haiku build under Ubuntu 10.04 x64. The first time, I was able to bypass this error by replacing the generated makeinfo by a symlink to /usr/bin/makeinfo. This time, I search in the makeinfo sourcecode what was going wrong.

A bad strcpy() call is involved, which tries to copy a buffer over himself, which is strongly discouraged since it may or may not work, depending on the implementation (I believe the strcpy implementation in the x64 version of libc can't handle buffer overlap).

The above patch correct this strcpy() call. :-)

edit: The patch is to be applied to buildtools/legacy/gcc/texinfo/makeinfo/makeinfo.c

Last edited 14 years ago by Shisui (previous) (diff)

comment:5 by bonefish, 14 years ago

Owner: changed from bonefish to bga
Status: newassigned

Shisui, thanks for the patch! It is unnecessarily complicated, though. The to be replaced strcpy(string, string + x) is semantically equivalent to memmove(string, string + x, strlen(string + x) + 1), with the latter handling the potential overlap correctly.

Bruno, assigning to you. If you can verify this fixes the problem, please apply the change and close the ticket.

comment:6 by bga, 14 years ago

Will do this tomorrow. Thank you both for your help. now i just need a working Intel Extreme driver. :)

comment:7 by bga, 14 years ago

Resolution: fixed
Status: assignedclosed

I went ahead and tried the fix. It worked.

Fixed in hrev37574.

Note: See TracTickets for help on using tickets.