Opened 9 years ago

Closed 9 years ago

#48672 closed defect (fixed)

lablgtk2 build fails with ocaml-camlp4 4.02-6_0

Reported by: james.cheney@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc: james.cheney@…, someuser12, corwin.amber@…, majoc-at-astro (majoc-at-astro), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: lablgtk2

Description

Hi,

Attempting to do

port install lablgtk2

fails with an error for me:

$ sudo port install lablgtk2
--->  Computing dependencies for lablgtk2
--->  Dependencies to be installed: ocaml-camlp4
--->  Fetching archive for ocaml-camlp4
--->  Attempting to fetch ocaml-camlp4-4.02-6_0.darwin_14.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/ocaml-camlp4
--->  Attempting to fetch ocaml-camlp4-4.02-6_0.darwin_14.x86_64.tbz2.rmd160 from http://mse.uk.packages.macports.org/sites/packages.macports.org/ocaml-camlp4
--->  Installing ocaml-camlp4 @4.02-6_0
--->  Activating ocaml-camlp4 @4.02-6_0
--->  Cleaning ocaml-camlp4
--->  Building lablgtk2
Error: org.macports.build for port lablgtk2 returned: command execution failed
Please see the log file for port lablgtk2 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_lablgtk2/lablgtk2/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port lablgtk2 failed

The culprit seems to be a recent change in ocaml-camlp4 (see the attached complete log file for details):

:info:build Camlp4: Uncaught exception: DynLoader.Error ("Camlp4MacroParser.cmo", "file not found in path")

Installing a previous version of both packages works:

$ svn checkout -r 131008 https://svn.macports.org/repository/macports/trunk/dports/lang/ocaml-camlp4

$ cd ocaml-camlp4 ; sudo port install ; cd ..

--->  Computing dependencies for ocaml-camlp4
--->  Fetching archive for ocaml-camlp4
--->  Attempting to fetch ocaml-camlp4-4.02.0.1_0.darwin_14.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/ocaml-camlp4
--->  Attempting to fetch ocaml-camlp4-4.02.0.1_0.darwin_14.x86_64.tbz2.rmd160 from http://mse.uk.packages.macports.org/sites/packages.macports.org/ocaml-camlp4
--->  Installing ocaml-camlp4 @4.02.0.1_0
--->  Activating ocaml-camlp4 @4.02.0.1_0
--->  Cleaning ocaml-camlp4
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.

$ svn checkout -r 131008 https://svn.macports.org/repository/macports/trunk/dports/x11/lablgtk2

$ cd lablgtk2 ; sudo port install ; cd ..

--->  Computing dependencies for lablgtk2
--->  Fetching archive for lablgtk2
--->  Attempting to fetch lablgtk2-2.18.3_0+x11.darwin_14.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/lablgtk2
--->  Attempting to fetch lablgtk2-2.18.3_0+x11.darwin_14.x86_64.tbz2.rmd160 from http://mse.uk.packages.macports.org/sites/packages.macports.org/lablgtk2
--->  Installing lablgtk2 @2.18.3_0+x11
--->  Activating lablgtk2 @2.18.3_0+x11
--->  Cleaning lablgtk2
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.

Attachments (1)

main.log (148.5 KB) - added by james.cheney@… 9 years ago.

Download all attachments as: .zip

Change History (11)

Changed 9 years ago by james.cheney@…

Attachment: main.log added

comment:1 Changed 9 years ago by james.cheney@…

Cc: james.cheney@… added

Cc Me!

comment:2 Changed 9 years ago by someuser12

Cc: macosx12345@… added

Cc Me!

comment:3 Changed 9 years ago by hippallium-macports@…

Cc: hippallium-macports@… added

Cc Me!

comment:4 Changed 9 years ago by hippallium-macports@…

A workaround that works for me: downgrade ocaml-camlp4 to version 4.02.0.1_1

comment:5 Changed 9 years ago by paoloit@…

A kludgy workaround that works for me (without having to downgrade ocaml-camlp4):

The problem appears to be due to ocaml-camlp4 failing to locate filters, parsers, etc. available in subdirectories of /opt/local/lib/ocaml/camlp4/ (i.e., *.cmo files). The following provides symbolic links to these *.cmo files in the /opt/local/lib/ocaml directory, the content of which ocaml-camlp4 evidently _is_ aware of (e.g., the build of lablgtk2 then succeeds):

cd /opt/local/lib/ocaml && sudo ln -s camlp4/*/*.cmo . (this should be reasonably safe to invoke, since ln(1) will not overwrite existing file system entries) As very limited limited empirical evidence that this actually works, beyond lablgtk2 itself I managed to build what appears to be a fully functional instance of MacPort's unison with graphical interface (which uses lablgtk2).

To undo this creation of symbolic links:

As there appear to be no *.cmo files hosted normally in /opt/local/lib/ocaml, it could be OK to simply:

cd /opt/local/lib/ocaml && sudo rm *.cmo

but to play a little more safe, one might remove only the symbolic links pointing below the camlp4/ subdirectory, e.g.:

cd /opt/local/lib/ocaml && sudo rm /bin/ls -l | /usr/bin/awk '/ -> camlp4/ {print $9}'

Please Cc Me!

(I'll be the first to be happy to undo this kludge :) )

comment:6 Changed 9 years ago by corwin.amber@…

Cc: corwin.amber@… added

Cc Me!

comment:7 Changed 9 years ago by majoc-at-astro (majoc-at-astro)

Cc: majoc@… added

Cc Me!

comment:8 Changed 9 years ago by hippallium-macports@…

Cc: hippallium-macports@… removed

Cc Me!

comment:9 Changed 9 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: mcalhoun@… added

Cc Me!

comment:10 Changed 9 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: newclosed

r148027 fixed the problem for me

Note: See TracTickets for help on using tickets.