caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] ocamlc compiles hello world, ocamlopt not
@ 2013-01-10 13:57 r0ller
  2013-01-10 14:25 ` Gerd Stolpmann
  0 siblings, 1 reply; 18+ messages in thread
From: r0ller @ 2013-01-10 13:57 UTC (permalink / raw)
  To: caml-list

Hi All,

I'm trying to make ocaml compiler (4.00.1) work on minix (current 3.2.1) and
managed to get to point 3) and 4) of the INSTALL intsructions. According to
point 3) make bootstrap reports success and make opt (point 4) worked fine as
well. However, point 5) that is make opt.opt gives linking errors.
Nevertheless, as far as I could understand, this should not pose any problem
as then I only miss the optimized compiler versions that is the ones ending
in .opt and they're missing indeed. Still, when trying to compile a hello
world program called smallest.ml like:

print_string "hello, world\n"

by executing 'ocamlopt smallest.ml -o smallest', I get roughly the same
linking errors I got when make opt.opt failed (see at the end). When later
adding the -verbose option I got:

+ as -o 'smallest.o' 'smallest.s'
+ as -o '/tmp/camlstartup219145.o' '/tmp/camlstartupbc831e.s'
+ gcc -o 'smallest'   '-L/usr/local/lib/ocaml'  '/tmp/camlstartup219145.o' '/
usr/local/lib/ocaml/std_exit.o' 'smallest.o' '/usr/local/lib/ocaml/stdlib.a'
'/usr/local/lib/ocaml/libasmrun.a' -lm

If this simple hello world is compiled with ocamlc then it works fine. I also
must admit that I'm not an ocaml expert at all. Could you please, tell me
what's going wrong? Thanks for your help in advance!

Best regards,
r0ller

/tmp/camlstartup720305.o: In function `L103':
(.text+0x7): undefined reference to `_caml_globals_inited'
/tmp/camlstartup720305.o: In function `L104':
(.text+0x13): undefined reference to `_caml_globals_inited'
/tmp/camlstartup720305.o: In function `L105':
(.text+0x1f): undefined reference to `_caml_globals_inited'
/tmp/camlstartup720305.o: In function `L107':
(.text+0x2f): undefined reference to `_caml_young_ptr'
/tmp/camlstartup720305.o: In function `L107':
(.text+0x37): undefined reference to `_caml_young_ptr'
/tmp/camlstartup720305.o: In function `L107':
(.text+0x3d): undefined reference to `_caml_young_limit'
/tmp/camlstartup720305.o: In function `L112':
(.text+0x97): undefined reference to `_caml_young_ptr'
/tmp/camlstartup720305.o: In function `L112':
(.text+0x9f): undefined reference to `_caml_young_ptr'
/tmp/camlstartup720305.o: In function `L112':
(.text+0xa5): undefined reference to `_caml_young_limit'
/tmp/camlstartup720305.o: In function `L117':
(.text+0xf3): undefined reference to `_caml_young_ptr'
/tmp/camlstartup720305.o: In function `L117':
(.text+0xfb): undefined reference to `_caml_young_ptr'
/tmp/camlstartup720305.o: In function `L117':
(.text+0x101): undefined reference to `_caml_young_limit'
/tmp/camlstartup720305.o: In function `L122':
(.text+0x14b): undefined reference to `_caml_young_ptr'
/tmp/camlstartup720305.o: In function `L122':
(.text+0x153): undefined reference to `_caml_young_ptr'
/tmp/camlstartup720305.o: In function `L122':
(.text+0x159): undefined reference to `_caml_young_limit'
/tmp/camlstartup720305.o: In function `L127':
(.text+0x1a3): undefined reference to `_caml_young_ptr'
/tmp/camlstartup720305.o: In function `L127':
(.text+0x1ab): undefined reference to `_caml_young_ptr'
/tmp/camlstartup720305.o: In function `L127':
(.text+0x1b1): undefined reference to `_caml_young_limit'
/tmp/camlstartup720305.o: In function `L132':
(.text+0x1f3): undefined reference to `_caml_young_ptr'
/tmp/camlstartup720305.o: In function `L132':
(.text+0x1fb): undefined reference to `_caml_young_ptr'
/tmp/camlstartup720305.o: In function `L132':
(.text+0x201): undefined reference to `_caml_young_limit'
/usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L109':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:250: undefined reference
to `_caml_exception_pointer'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:250: undefined reference
to `_caml_exception_pointer'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:252: undefined reference
to `_caml_ml_flush'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L111':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:252: undefined reference
to `_caml_exception_pointer'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__build_result_1224':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:327: undefined reference
to `_caml_blit_string'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L118':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:330: undefined reference
to `_caml_ml_input_scan_line'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L119':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:334: undefined reference
to `_caml_create_string'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L121':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:334: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:334: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:334: undefined reference
to `_caml_young_limit'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L116':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:336: undefined reference
to `_caml_create_string'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L125':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:337: undefined reference
to `_caml_ml_input'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L126':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:338: undefined reference
to `_caml_ml_input_char'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L128':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:338: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:338: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:338: undefined reference
to `_caml_young_limit'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:342: undefined reference
to `_caml_create_string'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L114':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:344: undefined reference
to `_caml_create_string'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L132':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:345: undefined reference
to `_caml_ml_input'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L134':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:345: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:345: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:345: undefined reference
to `_caml_young_limit'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1358':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_set_binary_mode'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1360':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_close_channel'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1362':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_channel_size'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1364':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_pos_in'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1366':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_seek_in'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1368':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_input_value'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1370':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_input_int'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1372':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_input_char'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1374':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_input_char'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1376':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_set_binary_mode'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1378':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_channel_size'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1380':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_pos_out'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1382':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_seek_out'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1384':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_output_int'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1386':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_output_char'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1388':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_output_char'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1390':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
to `_caml_ml_flush'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L174':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:22: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:22: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:22: undefined reference
to `_caml_young_limit'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L179':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:23: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:23: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:23: undefined reference
to `_caml_young_limit'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L184':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:37: undefined reference
to `_caml_lessequal'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L187':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:38: undefined reference
to `_caml_greaterequal'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L192':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:149: undefined reference
to `_caml_create_string'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L193':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:150: undefined reference
to `_caml_blit_string'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:151: undefined reference
to `_caml_blit_string'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__bool_of_string_1119':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:177: undefined reference
to `_caml_string_notequal'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:177: undefined reference
to `_caml_string_notequal'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__string_of_int_1120':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:183: undefined reference
to `_caml_format_int'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L204':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:191: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:191: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:191: undefined reference
to `_caml_young_limit'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__string_of_float_1130':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:202: undefined reference
to `_caml_format_float'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L212':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:211: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:211: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:211: undefined reference
to `_caml_young_limit'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__open_out_gen_1156':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:236: undefined reference
to `_caml_sys_open'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L216':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:236: undefined reference
to `_caml_ml_open_descriptor_out'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__flush_all_1166':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:253: undefined reference
to `_caml_ml_out_channels_list'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__output_string_1172':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:261: undefined reference
to `_caml_ml_output'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__output_1175':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:266: undefined reference
to `_caml_ml_output'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__output_value_1183':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:273: undefined reference
to `_caml_output_value'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L229':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:279: undefined reference
to `_caml_ml_flush'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L230':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:279: undefined reference
to `_caml_ml_close_channel'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L235':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:280: undefined reference
to `_caml_exception_pointer'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:280: undefined reference
to `_caml_exception_pointer'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:281: undefined reference
to `_caml_ml_flush'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L237':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:281: undefined reference
to `_caml_exception_pointer'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L233':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:281: undefined reference
to `_caml_exception_pointer'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:281: undefined reference
to `_caml_exception_pointer'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:282: undefined reference
to `_caml_ml_close_channel'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L238':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:282: undefined reference
to `_caml_exception_pointer'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__open_in_gen_1195':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:289: undefined reference
to `_caml_sys_open'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L240':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:289: undefined reference
to `_caml_ml_open_descriptor_in'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__input_1205':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:305: undefined reference
to `_caml_ml_input'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L248':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:309: undefined reference
to `_caml_ml_input'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L251':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:309: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:309: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:309: undefined reference
to `_caml_young_limit'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L258':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:322: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:322: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:322: undefined reference
to `_caml_young_limit'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L262':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:357: undefined reference
to `_caml_exception_pointer'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:357: undefined reference
to `_caml_exception_pointer'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:357: undefined reference
to `_caml_ml_close_channel'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L264':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:357: undefined reference
to `_caml_exception_pointer'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__print_char_1247':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:363: undefined reference
to `_caml_ml_output_char'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L273':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:368: undefined reference
to `_caml_ml_output_char'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L274':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:368: undefined reference
to `_caml_ml_flush'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__print_newline_1257':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:369: undefined reference
to `_caml_ml_output_char'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L277':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:369: undefined reference
to `_caml_ml_flush'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__prerr_char_1258':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:373: undefined reference
to `_caml_ml_output_char'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L287':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:378: undefined reference
to `_caml_ml_output_char'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L288':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:378: undefined reference
to `_caml_ml_flush'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__prerr_newline_1268':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:379: undefined reference
to `_caml_ml_output_char'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L291':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:379: undefined reference
to `_caml_ml_flush'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__read_line_1269':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:383: undefined reference
to `_caml_ml_flush'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L296':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:384: undefined reference
to `_caml_int_of_string'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L299':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:385: undefined reference
to `_caml_float_of_string'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1461':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:385: undefined reference
to `_caml_ml_channel_size_64'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1459':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:385: undefined reference
to `_caml_ml_pos_in_64'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1457':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:385: undefined reference
to `_caml_ml_seek_in_64'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1455':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:385: undefined reference
to `_caml_ml_channel_size_64'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1453':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:385: undefined reference
to `_caml_ml_pos_out_64'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__fun_1451':
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:385: undefined reference
to `_caml_ml_seek_out_64'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L315':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:434: undefined reference
to `_caml_create_string'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L316':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:435: undefined reference
to `_caml_blit_string'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L318':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:444: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:444: undefined reference
to `_caml_young_ptr'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:444: undefined reference
to `_caml_young_limit'
 /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:444: undefined reference
to `_caml_modify'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L323':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:452: undefined reference
to `_caml_sys_exit'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L326':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:120: undefined reference
to `_caml_int64_float_of_bits'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L327':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:122: undefined reference
to `_caml_int64_float_of_bits'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L328':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:124: undefined reference
to `_caml_int64_float_of_bits'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L329':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:126: undefined reference
to `_caml_int64_float_of_bits'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L330':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:128: undefined reference
to `_caml_int64_float_of_bits'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o):/home/r0ller/ocaml/ocaml-4.00.1/
stdlib/pervasives.ml:130: more undefined references to
`_caml_int64_float_of_bits' follow
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L332':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:222: undefined reference
to `_caml_ml_open_descriptor_in'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L333':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:223: undefined reference
to `_caml_ml_open_descriptor_out'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L334':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:224: undefined reference
to `_caml_ml_open_descriptor_out'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L336':
/home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:457: undefined reference
to `_caml_register_named_value'
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__2':
(.data+0x554): undefined reference to `_caml_int64_ops'
/usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `_camlPervasives__3':
(.data+0x564): undefined reference to `_caml_int64_ops'
/usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `_camlPervasives__4':
(.data+0x574): undefined reference to `_caml_int64_ops'
/usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `_camlPervasives__5':
(.data+0x584): undefined reference to `_caml_int64_ops'
/usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `_camlPervasives__6':
(.data+0x594): undefined reference to `_caml_int64_ops'
/usr/local/lib/ocaml/stdlib.a(pervasives.o):(.data+0x5a4): more undefined
references to `_caml_int64_ops' follow
 /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
