Build of master fails in new openSUSE Leap 15: llvm undefined references

Yesterday openSUSE released Leap 15.0, upgrade from Leap 42.3. I upgraded and tried to build Julia from master, but process fails with a number of undefined references in llvm. The message “use make cleanall” was suggested but this did not resolve the issue. It’s possible that my observation just coincided with the release of Leap 15, compile of the master has failed intermittently a number of times recently. New openSUSE has gcc version 7.3.1 20180323 [gcc-7-branch revision 258812] (SUSE Linux). Typical error on make is:
/home/colin/Downloads/julia7/usr/lib/libjulia.so: undefined reference to llvm::RTDyldMemoryManager::getPointerToNamedFunction(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)'`
Would you like a full report on this?

I’ve seen similar errors when building Fedora RPMs. The advice to use make cleanall is irrelevant when you build from a clean tree. IIRC I suspected it was due to setting prefix and other directories, but I haven’t investigated further because I now set USE_SYSTEM_LLVM=1 again, which works around the problem. If you can confirm it’s related to using custom paths, it would be helpful.

No custom paths as far as I am aware. Just refresh from git into /home/…/Downloads, make and make testall.

So you mean vanilla make, without any options at all? And from a clean git repository?

Yes, plain vanilla make.
The issue is resolved by re-cloning julia master and starting from scratch.
Painfully long process, but it works.

OK. Then it will be hard to fix, without a reliable way of reproducing the bug from a clean tree.

Whenever you see undefined reference and
std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&
it means that you are mixing C++ libraries compiled with gcc/libstdc++ 4 ABI and gcc/libstdc++ 5+ ABI.

Your old version probably had gcc 4.x and when you upgraded you got gcc 7.3. Since LLVM was not recompiled, this error showed up.

2 Likes

Just one question, why don’t you use the official package? I have update Julia to v0.6.2 in Leap 15.0 (v0.6.3 will be submitted in the following days) and it is building fine.

Never mind, saw just now that you are building the v0.7.