Thu 14 Dec 2017 04:34:09 PM UTC, comment #16:
The workaround is simple: don't compile with the JIT compiler. It never grew out of the toy implementation and doesn't compile anything but toy examples.
|
Thu 14 Dec 2017 03:23:51 PM UTC, comment #15:
I have this problem when compiling Octave 4.2.1 from source on CentOS 7.4. I use the following configure options:
My LLVM version is 3.4.2, so according to the previous comment it should build without an error, but it doesn't.
I have the following error:
It would be good to have this bug re-opened or at list get a link where it is explained how to workaround this issue. Thank you!
|
Thu 02 Mar 2017 08:01:29 PM UTC, comment #14:
Verified that a normal build with llvm3.4 works and that the JIT is functional within Octave. Closing report.
|
Thu 02 Mar 2017 07:52:40 PM UTC, comment #13:
Sorry for the fuss. It was a dual installation of llvm 3.4 and 3.6 that was the problem. It was picking up bits from both installs that was the issue.
|
Thu 02 Mar 2017 07:51:41 PM UTC, comment #12:
The functions DO seem to be in the library
I tried setting the environment variables as you suggested, but it still fails to link.
I looked and "-lLLVM-3.4" is in the link command above.
Also, this is a NEEDED library.
|
Thu 02 Mar 2017 07:26:28 PM UTC, comment #11:
The functions llvm::verifyFunction and llvm::verifyModule are declared in the public header file "llvm/IR/Verifier.h", so I don't know why they would not be declared in the library as regular public symbols.
Running "nm -D /usr/lib/llvm-3.4/lib/libLLVM-3.4.so | c++filt | grep verify" should help clarify whether the symbols are exported by that library properly.
|
Thu 02 Mar 2017 07:19:27 PM UTC, comment #10:
Ok, if you want to try to force linking, try
This should put "-lLLVM-3.4" at the end of the command, with "-lutil -lm", which is where it needs to be to be useful.
Still, can you also verify that liboctinterp.so has libLLVM-3.4.so.1 in its header? It should show up in this list in your build directory:
|
Thu 02 Mar 2017 07:12:25 PM UTC, comment #9:
I cleared things with 'make distclean' and then re-configured after setting my environment variables to
As you can see below, the link still fails despite the fact that the library and directory are included in the path.
Is the verifyModule only included if I use '-g' somehow?
|
Thu 02 Mar 2017 06:40:26 PM UTC, comment #8:
I think that's right. In Debian's llvm-3.8-dev package, both shared and static libraries are included. Probably because the API is so unstable, they intentionally give users the option to link with either the shared library or the modular static libraries.
Octave should prefer the shared library, LLVM_LIBS should be set to "-lLLVM-3.4", and liboctinterp.so should be pulling it in when octave-cli is linked.
|
Thu 02 Mar 2017 06:14:13 PM UTC, comment #7:
I re-titled the bug report to track the new issue.
I installed all of what appeared to be llvm3.4 packages.
If I look in /usr/lib/llvm-3.4/lib I find libLLVM-3.4.so, but there are also 122 .a files. I'm not sure why that should be.
|
Thu 02 Mar 2017 04:57:47 PM UTC, comment #6:
May as well pursue the llvm build problems here if you think it's worth it.
The error is strange because liboctinterp is supposedly linked against LLVM_LIBS.
Did you install llvm 3.4 as static or shared libraries? The liboctinterp.la file should list a reference to llvm in the dependency_libs variable, and liboctinterp.so should list it in its header as a NEEDED library.
|
Thu 02 Mar 2017 04:30:08 PM UTC, comment #5:
@Mike: I committed your patch to the stable branch here (http://hg.savannah.gnu.org/hgweb/octave/rev/c21939b04931). I was able to install llvm3.4 and verify that without the patch I get the octave_jit_octave error, and with the patch it compiles fine.
It still doesn't work completely. I now have a fail at the link stage, but that is a different error.
Probably Octave is not using the correct LDFLAGS because the two mentioned functioned are available and declared in the header files.
Do we want to re-purpose this bug report to JIT not compiling on 4.2.1 or should we open a new one?
|
Wed 01 Mar 2017 09:27:04 PM UTC, comment #4:
Ceral - does this patch work for you?
(file #39873)
|
Wed 01 Mar 2017 09:24:25 PM UTC, comment #3:
I think this change
https://hg.savannah.gnu.org/hgweb/octave/diff/d0562b3159c7/libinterp/corefcn/jit-typeinfo.cc
was an overzealous search and replace. I think the parts that renamed "octave_jit_err_nan_to_logical_conversion" to "octave_jit_octave::err_nan_to_logical_conversion" should be undone. Unfortunately I don't have an ancient version of llvm to try to compile the stable branch against.
|
Sat 25 Feb 2017 11:02:28 PM UTC, comment #2:
If you are using a version of llvm > 3.4, then this is probably a duplicate of bug #41061 (failure to compile jit with llvm3.5).
|
Sat 25 Feb 2017 10:47:38 PM UTC, comment #1:
Does this work for 4.2.0 (mine doesn't)?
What version of llvm do you have installed?
Can you post more of the compilation log made with
for extra verbosity?
|
Sat 25 Feb 2017 01:05:52 PM UTC, original submission:
I get an error during compilation of 4.2.1:
./configure --enable-jit
make
error: ‘octave_jit_octave’ has not been declared
|