signalapp / libsignal

Home to the Signal Protocol as well as other cryptographic primitives which make Signal possible.
GNU Affero General Public License v3.0
3.59k stars 417 forks source link

System electron doesn't search signal resources for prebuilds #327

Closed cryptomilk closed 3 years ago

cryptomilk commented 3 years ago

Hi,

I'm packaging signal-desktop in the openSUSE Buildservice. For Linux distributions you to always use libraries and executables from the system. This means signal-desktop is using an electron installation from the system.

When it looks for prebuilds, it only searches the electron directory:

24790 20:16:57 openat(AT_FDCWD, "/usr/lib64/node_modules/electron/dist/electron/prebuilds/linux-x64", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
24790 20:16:57 write(44, "App threw an error during load\n", 31) = 31
24790 20:16:57 write(44, "Error: No native build was found for platform=linux arch=x64 runtime=electron abi=87 uv=1 libc=glibc node=14.16.0 electron=12.0."..., 1101) = 1101
24790 20:16:57 write(44, "Unhandled Error: Error: No native build was found for platform=linux arch=x64 runtime=electron abi=87 uv=1 libc=glibc node=14.16"..., 1118) = 1118
24790 20:16:57 write(2, "\33[1m\33[47m\33[31mUnhandled Error\n\33[30mError: No native build was found for platform=linux arch=x64 runtime=electron abi=87 uv=1 lib"..., 1140) = 1140

So I wonder why does node-gyp-build not search in the Signal directory which is /usr/lib64/signal-desktop/ in my case. Help would be appreciated as I'm not a nodejs expert. It worked fine when bindings where used with libsignal-client-node repo.

hiqua commented 3 years ago

You should ask on the forum, I think there was a similar thread some time ago.

cryptomilk commented 3 years ago

I got it working, yay :-)

Now I wonder, if I want prebuilds or do a final build and add the build/ directory to package.json too.

osztenkurden commented 2 years ago

@cryptomilk how did you resolve the issue?

cryptomilk commented 2 years ago

I replaced the prebuilt package with the source version in package.json and build it myself.