Make throws FAILURE / ERROR 255

Asked by Oscar Suarez

I followed the steps required to install Marionnet according to the guides for debian/redHat. I'm using Sabayon.
I got all the dependencies, after an hour of some work. But then when I tried the MAKE of Marionnet the output was:

----------------------------------------------------------------------------------------------------------------------------------------------------------------
.......
+ /usr/bin/ocamlc.opt -c -thread -g -I /usr/lib64/ocaml -I +camlp4 -I +threads -I +lablgtk2 -I +lablglade -I +ocamlbricks -I /usr/lib64/ocaml/camlp4 -I /usr/lib64/ocaml/threads -I /usr/lib64/ocaml/lablgtk2 -I /usr/lib64/ocaml/lablglade -I /usr/lib64/ocaml/ocamlbricks -pp 'camlp4of -I /usr/lib64/ocaml/ocamlbricks gettext_extract_pot_p4.cmo -I chip' -I gui -I chip -o simple_dialogs.cmo simple_dialogs.ml
File "simple_dialogs.ml", line 129, characters 6-12:
Warning Y: unused variable cancel.
File "simple_dialogs.ml", line 27, characters 8-30:
Error: Unbound class Gui.dialog_MESSAGE
Command exited with code 2.
FAILURE when building marionnet.byte
make: *** [marionnet.byte] Error 255
----------------------------------------------------------------------------------------------------------------------------------------------------------------

I'll try to find the problem (maybe the versions of the ocaml, vde, ocamlbricks or other???).
Any help is very usefull.
I'm trying to set up Marionnet for a basic networking course I will teach the next week.

Thank you very much.

Question information

Language:
English Edit question
Status:
Solved
For:
marionnet Edit question
Assignee:
Luca Saiu Edit question
Solved by:
Oscar Suarez
Solved:
Last query:
Last reply:
Revision history for this message
Luca Saiu (saiu) said :
#1

Hello Oscar.
The message
  Error: Unbound class Gui.dialog_MESSAGE
makes me suspect that you have a problem with lablgtk, which contains a binary which should generate the file gui.ml, then compiled into gui.cmo. Do you see such files?
You can run
  make gui.ml
to re-generate the file. Do you see the file gui.ml after running "make gui.ml"?
What do you see if you run
  which lablgladecc2
?

We would like to make such problems easier to diagnose. I think your problem won't be hard to solve.
Please let us know,

--
Luca Saiu

Revision history for this message
Oscar Suarez (osuarezl) said :
#2

Luca,

I see both files, gui.ml and _build/gui.cmo.

I ran "make gui", the result was: make: `gui.ml' is updated.

With which I got: which: no lablgladecc2 in (/sbin:/bin:/usr/sbin:/usr/bin)

So I think it may be the problem as you predicted??.

Thank you very much for the fast response, it is really amazing to have quality support like the one this community is providing.

Oscar.

Revision history for this message
Luca Saiu (saiu) said :
#3

About the community thing... well, I don't know which community you're talking about, but thanks. If you're speaking about the free software community in general I'm very happy to hear it :-).

lablgladecc2 is definitely needed when compiling. You can compile lablgtk2 from sources and install it, as explained in our howto for RedHat-like distributions; lablgladecc2 comes from there, even if (for some reason I don't understand) some distributions package it sepeartely.
However, I don't think that's your problem. I've tried to rename the file on my machine, just to see the error message; and I get this:

make[1]: Leaving directory `/home/luca/working/DARCS-TO-BZR-MIGRATION/marionnet.bzr'
Manually pre-building "chip/chip_parser_p4.cmo"...
make[1]: Entering directory `/home/luca/working/DARCS-TO-BZR-MIGRATION/marionnet.bzr'
ocamlc -c -I +camlp4 -pp camlp4of camlp4lib.cma -o _build/chip/chip_parser_p4.cmo chip/chip_parser_p4.ml
make[1]: Leaving directory `/home/luca/working/DARCS-TO-BZR-MIGRATION/marionnet.bzr'
Manually pre-building "chip/chip_example.expanded.ml"...
make[1]: Entering directory `/home/luca/working/DARCS-TO-BZR-MIGRATION/marionnet.bzr'
camlp4of -I _build/chip/ -printer Camlp4OCamlRevisedPrinter chip_parser_p4.cmo -o _build/chip/chip_example.expanded.ml chip/chip_example.ml
make[1]: Leaving directory `/home/luca/working/DARCS-TO-BZR-MIGRATION/marionnet.bzr'
/bin/bash: lablgladecc2: command not found

