[LLVMdev] questions about shared library ...

Reid Spencer reid at x10sys.com
Tue Nov 2 22:57:14 PST 2004


The symbols you mentioned are part of libtool's libdl.so which is an attempt to
provide cross platform support for shared libraries. You'll need to install
libdl.so and provide the -ldl option to the linker (e.g. TOOLLIBOPTSB
argument). See the new makefile documentation at
http://llvm.cs.uiuc.edu/docs/MakefileGuide.html for more details.

There is no plan to enhance the makefiles to build shared libraries as they are
not needed by most users and slow down the build. If you wish to create shared
libraries, I suggest you link a shared library with whatever contents you wish
based on the various .o files generated by the makefiles today. You can do this
, for example, by adding a new target to the llvm/Makefile that builds the
library you desire.


Yiping Fan wrote:
> During my project, it was very slow when I linked my program with the
> static libraries vmcore, asmparser, and support.a.
> Then I tried to compile these LLVM modules as shared libraries, by set
> SHARED_LIBRARY = 1 for those makefiles. It did generate the *.so libraries.
> However, when I linked with the shared libraries, it always complained that
> ...llvm/lib/Debug/libsupport.so: undefined reference to `dlerror'
> ...llvm/lib/Debug/libsupport.so: undefined reference to `dlopen'
> ...llvm/lib/Debug/libsupport.so: undefined reference to `dlsym'
> Do you have any suggestion for this problem? Also, do you have any plan
> to enhance your makefiles to provide developers the shared libraries?
> Thanks.
> ------------------------------------------------------------------------
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev

More information about the llvm-dev mailing list