smlnj-110.43 will die when compiling with gcc-3.3 due to a whole bunch of pre-processing errors: gcc -x assembler-with-cpp -E -P -ansi -D_ASM_ -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_LINUX -D_POSIX_SOURCE -D_BSD_SOURCE -DGNU_ASSEMBLER -DDLOPEN -I../bytecode -I../objs -I../include ../mach-dep/X86.prim.asm > prim.s In file included from ../mach-dep/X86.prim.asm:11: ../include/ml-base.h:11:1: warning: "CONCAT" redefined In file included from ../mach-dep/X86.prim.asm:10: ../mach-dep/assyntax.h:82:1: warning: this is the location of the previous definition ../mach-dep/X86.prim.asm:84:24: pasting "ML_X86Frame" and ":" does not give a valid preprocessing token ../mach-dep/X86.prim.asm:141:26: pasting "sigh_return_a" and ":" does not give a valid preprocessing token ...<snip>... make[1]: *** [prim.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/smlnj-110.43/work/src/runtime/objs' make: *** [all] Error 2 ./config/install.sh: !!! Run-time system build failed for some reason. !!! ERROR: dev-lang/smlnj-110.43 failed. !!! Function src_compile, Line 60, Exitcode 1 !!! (no error message) The easiest (if not the most elegant) fix for this was to simply change the following line in the runtime/objs/mk.x86-linux file from: CPP = gcc -x assembler-with-cpp -E -P -ansi to: CPP = gcc -x assembler-with-cpp -E -P
Investigating...
This bug is related to Bug #29918 as well. As of glibc-2.3.2-r6, a package cannot include sysmacros.h and use -ansi at the same time. This is what Ulrich Drepper states in a libc-alpha thread linked on Bug #29918. Removing -ansi from both the CPP line as well as the CC line in the file specified in the original description allows the package to build to compleition. I'll attach a patch that fixes this issue for testing.
Created attachment 18631 [details, diff] Patch to remove -ansi from compile Give this patch a shot, see if it compiles for you as it does for me. If it does, I'll commit it to CVS.
Resolving as FIXED. The patch is now in CVS.
This affects smlnj-110.42 as well. Either the patch needs to be applied to that version too, or .43 needs to be unmasked.
Just to mention that .43 is not unmasked yet, so I have just arrived at the problem with .42. At the same time I just wanted to confirm that 110.43 works for me with gcc-3.3.2-r5.
I partly withdraw the intention of my previous comment. Please do not mark this stable. There are still problems. See: bug #43017. Also I do not think we should mark those versions stable. These versions are called working versions by authors. The last stable version was 110.0.7 and the new version is bound to come "soon". See http://www.smlnj.org
Also there is 110.45 released, said to have fixed the GCC 3.3 problem, but I could not roll out and test a useful ebuild because of bug #43018.
OK ... I hit this on 110.42. Should I download 110.45 from upstream, or "downgrade" to 110.0.7? I only have one ML package, PEPA http://www.dcs.ed.ac.uk/pepa/pwb0.72src.tar.gz and I don't know whether it will or will not work with the other two Gentoo options, OCAML and MOSML (Moscow ML).
The patch wasn't applied for 110.42 so i just had to emerge 110.43 and it worked (using gcc-3.3.2). Is it intentional ?
I added the patch to the 110.0.7 ebuild which is the only one that needs it now.