`_camlPervasives__74':
 (.data+0x710): undefined reference to `_caml_register_named_value'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_call_gc':
i386.S:(.text+0x4): undefined reference to `_caml_last_return_address'
i386.S:(.text+0xd): undefined reference to `_caml_bottom_of_stack'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L105':
i386.S:(.text+0x29): undefined reference to `_caml_gc_regs'
i386.S:(.text+0x2e): undefined reference to `_caml_garbage_collection'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_alloc1':
i386.S:(.text+0x3b): undefined reference to `_caml_young_ptr'
i386.S:(.text+0x43): undefined reference to `_caml_young_ptr'
i386.S:(.text+0x49): undefined reference to `_caml_young_limit'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L100':
i386.S:(.text+0x54): undefined reference to `_caml_last_return_address'
i386.S:(.text+0x5d): undefined reference to `_caml_bottom_of_stack'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_alloc2':
i386.S:(.text+0x6d): undefined reference to `_caml_young_ptr'
i386.S:(.text+0x75): undefined reference to `_caml_young_ptr'
i386.S:(.text+0x7b): undefined reference to `_caml_young_limit'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L101':
i386.S:(.text+0x86): undefined reference to `_caml_last_return_address'
i386.S:(.text+0x8f): undefined reference to `_caml_bottom_of_stack'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_alloc3':
i386.S:(.text+0x9f): undefined reference to `_caml_young_ptr'
i386.S:(.text+0xa7): undefined reference to `_caml_young_ptr'
i386.S:(.text+0xad): undefined reference to `_caml_young_limit'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L102':
i386.S:(.text+0xb8): undefined reference to `_caml_last_return_address'
i386.S:(.text+0xc1): undefined reference to `_caml_bottom_of_stack'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_allocN':
i386.S:(.text+0xd2): undefined reference to `_caml_young_ptr'
i386.S:(.text+0xda): undefined reference to `_caml_young_limit'
i386.S:(.text+0xe1): undefined reference to `_caml_young_ptr'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L103':
i386.S:(.text+0xe8): undefined reference to `_caml_young_ptr'
i386.S:(.text+0xf1): undefined reference to `_caml_young_ptr'
i386.S:(.text+0xfa): undefined reference to `_caml_last_return_address'
i386.S:(.text+0x103): undefined reference to `_caml_bottom_of_stack'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_c_call':
i386.S:(.text+0x117): undefined reference to `_caml_last_return_address'
i386.S:(.text+0x121): undefined reference to `_caml_bottom_of_stack'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L106':
i386.S:(.text+0x141): undefined reference to `_caml_gc_regs'
i386.S:(.text+0x147): undefined reference to `_caml_last_return_address'
i386.S:(.text+0x14d): undefined reference to `_caml_bottom_of_stack'
i386.S:(.text+0x158): undefined reference to `_caml_exception_pointer'
i386.S:(.text+0x15e): undefined reference to `_caml_exception_pointer'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L107':
i386.S:(.text+0x166): undefined reference to `_caml_exception_pointer'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L109':
i386.S:(.text+0x16f): undefined reference to `_caml_bottom_of_stack'
i386.S:(.text+0x175): undefined reference to `_caml_last_return_address'
i386.S:(.text+0x17b): undefined reference to `_caml_gc_regs'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_raise_exn':
i386.S:(.text+0x18c): undefined reference to `_caml_backtrace_active'
i386.S:(.text+0x198): undefined reference to `_caml_exception_pointer'
i386.S:(.text+0x19e): undefined reference to `_caml_exception_pointer'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L110':
i386.S:(.text+0x1a7): undefined reference to `_caml_exception_pointer'
i386.S:(.text+0x1b7): undefined reference to `_caml_stash_backtrace'
i386.S:(.text+0x1c1): undefined reference to `_caml_exception_pointer'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_raise_exception':
i386.S:(.text+0x1c8): undefined reference to `_caml_backtrace_active'
i386.S:(.text+0x1d8): undefined reference to `_caml_exception_pointer'
i386.S:(.text+0x1de): undefined reference to `_caml_exception_pointer'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L111':
i386.S:(.text+0x1e9): undefined reference to `_caml_exception_pointer'
i386.S:(.text+0x1ef): undefined reference to `_caml_bottom_of_stack'
i386.S:(.text+0x1f5): undefined reference to `_caml_last_return_address'
i386.S:(.text+0x1fb): undefined reference to `_caml_stash_backtrace'
i386.S:(.text+0x203): undefined reference to `_caml_exception_pointer'
i386.S:(.text+0x209): undefined reference to `_caml_exception_pointer'
/usr/local/lib/ocaml/libasmrun.a(i386.o): In function
`_caml_ml_array_bound_error':
 i386.S:(.text+0x26f): undefined reference to `_caml_last_return_address'
i386.S:(.text+0x279): undefined reference to `_caml_bottom_of_stack'
i386.S:(.text+0x27e): undefined reference to `_caml_array_bound_error'
/usr/local/lib/ocaml/libasmrun.a(startup.o): In function `caml_main':
startup.c:(.text+0x1eb): undefined reference to `caml_data_segments'
startup.c:(.text+0x240): undefined reference to `caml_code_segments'
startup.c:(.text+0x32b): undefined reference to `caml_start_program'
/usr/local/lib/ocaml/libasmrun.a(fail.o): In function
`caml_is_special_exception':
 fail.c:(.text+0x7): undefined reference to `caml_exn_Match_failure'
fail.c:(.text+0xe): undefined reference to `caml_exn_Assert_failure'
fail.c:(.text+0x15): undefined reference to
`caml_exn_Undefined_recursive_module'
 /usr/local/lib/ocaml/libasmrun.a(fail.o): In function `caml_raise':
fail.c:(.text+0x73): undefined reference to `caml_raise_exception'
/usr/local/lib/ocaml/libasmrun.a(fail.o): In function
`caml_array_bound_error':
fail.c:(.text+0xa7): undefined reference to `caml_exn_Invalid_argument'
/usr/local/lib/ocaml/libasmrun.a(fail.o): In function
`caml_raise_stack_overflow':
 fail.c:(.text+0xf4): undefined reference to `caml_bucket_Stack_overflow'
/usr/local/lib/ocaml/libasmrun.a(fail.o): In function
`caml_raise_out_of_memory':
 fail.c:(.text+0x104): undefined reference to `caml_bucket_Out_of_memory'
/usr/local/lib/ocaml/libasmrun.a(fail.o): In function `caml_raise_sys_error':
fail.c:(.text+0x203): undefined reference to `caml_exn_Sys_error'
/usr/local/lib/ocaml/libasmrun.a(fail.o): In function `caml_invalid_argument':
fail.c:(.text+0x230): undefined reference to `caml_exn_Invalid_argument'
/usr/local/lib/ocaml/libasmrun.a(fail.o): In function `caml_failwith':
fail.c:(.text+0x243): undefined reference to `caml_exn_Failure'
/usr/local/lib/ocaml/libasmrun.a(fail.o): In function
`caml_raise_sys_blocked_io':
 fail.c:(.text+0x2ba): undefined reference to `caml_exn_Sys_blocked_io'
/usr/local/lib/ocaml/libasmrun.a(fail.o): In function `caml_raise_not_found':
fail.c:(.text+0x2ca): undefined reference to `caml_exn_Not_found'
/usr/local/lib/ocaml/libasmrun.a(fail.o): In function
`caml_raise_zero_divide':
fail.c:(.text+0x2da): undefined reference to `caml_exn_Division_by_zero'
/usr/local/lib/ocaml/libasmrun.a(fail.o): In function
`caml_raise_end_of_file':
fail.c:(.text+0x2ea): undefined reference to `caml_exn_End_of_file'
/usr/local/lib/ocaml/libasmrun.a(roots.o): In function
`caml_init_frame_descriptors':
 roots.c:(.text+0x1dd): undefined reference to `caml_frametable'
roots.c:(.text+0x1eb): undefined reference to `caml_frametable'
/usr/local/lib/ocaml/libasmrun.a(roots.o): In function `caml_do_roots':
roots.c:(.text+0x32a): undefined reference to `caml_globals'
roots.c:(.text+0x367): undefined reference to `caml_globals'
/usr/local/lib/ocaml/libasmrun.a(roots.o): In function
`caml_oldify_local_roots':
 roots.c:(.text+0x467): undefined reference to `caml_globals'
roots.c:(.text+0x472): undefined reference to `caml_globals'
/usr/local/lib/ocaml/libasmrun.a(signals.o): In function
`caml_execute_signal':
signals.c:(.text+0x115): undefined reference to `caml_callback_exn'
/usr/local/lib/ocaml/libasmrun.a(printexc.o): In function
`caml_fatal_uncaught_exception':
 printexc.c:(.text+0x25a): undefined reference to `caml_callback_exn'
/usr/local/lib/ocaml/libasmrun.a(callback.o): In function `caml_callback3':
callback.c:(.text+0x12c): undefined reference to `caml_callback3_exn'
/usr/local/lib/ocaml/libasmrun.a(callback.o): In function `caml_callback2':
callback.c:(.text+0x15b): undefined reference to `caml_callback2_exn'
/usr/local/lib/ocaml/libasmrun.a(callback.o): In function `caml_callback':
callback.c:(.text+0x187): undefined reference to `caml_callback_exn'
/usr/local/lib/ocaml/libasmrun.a(callback.o): In function
`caml_callbackN_exn':
callback.c:(.text+0x242): undefined reference to `caml_callback_exn'
callback.c:(.text+0x278): undefined reference to `caml_callback2_exn'
callback.c:(.text+0x2ae): undefined reference to `caml_callback3_exn'
/usr/local/lib/ocaml/libasmrun.a(finalise.o): In function
`caml_final_do_calls':
 finalise.c:(.text+0x2e7): undefined reference to `caml_callback_exn'
collect2: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
  2013-01-10 13:57 [Caml-list] ocamlc compiles hello world, ocamlopt not r0ller
@ 2013-01-10 14:25 ` Gerd Stolpmann
  0 siblings, 0 replies; 18+ messages in thread
From: Gerd Stolpmann @ 2013-01-10 14:25 UTC (permalink / raw)
  To: r0ller; +Cc: caml-list

