[MacPorts] #55385: ocaml: fails to build on 10.6 and lower

MacPorts noreply at macports.org
Thu Nov 23 00:52:03 UTC 2017


#55385: ocaml: fails to build on 10.6 and lower
---------------------+----------------------
  Reporter:  mojca   |      Owner:  pmetzger
      Type:  defect  |     Status:  new
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:
Resolution:          |   Keywords:
      Port:  ocaml   |
---------------------+----------------------

Comment (by kencu):

 I am working on this right now. I'm sorry I made an error above, and I
 built a slightly older `ocaml` version above. The current version that
 we're interested in, `4.0.5` fails to build due to a missing `strnlen`
 function.
 {{{
 ../boot/ocamlrun ../ocamlc -nostdlib -I ../stdlib -linkall -I
 ../otherlibs/unix -o ocamldebug -linkall ../otherlibs/unix/unix.cma
 ../utils/config.cmo ../utils/tbl.cmo ../utils/misc.cmo
 ../utils/identifiable.cmo ../utils/numbers.cmo ../utils/arg_helper.cmo
 ../utils/clflags.cmo ../utils/consistbl.cmo ../utils/warnings.cmo
 ../utils/terminfo.cmo ../parsing/location.cmo ../parsing/longident.cmo
 ../parsing/docstrings.cmo ../parsing/syntaxerr.cmo
 ../parsing/ast_helper.cmo ../parsing/ast_mapper.cmo
 ../parsing/ast_iterator.cmo ../parsing/attr_helper.cmo
 ../parsing/builtin_attributes.cmo ../typing/ident.cmo ../typing/path.cmo
 ../typing/types.cmo ../typing/btype.cmo ../typing/primitive.cmo
 ../typing/typedtree.cmo ../typing/subst.cmo ../typing/predef.cmo
 ../typing/datarepr.cmo ../typing/cmi_format.cmo ../typing/env.cmo
 ../typing/oprint.cmo ../typing/ctype.cmo ../typing/printtyp.cmo
 ../typing/mtype.cmo ../typing/envaux.cmo ../bytecomp/runtimedef.cmo
 ../bytecomp/bytesections.cmo ../bytecomp/dll.cmo ../bytecomp/meta.cmo
 ../bytecomp/symtable.cmo ../bytecomp/opcodes.cmo ../driver/compdynlink.cmo
 ../toplevel/genprintval.cmo int64ops.cmo primitives.cmo unix_tools.cmo
 debugger_config.cmo parameters.cmo lexer.cmo input_handling.cmo
 question.cmo debugcom.cmo exec.cmo source.cmo pos.cmo checkpoints.cmo
 events.cmo program_loading.cmo symbols.cmo breakpoints.cmo
 trap_barrier.cmo history.cmo printval.cmo show_source.cmo time_travel.cmo
 program_management.cmo frames.cmo eval.cmo show_information.cmo
 loadprinter.cmo parser.cmo command_line.cmo main.cmo
 File "_none_", line 1:
 Error: Error on dynamically loaded library: ../otherlibs/unix/dllunix.so:
 dlopen(../otherlibs/unix/dllunix.so, 138): Symbol not found: _strnlen
   Referenced from:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_ocaml/ocaml/work/ocaml-4.05.0/otherlibs/unix/dllunix.so
   Expected in: flat namespace
  in
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_ocaml/ocaml/work/ocaml-4.05.0/otherlibs/unix/dllunix.so
 make[3]: *** [ocamldebug] Error 2
 make[2]: *** [ocamldebugger] Error 2
 make[1]: *** [opt.opt] Error 2
 make: *** [world.opt] Error 2
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_ocaml/ocaml/work/ocaml-4.05.0"
 && unset LD_PREBIND LD_PREBIND_ALLOW_OVERLAP && /usr/bin/make world.opt
 }}}

 The `snowleopard_fixes` portgroup might normally fix this, but
 unfortunately it's somewhere in the ocaml build itself where it fails, not
 standard c++, so the configure.flags manipulations don't work.

 Short story - at present it won't build on 10.6 or less, even with a new
 compiler. I can work on it, but it will take some time it appears. A patch
 for the missing function, maybe, or see how to link in the
 -lsnowleopardfixes library somehow in that link stage.

--
Ticket URL: <https://trac.macports.org/ticket/55385#comment:21>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list