Internal error: System.DllNotFoundException

I’m still getting Internal error: System.DllNotFoundException when I try to build a Linux Island Oxygene application on a Linux build host. I did a fresh install of Debian 10 on a Windows 10 machine using Windows Subsystem for Linux (though please note I get the exact same error on real Linux machines as well; it is NOT an artifact of WSL). Then I installed Elements for Linux. Then I try to build an application:

pmunts@GOLAN:~/src/libsimpleio/elements/linux/programs/test_gpio$ make
"/usr/local/bin/ebuild" "test_gpio.elements" --configuration:Release
RemObjects EBuild. An open source build engine for Elements and beyond.
Copyright RemObjects Software 2016-2019. All Rights Reserved. Created by marc hoffman.
Version 10.0.0.2445 (develop) built on talax, 20191011-150638. Commit 248933d.

   No exact Ubuntu SDK version was specified for target 'Island-Linux', using 'Ubuntu 2.19'.
   Reference 'libsimpleio' was resolved to '/home/pmunts/src/libsimpleio/elements/linux/bindings/x86_64/libsimpleio.fx' via 'HintPath' for target 'Island-Linux'.
   Reference 'libsimpleio' was resolved to '/home/pmunts/src/libsimpleio/elements/linux/bindings/aarch64/libsimpleio.fx' for target 'Island-Linux' (aarch64).
   Reference 'libsimpleio' was resolved to '/home/pmunts/src/libsimpleio/elements/linux/bindings/armv6/libsimpleio.fx' for target 'Island-Linux' (armv6).
   Reference 'libsimpleio' was resolved to '/home/pmunts/src/libsimpleio/elements/linux/bindings/x86_64/libsimpleio.fx' for target 'Island-Linux' (x86_64).
   Reference 'libsimpleio' was resolved to '/home/pmunts/src/libsimpleio/elements/linux/bindings/armv6/libsimpleio.fx' via 'HintPath' for target 'Island-Linux'.
   Reference 'libsimpleio' was resolved to '/home/pmunts/src/libsimpleio/elements/linux/bindings/aarch64/libsimpleio.fx' for target 'Island-Linux' (aarch64).
   Reference 'libsimpleio' was resolved to '/home/pmunts/src/libsimpleio/elements/linux/bindings/armv6/libsimpleio.fx' for target 'Island-Linux' (armv6).
   Reference 'libsimpleio' was resolved to '/home/pmunts/src/libsimpleio/elements/linux/bindings/x86_64/libsimpleio.fx' for target 'Island-Linux' (x86_64).
   Reference 'libsimpleio' was resolved to '/home/pmunts/src/libsimpleio/elements/linux/bindings/aarch64/libsimpleio.fx' via 'HintPath' for target 'Island-Linux'.
   Reference 'libsimpleio' was resolved to '/home/pmunts/src/libsimpleio/elements/linux/bindings/aarch64/libsimpleio.fx' for target 'Island-Linux' (aarch64).
   Reference 'libsimpleio' was resolved to '/home/pmunts/src/libsimpleio/elements/linux/bindings/armv6/libsimpleio.fx' for target 'Island-Linux' (armv6).
   Reference 'libsimpleio' was resolved to '/home/pmunts/src/libsimpleio/elements/linux/bindings/x86_64/libsimpleio.fx' for target 'Island-Linux' (x86_64).
   Reference 'rtl' was resolved to '/usr/local/lib/elements/Island SDKs/Linux/Ubuntu 2.19/aarch64/rtl.fx' for target 'Island-Linux'.
   Reference 'rtl' was resolved to '/usr/local/lib/elements/Island SDKs/Linux/Ubuntu 2.19/aarch64/rtl.fx' for target 'Island-Linux' (aarch64).
   Reference 'rtl' was resolved to '/usr/local/lib/elements/Island SDKs/Linux/Ubuntu 2.19/armv6/rtl.fx' for target 'Island-Linux' (armv6).
   Reference 'rtl' was resolved to '/usr/local/lib/elements/Island SDKs/Linux/Ubuntu 2.19/x86_64/rtl.fx' for target 'Island-Linux' (x86_64).
   Reference 'gc' was resolved to '/usr/local/lib/elements/Island SDKs/Linux/Ubuntu 2.19/aarch64/gc.fx' for target 'Island-Linux'.
   Reference 'gc' was resolved to '/usr/local/lib/elements/Island SDKs/Linux/Ubuntu 2.19/aarch64/gc.fx' for target 'Island-Linux' (aarch64).
   Reference 'gc' was resolved to '/usr/local/lib/elements/Island SDKs/Linux/Ubuntu 2.19/armv6/gc.fx' for target 'Island-Linux' (armv6).
   Reference 'gc' was resolved to '/usr/local/lib/elements/Island SDKs/Linux/Ubuntu 2.19/x86_64/gc.fx' for target 'Island-Linux' (x86_64).
   Reference 'Island' was resolved to '/usr/local/lib/elements/References/Island/Ubuntu/x86_64/Island.fx' for target 'Island-Linux'.
   Reference 'Island' was resolved to '/usr/local/lib/elements/References/Island/Ubuntu/aarch64/Island.fx' for target 'Island-Linux' (aarch64).
   Reference 'Island' was resolved to '/usr/local/lib/elements/References/Island/Ubuntu/armv6/Island.fx' for target 'Island-Linux' (armv6).
   Reference 'Island' was resolved to '/usr/local/lib/elements/References/Island/Ubuntu/x86_64/Island.fx' for target 'Island-Linux' (x86_64).
   RemObjects Elements (Oxygene, C#, Swift and Java) Compiler for .NET, Cocoa, Java and Island.
   Version 10.0.0.2445 (develop) built on talax, 20191011-150638. Commit 248933d.
   Copyright 2003-2019 RemObjects Software, LLC. All rights reserved.
E: Internal error: System.DllNotFoundException: RemObjects.Elements.LLVM.dll assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) LLVM.Interop.LLVMInterop.LLVMInitializeAll()
  at RemObjects.Elements.Island.IslandOutput..cctor () [0x00186] in <0493226bc0624090b2fa745a7c9d0592>:0
   Project 'test_gpio' failed to build.
   Solution 'test_gpio' failed to build all projects.