Am Donnerstag, den 10.01.2013, 14:57 +0100 schrieb r0ller@freemail.hu:
> Hi All,
> 
> I'm trying to make ocaml compiler (4.00.1) work on minix (current 3.2.1) and
> managed to get to point 3) and 4) of the INSTALL intsructions. According to
> point 3) make bootstrap reports success and make opt (point 4) worked fine as
> well. However, point 5) that is make opt.opt gives linking errors.
> Nevertheless, as far as I could understand, this should not pose any problem
> as then I only miss the optimized compiler versions that is the ones ending
> in .opt and they're missing indeed. Still, when trying to compile a hello
> world program called smallest.ml like:
> 
> print_string "hello, world\n"
> 
> by executing 'ocamlopt smallest.ml -o smallest', I get roughly the same
> linking errors I got when make opt.opt failed (see at the end). When later
> adding the -verbose option I got:
> 
> + as -o 'smallest.o' 'smallest.s'
> + as -o '/tmp/camlstartup219145.o' '/tmp/camlstartupbc831e.s'
> + gcc -o 'smallest'   '-L/usr/local/lib/ocaml'  '/tmp/camlstartup219145.o' '/
> usr/local/lib/ocaml/std_exit.o' 'smallest.o' '/usr/local/lib/ocaml/stdlib.a'
> '/usr/local/lib/ocaml/libasmrun.a' -lm
> 
> If this simple hello world is compiled with ocamlc then it works fine. I also
> must admit that I'm not an ocaml expert at all. Could you please, tell me
> what's going wrong? Thanks for your help in advance!

These errors would mean that stdlib.a and libasmrun.a do not contain the
symbols they are supposed to contain.

What's the output of

nm /usr/local/lib/ocaml/libasmrun.a

? You should normally find here the missing symbols the linker is
complaining about.

Gerd

