Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Linux 32 error: wrong ELF class: ELFCLASS64 #6

Closed
fiatjaf opened this issue Feb 18, 2016 · 10 comments
Closed

Linux 32 error: wrong ELF class: ELFCLASS64 #6

fiatjaf opened this issue Feb 18, 2016 · 10 comments

Comments

@fiatjaf
Copy link

fiatjaf commented Feb 18, 2016

Unzipped the ia32 version and run on terminal. See if that helps trace something:

fiatjaf@mises ~/D/Abricotine-linux-ia32> ./Abricotine 
A JavaScript error occurred in the main process
Uncaught Exception:
Error: /home/fiatjaf/Desktop/Abricotine-linux-ia32/resources/app.asar.unpacked/node_modules/spellchecker/build/Release/spellchecker.node: wrong ELF class: ELFCLASS64
    at Error (native)
    at Object.module.(anonymous function) (ATOM_SHELL_ASAR.js:137:20)
    at Object.module.(anonymous function) [as .node] (ATOM_SHELL_ASAR.js:148:18)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/home/fiatjaf/Desktop/Abricotine-linux-ia32/resources/app.asar/node_modules/spellchecker/lib/spellchecker.js:2:16)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
^C⏎                                                                                                                                                                                                                               

fiatjaf@mises ~/D/Abricotine-linux-ia32> node --version
v5.4.0
fiatjaf@mises ~/D/Abricotine-linux-ia32> cat version 
v0.35.1                                           
@brrd
Copy link
Owner

brrd commented Feb 18, 2016

Thanks for reporting. This looks like a problem with ia32 packages.
Have you tried to build the app from source using $ npm install?

@fiatjaf
Copy link
Author

fiatjaf commented Feb 18, 2016

No, but I will. Tomorrow when I get computer access.

Isn't this a problem caused by a 64bit only library being included in a 32bit program?

@brrd
Copy link
Owner

brrd commented Feb 18, 2016

Isn't this a problem caused by a 64bit only library being included in a 32bit program?

I guess the issue comes from the spellchecker module. It is a native node module which must be built specifically for each platform, and I didn't think about that when I built the 32 bit package with a 64 bit computer 😕

I need to find a more efficient way to package and distribute the app for different platforms anyway...

@fiatjaf
Copy link
Author

fiatjaf commented Feb 18, 2016

Did you use https://github.com/maxogden/electron-packager?

I don't even know if it is possible to build for 32 bit from a 64 bit computer. Is it? What about the contrary?

@brrd
Copy link
Owner

brrd commented Feb 19, 2016

Did you use https://github.com/maxogden/electron-packager?

Yes, I do : https://github.com/brrd/Abricotine/blob/master/scripts/packager.js#L4

I don't even know if it is possible to build for 32 bit from a 64 bit computer. Is it? What about the contrary?

I guess (?) it can work for most apps in the 2 ways since electron-packager just packages electron-prebuilt binaries with the provided app. But Abricotine uses the node-spellchecker module which is a native module and (as I understand it) needs to be rebuilt on each platform and electron version : https://github.com/atom/electron/blob/master/docs/tutorial/using-native-node-modules.md

Right know this is automatically performed when you npm install the app (https://github.com/brrd/Abricotine/blob/master/package.json#L20) but the distributed ia32 packages may not work.

Now I wonder how to distribute the app for each platform (win, osx and linux x 32 and 64 bit = 6 packages) without having to deal with 6 OS. I need to investigate this.

@szelpe
Copy link

szelpe commented Feb 28, 2016

Same issue here, seems like the linux 32 bit package is broken.

Update: I managed to get it work by building from source using npm install

@brrd brrd mentioned this issue Feb 29, 2016
@brrd
Copy link
Owner

brrd commented Feb 29, 2016

I updated the linux 32 bit package : https://github.com/brrd/Abricotine/releases/tag/0.2.2
Your feedback would be really appreciated.

@szelpe
Copy link

szelpe commented Feb 29, 2016

Nice work @brrd, it works now!

@fiatjaf
Copy link
Author

fiatjaf commented Feb 29, 2016

It works here also. Thank you.

(sorry, I forgot to build it myself)

@brrd
Copy link
Owner

brrd commented Feb 29, 2016

Glad to hear that it works!

@brrd brrd closed this as completed Feb 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants