You are not logged in.
Hi everyone,
I'm currently trying to compile MinCaml (1), which is itself written in OCaml. It does not currently support x86_64, so I set up a 32 bit chroot environment using arch32-light (2) to compile MinCaml there. During the linking stage, I get the following error:
arch32$ ocamlc float.o -custom -g -o min-caml -verbose [lots of .cmo files]
> + gcc -o 'min-caml' '-L/usr/lib/ocaml' '/tmp/camlprim3f913d.c' 'float.o' '-lcamlrun' -I'/usr/lib/ocaml' -lm -ldl -lcurses -lpthread
> /usr/bin/ld: cannot find -lcamlrun # <-- the problem
> collect2: error: ld returned 1 exit status
> File "_none_", line 1:
> Error: Error while building custom runtime system
Interestingly, it appears that inside the 32 bit chroot, there is indeed no "libcamlrun.a" or "libcamlrun.so" in /usr/lib/ocaml, only a "libcamlrun_shared.so":
arch32$ ls /usr/lib/ocaml | grep libcaml
> libcamlrun_shared.so
arch32$ # "pacman -Ql ocaml | grep libcaml" lists the same file
As a quick sanity check, I had a look at /usr/lib/ocaml in my 64 bit system. Surprise:
arch64$ ls /usr/lib/ocaml | grep libcaml
> libcamlrun.a # <-- installed on x86_64, but not i386
> libcamlrun_shared.so
> libcamlstr.a # <-- installed on x86_64, but not i386
arch64$ # "pacman -Ql ocaml | grep libcaml" lists the same files
What's going on? Wondering where "libcamlrun.a" came from, I ran pkgfile:
arch64$ pkgfile /usr/lib/ocaml/libcamlrun.a
> extra/ocaml
Interesting ... for comparison:
arch32$ pkgfile /usr/lib/ocaml/libcamlrun.a
arch32$
I.e., on the 32 bit chroot, /usr/lib/ocaml/libcamlrun.a is not part of any package.
Strange ... To double-check, I compared the file lists for the 64-bit and the 32-bit extra/ocaml package on the Arch Linux package website (3) and (4). Neither of them includes "/usr/lib/ocaml/libcamlrun.a".
So basically, my question is: What is going on here? Why does the x86_64 version of ocaml include /usr/lib/libcamlrun.a, but the i386 version does not? Why does "pacman -Ql ocaml" list "/usr/lib/libcamlrun.a" in its output for x86_64, but the file list on the Arch Linux package website does not?
(1) MinCaml: [http://esumii.github.io/min-caml/index-e.html]
(2) arch32-light project: [http://xyne.archlinux.ca/projects/arch32-light/]
(3) extra/ocaml, x86_64 version: [https://www.archlinux.org/packages/extra/x86_64/ocaml/]
(4) extra/ocaml, i386 version: [https://www.archlinux.org/packages/extra/i686/ocaml/]
Last edited by curiousleo (2013-10-23 14:46:27)
Offline
Update pkgfile and try again.
ocaml has been updated yesterday and maybe you're using different versions e.g. you haven't updated the 64-bit one.
Last edited by karol (2013-10-22 14:53:34)
Offline
Haha, great, thanks! Arch is just moving too fast for me
That solves the original question: Now /url/lib/libcamlrun.a is included in neither package, and everything is coherent again.
Which brings me back to trying to compile MinCaml. Any idea why /url/lib/libcamlrun.a was taken out of the ocaml package? Looks like I'm going to have to compile OCaml myself to get it "back" ...
Offline
Offline
Thanks for the link. It doesn't really say why the static libraries were removed though. But I'm building ocaml myself now, so as far as I'm concerned, everything is sorted.
Offline
Offline
File a bug. Removing static libraries is a goal we're chasing, but not at all cost. In this case either the static library should be kept alive, or libcamlrun_shared.so should be installed in a way it will get linked when linking -lcamlrun.
Offline
I'm building ocaml myself now, so as far as I'm concerned, everything is sorted.
Please remember to mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309
If you do file a bug report, please post a link to it too.
Offline
Okay, so a few hours ago the ocaml package was upgraded to 4.01.0-3, which includes the static libraries again (1). Maybe its maintainer has come across this forum thread? A big thanks to tpowa anyways, and to everyone who helped me out here.
File a bug. Removing static libraries is a goal we're chasing, but not at all cost. In this case either the static library should be kept alive, or libcamlrun_shared.so should be installed in a way it will get linked when linking -lcamlrun.
The static libraries are included again, so I guess filing a bug isn't necessary anymore?
(1) 4.01.0-3 commit: https://projects.archlinux.org/svntogit … d810697e06
Offline