> Best regards,
> r0ller
> 
> /tmp/camlstartup720305.o: In function `L103':
> (.text+0x7): undefined reference to `_caml_globals_inited'
> /tmp/camlstartup720305.o: In function `L104':
> (.text+0x13): undefined reference to `_caml_globals_inited'
> /tmp/camlstartup720305.o: In function `L105':
> (.text+0x1f): undefined reference to `_caml_globals_inited'
> /tmp/camlstartup720305.o: In function `L107':
> (.text+0x2f): undefined reference to `_caml_young_ptr'
> /tmp/camlstartup720305.o: In function `L107':
> (.text+0x37): undefined reference to `_caml_young_ptr'
> /tmp/camlstartup720305.o: In function `L107':
> (.text+0x3d): undefined reference to `_caml_young_limit'
> /tmp/camlstartup720305.o: In function `L112':
> (.text+0x97): undefined reference to `_caml_young_ptr'
> /tmp/camlstartup720305.o: In function `L112':
> (.text+0x9f): undefined reference to `_caml_young_ptr'
> /tmp/camlstartup720305.o: In function `L112':
> (.text+0xa5): undefined reference to `_caml_young_limit'
> /tmp/camlstartup720305.o: In function `L117':
> (.text+0xf3): undefined reference to `_caml_young_ptr'
> /tmp/camlstartup720305.o: In function `L117':
> (.text+0xfb): undefined reference to `_caml_young_ptr'
> /tmp/camlstartup720305.o: In function `L117':
> (.text+0x101): undefined reference to `_caml_young_limit'
> /tmp/camlstartup720305.o: In function `L122':
> (.text+0x14b): undefined reference to `_caml_young_ptr'
> /tmp/camlstartup720305.o: In function `L122':
> (.text+0x153): undefined reference to `_caml_young_ptr'
> /tmp/camlstartup720305.o: In function `L122':
> (.text+0x159): undefined reference to `_caml_young_limit'
> /tmp/camlstartup720305.o: In function `L127':
> (.text+0x1a3): undefined reference to `_caml_young_ptr'
> /tmp/camlstartup720305.o: In function `L127':
> (.text+0x1ab): undefined reference to `_caml_young_ptr'
> /tmp/camlstartup720305.o: In function `L127':
> (.text+0x1b1): undefined reference to `_caml_young_limit'
> /tmp/camlstartup720305.o: In function `L132':
> (.text+0x1f3): undefined reference to `_caml_young_ptr'
> /tmp/camlstartup720305.o: In function `L132':
> (.text+0x1fb): undefined reference to `_caml_young_ptr'
> /tmp/camlstartup720305.o: In function `L132':
> (.text+0x201): undefined reference to `_caml_young_limit'
> /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L109':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:250: undefined reference
> to `_caml_exception_pointer'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:250: undefined reference
> to `_caml_exception_pointer'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:252: undefined reference
> to `_caml_ml_flush'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L111':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:252: undefined reference
> to `_caml_exception_pointer'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__build_result_1224':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:327: undefined reference
> to `_caml_blit_string'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L118':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:330: undefined reference
> to `_caml_ml_input_scan_line'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L119':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:334: undefined reference
> to `_caml_create_string'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L121':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:334: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:334: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:334: undefined reference
> to `_caml_young_limit'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L116':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:336: undefined reference
> to `_caml_create_string'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L125':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:337: undefined reference
> to `_caml_ml_input'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L126':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:338: undefined reference
> to `_caml_ml_input_char'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L128':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:338: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:338: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:338: undefined reference
> to `_caml_young_limit'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:342: undefined reference
> to `_caml_create_string'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L114':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:344: undefined reference
> to `_caml_create_string'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L132':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:345: undefined reference
> to `_caml_ml_input'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L134':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:345: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:345: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:345: undefined reference
> to `_caml_young_limit'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1358':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_set_binary_mode'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1360':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_close_channel'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1362':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_channel_size'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1364':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_pos_in'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1366':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_seek_in'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1368':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_input_value'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1370':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_input_int'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1372':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_input_char'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1374':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_input_char'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1376':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_set_binary_mode'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1378':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_channel_size'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1380':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_pos_out'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1382':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_seek_out'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1384':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_output_int'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1386':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_output_char'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1388':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_output_char'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1390':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:446: undefined reference
> to `_caml_ml_flush'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L174':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:22: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:22: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:22: undefined reference
> to `_caml_young_limit'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L179':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:23: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:23: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:23: undefined reference
> to `_caml_young_limit'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L184':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:37: undefined reference
> to `_caml_lessequal'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L187':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:38: undefined reference
> to `_caml_greaterequal'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L192':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:149: undefined reference
> to `_caml_create_string'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L193':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:150: undefined reference
> to `_caml_blit_string'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:151: undefined reference
> to `_caml_blit_string'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__bool_of_string_1119':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:177: undefined reference
> to `_caml_string_notequal'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:177: undefined reference
> to `_caml_string_notequal'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__string_of_int_1120':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:183: undefined reference
> to `_caml_format_int'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L204':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:191: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:191: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:191: undefined reference
> to `_caml_young_limit'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__string_of_float_1130':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:202: undefined reference
> to `_caml_format_float'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L212':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:211: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:211: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:211: undefined reference
> to `_caml_young_limit'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__open_out_gen_1156':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:236: undefined reference
> to `_caml_sys_open'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L216':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:236: undefined reference
> to `_caml_ml_open_descriptor_out'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__flush_all_1166':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:253: undefined reference
> to `_caml_ml_out_channels_list'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__output_string_1172':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:261: undefined reference
> to `_caml_ml_output'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__output_1175':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:266: undefined reference
> to `_caml_ml_output'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__output_value_1183':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:273: undefined reference
> to `_caml_output_value'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L229':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:279: undefined reference
> to `_caml_ml_flush'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L230':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:279: undefined reference
> to `_caml_ml_close_channel'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L235':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:280: undefined reference
> to `_caml_exception_pointer'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:280: undefined reference
> to `_caml_exception_pointer'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:281: undefined reference
> to `_caml_ml_flush'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L237':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:281: undefined reference
> to `_caml_exception_pointer'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L233':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:281: undefined reference
> to `_caml_exception_pointer'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:281: undefined reference
> to `_caml_exception_pointer'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:282: undefined reference
> to `_caml_ml_close_channel'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L238':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:282: undefined reference
> to `_caml_exception_pointer'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__open_in_gen_1195':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:289: undefined reference
> to `_caml_sys_open'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L240':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:289: undefined reference
> to `_caml_ml_open_descriptor_in'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__input_1205':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:305: undefined reference
> to `_caml_ml_input'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L248':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:309: undefined reference
> to `_caml_ml_input'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L251':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:309: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:309: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:309: undefined reference
> to `_caml_young_limit'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L258':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:322: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:322: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:322: undefined reference
> to `_caml_young_limit'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L262':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:357: undefined reference
> to `_caml_exception_pointer'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:357: undefined reference
> to `_caml_exception_pointer'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:357: undefined reference
> to `_caml_ml_close_channel'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L264':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:357: undefined reference
> to `_caml_exception_pointer'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__print_char_1247':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:363: undefined reference
> to `_caml_ml_output_char'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L273':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:368: undefined reference
> to `_caml_ml_output_char'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L274':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:368: undefined reference
> to `_caml_ml_flush'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__print_newline_1257':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:369: undefined reference
> to `_caml_ml_output_char'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L277':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:369: undefined reference
> to `_caml_ml_flush'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__prerr_char_1258':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:373: undefined reference
> to `_caml_ml_output_char'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L287':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:378: undefined reference
> to `_caml_ml_output_char'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L288':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:378: undefined reference
> to `_caml_ml_flush'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__prerr_newline_1268':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:379: undefined reference
> to `_caml_ml_output_char'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L291':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:379: undefined reference
> to `_caml_ml_flush'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__read_line_1269':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:383: undefined reference
> to `_caml_ml_flush'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L296':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:384: undefined reference
> to `_caml_int_of_string'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L299':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:385: undefined reference
> to `_caml_float_of_string'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1461':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:385: undefined reference
> to `_caml_ml_channel_size_64'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1459':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:385: undefined reference
> to `_caml_ml_pos_in_64'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1457':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:385: undefined reference
> to `_caml_ml_seek_in_64'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1455':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:385: undefined reference
> to `_caml_ml_channel_size_64'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1453':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:385: undefined reference
> to `_caml_ml_pos_out_64'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__fun_1451':
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:385: undefined reference
> to `_caml_ml_seek_out_64'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L315':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:434: undefined reference
> to `_caml_create_string'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L316':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:435: undefined reference
> to `_caml_blit_string'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L318':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:444: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:444: undefined reference
> to `_caml_young_ptr'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:444: undefined reference
> to `_caml_young_limit'
>  /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:444: undefined reference
> to `_caml_modify'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L323':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:452: undefined reference
> to `_caml_sys_exit'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L326':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:120: undefined reference
> to `_caml_int64_float_of_bits'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L327':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:122: undefined reference
> to `_caml_int64_float_of_bits'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L328':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:124: undefined reference
> to `_caml_int64_float_of_bits'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L329':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:126: undefined reference
> to `_caml_int64_float_of_bits'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L330':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:128: undefined reference
> to `_caml_int64_float_of_bits'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o):/home/r0ller/ocaml/ocaml-4.00.1/
> stdlib/pervasives.ml:130: more undefined references to
> `_caml_int64_float_of_bits' follow
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L332':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:222: undefined reference
> to `_caml_ml_open_descriptor_in'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L333':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:223: undefined reference
> to `_caml_ml_open_descriptor_out'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L334':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:224: undefined reference
> to `_caml_ml_open_descriptor_out'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `L336':
> /home/r0ller/ocaml/ocaml-4.00.1/stdlib/pervasives.ml:457: undefined reference
> to `_caml_register_named_value'
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__2':
> (.data+0x554): undefined reference to `_caml_int64_ops'
> /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `_camlPervasives__3':
> (.data+0x564): undefined reference to `_caml_int64_ops'
> /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `_camlPervasives__4':
> (.data+0x574): undefined reference to `_caml_int64_ops'
> /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `_camlPervasives__5':
> (.data+0x584): undefined reference to `_caml_int64_ops'
> /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function `_camlPervasives__6':
> (.data+0x594): undefined reference to `_caml_int64_ops'
> /usr/local/lib/ocaml/stdlib.a(pervasives.o):(.data+0x5a4): more undefined
> references to `_caml_int64_ops' follow
>  /usr/local/lib/ocaml/stdlib.a(pervasives.o): In function
> `_camlPervasives__74':
>  (.data+0x710): undefined reference to `_caml_register_named_value'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_call_gc':
> i386.S:(.text+0x4): undefined reference to `_caml_last_return_address'
> i386.S:(.text+0xd): undefined reference to `_caml_bottom_of_stack'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L105':
> i386.S:(.text+0x29): undefined reference to `_caml_gc_regs'
> i386.S:(.text+0x2e): undefined reference to `_caml_garbage_collection'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_alloc1':
> i386.S:(.text+0x3b): undefined reference to `_caml_young_ptr'
> i386.S:(.text+0x43): undefined reference to `_caml_young_ptr'
> i386.S:(.text+0x49): undefined reference to `_caml_young_limit'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L100':
> i386.S:(.text+0x54): undefined reference to `_caml_last_return_address'
> i386.S:(.text+0x5d): undefined reference to `_caml_bottom_of_stack'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_alloc2':
> i386.S:(.text+0x6d): undefined reference to `_caml_young_ptr'
> i386.S:(.text+0x75): undefined reference to `_caml_young_ptr'
> i386.S:(.text+0x7b): undefined reference to `_caml_young_limit'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L101':
> i386.S:(.text+0x86): undefined reference to `_caml_last_return_address'
> i386.S:(.text+0x8f): undefined reference to `_caml_bottom_of_stack'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_alloc3':
> i386.S:(.text+0x9f): undefined reference to `_caml_young_ptr'
> i386.S:(.text+0xa7): undefined reference to `_caml_young_ptr'
> i386.S:(.text+0xad): undefined reference to `_caml_young_limit'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L102':
> i386.S:(.text+0xb8): undefined reference to `_caml_last_return_address'
> i386.S:(.text+0xc1): undefined reference to `_caml_bottom_of_stack'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_allocN':
> i386.S:(.text+0xd2): undefined reference to `_caml_young_ptr'
> i386.S:(.text+0xda): undefined reference to `_caml_young_limit'
> i386.S:(.text+0xe1): undefined reference to `_caml_young_ptr'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L103':
> i386.S:(.text+0xe8): undefined reference to `_caml_young_ptr'
> i386.S:(.text+0xf1): undefined reference to `_caml_young_ptr'
> i386.S:(.text+0xfa): undefined reference to `_caml_last_return_address'
> i386.S:(.text+0x103): undefined reference to `_caml_bottom_of_stack'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_c_call':
> i386.S:(.text+0x117): undefined reference to `_caml_last_return_address'
> i386.S:(.text+0x121): undefined reference to `_caml_bottom_of_stack'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L106':
> i386.S:(.text+0x141): undefined reference to `_caml_gc_regs'
> i386.S:(.text+0x147): undefined reference to `_caml_last_return_address'
> i386.S:(.text+0x14d): undefined reference to `_caml_bottom_of_stack'
> i386.S:(.text+0x158): undefined reference to `_caml_exception_pointer'
> i386.S:(.text+0x15e): undefined reference to `_caml_exception_pointer'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L107':
> i386.S:(.text+0x166): undefined reference to `_caml_exception_pointer'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L109':
> i386.S:(.text+0x16f): undefined reference to `_caml_bottom_of_stack'
> i386.S:(.text+0x175): undefined reference to `_caml_last_return_address'
> i386.S:(.text+0x17b): undefined reference to `_caml_gc_regs'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_raise_exn':
> i386.S:(.text+0x18c): undefined reference to `_caml_backtrace_active'
> i386.S:(.text+0x198): undefined reference to `_caml_exception_pointer'
> i386.S:(.text+0x19e): undefined reference to `_caml_exception_pointer'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L110':
> i386.S:(.text+0x1a7): undefined reference to `_caml_exception_pointer'
> i386.S:(.text+0x1b7): undefined reference to `_caml_stash_backtrace'
> i386.S:(.text+0x1c1): undefined reference to `_caml_exception_pointer'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `_caml_raise_exception':
> i386.S:(.text+0x1c8): undefined reference to `_caml_backtrace_active'
> i386.S:(.text+0x1d8): undefined reference to `_caml_exception_pointer'
> i386.S:(.text+0x1de): undefined reference to `_caml_exception_pointer'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function `L111':
> i386.S:(.text+0x1e9): undefined reference to `_caml_exception_pointer'
> i386.S:(.text+0x1ef): undefined reference to `_caml_bottom_of_stack'
> i386.S:(.text+0x1f5): undefined reference to `_caml_last_return_address'
> i386.S:(.text+0x1fb): undefined reference to `_caml_stash_backtrace'
> i386.S:(.text+0x203): undefined reference to `_caml_exception_pointer'
> i386.S:(.text+0x209): undefined reference to `_caml_exception_pointer'
> /usr/local/lib/ocaml/libasmrun.a(i386.o): In function
> `_caml_ml_array_bound_error':
>  i386.S:(.text+0x26f): undefined reference to `_caml_last_return_address'
> i386.S:(.text+0x279): undefined reference to `_caml_bottom_of_stack'
> i386.S:(.text+0x27e): undefined reference to `_caml_array_bound_error'
> /usr/local/lib/ocaml/libasmrun.a(startup.o): In function `caml_main':
> startup.c:(.text+0x1eb): undefined reference to `caml_data_segments'
> startup.c:(.text+0x240): undefined reference to `caml_code_segments'
> startup.c:(.text+0x32b): undefined reference to `caml_start_program'
> /usr/local/lib/ocaml/libasmrun.a(fail.o): In function
> `caml_is_special_exception':
>  fail.c:(.text+0x7): undefined reference to `caml_exn_Match_failure'
> fail.c:(.text+0xe): undefined reference to `caml_exn_Assert_failure'
> fail.c:(.text+0x15): undefined reference to
> `caml_exn_Undefined_recursive_module'
>  /usr/local/lib/ocaml/libasmrun.a(fail.o): In function `caml_raise':
> fail.c:(.text+0x73): undefined reference to `caml_raise_exception'
> /usr/local/lib/ocaml/libasmrun.a(fail.o): In function
> `caml_array_bound_error':
> fail.c:(.text+0xa7): undefined reference to `caml_exn_Invalid_argument'
> /usr/local/lib/ocaml/libasmrun.a(fail.o): In function
> `caml_raise_stack_overflow':
>  fail.c:(.text+0xf4): undefined reference to `caml_bucket_Stack_overflow'
> /usr/local/lib/ocaml/libasmrun.a(fail.o): In function
> `caml_raise_out_of_memory':
>  fail.c:(.text+0x104): undefined reference to `caml_bucket_Out_of_memory'
> /usr/local/lib/ocaml/libasmrun.a(fail.o): In function `caml_raise_sys_error':
> fail.c:(.text+0x203): undefined reference to `caml_exn_Sys_error'
> /usr/local/lib/ocaml/libasmrun.a(fail.o): In function `caml_invalid_argument':
> fail.c:(.text+0x230): undefined reference to `caml_exn_Invalid_argument'
> /usr/local/lib/ocaml/libasmrun.a(fail.o): In function `caml_failwith':
> fail.c:(.text+0x243): undefined reference to `caml_exn_Failure'
> /usr/local/lib/ocaml/libasmrun.a(fail.o): In function
> `caml_raise_sys_blocked_io':
>  fail.c:(.text+0x2ba): undefined reference to `caml_exn_Sys_blocked_io'
> /usr/local/lib/ocaml/libasmrun.a(fail.o): In function `caml_raise_not_found':
> fail.c:(.text+0x2ca): undefined reference to `caml_exn_Not_found'
> /usr/local/lib/ocaml/libasmrun.a(fail.o): In function
> `caml_raise_zero_divide':
> fail.c:(.text+0x2da): undefined reference to `caml_exn_Division_by_zero'
> /usr/local/lib/ocaml/libasmrun.a(fail.o): In function
> `caml_raise_end_of_file':
> fail.c:(.text+0x2ea): undefined reference to `caml_exn_End_of_file'
> /usr/local/lib/ocaml/libasmrun.a(roots.o): In function
> `caml_init_frame_descriptors':
>  roots.c:(.text+0x1dd): undefined reference to `caml_frametable'
> roots.c:(.text+0x1eb): undefined reference to `caml_frametable'
> /usr/local/lib/ocaml/libasmrun.a(roots.o): In function `caml_do_roots':
> roots.c:(.text+0x32a): undefined reference to `caml_globals'
> roots.c:(.text+0x367): undefined reference to `caml_globals'
> /usr/local/lib/ocaml/libasmrun.a(roots.o): In function
> `caml_oldify_local_roots':
>  roots.c:(.text+0x467): undefined reference to `caml_globals'
> roots.c:(.text+0x472): undefined reference to `caml_globals'
> /usr/local/lib/ocaml/libasmrun.a(signals.o): In function
> `caml_execute_signal':
> signals.c:(.text+0x115): undefined reference to `caml_callback_exn'
> /usr/local/lib/ocaml/libasmrun.a(printexc.o): In function
> `caml_fatal_uncaught_exception':
>  printexc.c:(.text+0x25a): undefined reference to `caml_callback_exn'
> /usr/local/lib/ocaml/libasmrun.a(callback.o): In function `caml_callback3':
> callback.c:(.text+0x12c): undefined reference to `caml_callback3_exn'
> /usr/local/lib/ocaml/libasmrun.a(callback.o): In function `caml_callback2':
> callback.c:(.text+0x15b): undefined reference to `caml_callback2_exn'
> /usr/local/lib/ocaml/libasmrun.a(callback.o): In function `caml_callback':
> callback.c:(.text+0x187): undefined reference to `caml_callback_exn'
> /usr/local/lib/ocaml/libasmrun.a(callback.o): In function
> `caml_callbackN_exn':
> callback.c:(.text+0x242): undefined reference to `caml_callback_exn'
> callback.c:(.text+0x278): undefined reference to `caml_callback2_exn'
> callback.c:(.text+0x2ae): undefined reference to `caml_callback3_exn'
> /usr/local/lib/ocaml/libasmrun.a(finalise.o): In function
> `caml_final_do_calls':
>  finalise.c:(.text+0x2e7): undefined reference to `caml_callback_exn'
> collect2: ld returned 1 exit status
> File "caml_startup", line 1:
> Error: Error during linking
> 

-- 
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
*** Searching for new projects! Need consulting for system
*** programming in Ocaml? Gerd Stolpmann can help you.
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
  2013-01-16 23:17                 ` Gabriel Scherer
@ 2013-01-17 19:34                   ` Benedikt Meurer
  0 siblings, 0 replies; 18+ messages in thread
From: Benedikt Meurer @ 2013-01-17 19:34 UTC (permalink / raw)
  To: Gabriel Scherer
  Cc: Benedikt Meurer, Basile Starynkevitch, Gerd Stolpmann,
	Francois Berenger, caml-list


On Jan 17, 2013, at 0:17 , Gabriel Scherer <gabriel.scherer@gmail.com> wrote:

> Benedikt, let me jump on the occasion to provide more pointers you
> might be interested in:
> 
> - Raphaël Amiard, a student at Paris 6 university, recently worked on
> translating OCaml byte into LLVM:
> https://github.com/raph-amiard/CamllVM ; I have not seen a definite
> comparison with Colin's and Benoit's work, but they appear to hit the
> same kind of issues (performance degradation of exceptions, handling
> GC roots that are passed in registers)

Yeah, I've seen that earlier on the mailinglist.

> - VeriML is a research language for writing tactics and proof
> assistants; developed at Yale during Antonis Stampoulis recently
> finished thesis ( http://www.cs.yale.edu/homes/stampoulis/ ); they
> have a HOL-like mode of interaction, where the user-interface to the
> prover is directly a toplevel (forked from OCaml's toplevel), and they
> use OCamlJIT2 to provide good performances within this model.

That sounds interesting. And it would certainly benefit from a trace-based JITter. :-)

Benedikt

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
  2013-01-16 22:32               ` Benedikt Meurer
@ 2013-01-16 23:17                 ` Gabriel Scherer
  2013-01-17 19:34                   ` Benedikt Meurer
  0 siblings, 1 reply; 18+ messages in thread
From: Gabriel Scherer @ 2013-01-16 23:17 UTC (permalink / raw)
  To: Benedikt Meurer
  Cc: Basile Starynkevitch, Gerd Stolpmann, Francois Berenger, caml-list

Benedikt, let me jump on the occasion to provide more pointers you
might be interested in:

- Raphaël Amiard, a student at Paris 6 university, recently worked on
translating OCaml byte into LLVM:
https://github.com/raph-amiard/CamllVM ; I have not seen a definite
comparison with Colin's and Benoit's work, but they appear to hit the
same kind of issues (performance degradation of exceptions, handling
GC roots that are passed in registers)

