Loading ...
Sorry, an error occurred while loading the content.

Re: "ocaml_beginners"::[] ocamlmpi -- undefined reference to `caml_names_of_builtin_cprim'

Expand Messages
  • ygrek
    On Mon, 01 Feb 2010 05:48:21 -0000 ... I remember building/using ocamlmpi on 64-bit without any problems. Looking at error messages I believe there is
    Message 1 of 7 , Feb 2, 2010
    • 0 Attachment
      On Mon, 01 Feb 2010 05:48:21 -0000
      "tenuc70" <tenuc70@...> wrote:

      > [ocamlmpi-1.01] make test
      > ocamlc -o testmpi unix.cma mpi.cma test.ml -ccopt -L.
      > File "test.ml", line 144, characters 6-9:
      > Warning Y: unused variable res.
      > /opt/godi/lib/ocaml/std-lib/libcamlrun.a(startup.o): In function `caml_main':
      > startup.c:(.text+0x73d): undefined reference to `caml_names_of_builtin_cprim'
      > startup.c:(.text+0x747): undefined reference to `caml_names_of_builtin_cprim'
      > std-lib/libcamlrun.a(dynlink.o): In function `caml_build_primitive_table_builtin':
      > dynlink.c:(.text+0x18f): undefined reference to `caml_builtin_cprim'
      > dynlink.c:(.text+0x19e): undefined reference to `caml_builtin_cprim'
      > /opt/godi/lib/ocaml/std-lib/libcamlrun.a(dynlink.o): In function `caml_build_primitive_table':
      > dynlink.c:(.text+0x461): undefined reference to `caml_names_of_builtin_cprim'
      > dynlink.c:(.text+0x490): undefined reference to `caml_builtin_cprim'
      > collect2: ld returned 1 exit status
      >
      >
      > The compiler version is 3.10.2, ocamlmpi is version 1.01.
      > Problem is very easy to reproduce, any suggestions? let me know.

      I remember building/using ocamlmpi on 64-bit without any problems.
      Looking at error messages I believe there is something wrong with your
      ocaml installation. Can it be so that ocamlmpi was built with another
      version of ocaml (not the one in /opt/godi/lib/ocaml/) ?

      --
      ygrek
      http://ygrek.org.ua
    • tenuc70
      Thanks for your feedback. The answer is no, it was built with /opt/godi/bin/ocamlc and related runtime. I also installed version 3.11.2 this morning (hand
      Message 2 of 7 , Feb 3, 2010
      • 0 Attachment
        Thanks for your feedback.
        The answer is no, it was built with /opt/godi/bin/ocamlc and related runtime.
        I also installed version 3.11.2 this morning (hand built from inria.fr sources), ensured it is visible in the $PATH and no older versions are in the $PATH, rebuilt ocamlmpi, and the results are even worse

        (* same as "make test" *)
        $ ocamlc -o testmpi unix.cma mpi.cma test.ml -ccopt -L.
        File "test.ml", line 144, characters 6-9:
        Warning Y: unused variable res.
        gcc: argument to '-L' is missing
        File "test.ml", line 1, characters 0-1:
        Error: Error while building custom runtime system


        For some strange reason ocamlc invokes gcc with an empty -L option at the end whether or not -ccopt -L. is specified.
        This is the kind of problem an experienced ocaml user should be able to identify in minutes but it's taking me days to find a workaround or a solution.



        --- In ocaml_beginners@yahoogroups.com, ygrek <ygrekheretix@...> wrote:
        >
        > On Mon, 01 Feb 2010 05:48:21 -0000
        > "tenuc70" <tenuc70@...> wrote:
        >
        > > [ocamlmpi-1.01] make test
        > > ocamlc -o testmpi unix.cma mpi.cma test.ml -ccopt -L.
        > > File "test.ml", line 144, characters 6-9:
        > > Warning Y: unused variable res.
        > > /opt/godi/lib/ocaml/std-lib/libcamlrun.a(startup.o): In function `caml_main':
        > > startup.c:(.text+0x73d): undefined reference to `caml_names_of_builtin_cprim'
        > > startup.c:(.text+0x747): undefined reference to `caml_names_of_builtin_cprim'
        > > std-lib/libcamlrun.a(dynlink.o): In function `caml_build_primitive_table_builtin':
        > > dynlink.c:(.text+0x18f): undefined reference to `caml_builtin_cprim'
        > > dynlink.c:(.text+0x19e): undefined reference to `caml_builtin_cprim'
        > > /opt/godi/lib/ocaml/std-lib/libcamlrun.a(dynlink.o): In function `caml_build_primitive_table':
        > > dynlink.c:(.text+0x461): undefined reference to `caml_names_of_builtin_cprim'
        > > dynlink.c:(.text+0x490): undefined reference to `caml_builtin_cprim'
        > > collect2: ld returned 1 exit status
        > >
        > >
        > > The compiler version is 3.10.2, ocamlmpi is version 1.01.
        > > Problem is very easy to reproduce, any suggestions? let me know.
        >
        > I remember building/using ocamlmpi on 64-bit without any problems.
        > Looking at error messages I believe there is something wrong with your
        > ocaml installation. Can it be so that ocamlmpi was built with another
        > version of ocaml (not the one in /opt/godi/lib/ocaml/) ?
        >
        > --
        > ygrek
        > http://ygrek.org.ua
        >
      • Matthieu Dubuget
        Did you also checked OCAMLLIB? Salutations Matt
        Message 3 of 7 , Feb 3, 2010
        • 0 Attachment
          Did you also checked OCAMLLIB?

          Salutations

          Matt
        • tenuc70
          Yes, the only env. variable related to Ocaml I have is OCAMLRUNPARAM and it is set to b , verified it with [tcsh] env |grep -i ocaml
          Message 4 of 7 , Feb 3, 2010
          • 0 Attachment
            Yes, the only env. variable related to Ocaml I have is
            OCAMLRUNPARAM and it is set to "b", verified it with
            [tcsh] env |grep -i ocaml

            --- In ocaml_beginners@yahoogroups.com, Matthieu Dubuget <matthieu.dubuget@...> wrote:
            >
            > Did you also checked OCAMLLIB?
            >
            > Salutations
            >
            > Matt
            >
          • Sylvain Le Gall
            ... Maybe try the ocamlopt version of your command: ocamlopt -o testmpi unix.cmxa mpi.cmxa test.ml -ccopt -L. (same as the line you are blocking on, but with
            Message 5 of 7 , Feb 3, 2010
            • 0 Attachment
              On 03-02-2010, tenuc70 <tenuc70@...> wrote:
              > --f2BaMukYTAI8GxKNkf9BrRAGfKZj5ypoOl3QVmL
              > Content-Type: text/plain; charset=ISO-8859-1
              > Content-Transfer-Encoding: quoted-printable
              >
              > Yes, the only env. variable related to Ocaml I have is
              > OCAMLRUNPARAM and it is set to "b", verified it with
              > [tcsh] env |grep -i ocaml
              >

              Maybe try the ocamlopt version of your command:
              ocamlopt -o testmpi unix.cmxa mpi.cmxa test.ml -ccopt -L.

              (same as the line you are blocking on, but with ocamlopt).

              Regards
              Sylvain Le Gall
            • ygrek
              On Wed, 03 Feb 2010 12:19:58 -0000 ... I verified that ocamlmpi builds fine on debian i386 and amd64. So the problem is elsewhere, maybe gcc installation, or
              Message 6 of 7 , Feb 10, 2010
              • 0 Attachment
                On Wed, 03 Feb 2010 12:19:58 -0000
                "tenuc70" <tenuc70@...> wrote:

                >
                >
                > Thanks for your feedback.
                > The answer is no, it was built with /opt/godi/bin/ocamlc and related runtime.
                > I also installed version 3.11.2 this morning (hand built from inria.fr sources), ensured it is visible in the $PATH and no older versions are in the $PATH, rebuilt ocamlmpi, and the results are even worse
                >
                > (* same as "make test" *)
                > $ ocamlc -o testmpi unix.cma mpi.cma test.ml -ccopt -L.
                > File "test.ml", line 144, characters 6-9:
                > Warning Y: unused variable res.
                > gcc: argument to '-L' is missing
                > File "test.ml", line 1, characters 0-1:
                > Error: Error while building custom runtime system
                >
                >
                > For some strange reason ocamlc invokes gcc with an empty -L option at the end whether or not -ccopt -L. is specified.
                > This is the kind of problem an experienced ocaml user should be able to identify in minutes but it's taking me days to find a workaround or a solution.

                I verified that ocamlmpi builds fine on debian i386 and amd64. So the
                problem is elsewhere, maybe gcc installation, or maybe the ocaml
                package in ubuntu is broken - this had been a known problem some time
                ago.
                On a side note - try running ocamlc -verbose to see what
                parameters are passed to gcc, maybe that will help.

                --
                ygrek
                http://ygrek.org.ua
              Your message has been successfully submitted and would be delivered to recipients shortly.