Am I missing something for WebAssembly creation in Oxygene?

I just tried to create a new WebAssembly project in VS 2017. When I compile I get:

Severity Code Description Project File Line Suppression State
Error (E0) Internal error: System.DllNotFoundException: Unable to load DLL ‘RemObjects.Elements.LLVM.dll’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at LLVM.Interop.LLVMInterop.LLVMInitializeAll()
at RemObjects.Elements.Island.IslandOutput…cctor() WebAsmModule C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\RemObjects Software\Elements\RemObjects.Elements.Island.WebAssembly.targets 42

Am I missing something?

hard to say, w/o more details. do you have that dll installed in your elements Bin folder?

Not sure what more detail you need. I just created a WebAssembly project from the RemObjects template. Then compiled.

Is the RemObjects install supposed to create the files that it is looking for? If it is, apparently it did not.

A quick Cortana search did not reveal the files. I’ll manually look in the BIN folder and let you know momentarily.

Odd, I just reloaded VS and the project and compiled and I just got this ONE error message:

Severity Code Description Project File Line Suppression State
Error (E0) Internal error: System.DllNotFoundException: Unable to load DLL ‘RemObjects.Elements.LLVM.dll’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at LLVM.Interop.LLVMInterop.LLVMInitializeAll()
at RemObjects.Elements.Island.IslandOutput…cctor() WebAsmModule C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\RemObjects Software\Elements\RemObjects.Elements.Island.WebAssembly.targets 42

Is this file something that RemObjects is supposed to install or am I supposed to download it from somewhere? I couldn’t find documentation on RemObjects site after poking around for a half hour or so.

Wife tells me we are leaving in 10 minutes for a concert so will check back later.

so, does this dll exist on your system or not? out installer does install it, and pretty much everything would fail without it, so this is not a “broken for me, so it must be broken for everyone” issue, as I’m sure we’d have notices if no-one was able to build any project…

One possibility is that your system path is broken somehow (too long?) Elements/Bin has to be in it, which is where this dll is located.

Carlo,

Thanks for telling me where it was supposed to be. I found it there. Apparently Cortana doesn’t index the Program Files(x86) ((maybe I should add that to Cortana indexing for future)).

The path truncated sounds like a possibility. I know a long time ago it was very long with all the stuff on the computer that puts things in the path. Also seems like a long time ago they allowed making the string longer than whatever the default was.

I’ll check that out.

… time passes …

Nope, nothing in the path about RemObjects. I’ll try just adding it to the references and see if it is happy.

… time passes …

OOps. Apparently a reference for a webassembly only wants a .fx file so I guess the path needs to have it. Now I’ll have to see how to get that to happen.

You’ll want to put C:\Program Files (x86)\RemObjects Software\Elements\bin (or the path you picked if you picked differently) in the system path to make the compiler working.

Sounds good. Just finding where Windows hides the path. I think I’m on the right “path” now. Thanks again.

“System”, Advanced System Settings, Environment Variable.

Yep, Cortana got me there. Seems like the last time I played with paths was probably Turbo Pascal. :slight_smile:

Bummer. I have this:

C:\Users\mtied>path
PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn;C:\Program Files\Microsoft SQL Server\140\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Windows Live\Shared;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Users\mtied\AppData\Local\Microsoft\WindowsApps;C:\Users\mtied\AppData\Local\Programs\Fiddler;C:\Users\mtied\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\RemObjects Software\Elements\Bin;

And the compiler still complains:

Severity Code Description Project File Line Suppression State
Error (E0) Internal error: System.DllNotFoundException: Unable to load DLL ‘RemObjects.Elements.LLVM.dll’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at LLVM.Interop.LLVMInterop.LLVMInitializeAll()
at RemObjects.Elements.Island.IslandOutput…cctor() WebAsmModule C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\RemObjects Software\Elements\RemObjects.Elements.Island.WebAssembly.targets 42

… time passes …

Seems like there are more paths at the front of the path string that the advanced path editor doesn’t list. Could be one of those is invalid and screws up the path search mechanism, but I don’t see how to fix those.

Off to Bing I go…

… time passes …

All the rest of the path pieces DO exist.

… time passes …

I read something about being admin to edit system environment variables so I loaded control panel as administrator and it still didn’t show a bunch of the paths. Nothing Is Ever Easy (niee)

… time passes …

Oh, I got it. The top and bottom of the panel show different sets of variables. I just have to select the bottom one. I just saw the path at the top end pressed the edit button. Gotta learn to look around more :slight_smile:

It is still a problem though since all the paths seem valid, but compiler still isn’t finding llvm.dll. :frowning:

… time passes …

