Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 84929 - ocaml fails to compile: Unbound type constructor Parser.token
Summary: ocaml fails to compile: Unbound type constructor Parser.token
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Team for the ML programming language family
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-11 21:12 UTC by Lina Pezzella (RETIRED)
Modified: 2005-08-14 18:39 UTC (History)
1 user (show)

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 Lina Pezzella (RETIRED) gentoo-dev 2005-03-11 21:12:34 UTC
sed -e 's|%%LIBDIR%%|/usr/lib/ocaml|' \
            -e 's|%%BYTERUN%%|/usr/bin/ocamlrun|' \
            -e 's|%%CCOMPTYPE%%|cc|' \
            -e 's|%%BYTECC%%|gcc -fno-defer-pop -no-cpp-precomp -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC -mcpu=7450 -pipe |' \
            -e 's|%%BYTELINK%%|gcc |' \
            -e 's|%%NATIVECC%%|gcc -Wall -DDARWIN_VERSION_6  -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC -mcpu=7450 -pipe|' \
            -e 's|%%NATIVELINK%%|gcc |' \
            -e 's|%%PARTIALLD%%|ld -r |' \
            -e 's|%%PACKLD%%|ld -r |' \
            -e 's|%%BYTECCLIBS%%|-lcurses -lpthread|' \
            -e 's|%%NATIVECCLIBS%%||' \
            -e 's|%%RANLIBCMD%%|ranlib|' \
            -e 's|%%BINUTILS_NM%%||' \
            -e 's|%%CC_PROFILE%%|-pg|' \
            -e 's|%%BINUTILS_OBJCOPY%%||' \
            -e 's|%%ARCH%%|power|' \
            -e 's|%%MODEL%%|ppc|' \
            -e 's|%%SYSTEM%%|rhapsody|' \
            -e 's|%%EXT_OBJ%%|.o|' \
            -e 's|%%EXT_ASM%%|.s|' \
            -e 's|%%EXT_LIB%%|.a|' \
            -e 's|%%EXT_DLL%%|.so|' \
            utils/config.mlp > utils/config.ml
boot/ocamlrun boot/ocamlc -nostdlib -I boot -warn-error A -I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver -I toplevel -c utils/config.ml
boot/ocamlrun boot/ocamlc -nostdlib -I boot -warn-error A -I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver -I toplevel -c parsing/lexer.mli
File "parsing/lexer.mli", line 17, characters 28-40:
Unbound type constructor Parser.token
make: *** [parsing/lexer.cmi] Error 2

!!! ERROR: dev-lang/ocaml-3.08.2 failed.
!!! Function src_compile, Line 51, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

I set MAKEOPTS to -j1 and CFLAGS to "". Nothing fixes this error.  I tried version 3.08.1 and received my favorite error in the world "bus error". I'd appreciate any help you can give me trying to get this to compile, as I don't know this language.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Matthieu Sozeau (RETIRED) gentoo-dev 2005-03-14 12:25:02 UTC
Your system seems a little bit exotic :) 
Could you give me the complete specs ? 
I will probably have to submit the bug upstream.
Comment 2 Matthieu Sozeau (RETIRED) gentoo-dev 2005-03-14 12:40:40 UTC
I just checked the compilation order and lexer.mli shouldn't be compiled before parser.mly is ocamlyacc'ed, so there must be something bad happening with make.
In /var/tmp.../work/ocaml-3.08.2 try:  make clean ; make world -j1.
Comment 3 Lina Pezzella (RETIRED) gentoo-dev 2005-03-14 14:20:44 UTC
make world in the source directory worked, so I commented a few of the likely candidates in the ebuild itself.
If I comment the following line, it seems to compile and install just fine:

sed -i -e "s/\(BYTECCCOMPOPTS=.*\)/\1 ${CFLAGS}/" config/Makefile

I wouldn't think that removing this line conditionally for ppc-macos would cause any serious problems
with the package working as expected, but I will admit to not knowing what BYTECCOMPOPTS does.

So now I am onto the next (and hopefully last error):

cd camlp4; make opt.opt
set -e; for i in lib odyl camlp4 meta etc compile; do cd $i; make opt; cd ..; done
make[2]: Nothing to be done for `opt'.
cp odyl_config.ml odyl_config.ppo
../../ocamlcompopt.sh -warn-error A -I ../../otherlibs/dynlink -c -impl odyl_config.ppo
Fatal error: exception Division_by_zero
make[2]: *** [odyl_config.cmx] Error 2
make[1]: *** [opt.opt] Error 2
make: *** [camlp4optopt] Error 2

!!! ERROR: dev-lang/ocaml-3.08.2 failed.
!!! Function src_compile, Line 53, Exitcode 2
!!! Failed to make opt.opt
!!! If you need support, post the topmost build error, NOT this status message.

So you don't have to parse through all of that, the culprit is "make opt" in odyl. This time, trying "make opt"
in the source directory does not work. :-(
Comment 4 Lina Pezzella (RETIRED) gentoo-dev 2005-08-14 18:39:07 UTC
I'm closing this bug as the offending version has been removed from portage and the latest existing stable 
and unstable versions in the tree work just fine.