[Gambas-user] JIT on archlinux fails to build

Benoît Minisini gambas at ...1...
Fri May 25 01:07:41 CEST 2012


Le 25/05/2012 00:26, Emil Lenngren a écrit :
> Hi
>
> Does someone here know a good way in automake scripts to make the llvm
> linking work in "all" distributions? I can't manage to get llvm-config to
> print out the correct .so file.
>
> /Emil
>

A few points:

1) You must assume that llvm-config is in PATH. Not having a 
configuration program in PATH makes it completely useless.

2) You must use llvm-config for getting *all* flags: flags for the C++ 
preprocessor, flags for the compiler, flags for the linker, and 
libraries to link, by specifying to that command which "llvm engine" you 
need. I don't know exactly which engine you need ("jit" ?).

3) On my freshly compiled llvm-3.2svn, llvm-config will never link to 
that shared library, but to a lot of static "*.a" libraries.

4) So I guess that this shared library is all these *.a static libraries 
put into one big shared library.

5) That shared library cannot be used on Linux, because its name is not 
standard, and the "make install" command did not install it correctly. A 
shared library must follow a precise naming standard (for example 
libLLVM.3.2.0.so), and have many symbolic links (libLLVM.3.2.so 
libLLVM.so). A compiled program is linked against libLLVM.so.

6) By not following that standard, llvm means that libLLVM-3.0, 
libLLVM-3.1 and libLLVM-3.2 are completely different libraries. Why not? 
But then all these libraries should be able to be installed at the same 
time on the system. I can have GTK+2 and GTK+3 on the same system, I can 
have Qt3 and Qt4 on the same system, and so on... But this is not the 
case for llvm: the headers are installed in /usr/include/llvm, which is 
version independant.

Maybe we should go to the llvm site and search for answers to all these 
questions. At the moment, there is no way to write a simple configure.ac 
file for gb.jit, unless I write a dedicated M4 macro for it.

Regards,

-- 
Benoît Minisini




More information about the User mailing list