which is quite reasonable. But I don't think that is what you are seeing; please correct me if I'm wrong. This is really strange.
Could you please include the *complete* output of
   make clean && make
?

We've never tested on your distribution, but there is no reason why the thing shouldn't work on it. We're interested in supporting it.

Best regards,

Revision history for this message
Oscar Suarez (osuarezl) said :
#4

Yes I was talking of free soft one, sorry for my bad english!. :)

First if noticed something, which lablgladecc2 showed: no lablgladecc2 in (/sbin:/bin:/usr/sbin:/usr/bin). I remembered that it happened because lablgladecc2 was in /usr/local/bin. I suppose there is a problem with that directory because as root I can't execute any of its contents (maybe it is not on the PATH).

I got problems whit that before so I cp the contents of /usr/local/bin to /usr/bin. I had to do something similar with the ocaml bins to being able to install ocamlbricks.

After that, I didn't got the original error, but still got one.

The original error was:
Checking if files manually copied in _build/ have been modified...
Checking "gettext_extract_pot_p4.conf"...
Checking "include_type_definitions_p4.ml"...
Checking "include_as_string_p4.ml"...
Checking "chip/chip_parser_p4.ml"...
Checking "scripts/can-directory-host-sparse-files.sh"...
Manually pre-copying "gettext_extract_pot_p4.conf"...
Manually pre-copying "include_type_definitions_p4.ml"...
Manually pre-copying "include_as_string_p4.ml"...
Manually pre-copying "chip/chip_parser_p4.ml"...
Manually pre-copying "scripts/can-directory-host-sparse-files.sh"...
Manually pre-building "include_type_definitions_p4.cmo"...
make[1]: se ingresa al directorio `/root/tmp/marionnet'
make[1]: `_build/include_type_definitions_p4.cmo' está actualizado.
make[1]: se sale del directorio `/root/tmp/marionnet'
Manually pre-building "include_as_string_p4.cmo"...
make[1]: se ingresa al directorio `/root/tmp/marionnet'
make[1]: `_build/include_as_string_p4.cmo' está actualizado.
make[1]: se sale del directorio `/root/tmp/marionnet'
Manually pre-building "chip/chip_parser_p4.cmo"...
make[1]: se ingresa al directorio `/root/tmp/marionnet'
make[1]: `_build/chip/chip_parser_p4.cmo' está actualizado.
make[1]: se sale del directorio `/root/tmp/marionnet'
Manually pre-building "chip/chip_example.expanded.ml"...
make[1]: se ingresa al directorio `/root/tmp/marionnet'
make[1]: `_build/chip/chip_example.expanded.ml' está actualizado.
make[1]: se sale del directorio `/root/tmp/marionnet'
Finished, 0 targets (0 cached) in 00:00:00.
+ /usr/bin/ocamlc.opt -c -thread -g -I /usr/lib64/ocaml -I +camlp4 -I +threads -I +lablgtk2 -I +lablglade -I +ocamlbricks -I /usr/lib64/ocaml/camlp4 -I /usr/lib64/ocaml/threads -I /usr/lib64/ocaml/lablgtk2 -I /usr/lib64/ocaml/lablglade -I /usr/lib64/ocaml/ocamlbricks -pp 'camlp4of -I /usr/lib64/ocaml/ocamlbricks gettext_extract_pot_p4.cmo -I chip' -I gui -I chip -o simple_dialogs.cmo simple_dialogs.ml
File "simple_dialogs.ml", line 129, characters 6-12:
Warning Y: unused variable cancel.
File "simple_dialogs.ml", line 27, characters 8-30:
Error: Unbound class Gui.dialog_MESSAGE
Command exited with code 2.
FAILURE when building marionnet.byte
make: *** [marionnet.byte] Error 255

