Closed raould closed 6 years ago
Mhhhh, I believe this is as a result of our linux support for sdl2 being still a tad hacky. We generate a bsconfig with the "correct" (hardcoded) linux linking flags here: https://github.com/bsansouci/SDL-mirror/blob/fast/postinstall.js#L135
But since on linux we run the configure script and build from scratch, these link flags might end up being wrong for some platforms (seems like yours is one of them). We need to instead pull the right static linking flags from the generated pc files (https://github.com/bsansouci/SDL-mirror/blob/SDL12/sdl.pc.in#L14)
@bsansouci
@raould can you paste the contents of node_modules/sdl2/sdl2.pc
?
In my case I get a bunch of these
can not be used when making a shared object; recompile with -fPIC
Any idea how to workaround this?
@mciparelli unless sdl is mentioned explicitly in the error message, that unfortunately looks like another occurrence of https://github.com/bsansouci/bsb-native/issues/35 (and likely isn't related to this issue).
@mciparelli Could you paste the contents of node_modules/sdl2/sdl2.pc
so we can figure out if you have different generated linker flags on your machine?
yeah it looks like this
# sdl pkg-config source file
prefix=/home/tincho/local/reprocessing-example/node_modules/sdl2
exec_prefix=${prefix}
libdir=/home/tincho/local/reprocessing-example/node_modules/sdl2
includedir=${prefix}/include
Name: sdl2
Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
Version: 2.0.5
Requires:
Conflicts:
Libs: -L${libdir} -Wl,-rpath,${libdir} -Wl,--enable-new-dtags -lSDL2
Libs.private: -lSDL2 -Wl,--no-undefined -lm -ldl -lpthread -lrt
Cflags: -I${includedir}/SDL2 -D_REENTRANT
@raould the dependency on libpulse-dev should be removed for cases where your distro doesn't use pulseaudio. Please reopen or otherwise let us know if you're still having issues, and if the error looks like this, please include the contents of node_modules/sdl2/sdl2.pc just so we can check what sdl2 wants us to link :)
after the npm install etc. trying to do
so then i installed libpulse-dev, which helped. but then: