New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ocaml build fails on Solaris 10/x64 #3943
Comments
Comment author: @xavierleroy Note that gcc and OCaml are configured for x86 (32 bits) not x86_64 (64 bits). It would be helpful to identify which system call fails. Something like truss boot/ocamlrun boot/ocamllex parsing/linenum.mll should show a trace of system calls. Consider also compiling ocamlrun in debug mode (see INSTALL file) and |
Comment author: majid It is indeed a 32/64 bit issue, as ocaml compiles and installs just fine on another Solaris 10 machine running on an AMD Athlon XP (32 bit). I am attaching the results of truss. |
Comment author: majid I manage to build using: configure -cc "/usr/sfw/bin/gcc -m64" -host x86_64-solaris10 -with-pthreads (after having patched configure with the patch attached so it recognizes /usr/sfw/bin/gcc as gcc to supply -fPIC instead of -KPIC, and so it uses amd64 as the target instead of ia32). I cannot build "make opt" yet, as compilation of amd64.S aborts with the following error message: /usr/sfw/bin/gcc -m64 -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_amd64 -DSYS_solaris -O -D_FILE_OFFSET_BITS=64 -D_REENTRANT -c -o unix.o unix.c |
Comment author: majid Changing ASPP with yet another patch to configure (attached configure2.txt supersedes configure.txt) so it uses /usr/sfw/bin/gcc instead of just gcc will get amd64.o to compile. The build fails downstream, presumably because ocamlopt is not calling the right assembler or giving it the right options (e.g. -xarch=amd64 if using Solaris /usr/ccs/bin/as). cd stdlib; gmake allopt |
Comment author: @xavierleroy There are two separate issues here: 1- The close() system call that returns EINVAL (see the truss output). 2- The Solaris compilers appear to produce 32-bit apps by default and to require special options to produce 64-bit apps. This is OK except that OCaml's configuration makes it hard or even impossible to select the options appropriate for a 64-bit app. I might look into this later when I get access to a Solaris/AMD64 platform. |
Original bug ID: 3943
Reporter: majid
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2006-08-30T11:42:46Z)
Resolution: not a bug
Priority: normal
Severity: major
Version: 3.09.0
Category: ~DO NOT USE (was: OCaml general)
Related to: #4663
Monitored by: avatariks majid
Bug description
Building ocaml 3.09 on Solaris 10/x64 fails with the following message:
boot/ocamlrun boot/ocamlc -nostdlib -I boot -warn-error A -I utils -I parsing -I
typing -I bytecomp -I asmcomp -I driver -I toplevel -c utils/consistbl.ml
boot/ocamlrun boot/ocamllex parsing/linenum.mll
12 states, 323 transitions, table size 1364 bytes
Fatal error: exception Sys_error("Invalid argument")
gmake: *** [parsing/linenum.ml] Error 2
Additional information
I am attaching a full log of the configure/make world session
File attachments
The text was updated successfully, but these errors were encountered: