I am trying to compile ocaml with icc, i encounter segfault ! terminal log is:
icc -c -DCAML_NAME_SPACE -O -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC main.pic.c
rm main.pic.c
icc -shared -o libcamlrun_shared.so interp.pic.o misc.pic.o stacks.pic.o fix_code.pic.o startup.pic.o freelist.pic.o major_gc.pic.o minor_gc.pic.o memory.pic.o alloc.pic.o roots.pic.o globroots.pic.o fail.pic.o signals.pic.o signals_byt.pic.o printexc.pic.o backtrace.pic.o compare.pic.o ints.pic.o floats.pic.o str.pic.o array.pic.o io.pic.o extern.pic.o intern.pic.o hash.pic.o sys.pic.o meta.pic.o parsing.pic.o gc_ctrl.pic.o terminfo.pic.o md5.pic.o obj.pic.o lexing.pic.o callback.pic.o debugger.pic.o weak.pic.o compact.pic.o finalise.pic.o custom.pic.o dynlink.pic.o unix.pic.o main.pic.o -lm -lcurses -lpthread
make[2]: Leaving directory `/opt/user1-INTEL/finaluser1/ToolsInstaller/Electronics/SCILAB5/ocaml-4.01.0/byterun'
cp byterun/ocamlrun boot/ocamlrun
cd yacc; make all
make[2]: Entering directory `/opt/user1-INTEL/finaluser1/ToolsInstaller/Electronics/SCILAB5/ocaml-4.01.0/yacc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/opt/user1-INTEL/finaluser1/ToolsInstaller/Electronics/SCILAB5/ocaml-4.01.0/yacc'
cp yacc/ocamlyacc boot/ocamlyacc
cd stdlib; make COMPILER=../boot/ocamlc all
make[2]: Entering directory `/opt/user1-INTEL/finaluser1/ToolsInstaller/Electronics/SCILAB5/ocaml-4.01.0/stdlib'
../boot/ocamlrun ../boot/ocamlc -strict-sequence -w +33..39 -g -warn-error A -nostdlib `./Compflags pervasives.cmi` -c pervasives.mli
make[2]: *** [pervasives.cmi] Segmentation fault (core dumped)
make[2]: Leaving directory `/opt/user1-INTEL/finaluser1/ToolsInstaller/Electronics/SCILAB5/ocaml-4.01.0/stdlib'
make[1]: *** [coldstart] Error 2
The ocaml gets successfully compiled with gcc !
What might be the reason for the segfault ?
should i decrease the optimization level?