Oh, that is odd. Although I quit VS and re-entered it, it still didn’t compile. So I checked that VS was really gone from task manager and it was gone. But when I just now went in to VS again, NOW it finds it and compiles. Weird. Almost like the change to the path had a time delay or something. Or it was cached.

Oh well, I appear to be good to go on and find the next oddball thing.

Thanks to both Marc and Carlo.

… time passes …

Rats. Although it compiled, I don’t think it is running right. I see the static text in the example on the page, but the webassembly code didn’t seem to do what I think it is doing (locating a field by id and changing its text). In the debug output window I get:

Connected to remote debugger
Loading module
An exception of type: ReferenceError occurred and was ignored
The program ‘WebAsmModule: C:\Users\mtied\Documents\Visual Studio 2017\Projects\WebAsm\WebAsmModule\WebAsmModule\bin\Debug\WebAssembly\WebAsmModule’ has exited with code 0 (0x0).

Not sure what the “referenceerror” is about, but I’m guessing it ignored the webassembly code part.

I see: WebAsmModule.instantiate(“wasm/WebAsmModule.wasm”).then(function (result) {

and I see the wasm is actually in “wasm32” subfolder. Tried changing that line to wasm32, but it didn’t make a difference. I also tried putting the full path to the wasm. Still no go. Am I missing something else in the path?

No your path is right now; it did compile right now. I’ll ping someone to look at the template issue.

Can you tell me which version this is?

I think you want RemObjects Elements - 10.0.0.2285? I’m not POSITIVE there was a template issue. The very first time, there were the 3 error messages, but later without changing anything except restarting VS 2017, there was only one.

The main problem was that the entry was missing from the path. And if the install asked whether the path should include something new, I generally say NO to those so it doesn’t keep making my path longer and longer. Stuff that I make never relies on the path.

Any clue on the ReferenceError? And yes, it did compile, it just doesn’t seem to work. Maybe another path missing?

… time passes …

Yeah, I changed the default code to:
console.log(“hello test”);
WebAsmModule.instantiate(“wasm/WebAsmModule.wasm”).then(function (result) {
console.log(“WebAssembly file WebAsmModule.wasm has been loaded.”);
var program = result.Program();
program.HelloWorld();

and the “hello test” message came out to console, but not the second log message.

So something in the instantiate isn’t right. So what is the first “wasm” in “wasm/WebAsmModule.wasm”? Is there a parameter somewhere that says where wasm is?

It looks like there’s a template bug. The wasm32/ part should be removed. It should put a “Hello from Elements” as html on the screen once it’s done.

1 Like

Carlo,

As I said, I just tried changing the html to the wasm32 folder because that is where the wasm actually compiles to. So there isn’t a wasm32 part to remove. There IS a WASM. I’ll try removing that part.

… time passes …

Nope, didn’t make any difference. With wasm or wasm32 or no prefix in the html, none work.

… time passes …

Ok, I changed the index.html to have “wasm32” and not “wasm” in the paths. Then I changed the index.html to reference wasm32. Then I copied the index.html to the debug folder that contained the wasm32. Then I just opened the index.html from the file explorer. That launched an instance of Edge browser and it worked.

I suppose I ought to be able to change something in the elements file that says where things go? And what the index.html in the project references? Or maybe I can just change the project to put the index.html in the folder where it needs to be. But then I would worry about switching between debug and release?

And is there a way I can make Edge be launched from VS instead of Chrome?

What do you think?

This is really odd. If I start from a template now (which is fixed) it starts Google Chrome (we require Chrome because it’s the only browser that properly supports Debuggiing wasm)
This is the html from the template and it works:

<html>
	<head>
		<title>Module19 Test Page</title>
		<script lang="javascript" src="wasm/RemObjectsElements.js"></script>
		<script lang="javascript" src="wasm/Module19.js"></script>
	</head>
	<body>
	<h1>Module19 Test Page</h1>
	<div id="helloWorld"/>
	<script lang="javascript">
		Module19.instantiate("wasm/Module19.wasm").then(function (result) {
			console.log("WebAssembly file Module19.wasm has been loaded.");
			var program = result.Program();
			program.HelloWorld();
		});
	</script>
	</body>
</html>

It says:

Module19 Test Page
Hello from Elements WebAssembly!

You’re using VS or Water? Latest’beta?

I’m going to guess this is another thing that changed with VS 2017. Probably 2017 compiles to a wasm32 folder instead of wasm (which you reference in the template). And I’m guessing the folder structure may be different also such that the index.html isn’t in a place that can find either the wasm or wasm32 stuff.

Unlikely, as thesis all handled by EBuild. can you set build log verbosity to Detailed, and paste the full build log?