End of build.log: sed -n -e "s/CAMLprim value \([a-z0-9_][a-z0-9_]*\).*/\1/p" \ alloc.c array.c compare.c extern.c floats.c gc_ctrl.c hash.c intern.c interp.c ints.c io.c lexing.c md5.c meta.c obj.c parsing.c signals.c str.c sys.c terminfo.c callback.c weak.c fi nalise.c stacks.c dynlink.c > primitives (echo '#include "mlvalues.h"'; \ echo '#include "prims.h"'; \ sed -e 's/.*/extern value &();/' primitives; \ echo 'c_primitive caml_builtin_cprim[] = {'; \ sed -e 's/.*/ &,/' primitives; \ echo ' 0 };'; \ echo 'char * caml_names_of_builtin_cprim[] = {'; \ sed -e 's/.*/ "&",/' primitives; \ echo ' 0 };') > prims.c gcc -DCAML_NAME_SPACE -O -march=pentium2 -mtune=pentium2 -pipe -O2 -fno-defer-pop -Wall -D_FILE_O FFSET_BITS=64 -D_REENTRANT -c -o prims.o prims.c gcc -march=pentium2 -mtune=pentium2 -pipe -O2 -fno-defer-pop -Wall -D_FILE_OFFSET_BITS=64 -D_REEN TRANT -Wl,-O1 -Wl,-E -o ocamlrun \ prims.o libcamlrun.a -lm -ldl -lcurses -lpthread prims.o:(.data+0x38): undefined reference to `caml_make_' prims.o:(.data+0x5c): undefined reference to `caml_output_' prims.o:(.data+0x60): undefined reference to `caml_output_' ... Reproducible: Always The problem seems to be some sed locale issue. My locale settings are a mix of fi_FI.UTF-8 and en_US.UTF-8. Now, observe the difference between my locale and the C locale: # sed -n -e "s/CAMLprim value \([a-z0-9_][a-z0-9_]*\).*/\1/p" array.c caml_array_get_addr caml_array_get_float caml_array_get caml_array_set_addr caml_array_set_float caml_array_set caml_array_unsafe_get_float caml_array_unsafe_get caml_array_unsafe_set_addr caml_array_unsafe_set_float caml_array_unsafe_set caml_make_ caml_make_array # LC_ALL=C sed -n -e "s/CAMLprim value \([a-z0-9_][a-z0-9_]*\).*/\1/p" array.c caml_array_get_addr caml_array_get_float caml_array_get caml_array_set_addr caml_array_set_float caml_array_set caml_array_unsafe_get_float caml_array_unsafe_get caml_array_unsafe_set_addr caml_array_unsafe_set_float caml_array_unsafe_set caml_make_vect caml_make_array So, as a workaround I can emerge ocaml w/ LC_ALL=C.
Oh yes, classic problem from using '[a-z]' instead of equivalence classes. Thanks for reporting this problem; assigning to maintainers.
i've set LC_ALL to C in the ebuilds, it would be better to use :alpha: & friends regexps but there are many of them, thus setting LC_ALL to C seems more robust; please test