ocaml / opam-repository

Main public package repository for opam, the source package manager of OCaml.
https://opam.ocaml.org
Creative Commons Zero v1.0 Universal
509 stars 1.1k forks source link

`bin_prot` FTBFS on OpenSUSE #26154

Closed Leonidas-from-XIV closed 6 days ago

Leonidas-from-XIV commented 1 week ago

When I run the Yojson tests, bin_prot on opensuse + ocaml 5.2 fails. On OCaml 4.x bin_prot.v0.16 is picked by the solver which compiles fine.

The error message looks like this and is 100% reproducible.

/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: xen/blit_stubs.o: warning: relocation against `caml_leave_blocking_section' in read-only section `.text'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: xen/blit_stubs.o: relocation R_X86_64_PC32 against symbol `memcpy@@GLIBC_2.14' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status

Probably due to a missing -fPIC flag. Upstream fix submitted in https://github.com/janestreet/bin_prot/pull/27 and obsoleted by an even more complete solution in https://github.com/janestreet/bin_prot/pull/29.

hannesm commented 6 days ago

thanks!