[LLVMbugs] [Bug 22014] New: OCaml bindings don't link to libLLVM-3.x.so with -Wl, --as-needed
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Dec 23 04:12:48 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=22014
Bug ID: 22014
Summary: OCaml bindings don't link to libLLVM-3.x.so with
-Wl,--as-needed
Product: Build scripts
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Makefiles
Assignee: unassignedbugs at nondot.org
Reporter: evangelos at foutrelis.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 13587
--> http://llvm.org/bugs/attachment.cgi?id=13587&action=edit
Fix OCaml bindings linking with -Wl,--as-needed
When building LLVM with "-Wl,--as-needed" in LDFLAGS (as it's been the default
in Arch Linux for several years now), the OCaml bindings' .so libs won't get
linked to libLLVM-3.x.so and thus result in undefined symbols when they are
used:
> /usr/lib/ocaml/dllllvm.so: undefined symbol: LLVMGetFirstUse
I believe this is caused by the object files appearing after the libraries
during the linking stage. [1]
I've attached a patch for Makefile.ocaml which fixes the issue for me.
(I only tested with LLVM 3.5 but this issue should affect /trunk as well.)
[1]
https://wiki.mageia.org/en/Overlinking_issues_in_packaging#Wrong_linking_order
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141223/38745e7d/attachment.html>
More information about the llvm-bugs
mailing list