make: *** [/home/pmunts/src/libsimpleio/elements/include/elements.mk:43: elements_mk_build] Error 1

The shared library link libRemObjects.Elements.LLVM.so is in /usr/local/lib/ and it has the correct permissions 0755. The exact same project builds from the command line fine on both Windows and MacOS.

Something that has occurred to me is, I haven’t installed a license file on any of my Linux build hosts. Could that be the real problem, and where should I install a license file on Linux? I can build an Oxygene .Net Core application without any problems on my Linux build host; presumably that process doesn’t use llvm.

Oke so it’s not the license. The compiler doesn’t check for licenses. Reproduced the error with Mandelbrot (odd though; I’m 100% sure this worked when I tested it).

Update 1: It turns out that Mono has the info we need but doesn’t generally expose it.

So there’s two issues: libedit2 is required somehow; and the version of libc I linked to is too new. I’ll have to recompile the library on Debian 10 to make it work properly.

Update 2: Build is started, but building LLVM takes 6-8 hours (and that’s when it goes right in 1 go). I’ll get back to you when I have an updated so.

1 Like

Yes, I noticed this today:

/usr/local/lib/elements/lld: /lib/x86_64-linux-gnu/libm.so.6: version GLIBC_2.29’ not found (required by /usr/local/lib/elements/lld)`

My Linux build host already has libedit2 installed.

Are lld and libRemObjects.Elements.LLVM.so the only Linux binaries in Elements? I was also wondering about running the compiler on a Raspberry Pi…

They are, yes. the rest of the compiler chain is all .NET/Mono based.

It is.

The big problem there is that I would have to compile llvm for RPI. Which takes about two decades to build.

FWIW I just confirmed it now works on Debian 10 and latest Ubuntu.

Has your lld been customized (hard coded paths, etc.)? Debian Buster has an lld package available, and I am wondering whether it could be used instead, especially on the Raspberry Pi.

Our LLD is slightly customized yes (but LLD is only a small part of this). Our LLVM library is slightly modified too (the names of exception handlers supported by LLVM is hardcoded).

I can look into making a DLL version for say raspbian rpi3 arm though, by cross compiling it (presuming cmake allows that).