Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ocamlbuild.0.10.1 #8156

Closed
wants to merge 2 commits into from
Closed

Ocamlbuild.0.10.1 #8156

wants to merge 2 commits into from

Conversation

gasche
Copy link
Member

@gasche gasche commented Dec 26, 2016

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

@camelus
Copy link
Contributor

camelus commented Dec 26, 2016

✅ 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
Copy link
Member

samoht commented Dec 26, 2016

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
Copy link
Member

samoht commented Dec 26, 2016

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

@gasche
Copy link
Member Author

gasche commented Dec 26, 2016

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
Copy link
Member Author

gasche commented Dec 26, 2016

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
Member

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

@gasche
Copy link
Member Author

gasche commented Feb 26, 2017

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
Copy link
Member

whitequark commented Feb 26, 2017

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
Copy link
Member Author

gasche commented Feb 26, 2017

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
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
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
Copy link
Member Author

gasche commented Feb 26, 2017

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

@whitequark
Copy link
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
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.

None yet

4 participants