- VeriML is a research language for writing tactics and proof
assistants; developed at Yale during Antonis Stampoulis recently
finished thesis ( http://www.cs.yale.edu/homes/stampoulis/ ); they
have a HOL-like mode of interaction, where the user-interface to the
prover is directly a toplevel (forked from OCaml's toplevel), and they
use OCamlJIT2 to provide good performances within this model.

On Wed, Jan 16, 2013 at 11:32 PM, Benedikt Meurer
<benedikt.meurer@googlemail.com> wrote:
>
> On Jan 16, 2013, at 10:48 , Basile Starynkevitch <basile@starynkevitch.net> wrote:
>
>> On Wed, Jan 16, 2013 at 10:01:06AM +0100, Gerd Stolpmann wrote:
>>> Am 16.01.2013 09:56:55 schrieb(en) Francois Berenger:
>>>> On 01/16/2013 05:02 PM, r0ller@freemail.hu wrote:
>>>>> Hi All,
>>>>>
>>>>> By the way, is there any doc available about porting ocaml
>>>>> (google didn't find any) or any hint on how to move forward? I'd
>>>>> really like to have the native compiler on minix too.
>>>>
>>>> I think in the past it was possible to generate C code from OCaml
>>>> code.
>>>
>>> There is no real C backend (and has never been). The only thing you
>>> can do is to embed bytecode in a C-friendly way (what -output-obj
>>> does). But it is still bytecode.
>>
>> Benoit Vaugon & Michel Mauny worked recently on OcamlCC
>> (a translator from Ocaml bytecode to C)
>> http://oud.ocaml.org/2012/abstracts/oud2012-final10.pdf
>> https://github.com/ocaml-bytes/ocamlcc
>
> Very interesting work. I somehow missed that so far. I did something similar prior to starting with OCamlJIT2, but that turned out to be very slow with the compilation of the C code. I'd be interested to hear about results from generating LLVM code instead of C. Actually I'm still thinking that a tracing JIT using LLVM to optimize/generate code could be a viable option for the bytecode runtime (this is one of the results we gathered while working on Colin's thesis, the LLVM backend for the native code compiler).
>
> greets,
> Benedikt
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
  2013-01-16  9:48             ` Basile Starynkevitch
@ 2013-01-16 22:32               ` Benedikt Meurer
  2013-01-16 23:17                 ` Gabriel Scherer
  0 siblings, 1 reply; 18+ messages in thread
From: Benedikt Meurer @ 2013-01-16 22:32 UTC (permalink / raw)
  To: Basile Starynkevitch; +Cc: Gerd Stolpmann, Francois Berenger, caml-list


On Jan 16, 2013, at 10:48 , Basile Starynkevitch <basile@starynkevitch.net> wrote:

> On Wed, Jan 16, 2013 at 10:01:06AM +0100, Gerd Stolpmann wrote:
>> Am 16.01.2013 09:56:55 schrieb(en) Francois Berenger:
>>> On 01/16/2013 05:02 PM, r0ller@freemail.hu wrote:
>>>> Hi All,
>>>> 
>>>> By the way, is there any doc available about porting ocaml
>>>> (google didn't find any) or any hint on how to move forward? I'd
>>>> really like to have the native compiler on minix too.
>>> 
>>> I think in the past it was possible to generate C code from OCaml
>>> code.
>> 
>> There is no real C backend (and has never been). The only thing you
>> can do is to embed bytecode in a C-friendly way (what -output-obj
>> does). But it is still bytecode.
> 
> Benoit Vaugon & Michel Mauny worked recently on OcamlCC
> (a translator from Ocaml bytecode to C)
> http://oud.ocaml.org/2012/abstracts/oud2012-final10.pdf
> https://github.com/ocaml-bytes/ocamlcc

Very interesting work. I somehow missed that so far. I did something similar prior to starting with OCamlJIT2, but that turned out to be very slow with the compilation of the C code. I'd be interested to hear about results from generating LLVM code instead of C. Actually I'm still thinking that a tracing JIT using LLVM to optimize/generate code could be a viable option for the bytecode runtime (this is one of the results we gathered while working on Colin's thesis, the LLVM backend for the native code compiler).

greets,
Benedikt

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
       [not found] ` <fa.53tG84D0PDsZ/dZaWLkOQvsLfTU@ifi.uio.no>
@ 2013-01-16 10:20   ` r0ller
  0 siblings, 0 replies; 18+ messages in thread
From: r0ller @ 2013-01-16 10:20 UTC (permalink / raw)
  To: fa.caml; +Cc: r0ller, Francois Berenger, caml-list

Hi Gerd,

Thanks for the links! If all my efforts to get a natively compiled ocaml program on minix fails, I guess I'll have no other choice to interface with the byte code lib -or leave the minix platform and continue developing my project on another being supported by native ocaml compiler.

Thanks&regards,
r0ller

On Wednesday, January 16, 2013 10:54:12 AM UTC+1, Gerd Stolpmann wrote:
> Am 16.01.2013 10:36:41 schrieb(en) r0ller@.hu:
> 
> > Hi Gerd,
> 
> > 
> 
> > If that's really the case (still I'm trying to find the post  
> 
> > mentioned by Francois), then my question is if there's any doc about  
> 
> > how to do it? I'm asking because I'm more a guy with C/C++ knowledge.  
> 
> > Actually, the library I'd like to link my C/C++ project with  
> 
> > originally has a C lib on platforms that have ocamlopt but I don't  
> 
> > mind if I'm interfacing with a byte code lib if it's also possible.
> 
> 
> 
> It's described in the manual, section 19.7.5:
> 
> 
> 
> http://caml.inria.fr/pub/docs/manual-ocaml-4.00/manual033.html
> 
> 
> 
> You may also look at my text
> 
> 
> 
> http://www.camlcity.org/knowledge/kb_002_shared_library.html
> 
> 
> 
> which is written for ocamlopt, but the same should also apply to ocamlc  
> 
> provided you use -lcamlrun instead of -lasmrun.
> 
> 
> 
> Gerd
> 
> 
> 
> > 
> 
> > Thanks&regards,
> 
> > r0ller
> 
> > 
> 


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
       [not found]             ` <fa.3ZA77VqUCTh0CDJf/dKc9fxM234@ifi.uio.no>
@ 2013-01-16 10:16               ` r0ller
  0 siblings, 0 replies; 18+ messages in thread
From: r0ller @ 2013-01-16 10:16 UTC (permalink / raw)
  To: fa.caml; +Cc: Gerd Stolpmann, Francois Berenger, caml-list

Hi Basile,

Thanks! I'll definitely have a look at it even though compiling a whole ocaml project will be challenging:) Yet another really bold question: I do not know, how the original ocamlopt is built but if it's also built from bytecode, can ocamlcc be used to build ocamlopt?

Thanks&regards,
r0ller

On Wednesday, January 16, 2013 10:48:36 AM UTC+1, Basile Starynkevitch wrote:
> On Wed, Jan 16, 2013 at 10:01:06AM +0100, Gerd Stolpmann wrote:
> 
> > Am 16.01.2013 09:56:55 schrieb(en) Francois Berenger:
> 
> > >On 01/16/2013 05:02 PM, r0ller@.hu wrote:
> 
> > >>Hi All,
> 
> > >>
> 
> > >>By the way, is there any doc available about porting ocaml
> 
> > >>(google didn't find any) or any hint on how to move forward? I'd
> 
> > >>really like to have the native compiler on minix too.
> 
> > >
> 
> > >I think in the past it was possible to generate C code from OCaml
> 
> > >code.
> 
> > 
> 
> > There is no real C backend (and has never been). The only thing you
> 
> > can do is to embed bytecode in a C-friendly way (what -output-obj
> 
> > does). But it is still bytecode.
> 
> 
> 
> 
> 
> Benoit Vaugon & Michel Mauny worked recently on OcamlCC
> 
> (a translator from Ocaml bytecode to C)
> 
> http://oud.ocaml.org/2012/abstracts/oud2012-final10.pdf
> 
> https://github.com/ocaml-bytes/ocamlcc
> 
> 
> 
> Cheers.
> 
> -- 
> 
> Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
> 
> email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
> 
> 8, rue de la Faiencerie, 92340 Bourg La Reine, France
> 
> *** opinions {are only mines, sont seulement les miennes} ***
> 
> 
> 
> -- 
> 
> Caml-list mailing list.  Subscription management and archives:
> 
> https://sympa.inria.fr/sympa/arc/caml-list
> 
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> 
> Bug reports: http://caml.inria.fr/bin/caml-bugs


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
  2013-01-16  9:01           ` AW: " Gerd Stolpmann
@ 2013-01-16  9:48             ` Basile Starynkevitch
  2013-01-16 22:32               ` Benedikt Meurer
  0 siblings, 1 reply; 18+ messages in thread
From: Basile Starynkevitch @ 2013-01-16  9:48 UTC (permalink / raw)
  To: Gerd Stolpmann; +Cc: Francois Berenger, caml-list

On Wed, Jan 16, 2013 at 10:01:06AM +0100, Gerd Stolpmann wrote:
> Am 16.01.2013 09:56:55 schrieb(en) Francois Berenger:
> >On 01/16/2013 05:02 PM, r0ller@freemail.hu wrote:
> >>Hi All,
> >>
> >>By the way, is there any doc available about porting ocaml
> >>(google didn't find any) or any hint on how to move forward? I'd
> >>really like to have the native compiler on minix too.
> >
> >I think in the past it was possible to generate C code from OCaml
> >code.
> 
> There is no real C backend (and has never been). The only thing you
> can do is to embed bytecode in a C-friendly way (what -output-obj
> does). But it is still bytecode.


Benoit Vaugon & Michel Mauny worked recently on OcamlCC
(a translator from Ocaml bytecode to C)
http://oud.ocaml.org/2012/abstracts/oud2012-final10.pdf
https://github.com/ocaml-bytes/ocamlcc

Cheers.
-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
       [not found]           ` <fa.vGYTX053VB/7kO+WVlnBXs6LyWM@ifi.uio.no>
@ 2013-01-16  9:36             ` r0ller
       [not found]             ` <fa.3ZA77VqUCTh0CDJf/dKc9fxM234@ifi.uio.no>
  1 sibling, 0 replies; 18+ messages in thread
From: r0ller @ 2013-01-16  9:36 UTC (permalink / raw)
  To: fa.caml; +Cc: Francois Berenger, caml-list

Hi Gerd,

If that's really the case (still I'm trying to find the post mentioned by Francois), then my question is if there's any doc about how to do it? I'm asking because I'm more a guy with C/C++ knowledge. Actually, the library I'd like to link my C/C++ project with originally has a C lib on platforms that have ocamlopt but I don't mind if I'm interfacing with a byte code lib if it's also possible.

Thanks&regards,
r0ller

On Wednesday, January 16, 2013 10:01:20 AM UTC+1, Gerd Stolpmann wrote:
> Am 16.01.2013 09:56:55 schrieb(en) Francois Berenger:
> 
> > On 01/16/2013 05:02 PM, r0ller@.hu wrote:
> 
> >> Hi All,
> 
> >> 
> 
> >> By the way, is there any doc available about porting ocaml (google  
> 
> >> didn't find any) or any hint on how to move forward? I'd really like  
> 
> >> to have the native compiler on minix too.
> 
> > 
> 
> > I think in the past it was possible to generate C code from OCaml  
> 
> > code.
> 
> 
> 
> There is no real C backend (and has never been). The only thing you can  
> 
> do is to embed bytecode in a C-friendly way (what -output-obj does).  
> 
> But it is still bytecode.
> 
> 
> 
> Gerd
> 
> 
> 
> > As I guess Minix have a C compiler, that would be a way out for you.
> 
> > 
> 
> > I can't find back, but I remember Richard W.M. Jones from Red Hat  
> 
> > posted about it on caml-list and keeps it somewhere.
> 
> > 
> 
> >> Thanks&regards,
> 
> >> r0ller


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
       [not found]         ` <fa.SiWjqBgSRaJHHtRDr1LQlRGec/I@ifi.uio.no>
@ 2013-01-16  9:29           ` r0ller
       [not found]           ` <fa.vGYTX053VB/7kO+WVlnBXs6LyWM@ifi.uio.no>
  1 sibling, 0 replies; 18+ messages in thread
From: r0ller @ 2013-01-16  9:29 UTC (permalink / raw)
  To: fa.caml; +Cc: caml-list

Hi Francois,

Thanks! I'm working hard to find it:)

Regards,
r0ller

On Wednesday, January 16, 2013 9:57:16 AM UTC+1, Francois Berenger wrote:
> On 01/16/2013 05:02 PM, r0ller@.hu wrote:
> 
> > Hi All,
> 
> >
> 
> > By the way, is there any doc available about porting ocaml (google didn't find any) or any hint on how to move forward? I'd really like to have the native compiler on minix too.
> 
> 
> 
> I think in the past it was possible to generate C code from OCaml code.
> 
> 
> 
> As I guess Minix have a C compiler, that would be a way out for you.
> 
> 
> 
> I can't find back, but I remember Richard W.M. Jones from Red Hat posted 
> 
> about it on caml-list and keeps it somewhere.
> 
> 
> 
> > Thanks&regards,
> 
> > r0ller
> 
> >
> 
> > On Friday, January 11, 2013 5:23:54 PM UTC+1, r0l...@freemail.hu wrote:
> 
> >> Hi again,
> 
> >>
> 
> >>
> 
> >>
> 
> >> I forgot to mention that this result I got after gmake opt.
> 
> >>
> 
> >>
> 
> >>
> 
> >> Regards,
> 
> >>
> 
> >> r0ller
> 
> >>
> 
> >>
> 
> >>
> 
> >> On Friday, January 11, 2013 5:13:56 PM UTC+1, r0l...@freemail.hu wrote:
> 
> >>
> 
> >>> Hi Xavier,
> 
> >>
> 
> >>>
> 
> >>
> 
> >>>
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> Thanks for the hint! I gave it a try and also with SYSTEM=bsd_elf. Please, find below the result of the latter (it's the same for linux_elf anyway). I also tried another suggestion from Olivier Andrieu by introducing SYS_minix in asmrun/i386.S but ended up in the same result:( Do you happen to know how to proceed now?
> 
> >>
> 
> >>>
> 
> >>
> 
> >>>
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> gmake runtimeopt
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> gmake[1]: Entering directory `/home/r0ller/ocaml-4.00.1'
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> cd asmrun; gmake all
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> gmake[2]: Entering directory `/home/r0ller/ocaml-4.00.1/asmrun'
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> DSYS_bsd_elf -o i386.o i386.S || \
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> { echo "If your assembler produced syntax errors, it is probably unhappy with the"; echo "preprocessor. Check your assembler, or try producing i386.o by hand."; exit 2; }
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> DSYS_bsd_elf: not found
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> If your assembler produced syntax errors, it is probably unhappy with the
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> preprocessor. Check your assembler, or try producing i386.o by hand.
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> gmake[2]: [i386.o] Error 2 (ignored)
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> rm -f libasmrun.a
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> ar rc libasmrun.a startup.o main.o fail.o roots.o globroots.o signals.o signals_asm.o misc.o freelist.o major_gc.o minor_gc.o memory.o alloc.o compare.o ints.o floats.o str.o array.o io.o extern.o intern.o hash.o sys.o parsing.o gc_ctrl.o terminfo.o md5.o obj.o lexing.o printexc.o callback.o weak.o compact.o finalise.o custom.o unix.o backtrace.o natdynlink.o debugger.o meta.o dynlink.o i386.o
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> ar: i386.o: no such file or directory
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> gmake[2]: *** [libasmrun.a] Error 1
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> gmake[2]: Leaving directory `/home/r0ller/ocaml-4.00.1/asmrun'
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> gmake[1]: *** [makeruntimeopt] Error 2
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> gmake[1]: Leaving directory `/home/r0ller/ocaml-4.00.1'
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> gmake: *** [opt] Error 2
> 
> >>
> 
> >>>
> 
> >>
> 
> >>>
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> Thanks & regards,
> 
> >>
> 
> >>>
> 
> >>
> 
> >>> r0ller
> 
> >
> 
> >
> 
> 
> 
> 
> 
> -- 
> 
> Caml-list mailing list.  Subscription management and archives:
> 
> https://sympa.inria.fr/sympa/arc/caml-list
> 
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> 
> Bug reports: http://caml.inria.fr/bin/caml-bugs


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
  2013-01-16  8:02       ` r0ller
@ 2013-01-16  8:56         ` Francois Berenger
  2013-01-16  9:01           ` AW: " Gerd Stolpmann
  0 siblings, 1 reply; 18+ messages in thread
From: Francois Berenger @ 2013-01-16  8:56 UTC (permalink / raw)
  To: caml-list

On 01/16/2013 05:02 PM, r0ller@freemail.hu wrote:
> Hi All,
>
> By the way, is there any doc available about porting ocaml (google didn't find any) or any hint on how to move forward? I'd really like to have the native compiler on minix too.

I think in the past it was possible to generate C code from OCaml code.

As I guess Minix have a C compiler, that would be a way out for you.

I can't find back, but I remember Richard W.M. Jones from Red Hat posted 
about it on caml-list and keeps it somewhere.

> Thanks&regards,
> r0ller
>
> On Friday, January 11, 2013 5:23:54 PM UTC+1, r0l...@freemail.hu wrote:
>> Hi again,
>>
>>
>>
>> I forgot to mention that this result I got after gmake opt.
>>
>>
>>
>> Regards,
>>
>> r0ller
>>
>>
>>
>> On Friday, January 11, 2013 5:13:56 PM UTC+1, r0l...@freemail.hu wrote:
>>
>>> Hi Xavier,
>>
>>>
>>
>>>
>>
>>>
>>
>>> Thanks for the hint! I gave it a try and also with SYSTEM=bsd_elf. Please, find below the result of the latter (it's the same for linux_elf anyway). I also tried another suggestion from Olivier Andrieu by introducing SYS_minix in asmrun/i386.S but ended up in the same result:( Do you happen to know how to proceed now?
>>
>>>
>>
>>>
>>
>>>
>>
>>> gmake runtimeopt
>>
>>>
>>
>>> gmake[1]: Entering directory `/home/r0ller/ocaml-4.00.1'
>>
>>>
>>
>>> cd asmrun; gmake all
>>
>>>
>>
>>> gmake[2]: Entering directory `/home/r0ller/ocaml-4.00.1/asmrun'
>>
>>>
>>
>>> DSYS_bsd_elf -o i386.o i386.S || \
>>
>>>
>>
>>> { echo "If your assembler produced syntax errors, it is probably unhappy with the"; echo "preprocessor. Check your assembler, or try producing i386.o by hand."; exit 2; }
>>
>>>
>>
>>> DSYS_bsd_elf: not found
>>
>>>
>>
>>> If your assembler produced syntax errors, it is probably unhappy with the
>>
>>>
>>
>>> preprocessor. Check your assembler, or try producing i386.o by hand.
>>
>>>
>>
>>> gmake[2]: [i386.o] Error 2 (ignored)
>>
>>>
>>
>>> rm -f libasmrun.a
>>
>>>
>>
>>> ar rc libasmrun.a startup.o main.o fail.o roots.o globroots.o signals.o signals_asm.o misc.o freelist.o major_gc.o minor_gc.o memory.o alloc.o compare.o ints.o floats.o str.o array.o io.o extern.o intern.o hash.o sys.o parsing.o gc_ctrl.o terminfo.o md5.o obj.o lexing.o printexc.o callback.o weak.o compact.o finalise.o custom.o unix.o backtrace.o natdynlink.o debugger.o meta.o dynlink.o i386.o
>>
>>>
>>
>>> ar: i386.o: no such file or directory
>>
>>>
>>
>>> gmake[2]: *** [libasmrun.a] Error 1
>>
>>>
>>
>>> gmake[2]: Leaving directory `/home/r0ller/ocaml-4.00.1/asmrun'
>>
>>>
>>
>>> gmake[1]: *** [makeruntimeopt] Error 2
>>
>>>
>>
>>> gmake[1]: Leaving directory `/home/r0ller/ocaml-4.00.1'
>>
>>>
>>
>>> gmake: *** [opt] Error 2
>>
>>>
>>
>>>
>>
>>>
>>
>>> Thanks & regards,
>>
>>>
>>
>>> r0ller
>
>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
  2013-01-11 16:23     ` r0ller
@ 2013-01-16  8:02       ` r0ller
  2013-01-16  8:56         ` Francois Berenger
  0 siblings, 1 reply; 18+ messages in thread
From: r0ller @ 2013-01-16  8:02 UTC (permalink / raw)
  To: fa.caml; +Cc: caml-list

Hi All,

By the way, is there any doc available about porting ocaml (google didn't find any) or any hint on how to move forward? I'd really like to have the native compiler on minix too.

Thanks&regards,
r0ller

On Friday, January 11, 2013 5:23:54 PM UTC+1, r0l...@freemail.hu wrote:
> Hi again,
> 
> 
> 
> I forgot to mention that this result I got after gmake opt.
> 
> 
> 
> Regards,
> 
> r0ller
> 
> 
> 
> On Friday, January 11, 2013 5:13:56 PM UTC+1, r0l...@freemail.hu wrote:
> 
> > Hi Xavier,
> 
> > 
> 
> > 
> 
> > 
> 
> > Thanks for the hint! I gave it a try and also with SYSTEM=bsd_elf. Please, find below the result of the latter (it's the same for linux_elf anyway). I also tried another suggestion from Olivier Andrieu by introducing SYS_minix in asmrun/i386.S but ended up in the same result:( Do you happen to know how to proceed now?
> 
> > 
> 
> > 
> 
> > 
> 
> > gmake runtimeopt
> 
> > 
> 
> > gmake[1]: Entering directory `/home/r0ller/ocaml-4.00.1'
> 
> > 
> 
> > cd asmrun; gmake all
> 
> > 
> 
> > gmake[2]: Entering directory `/home/r0ller/ocaml-4.00.1/asmrun'
> 
> > 
> 
> > DSYS_bsd_elf -o i386.o i386.S || \
> 
> > 
> 
> > { echo "If your assembler produced syntax errors, it is probably unhappy with the"; echo "preprocessor. Check your assembler, or try producing i386.o by hand."; exit 2; }
> 
> > 
> 
> > DSYS_bsd_elf: not found
> 
> > 
> 
> > If your assembler produced syntax errors, it is probably unhappy with the
> 
> > 
> 
> > preprocessor. Check your assembler, or try producing i386.o by hand.
> 
> > 
> 
> > gmake[2]: [i386.o] Error 2 (ignored)
> 
> > 
> 
> > rm -f libasmrun.a
> 
> > 
> 
> > ar rc libasmrun.a startup.o main.o fail.o roots.o globroots.o signals.o signals_asm.o misc.o freelist.o major_gc.o minor_gc.o memory.o alloc.o compare.o ints.o floats.o str.o array.o io.o extern.o intern.o hash.o sys.o parsing.o gc_ctrl.o terminfo.o md5.o obj.o lexing.o printexc.o callback.o weak.o compact.o finalise.o custom.o unix.o backtrace.o natdynlink.o debugger.o meta.o dynlink.o i386.o
> 
> > 
> 
> > ar: i386.o: no such file or directory
> 
> > 
> 
> > gmake[2]: *** [libasmrun.a] Error 1
> 
> > 
> 
> > gmake[2]: Leaving directory `/home/r0ller/ocaml-4.00.1/asmrun'
> 
> > 
> 
> > gmake[1]: *** [makeruntimeopt] Error 2
> 
> > 
> 
> > gmake[1]: Leaving directory `/home/r0ller/ocaml-4.00.1'
> 
> > 
> 
> > gmake: *** [opt] Error 2
> 
> > 
> 
> > 
> 
> > 
> 
> > Thanks & regards,
> 
> > 
> 
> > r0ller


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
  2013-01-11 16:13   ` r0ller
@ 2013-01-11 16:23     ` r0ller
  2013-01-16  8:02       ` r0ller
  0 siblings, 1 reply; 18+ messages in thread
From: r0ller @ 2013-01-11 16:23 UTC (permalink / raw)
  To: fa.caml; +Cc: caml-list

Hi again,

I forgot to mention that this result I got after gmake opt.

Regards,
r0ller

On Friday, January 11, 2013 5:13:56 PM UTC+1, r0l...@freemail.hu wrote:
> Hi Xavier,
> 
> 
> 
> Thanks for the hint! I gave it a try and also with SYSTEM=bsd_elf. Please, find below the result of the latter (it's the same for linux_elf anyway). I also tried another suggestion from Olivier Andrieu by introducing SYS_minix in asmrun/i386.S but ended up in the same result:( Do you happen to know how to proceed now?
> 
> 
> 
> gmake runtimeopt
> 
> gmake[1]: Entering directory `/home/r0ller/ocaml-4.00.1'
> 
> cd asmrun; gmake all
> 
> gmake[2]: Entering directory `/home/r0ller/ocaml-4.00.1/asmrun'
> 
> DSYS_bsd_elf -o i386.o i386.S || \
> 
> { echo "If your assembler produced syntax errors, it is probably unhappy with the"; echo "preprocessor. Check your assembler, or try producing i386.o by hand."; exit 2; }
> 
> DSYS_bsd_elf: not found
> 
> If your assembler produced syntax errors, it is probably unhappy with the
> 
> preprocessor. Check your assembler, or try producing i386.o by hand.
> 
> gmake[2]: [i386.o] Error 2 (ignored)
> 
> rm -f libasmrun.a
> 
> ar rc libasmrun.a startup.o main.o fail.o roots.o globroots.o signals.o signals_asm.o misc.o freelist.o major_gc.o minor_gc.o memory.o alloc.o compare.o ints.o floats.o str.o array.o io.o extern.o intern.o hash.o sys.o parsing.o gc_ctrl.o terminfo.o md5.o obj.o lexing.o printexc.o callback.o weak.o compact.o finalise.o custom.o unix.o backtrace.o natdynlink.o debugger.o meta.o dynlink.o i386.o
> 
> ar: i386.o: no such file or directory
> 
> gmake[2]: *** [libasmrun.a] Error 1
> 
> gmake[2]: Leaving directory `/home/r0ller/ocaml-4.00.1/asmrun'
> 
> gmake[1]: *** [makeruntimeopt] Error 2
> 
> gmake[1]: Leaving directory `/home/r0ller/ocaml-4.00.1'
> 
> gmake: *** [opt] Error 2
> 
> 
> 
> Thanks & regards,
> 
> r0ller


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
       [not found] ` <fa.cI6IwITMmpEcG/xX8jnbm1tXnWU@ifi.uio.no>
@ 2013-01-11 16:13   ` r0ller
  2013-01-11 16:23     ` r0ller
  0 siblings, 1 reply; 18+ messages in thread
From: r0ller @ 2013-01-11 16:13 UTC (permalink / raw)
  To: fa.caml; +Cc: caml-list

Hi Xavier,

Thanks for the hint! I gave it a try and also with SYSTEM=bsd_elf. Please, find below the result of the latter (it's the same for linux_elf anyway). I also tried another suggestion from Olivier Andrieu by introducing SYS_minix in asmrun/i386.S but ended up in the same result:( Do you happen to know how to proceed now?

gmake runtimeopt
gmake[1]: Entering directory `/home/r0ller/ocaml-4.00.1'
cd asmrun; gmake all
gmake[2]: Entering directory `/home/r0ller/ocaml-4.00.1/asmrun'
DSYS_bsd_elf -o i386.o i386.S || \
{ echo "If your assembler produced syntax errors, it is probably unhappy with the"; echo "preprocessor. Check your assembler, or try producing i386.o by hand."; exit 2; }
DSYS_bsd_elf: not found
If your assembler produced syntax errors, it is probably unhappy with the
preprocessor. Check your assembler, or try producing i386.o by hand.
gmake[2]: [i386.o] Error 2 (ignored)
rm -f libasmrun.a
ar rc libasmrun.a startup.o main.o fail.o roots.o globroots.o signals.o signals_asm.o misc.o freelist.o major_gc.o minor_gc.o memory.o alloc.o compare.o ints.o floats.o str.o array.o io.o extern.o intern.o hash.o sys.o parsing.o gc_ctrl.o terminfo.o md5.o obj.o lexing.o printexc.o callback.o weak.o compact.o finalise.o custom.o unix.o backtrace.o natdynlink.o debugger.o meta.o dynlink.o i386.o
ar: i386.o: no such file or directory
gmake[2]: *** [libasmrun.a] Error 1
gmake[2]: Leaving directory `/home/r0ller/ocaml-4.00.1/asmrun'
gmake[1]: *** [makeruntimeopt] Error 2
gmake[1]: Leaving directory `/home/r0ller/ocaml-4.00.1'
gmake: *** [opt] Error 2

Thanks & regards,
r0ller

On Friday, January 11, 2013 10:56:51 AM UTC+1, Xavier Leroy wrote:
> On 01/11/2013 10:28 AM, r0ller wrote:
> 
> 
> 
> > Minix3 is an ELF based system indeed. I asked the guys on the minix3 forum and one of the developers said that neither the default minix toolchain (clang) nor the minix port of gcc prepends leading underscores. However, he had a hint about checking if the ocaml package itself is trying to guess during its build whether leading underscore prepending is done on the host system or not.
> 
> 
> 
> Indeed, the "configure" script tries to guess this, among other
> 
> platform dependencies.
> 
> 
> 
> > If that's true, I'd need to recompile the ocaml package whilst trying to indicate somehow that the minix3 system does not need leading underscore prepending, right?
> 
> 
> 
> Yes.  For your first try, just manually edit the generated file
> 
> config/Makefile so that it has
> 
> 
> 
> ARCH=i386
> 
> MODEL=default
> 
> SYSTEM=linux_elf
> 
> 
> 
> then do "make opt" and "make opt.opt" and see if it now works.
> 
> 
> 
> If it does, you may want to investigate why the ./configure script
> 
> guessed wrong on your Minix system.  Running "sh -x ./configure"
> 
> generates a useful trace.
> 
> 
> 
> - Xavier Leroy
> 
> 
> 
> -- 
> 
> Caml-list mailing list.  Subscription management and archives:
> 
> https://sympa.inria.fr/sympa/arc/caml-list
> 
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> 
> Bug reports: http://caml.inria.fr/bin/caml-bugs


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
  2013-01-11  9:28   ` r0ller
@ 2013-01-11  9:56     ` Xavier Leroy
  0 siblings, 0 replies; 18+ messages in thread
From: Xavier Leroy @ 2013-01-11  9:56 UTC (permalink / raw)
  To: r0ller; +Cc: caml-list

On 01/11/2013 10:28 AM, r0ller wrote:

> Minix3 is an ELF based system indeed. I asked the guys on the minix3 forum and one of the developers said that neither the default minix toolchain (clang) nor the minix port of gcc prepends leading underscores. However, he had a hint about checking if the ocaml package itself is trying to guess during its build whether leading underscore prepending is done on the host system or not.

Indeed, the "configure" script tries to guess this, among other
platform dependencies.

> If that's true, I'd need to recompile the ocaml package whilst trying to indicate somehow that the minix3 system does not need leading underscore prepending, right?

Yes.  For your first try, just manually edit the generated file
config/Makefile so that it has

ARCH=i386
MODEL=default
SYSTEM=linux_elf

then do "make opt" and "make opt.opt" and see if it now works.

If it does, you may want to investigate why the ./configure script
guessed wrong on your Minix system.  Running "sh -x ./configure"
generates a useful trace.

- Xavier Leroy

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
  2013-01-10 16:08 ` Gerd Stolpmann
@ 2013-01-11  9:28   ` r0ller
  2013-01-11  9:56     ` Xavier Leroy
  0 siblings, 1 reply; 18+ messages in thread
From: r0ller @ 2013-01-11  9:28 UTC (permalink / raw)
  To: Gerd Stolpmann; +Cc: caml-list

Hi Gerd,

Minix3 is an ELF based system indeed. I asked the guys on the minix3 forum and one of the developers said that neither the default minix toolchain (clang) nor the minix port of gcc prepends leading underscores. However, he had a hint about checking if the ocaml package itself is trying to guess during its build whether leading underscore prepending is done on the host system or not. If so, that guessing might have gone wrong in case of minix3. After googling a bit, I found something indicating that point may be valid, (cited from http://asm.sourceforge.net/howto/conventions.html#AEN647 ):

Some C compilers prepend an underscore before every symbol, while others do not.
Particularly, Linux a.out GCC does such prepending, while Linux ELF GCC does not.
If you need to cope with both behaviors at once, see how existing packages do. For instance, get an old Linux source tree, the Elk, qthreads, or OCaml...

If that's true, I'd need to recompile the ocaml package whilst trying to indicate somehow that the minix3 system does not need leading underscore prepending, right? Do you think this to be a valid assumption? If so, do you happen to know how can I influence the ocaml build in such a way?

Thanks&regards,
r0ller


Gerd Stolpmann <info@gerd-stolpmann.de> írta:
>Am Donnerstag, den 10.01.2013, 15:48 +0100 schrieb r0ller:>
> Hi Gerd,>
> >
> Thanks for the quick answer! Please, find the output of nm attached -for the first try, size limit was exceeded, hopefully now it'll get through as attachment.>
>
Interesting. I guess you use an ELF-based system (Minix-3.2)? If not it>
could be a limitation of a.out.>
>
Another theory: the symbol names coming from assembler sources seem to>
always have a leading underscore, which seems to have been auto-added by>
the assembler. This is a very old convention you don't find on modern OS>
anymore, so it could be that this is the source of the problem. See>
http://stackoverflow.com/questions/2627511/why-do-c-compilers-prepend-underscores-to-external-names,>
but pay attention to the fact that at some day the underscore was>
handled differently, and was used for internal symbols. So what could>
have happened: The assembler still thinks that symbols from the C>
compiler are prefixed with an underscore, but this is in fact not true.>
This would be a problem of the installed compiler toolchain. Maybe you>
do not use the right assembler matching the C compiler?>
>
Gerd>
>
>
>
>
> Thanks&regards,>
> r0ller>
> >
> Gerd Stolpmann <info@gerd-stolpmann.de> írta:>
> >Am Donnerstag, den 10.01.2013, 14:57 +0100 schrieb r0ller@freemail.hu:>
> These errors would mean that stdlib.a and libasmrun.a do not contain the>
> symbols they are supposed to contain.>
> What's the output of>
> >
> nm /usr/local/lib/ocaml/libasmrun.a?>
> You should normally find here the missing symbols the linker is>
> complaining about.>
> >
> Gerd>
> >
> ------------------------------------------------------------>>
> Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de>>
> Creator of GODI and camlcity.org.>>
> Contact details:        http://www.camlcity.org/contact.html>>
> Company homepage:       http://www.gerd-stolpmann.de>>
> *** Searching for new projects! Need consulting for system>>
> *** programming in Ocaml? Gerd Stolpmann can help you.>>
> ------------------------------------------------------------>>
> >>
> >
> >
> -- >
> Caml-list mailing list.  Subscription management and archives:>
> https://sympa.inria.fr/sympa/arc/caml-list>
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners>
> Bug reports: http://caml.inria.fr/bin/caml-bugs>
>
-- >
------------------------------------------------------------>
Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de>
Creator of GODI and camlcity.org.>
Contact details:        http://www.camlcity.org/contact.html>
Company homepage:       http://www.gerd-stolpmann.de>
*** Searching for new projects! Need consulting for system>
*** programming in Ocaml? Gerd Stolpmann can help you.>
------------------------------------------------------------>
>
>
-- >
Caml-list mailing list.  Subscription management and archives:>
https://sympa.inria.fr/sympa/arc/caml-list>
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners>
Bug reports: http://caml.inria.fr/bin/caml-bugs

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
  2013-01-10 14:48 r0ller
@ 2013-01-10 16:08 ` Gerd Stolpmann
  2013-01-11  9:28   ` r0ller
  0 siblings, 1 reply; 18+ messages in thread
From: Gerd Stolpmann @ 2013-01-10 16:08 UTC (permalink / raw)
  To: r0ller; +Cc: caml-list

Am Donnerstag, den 10.01.2013, 15:48 +0100 schrieb r0ller:
> Hi Gerd,
> 
> Thanks for the quick answer! Please, find the output of nm attached -for the first try, size limit was exceeded, hopefully now it'll get through as attachment.

Interesting. I guess you use an ELF-based system (Minix-3.2)? If not it
could be a limitation of a.out.

Another theory: the symbol names coming from assembler sources seem to
always have a leading underscore, which seems to have been auto-added by
the assembler. This is a very old convention you don't find on modern OS
anymore, so it could be that this is the source of the problem. See
http://stackoverflow.com/questions/2627511/why-do-c-compilers-prepend-underscores-to-external-names,
but pay attention to the fact that at some day the underscore was
handled differently, and was used for internal symbols. So what could
have happened: The assembler still thinks that symbols from the C
compiler are prefixed with an underscore, but this is in fact not true.
This would be a problem of the installed compiler toolchain. Maybe you
do not use the right assembler matching the C compiler?

Gerd




> Thanks&regards,
> r0ller
> 
> Gerd Stolpmann <info@gerd-stolpmann.de> írta:
> >Am Donnerstag, den 10.01.2013, 14:57 +0100 schrieb r0ller@freemail.hu:
> These errors would mean that stdlib.a and libasmrun.a do not contain the
> symbols they are supposed to contain.
> What's the output of
> 
> nm /usr/local/lib/ocaml/libasmrun.a?
> You should normally find here the missing symbols the linker is
> complaining about.
> 
> Gerd
> 
> ------------------------------------------------------------>
> Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de>
> Creator of GODI and camlcity.org.>
> Contact details:        http://www.camlcity.org/contact.html>
> Company homepage:       http://www.gerd-stolpmann.de>
> *** Searching for new projects! Need consulting for system>
> *** programming in Ocaml? Gerd Stolpmann can help you.>
> ------------------------------------------------------------>
> >
> 
> 
> -- 
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

-- 
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
*** Searching for new projects! Need consulting for system
*** programming in Ocaml? Gerd Stolpmann can help you.
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Caml-list] ocamlc compiles hello world, ocamlopt not
@ 2013-01-10 14:48 r0ller
  2013-01-10 16:08 ` Gerd Stolpmann
  0 siblings, 1 reply; 18+ messages in thread
From: r0ller @ 2013-01-10 14:48 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: TEXT/plain, Size: 1059 bytes --]

Hi Gerd,

Thanks for the quick answer! Please, find the output of nm attached -for the first try, size limit was exceeded, hopefully now it'll get through as attachment.

Thanks&regards,
r0ller

Gerd Stolpmann <info@gerd-stolpmann.de> írta:
>Am Donnerstag, den 10.01.2013, 14:57 +0100 schrieb r0ller@freemail.hu:
These errors would mean that stdlib.a and libasmrun.a do not contain the
symbols they are supposed to contain.
What's the output of

nm /usr/local/lib/ocaml/libasmrun.a?
You should normally find here the missing symbols the linker is
complaining about.

Gerd

------------------------------------------------------------>
Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de>
Creator of GODI and camlcity.org.>
Contact details:        http://www.camlcity.org/contact.html>
Company homepage:       http://www.gerd-stolpmann.de>
*** Searching for new projects! Need consulting for system>
*** programming in Ocaml? Gerd Stolpmann can help you.>
------------------------------------------------------------>
>


[-- Attachment #2: nm_out.zip --]
[-- Type: APPLICATION/zip, Size: 8860 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-01-17 19:36 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-10 13:57 [Caml-list] ocamlc compiles hello world, ocamlopt not r0ller
2013-01-10 14:25 ` Gerd Stolpmann
2013-01-10 14:48 r0ller
2013-01-10 16:08 ` Gerd Stolpmann
2013-01-11  9:28   ` r0ller
2013-01-11  9:56     ` Xavier Leroy
     [not found] <fa.J86NbZyp4NcoVDLx3IIZPjh6Xsw@ifi.uio.no>
     [not found] ` <fa.cI6IwITMmpEcG/xX8jnbm1tXnWU@ifi.uio.no>
2013-01-11 16:13   ` r0ller
2013-01-11 16:23     ` r0ller
2013-01-16  8:02       ` r0ller
2013-01-16  8:56         ` Francois Berenger
2013-01-16  9:01           ` AW: " Gerd Stolpmann
2013-01-16  9:48             ` Basile Starynkevitch
2013-01-16 22:32               ` Benedikt Meurer
2013-01-16 23:17                 ` Gabriel Scherer
2013-01-17 19:34                   ` Benedikt Meurer
     [not found] <fa.tMEIU2eZ10ydMQJpEId8zYmuWpo@ifi.uio.no>
     [not found] ` <fa.5ytRg9PGwzfRT5U12a+96CThPHM@ifi.uio.no>
     [not found]   ` <fa.fEvQzwMsL9tn+Q+kKoqZrwKQpHs@ifi.uio.no>
     [not found]     ` <fa.gj9h88pWsiKoDqywSvikWobc2Gk@ifi.uio.no>
     [not found]       ` <fa.yuD604fWUWzMhQKQ2PVUY9+PSRs@ifi.uio.no>
     [not found]         ` <fa.SiWjqBgSRaJHHtRDr1LQlRGec/I@ifi.uio.no>
2013-01-16  9:29           ` r0ller
     [not found]           ` <fa.vGYTX053VB/7kO+WVlnBXs6LyWM@ifi.uio.no>
2013-01-16  9:36             ` r0ller
     [not found]             ` <fa.3ZA77VqUCTh0CDJf/dKc9fxM234@ifi.uio.no>
2013-01-16 10:16               ` r0ller
     [not found] <fa.rDSh+u4grOqB/jgTnZaDUQoT+s0@ifi.uio.no>
     [not found] ` <fa.53tG84D0PDsZ/dZaWLkOQvsLfTU@ifi.uio.no>
2013-01-16 10:20   ` r0ller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).