| Anonymous | Login | Signup for a new account | 2013-05-23 17:51 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0005178 | OCaml | OCaml general | public | 2010-11-15 18:01 | 2012-09-19 14:19 | ||||||
| Reporter | nobelius | ||||||||||
| Assigned To | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | have not tried | ||||||
| Status | acknowledged | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 3.12.0 | ||||||||||
| Target Version | 4.00.2+dev | Fixed in Version | |||||||||
| Summary | 0005178: Compile a 32-bit version of OCaml on a 64-bit linux OS | ||||||||||
| Description | I tried to compile a 32-bit version of OCaml because I suspect a performance loss with the 64-bit version. I used the command line given as example in INSTALL file: ./configure -cc "gcc -m32" -as "as --32" -aspp "gcc -m32 -c" and then "make world" but I obtained the following error: make[2]: Entering directory `/local/vmonfort/Downloads/ocaml-3.11.2/otherlibs/num' gcc -m32 -fno-defer-pop -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -I../../byterun -O -fPIC -DBNG_ARCH_amd64 -DBNG_ASM_LEVEL=1 -c bng.c In file included from bng.c:24: bng_amd64.c: In function ‘bng_amd64_mult_add_digit’: bng_amd64.c:113: error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’ bng_amd64.c:113: error: ‘asm’ operand has impossible constraints make[2]: *** [bng.o] Error 1 make[2]: Leaving directory `/local/vmonfort/Downloads/ocaml-3.11.2/otherlibs/num' the configure script (with above-mentioned option line) was indicating the following information: Configuration for the bytecode compiler: C compiler used........... gcc -m32 options for compiling..... -fno-defer-pop -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT options for linking....... -Wl,-E -lm -ldl -lpthread shared libraries are supported options for compiling..... -fPIC -fno-defer-pop -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT command for building...... gcc -m32 -shared -o lib.so -Wl,-rpath,/a/path objs Configuration for the native-code compiler: hardware architecture..... amd64 OS variant................ linux C compiler used........... gcc -m32 options for compiling..... -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT options for linking....... -lm assembler ................ as --32 preprocessed assembler ... gcc -m32 -c native dynlink ........... true profiling with gprof ..... supported Source-level replay debugger: supported Additional libraries supported: unix str num dynlink bigarray systhreads threads graph Configuration for the "num" library: target architecture ...... amd64 (asm level 1) Configuration for the "graph" library: options for compiling .... options for linking ...... -lX11 The "labltk" library: not supported | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0005712) xleroy (administrator) 2010-11-22 11:48 |
I ran into the same issue recently under Linux. Currently, some manual editing of the config/Makefile generated by configure is needed, which is not nice. At the very least, the wrong example should be removed from the INSTALL file. Even better would be to have a configure script that works in this case. |
|
(0005836) monate (reporter) 2011-02-28 16:05 |
Here is the command I had to use to cross compile a 32 bits ocaml from an Ubuntu 64. /configure -cc "gcc -m32" -as "as --32" -aspp "gcc -m32 -c" -host i386-linux -partialld "ld -r -melf_i386" Then I have to run make world.opt _twice_ as the first run ends up with ====== ../ocamlcomp.sh -pack -g camlp4/Camlp4Top/Top.cmo camlp4/Camlp4Top/Rprint.cmo -o camlp4/Camlp4Top.cmo boot/ocamlrun boot/ocamldep -pp 'boot/ocamlrun camlp4/boot/camlp4boot.byte -D OPT' -modules camlp4/camlp4prof.mli > camlp4/camlp4prof.mli.depends sh: line 1: 32000 Killed boot/ocamlrun camlp4/boot/camlp4boot.byte -D OPT camlp4/camlp4prof.mli > /tmp/camlppb16a63 Preprocessing error on file camlp4/camlp4prof.mli Exit code 2 while executing this command: boot/ocamlrun boot/ocamldep -pp 'boot/ocamlrun camlp4/boot/camlp4boot.byte -D OPT' -modules camlp4/camlp4prof.mli > camlp4/camlp4prof.mli.depends make[1]: *** [camlp4out] Error 2 make[1]: Leaving directory `/home/monate/OCAML/ocaml-3.12.0' make: *** [world.opt] Error 2 ======= The second run is successful. Note that the detection of 32 library is not correct : if there is a valid libX11 64bits and no libX11 32bits, then configure pretends everything is ok, but the compilation fails later. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-11-15 18:01 | nobelius | New Issue | |
| 2010-11-22 11:48 | xleroy | Note Added: 0005712 | |
| 2010-11-22 11:48 | xleroy | Status | new => acknowledged |
| 2011-02-28 16:05 | monate | Note Added: 0005836 | |
| 2012-07-10 17:31 | doligez | Target Version | => 4.01.0+dev |
| 2012-07-31 13:36 | doligez | Target Version | 4.01.0+dev => 4.00.1+dev |
| 2012-09-19 14:19 | doligez | Target Version | 4.00.1+dev => 4.00.2+dev |
| Copyright © 2000 - 2011 MantisBT Group |