On Thu, May 24, 2007 at 16:38:34 -0400, Daniel Schepler wrote: > Package: mtasc > Version: 1.13-1 > Severity: serious > > From my pbuilder build log: > > ... > ( cd ocaml/mtasc ; ocamllex lexer.mll ; ocamlfind ocamlopt -c expr.ml > lexer.ml ; ocamlfind ocamlopt -c -pp camlp4o parser.ml ;\ > ocamlfind ocamlopt -package extlib -c -I .. -I ../extc -I ../swflib > typer.ml class.ml plugin.ml genSwf.ml main.ml ;\ > ocamlfind ocamlopt -package extlib -linkpkg -o mtasc -cclib > /usr/lib/libz.so extLib.cmxa ../extc/extc.cmxa ../swflib/swflib.cmxa expr.cmx > lexer.cmx parser.cmx typer.cmx class.cmx plugin.cmx genSwf.cmx main.cmx ) > 90 states, 709 transitions, table size 3376 bytes > make[1]: Leaving directory `/tmp/buildd/mtasc-1.13' > ./ocaml/mtasc/mtasc -swf helloworld.swf -main -header 640:480:20 > ocaml/mtasc/doc/HelloWorld.as > Directory 'std' containing MTASC class headers cannot be found : > Please install it or set classpath using '-cp' so it can be found. > make: *** [build-stamp] Error 1 > --
Looking into this, it seems that the problem is the way "base_path" is computed in ocaml/mtasc/main.ml. Adding "-v" to the line where debian/rules fails, I get this output: ./ocaml/mtasc/mtasc -v -swf helloworld.swf -main -header 640:480:20 ocaml/mtasc/doc/HelloWorld.as Classpath : debian/std/;/usr/share/mtasc/;debian/;;/ Directory 'std' containing MTASC class headers cannot be found : Please install it or set classpath using '-cp' so it can be found. make: *** [build-stamp] Error 1 When running the command manually afterwards, it runs fine: $ ./ocaml/mtasc/mtasc -v -swf helloworld.swf -main -header 640:480:20 ocaml/mtasc/doc/HelloWorld.as Classpath : ./ocaml/mtasc/std/;/usr/share/mtasc/;./ocaml/mtasc/;;/ Parsed ./ocaml/mtasc/std/StdPresent.as Parsed ./ocaml/mtasc/std/Object.as Parsed ./ocaml/mtasc/std/Boolean.as Parsed ./ocaml/mtasc/std/String.as Parsed ./ocaml/mtasc/std/Number.as Parsed ./ocaml/mtasc/std/Array.as Parsed ./ocaml/mtasc/std/Function.as Parsed ocaml/mtasc/doc/HelloWorld.as Typing HelloWorld.HelloWorld Parsed ./ocaml/mtasc/std/MovieClip.as Parsed ./ocaml/mtasc/std/ContextMenu.as Parsed ./ocaml/mtasc/std/TextSnapshot.as Typing HelloWorld.main Time spent : 0.004 Notice the different Classpath. The difference comes from executable_path in ocaml/extc/extc_stubs.c, which apparently uses readlink("/proc/self/exe") to find out the path to the mtasc executable. I'm not sure yet whether this is a bug in mtasc or if this failure can just be worked around and ignored. Using ./ocaml/mtasc/mtasc -cp ./ocaml/mtasc/std -swf helloworld.swf -main -header 640:480:20 ocaml/mtasc/doc/HelloWorld.as in debian/rules, the package builds fine. Cheers, Julien
signature.asc
Description: Digital signature