Cross-compiling for 32bits platform

I was trying to cross-compile the Launcher for 32bits (following up from this thread).

I successfully cross-compiled safe_core with the following command:
$ cargo build --release --features "use-mock-routing" --target=i686-unknown-linux-gnu

Then I copied the file onto safe_launcher’s app/ffi and I executed the following commands:
$ npm install
$ npm run rebuild-native (I’m not sure this is step is required but I ran it just in case)
$ npm run package-all

I shared the ia32 version of the launcher with @Havor, but when he executes it, he sees en empty screen:

Do you think I did the steps correctly? what could be wrong?

1 Like

I wonder you have the same as described here:

At least in my case the reason was the fresh installation of Windows 10.

The C++ libraries are not there by default and I didn't have any development tools installed.

Installing Visual C++ Redistributable for VS 2015 solved the problem.

You can get it from here:

Thanks @davidpbrown.

I’m building on Linux, even so, what I understand from that discussion is that the released binaries shouldn’t need any pre-installed C++ libraries:

It’s a build dependency. Electron apps (especially for Windows) should be released as binaries, in which case they won’t need the libraries.

On the other hand, I found this page where it’s explained something about installing some C++ libraries which I didn’t try yet. I will try this and then come back here:

To build app in 32 bit from a machine with 64 bit:

sudo apt-get install --no-install-recommends -y gcc-multilib g+±multilib

1 Like

This step rebuilds the native npm dependencies to work with electron (ffi and ref). I hope the rebuild step completed without any errors.

Can you pass the logs from the application? You can start the application from the console and check the logs on console.
Or, you can move this line above the if condition so that the dev tools is visible after packaging, which can help us to troubleshoot quicker.

I’m not getting any build errors.
I moved the mainWindow.openDevTools(); line as you suggested, and this is what I see in the Electron’s browser console (running from a Virtualbox VM):

file:///home/osboxes/safe-launcher-v0.10.0-linux-ia32/resources/app.asar/dist/style.css Failed to load resource: net::ERR_FILE_NOT_FOUND
bindings.js:83 Uncaught Error: /tmp/.org.chromium.Chromium.arKNGX: wrong ELF class: ELFCLASS64

I am not seeing any logs in the shell console, neither when I run it with “npm run dev” on the host box, nor when I run the binary package I generated with “npm run package-all” on the target 32bit box.

I just noticed that I don’t have a log.toml in the package I built, but I do see one in the v0.10.0 package you released. I tried placing a copy of it into the package I built but no difference there, no logs.

I also checked the config/env_production.js file and I see "level": "debug". So I don’t know why I don’t see any logs in the console, and there is no Client.log file created either.

I’m sure I’m confusing things here, I’m just trying to understand/learn it.

BTW, what I tried to mean is that since I see this is being executed as part of the postinstall script then I don’t know if it is necessary:

"postinstall": "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json && npm run rebuild-native",
1 Like

I just managed to build safe_core and safe_launcher in a Virtualbox Lubuntu 14.04.3 32bits image, and I’m now being able to see the launcher’s main screen but it doesn’t connect to the network (I understand it would be the mock).
This is what I see in the Electron browser’s console (still no logs on the command console):

Failed to load resource: net::ERR_FILE_NOT_FOUND

bundle.js:181 Library loaded from -  /home/osboxes/safe_launcher/release/safe-launcher-v0.10.0-linux-ia32/resources/app.asar.unpacked/dist/libsafe_core

bundle.js:264 Cannot read property 'output_log_path' of null(anonymous function) @ bundle.js:264

dynamic_library.js:112 Uncaught (in promise) Error: Dynamic Symbol Retrieval Error: /home/osboxes/safe_launcher/release/safe-launcher-v0.10.0-linux-ia32/resources/app.asar.unpacked/dist/ undefined symbol: misc_maid_sign_key(…)

This topic was automatically closed after 30 days. New replies are no longer allowed.