dbuenzli / uutf

Non-blocking streaming Unicode codec for OCaml
http://erratique.ch/software/uutf
ISC License
30 stars 15 forks source link

build errors (potentially related to relocatable builds) #10

Closed cfcs closed 7 years ago

cfcs commented 7 years ago

Let me know if you need more details:

#=== ERROR while installing uutf.1.0.1 ========================================#
# opam-version 1.2.2
# os           linux
# command      ocaml pkg/pkg.ml build --pinned false --with-cmdliner true
# path         /home/user/.opam/4.04.0/build/uutf.1.0.1
# compiler     4.04.0
# exit-code    1
# env-file     /home/user/.opam/4.04.0/build/uutf.1.0.1/uutf-7891-cb3985.env
# stdout-file  /home/user/.opam/4.04.0/build/uutf.1.0.1/uutf-7891-cb3985.out
# stderr-file  /home/user/.opam/4.04.0/build/uutf.1.0.1/uutf-7891-cb3985.err
### stdout ###
# [...]
# /usr/bin/ld: /home/user/.opam/4.04.0/lib/ocaml/libasmrun.a(finalise.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
# /usr/bin/ld: /home/user/.opam/4.04.0/lib/ocaml/libasmrun.a(custom.o): relocation R_X86_64_32 against symbol `caml_custom_table' can not be used when making a shared object; recompile with -fPIC
# /usr/bin/ld: /home/user/.opam/4.04.0/lib/ocaml/libasmrun.a(unix.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
# /usr/bin/ld: /home/user/.opam/4.04.0/lib/ocaml/libasmrun.a(backtrace.o): relocation R_X86_64_32 against symbol `caml_backtrace_last_exn' can not be used when making a shared object; recompile with -fPIC
# /usr/bin/ld: /home/user/.opam/4.04.0/lib/ocaml/libasmrun.a(startup.o): relocation R_X86_64_32S against symbol `caml_data_segments' can not be used when making a shared object; recompile with -fPIC
# /usr/bin/ld: final link failed: Nonrepresentable section on output
# collect2: error: ld returned 1 exit status
# File "caml_startup", line 1:
# Error: Error during linking
# Command exited with code 2.
### stderr ###
# pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-tag' 'debug'
#      '-build-dir' '_build' 'opam' 'pkg/META' 'CHANGES.md' 'LICENSE.md'
#      'README.md' 'src/uutf.a' 'src/uutf.cmxs' 'src/uutf.cmxa' 'src/uutf.cma'
#      'src/uutf.cmx' 'src/uutf.cmi' 'src/uutf.mli' 'test/utftrip.native']: exited with 10
cfcs commented 7 years ago

It looks like it could be a local issue (running debian stretch (v 9, aka "stretch")).

dbuenzli commented 7 years ago

Sorry but I won't be able to help here. The output is truncated but I suspect this happens when the .cmxs is created. I doubt this is an issue specific to uutf though.

dbuenzli commented 7 years ago

Similar issue there https://github.com/mmottl/pcre-ocaml/issues/12. Get in touch with the persons responsible of the ocaml package on your platform.

dbuenzli commented 7 years ago

See also https://github.com/mjambon/biniou/issues/21

cfcs commented 7 years ago

Thanks for the pointers, and sorry for the inconvenience!