Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
trunk build fails on Sparc Solaris 11 #7256
Original bug ID: 7256
Follow instructions in INSTALL, and get the following error:
gcc -m32 -std=gnu99 -O2 -fno-strict-aliasing -fwrapv -Wall -Werror -D_FILE_OFFSET_BITS=64 -D_REENTRANT -I../../byterun -fPIC -I../unix -DIN_OCAML_BIGARRAY -DCAML_NAME_SPACE -c mmap_unix.c
Steps to reproduce
./configure -cc "gcc -m32" -as "as -32" -aspp "gcc -m32 -c"
$ gcc -v
Comment author: @gasche
My understanding from
is that Solaris is a bit too clever and refuses to combine the "modern" setting -std=c99 with the "old" requirement (#define _XOPEN_SOURCE 500), which corresponds to a pre-2000 POSIX standard. It either accepts _XOPEN_SOURCE 500 with an older C version (eg. -std=c89), or a modern language requirement with a more recent standard requirement, eg. _XOPEN_SOURCE 600.
Could you confirm that the build also works if you replace the _XOPEN_SOURCE definition by 600 instead of 500?
(I think in that case it might be a better fix than just disabling the define, as some other functions may test for this _XOPEN_SOURCE define for availability.)
Comment author: junsli
Thanks. Defining it to 600 compiles (bytecode compiler). 4.02 compiles too.
(I see flag _XOPEN_SOURCE is added in 4.00.0).
By the way, It seems that running unit test requires native compiler, and configure reports no native compiler on Sparc Solaris, so I can't run test. It's unclear if all functions are working correctly.
I'll build on Linux and Mac to see if this change affects anything.