Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 255379 - emerge of dev-lang/ocaml-3.10.2 fails
Summary: emerge of dev-lang/ocaml-3.10.2 fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Team for the ML programming language family
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-18 14:11 UTC by Ville Syrjala
Modified: 2009-01-20 08:24 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ville Syrjala 2009-01-18 14:11:29 UTC
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.
Comment 1 Wormo (RETIRED) gentoo-dev 2009-01-19 06:46:43 UTC
Oh yes, classic problem from using '[a-z]' instead of equivalence classes. Thanks for reporting this problem; assigning to maintainers.
Comment 2 Alexis Ballier gentoo-dev 2009-01-20 08:24:43 UTC
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