Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#57200 - [ocaml-compiler-libs] missing native object files

Attached to Project: Arch Linux
Opened by Antonin Décimo (Rucikir) - Tuesday, 23 January 2018, 09:34 GMT
Last edited by Jürgen Hötzel (juergen) - Monday, 12 February 2018, 20:03 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jürgen Hötzel (juergen)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description:

With ocaml-compiler-libs 4.06.0-1, when I compile OCaml packages
through opam 1.2.2-4 I get errors of missing `*.cmxa` files from
`/usr/lib/ocaml/compiler-libs/`. My guess is that ony bytecodes files
are packaged but not native object files.

Steps to reproduce:
Install ocaml, ocaml-compiler-libs and opam and try:

$ opam intall utop

The following actions will be performed:
∗ install ocaml-migrate-parsetree 1.0.7 [required by lwt]
∗ install ppx_tools_versioned 5.1 [required by lwt]
∗ install lwt 3.2.1 [required by utop]
For the PPX, please install package lwt_ppx
For Lwt_log and Lwt_daemon, please install package lwt_log
∗ install lwt_react 1.1.0 [required by utop]
∗ install lambda-term 1.12.0 [required by utop]
∗ install utop 2.0.2
===== ∗ 6 =====
Do you want to continue ? [Y/n] y

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[lambda-term] Archive in cache
[lwt] Archive in cache
[lwt_react] Archive in cache
[ocaml-migrate-parsetree] Archive in cache
[ppx_tools_versioned] Archive in cache
[utop] Archive in cache

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ERROR] The compilation of ocaml-migrate-parsetree failed at "jbuilder build -p
ocaml-migrate-parsetree -j 4".

#=== ERROR while installing ocaml-migrate-parsetree.1.0.7 =====================#
# opam-version 1.2.2
# os linux
# command jbuilder build -p ocaml-migrate-parsetree -j 4
# path /home/antonin/.opam/system/build/ocaml-migrate-parsetree.1.0.7
# compiler system (4.06.0)
# exit-code 1
# env-file /home/antonin/.opam/system/build/ocaml-migrate-parsetree.1.0.7/ocaml-migrate-parsetree-27416-d8a4ae.env
# stdout-file /home/antonin/.opam/system/build/ocaml-migrate-parsetree.1.0.7/ocaml-migrate-parsetree-27416-d8a4ae.out
# stderr-file /home/antonin/.opam/system/build/ocaml-migrate-parsetree.1.0.7/ocaml-migrate-parsetree-27416-d8a4ae.err
### stderr ###
# ocamldep src/migrate_parsetree_driver_main.depends.ocamldep-output
# ocamllex tools/pp_rewrite.ml
# ocamldep tools/add_special_comments.depends.ocamldep-output
# File unavailable: /usr/lib/ocaml/compiler-libs/ocamlcommon.cmxa



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions were aborted
∗ install lambda-term 1.12.0
∗ install lwt 3.2.1
∗ install lwt_react 1.1.0
∗ install ppx_tools_versioned 5.1
∗ install utop 2.0.2
The following actions failed
∗ install ocaml-migrate-parsetree 1.0.7
No changes have been performed
This task depends upon

Closed by  Jürgen Hötzel (juergen)
Monday, 12 February 2018, 20:03 GMT
Reason for closing:  Fixed
Additional comments about closing:  Released: 4.06.0-2
Comment by Jakob Gahde (J5lx) - Monday, 05 February 2018, 13:22 GMT
Just tripped up on this while trying to update the AUR package for ocaml-migrate-parsetree, it took me quite a while to figure out that this was in fact a packaging problem. It seems that during the packaging process for ocaml, the compiler-libs directory is completely removed, but during the packaging process for ocaml-compiler-libs, only some of the contents of that directory are restored and as a result some required files are then missing from the resulting package, including the /usr/lib/ocaml/compiler-libs/ocamlcommon.cmxa needed by ocaml-migrate-parsetree.
Comment by Antonin Décimo (Rucikir) - Monday, 05 February 2018, 16:38 GMT
I have a simple fix for the bug, which is to add every library object
file from `ocaml-4.06.0/compilerlibs/*` into the package. With that,
jbuilder doesn't complain anymore from missing files.

7c7
< pkgrel=1
---
> pkgrel=2
58,60c58,59
< cp compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma \
< compilerlibs/ocamltoplevel.cma ${BYTESTART} ${TOPLEVELSTART} \
< "${pkgdir}/usr/lib/ocaml/compiler-libs"
---
> cp compilerlibs/* ${BYTESTART} ${TOPLEVELSTART} \
> "${pkgdir}/usr/lib/ocaml/compiler-libs"
Comment by Jakob Gahde (J5lx) - Monday, 05 February 2018, 18:48 GMT
FWIW, in addition to ocaml-migrate-parsetree I’m also unable to update AUR package ocp-build because of this.
Comment by Jürgen Hötzel (juergen) - Monday, 05 February 2018, 19:24 GMT
sorry for the inconvenience. Investigating...
Comment by Jürgen Hötzel (juergen) - Monday, 12 February 2018, 20:02 GMT
@Antonin: Thanks for your fix. I included it as proposed.

Loading...