After "cp /usr/local/bin/* /usr/bin/" the new error is:
m15xL marionnet # make clean && make
Success.
(echo -e "# This file is automatically generated. Please don't edit it.\n" > _tags; \
        for directory in $( sourcedirectories=''; for d in `find -type d | grep -v /_darcs\$ | grep -v /_darcs/ | grep -v /_build\$ | grep -v /_build/ | grep -v ^.$ | sort`; do if ls $d/*.ml &> /dev/null || ls $d/*.mli &> /dev/null || ls $d/*.mll &> /dev/null || ls $d/*.mly &> /dev/null ; then sourcedirectories+="$d "; fi; done; echo $sourcedirectories ); do \
                directory=`echo $directory | sed s/^.\\\\///`; \
                echo "<$directory>: include" >> _tags; \
        done; \
        echo >> _tags; \
        echo "<**/*.byte>: ourincludesettings, ourbytelinksettings, ourcmodules" >> _tags; \
        echo "<**/*.{ml,mli,byte,native,cma,cmxa}>: ourincludesettings" >> _tags; \
        echo "<**/*.{native,cma,cmxa}>: ourcmodules" >> _tags ; \
        echo "<**/*.cmx>: ournativecompilesettings" >> _tags; \
        echo "<**/*.cmo>: ourbytecompilesettings" >> _tags; \
        echo "<**/*.native>: ourincludesettings, ournativelinksettings" >> _tags; \
        echo "<**/*.{ml,mli}>: ourocamldocsettings" >> _tags ; \
        echo "<**/*.{ml,mli}>: ourppsettings" >> _tags)
Just for debugging: PP_OPTION is "camlp4of -I /usr/local/lib/ocaml/ocamlbricks gettext_extract_pot_p4.cmo -I chip"
Building meta.ml...
Success.
Manually pre-copying "gettext_extract_pot_p4.conf"...
Manually pre-copying "include_type_definitions_p4.ml"...
Manually pre-copying "include_as_string_p4.ml"...
Manually pre-copying "chip/chip_parser_p4.ml"...
Manually pre-copying "scripts/can-directory-host-sparse-files.sh"...
Manually pre-building "include_type_definitions_p4.cmo"...
make[1]: se ingresa al directorio `/root/tmp/marionnet'
ocamlc -c -I +camlp4 -pp camlp4of -o _build/include_type_definitions_p4.cmo include_type_definitions_p4.ml
make[1]: se sale del directorio `/root/tmp/marionnet'
Manually pre-building "include_as_string_p4.cmo"...
make[1]: se ingresa al directorio `/root/tmp/marionnet'
ocamlc -c -I +camlp4 -pp camlp4of -o _build/include_as_string_p4.cmo include_as_string_p4.ml
make[1]: se sale del directorio `/root/tmp/marionnet'
Manually pre-building "chip/chip_parser_p4.cmo"...
make[1]: se ingresa al directorio `/root/tmp/marionnet'
ocamlc -c -I +camlp4 -pp camlp4of camlp4lib.cma -o _build/chip/chip_parser_p4.cmo chip/chip_parser_p4.ml
make[1]: se sale del directorio `/root/tmp/marionnet'
Manually pre-building "chip/chip_example.expanded.ml"...
make[1]: se ingresa al directorio `/root/tmp/marionnet'
camlp4of -I _build/chip/ -printer Camlp4OCamlRevisedPrinter chip_parser_p4.cmo -o _build/chip/chip_example.expanded.ml chip/chip_example.ml
make[1]: se sale del directorio `/root/tmp/marionnet'
Finished, 1 target (0 cached) in 00:00:00.
+ /usr/local/bin/ocamldep.opt -pp 'camlp4of -I /usr/local/lib/ocaml/ocamlbricks gettext_extract_pot_p4.cmo -I chip' -modules marionnet.ml > marionnet.ml.depends
Camlp4: Uncaught exception: DynLoader.Error ("gettext_extract_pot_p4.cmo", "file not found in path")

Preprocessing error on file marionnet.ml
Command exited with code 2.
FAILURE when building marionnet.byte
make: *** [marionnet.byte] Error 255

m15xL marionnet # make clean && make
Success.
(echo -e "# This file is automatically generated. Please don't edit it.\n" > _tags; \
        for directory in $( sourcedirectories=''; for d in `find -type d | grep -v /_darcs\$ | grep -v /_darcs/ | grep -v /_build\$ | grep -v /_build/ | grep -v ^.$ | sort`; do if ls $d/*.ml &> /dev/null || ls $d/*.mli &> /dev/null || ls $d/*.mll &> /dev/null || ls $d/*.mly &> /dev/null ; then sourcedirectories+="$d "; fi; done; echo $sourcedirectories ); do \
                directory=`echo $directory | sed s/^.\\\\///`; \
                echo "<$directory>: include" >> _tags; \
        done; \
        echo >> _tags; \
        echo "<**/*.byte>: ourincludesettings, ourbytelinksettings, ourcmodules" >> _tags; \
        echo "<**/*.{ml,mli,byte,native,cma,cmxa}>: ourincludesettings" >> _tags; \
        echo "<**/*.{native,cma,cmxa}>: ourcmodules" >> _tags ; \
        echo "<**/*.cmx>: ournativecompilesettings" >> _tags; \
        echo "<**/*.cmo>: ourbytecompilesettings" >> _tags; \
        echo "<**/*.native>: ourincludesettings, ournativelinksettings" >> _tags; \
        echo "<**/*.{ml,mli}>: ourocamldocsettings" >> _tags ; \
        echo "<**/*.{ml,mli}>: ourppsettings" >> _tags)
Just for debugging: PP_OPTION is "camlp4of -I /usr/local/lib/ocaml/ocamlbricks gettext_extract_pot_p4.cmo -I chip"
Building meta.ml...
Success.
Manually pre-copying "gettext_extract_pot_p4.conf"...
Manually pre-copying "include_type_definitions_p4.ml"...
Manually pre-copying "include_as_string_p4.ml"...
Manually pre-copying "chip/chip_parser_p4.ml"...
Manually pre-copying "scripts/can-directory-host-sparse-files.sh"...
Manually pre-building "include_type_definitions_p4.cmo"...
make[1]: se ingresa al directorio `/root/tmp/marionnet'
ocamlc -c -I +camlp4 -pp camlp4of -o _build/include_type_definitions_p4.cmo include_type_definitions_p4.ml
make[1]: se sale del directorio `/root/tmp/marionnet'
Manually pre-building "include_as_string_p4.cmo"...
make[1]: se ingresa al directorio `/root/tmp/marionnet'
ocamlc -c -I +camlp4 -pp camlp4of -o _build/include_as_string_p4.cmo include_as_string_p4.ml
make[1]: se sale del directorio `/root/tmp/marionnet'
Manually pre-building "chip/chip_parser_p4.cmo"...
make[1]: se ingresa al directorio `/root/tmp/marionnet'
ocamlc -c -I +camlp4 -pp camlp4of camlp4lib.cma -o _build/chip/chip_parser_p4.cmo chip/chip_parser_p4.ml
make[1]: se sale del directorio `/root/tmp/marionnet'
Manually pre-building "chip/chip_example.expanded.ml"...
make[1]: se ingresa al directorio `/root/tmp/marionnet'
camlp4of -I _build/chip/ -printer Camlp4OCamlRevisedPrinter chip_parser_p4.cmo -o _build/chip/chip_example.expanded.ml chip/chip_example.ml
make[1]: se sale del directorio `/root/tmp/marionnet'
Finished, 1 target (0 cached) in 00:00:00.
+ /usr/local/bin/ocamldep.opt -pp 'camlp4of -I /usr/local/lib/ocaml/ocamlbricks gettext_extract_pot_p4.cmo -I chip' -modules marionnet.ml > marionnet.ml.depends
Camlp4: Uncaught exception: DynLoader.Error ("gettext_extract_pot_p4.cmo", "file not found in path")

Preprocessing error on file marionnet.ml
Command exited with code 2.
FAILURE when building marionnet.byte
make: *** [marionnet.byte] Error 255

As a Sabayon user I really appreciate your interest in supporting it, I hope to get over this and write a howto for Sabayon. :)

Regards,
Oscar.

Revision history for this message
Luca Saiu (saiu) said :
#5

Hello.

Jean-Vincent thinks that the error message
  Camlp4: Uncaught exception: DynLoader.Error ("gettext_extract_pot_p4.cmo", "file not found in path")
looks like an installation problem for ocamlbricks.

The file gettext_extract_pot_p4.cmo is not in the expected directory. Here you see where it is on my system:
[luca@optimum ~]$ locate gettext_extract_pot_p4.cmo
/usr/lib/ocaml/ocamlbricks/gettext_extract_pot_p4.cmo

I think that some part of the compilation is currently executed at install time, so root needs access to the compilers (which is wrong; we should change that); so you are right, the problem exists: your distribution wants to discourage root from running binaries in /usr/local/bin, I suppose for security reasons.

Your workaround
  cp /usr/local/bin/* /usr/bin/
looks a little drastic to me. Can't you achieve essentially the same by running
  export PATH="$PATH:/usr/local/bin"
? You might need to do the same for other directories, such as LIBRARY_PATH and LD_LIBRARY_PATH (they need to contain
/usr/local/lib).

And by the way notice that, for example, ocamldep.opt was exectued from /usr/local/bin in *your* build log. Where is gettext_extract_pot_p4.cmo on your system? I suppose you could even copy or symlink it into the right place -- a *very* ugly hack, but it might work. The correct solution of course would be to just change your PATH,LIBRARY_PATH, LD_LIBRARY_PATH and friends, and install from scratch on a clean system.

You can also try changing the "prefix=" line in CONFIGME, run
  make clean && make
, but just copying binary around doesn't always work; some of them might make assumptions about where the file is. I fear you might have broken your system with your cp trick.

You wrote:
> As a Sabayon user I really appreciate your interest in supporting it, I hope to get over this and write a howto for Sabayon. :)
Thanks, we would appreciate that very much; we can't promise you money, but you would gain fame and glory on our new website :-).

Let's try and solve this.
Can you please tell me what happens when you try the workarounds above?

Best regards.

Revision history for this message
Oscar Suarez (osuarezl) said :
#6

Hi there!

I've been busy last days so just today I had time to try the new ideas.

I made a fresh installation of Sabayon. Every thing went ok until I was following the lasts steps of the Ocaml installation.

When I did: cd /usr/local/include
I got that the directory wasn't created so I created it.

For installing lablgtk2 I first edited the root's bash_profile to add:
PATH=$PATH::/usr/local/bin
export PATH

LIBRARY_PATH=$LIBRARY_PATH::/usr/local/lib
export LIBRARY_PATH

LD_LIBRARY_PATH=$LD_LIBRARY_PATH::/usr/local/lib
export LD_LIBRARY_PATH

I applied the changes using source ~/.bash_profile

After that the lablgtk2 installation went fine at once.

Then I tried the installation of OcamlBricks and I got that:

m15xL ocamlbricks # make && make install
Checking if files manually copied in _build/ have been modified...
Building data...
Success: data were built.
make[1]: se ingresa al directorio `/root/tmp/ocamlbricks'
GETTEXT/gettext-c-wrapper.c:25:22: error: mlvalues.h: No existe el fichero o el directorio
GETTEXT/gettext-c-wrapper.c:28:19: error: alloc.h: No existe el fichero o el directorio
GETTEXT/gettext-c-wrapper.c:60: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘value’
GETTEXT/gettext-c-wrapper.c:78: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘value’
make[1]: *** [_build/gettext-c-wrapper.o] Error 1
make[1]: se sale del directorio `/root/tmp/ocamlbricks'
make[1]: se ingresa al directorio `/root/tmp/ocamlbricks'
EXTRA/does-process-exist-c-wrapper.c:27:22: error: mlvalues.h: No existe el fichero o el directorio
EXTRA/does-process-exist-c-wrapper.c:30:19: error: alloc.h: No existe el fichero o el directorio
EXTRA/does-process-exist-c-wrapper.c:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘value’
make[1]: *** [_build/does-process-exist-c-wrapper.o] Error 1
make[1]: se sale del directorio `/root/tmp/ocamlbricks'
make: *** [c-modules] Error 2

I have found these files in:
/root/tmp/ocaml-3.11.0/byterun/mlvalues.h
/usr/local/lib/ocaml/caml/mlvalues.h
/root/tmp/lablgtk-2.12.0/src/absvalue/caml/mlvalues.h

/usr/include/omapip/alloc.h
/root/tmp/ocaml-3.11.0/byterun/alloc.h
/usr/local/lib/ocaml/caml/alloc.h

Revision history for this message
Franck Butelle (franck-butelle) said :
#7

Hi !

Try to define
ocaml_sources=/root/tmp/ocaml-3.11.0/byterun
in CONFIGME file
of ocamlbricks

then again
make clean && make

Hope it helps !

Revision history for this message
Oscar Suarez (osuarezl) said :
#8

Franck, Thanks for the advise. It worked fine for me to change the ocaml_sources dir.

To every one, after all your help I figured out the final steps to make Marionnet work on Sabayon. I hope to write a How-To this weekend. So I'll be in contact.

Thanks a lot!, now I'm happy playing with Marionnet xD.