Skip to content

Ocamlbuild.0.10.1 - #8156

Closed
gasche wants to merge 2 commits into
ocaml:masterfrom
gasche:ocamlbuild.0.10.1
Closed

Ocamlbuild.0.10.1#8156
gasche wants to merge 2 commits into
ocaml:masterfrom
gasche:ocamlbuild.0.10.1

Conversation

@gasche

@gasche gasche commented Dec 26, 2016

Copy link
Copy Markdown
Member

Followup on #8155... The joy of software development :-)

@camelus

camelus commented Dec 26, 2016

Copy link
Copy Markdown
Contributor
✅ All lint checks passed 71f92ad
  • These packages passed lint tests: ocamlbuild.0.10.1

✅ Installability check (5893 → 5893)
  • new installable packages (1): ocamlbuild.0.10.1
  • removed installable packages (1): ocamlbuild.0.10.0

@samoht

samoht commented Dec 26, 2016

Copy link
Copy Markdown
Member

Does it fix:

#=== ERROR while installing mtime.0.8.3 =======================================#
# opam-version 1.2.2
# os           linux
# command      ocaml pkg/build.ml native=true native-dynlink=true jsoo=false
# path         /home/travis/.opam/4.03.0/build/mtime.0.8.3
# compiler     4.03.0
# exit-code    10
# env-file     /home/travis/.opam/4.03.0/build/mtime.0.8.3/mtime-24235-865888.env
# stdout-file  /home/travis/.opam/4.03.0/build/mtime.0.8.3/mtime-24235-865888.out
# stderr-file  /home/travis/.opam/4.03.0/build/mtime.0.8.3/mtime-24235-865888.err
### stdout ###
# [...]
# ocamlfind ocamlopt -a -cclib -lmtime_stubs -cclib -lrt src-os/mtime_base.cmx src-os/mtime.cmx -o src-os/mtime.cmxa
# ocamlfind ocamlc -c -g -bin-annot -safe-string -I src-os -o src-os/mtime.cmo src-os/mtime.ml
# ocamlfind ocamlc -a -dllib -lmtime_stubs -cclib -lrt src-os/mtime_base.cmo src-os/mtime.cmo -o src-os/mtime.cma
# ocamlfind ocamlopt -shared -linkall src-os/libmtime_stubs.a src-os/mtime.cmxa -o src-os/mtime.cmxs
# + ocamlfind ocamlopt -shared -linkall src-os/libmtime_stubs.a src-os/mtime.cmxa -o src-os/mtime.cmxs
# /usr/bin/ld: cannot find -lmtime_stubs
# collect2: ld returned 1 exit status
# File "caml_startup", line 1:
# Error: Error during linking
# Command exited with code 2.

@samoht

samoht commented Dec 26, 2016

Copy link
Copy Markdown
Member

I have reverted 0.10.0 as it seems to break some existing packages. Was it expected?

@gasche

gasche commented Dec 26, 2016

Copy link
Copy Markdown
Member Author

Nope, breaking builds is never expected. Although it is not completely surprising either as 0.10 indeed changes the way .cmxs are built.

Thanks for reverting. I'll investigate locally with the repro-case and see what we should do.

"Jamais deux sans trois"...

@gasche

gasche commented Dec 26, 2016

Copy link
Copy Markdown
Member Author

I'll close the PR for now while I don't understand the regression better.

@gasche gasche closed this Dec 26, 2016
algitbot pushed a commit to alpinelinux/aports that referenced this pull request Jan 9, 2017
the 0.10 had unexpected breakcakge of backwards compatibility:
ocaml/opam-repository#8156 (comment)
@whitequark

Copy link
Copy Markdown
Member

@gasche Can we please get a version with the -toolchain option? This holds up many downstream cross-compilation improvements.

@gasche

gasche commented Feb 26, 2017

Copy link
Copy Markdown
Member Author

I'll try to do this before the end of the month, yes. This release is painful because of the .cmxs regression (we have to revert the changes before going through), but in general, for future releases, I would warmly welcome help / be glad let someone else do the release. (It has experimentally been determined that I am bad at doing releases.)

@whitequark

whitequark commented Feb 26, 2017

Copy link
Copy Markdown
Member

This release is painful because of the .cmxs regression (we have to revert the changes before going through)

Actually, I don't think so. I believe the root cause of the regression is ocamlbuild not passing the necessary -I flags when building a cmxs, most likely caused by ocaml/ocamlbuild@89888f2c40.

@gasche

gasche commented Feb 26, 2017

Copy link
Copy Markdown
Member Author

This commit is part of the .cmxs changes I had in mind and plan to revert before doing a new release -- I should have released before merging them in the first place.

@whitequark

Copy link
Copy Markdown
Member

@gasche Actually, it's weirder. I bisected the change to ocaml/ocamlbuild@f865497a8. It looks like -linkall wasn't passed before but it is passed now, which causes the immediate failure.

Also, you've added the tag "foo" in ocaml_specific.ml...

@whitequark

Copy link
Copy Markdown
Member

@gasche I think I know what happens. Specifically, you're now linking a cmxa and a into a cmxs, instead of cmx and o. However, cmxa already has an autolink directive, so instead of the a, what's really needed is a -I flag.

@gasche

gasche commented Feb 26, 2017

Copy link
Copy Markdown
Member Author

I think that the discussion in ocaml/ocamlbuild#131 would give more context.

@whitequark

Copy link
Copy Markdown
Member

@gasche At a glance that was just a mixture of more confusion and everything I already knew. Anyway, I already implemented a fix, PR incoming.

@whitequark

Copy link
Copy Markdown
Member

@gasche Please review ocaml/ocamlbuild#159.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants