Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 16.04 x86_64 failure #2

Closed
raould opened this issue Feb 10, 2018 · 7 comments
Closed

Ubuntu 16.04 x86_64 failure #2

raould opened this issue Feb 10, 2018 · 7 comments

Comments

@raould
Copy link

raould commented Feb 10, 2018

after the npm install etc. trying to do

$ npm run build
...
FAILED: indexhot.byte 
/home/superman/Dev/rml/Test/reprocessing-example/node_modules/bs-platform/lib/bsb_helper.exe  -add-ocaml-dependency bigarray -add-ocaml-dependency dynlink -add-ocaml-dependency nums -add-ocaml-dependency str -add-ocaml-dependency threads -add-ocaml-dependency unix -w -30-40+6+7+27+32..39+44+45+101  -bs-main IndexHot -bs-super-errors -add-clib -ccopt -add-clib -lasound -add-clib -ccopt -add-clib -lm -add-clib -ccopt -add-clib -ldl -add-clib -ccopt -add-clib -lpulse-simple -add-clib -ccopt -add-clib -lpulse -add-clib -ccopt -add-clib -lpthread -add-clib -ccopt -add-clib -lrt -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Reasongl/lib/reasongl.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/glad.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/image_helper.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/stb_image_aug.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/image_DXT.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/SOIL.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/soil_wrapper.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/tgls_new.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tsdl/lib/tsdl_new.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/sdl2/libSDL2.a  -I /home/superman/Dev/rml/Test/reprocessing-example/node_modules/sdl2/lib/ocaml/bytecode -I /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tsdl/lib/ocaml/bytecode -I /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/ocaml/bytecode -I /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Reasongl/lib/ocaml/bytecode -I /home/superman/Dev/rml/Test/reprocessing-example/node_modules/reprocessing/lib/ocaml/bytecode src/IndexHot.mlast src/index.mlast -link-bytecode indexhot.byte
/usr/bin/ld: cannot find -lpulse-simple
/usr/bin/ld: cannot find -lpulse
collect2: error: ld returned 1 exit status

so then i installed libpulse-dev, which helped. but then:

FAILED: indexhot.byte 
/home/superman/Dev/rml/Test/reprocessing-example/node_modules/bs-platform/lib/bsb_helper.exe  -add-ocaml-dependency bigarray -add-ocaml-dependency dynlink -add-ocaml-dependency nums -add-ocaml-dependency str -add-ocaml-dependency threads -add-ocaml-dependency unix -w -30-40+6+7+27+32..39+44+45+101  -bs-main IndexHot -bs-super-errors -add-clib -ccopt -add-clib -lasound -add-clib -ccopt -add-clib -lm -add-clib -ccopt -add-clib -ldl -add-clib -ccopt -add-clib -lpulse-simple -add-clib -ccopt -add-clib -lpulse -add-clib -ccopt -add-clib -lpthread -add-clib -ccopt -add-clib -lrt -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Reasongl/lib/reasongl.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/glad.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/image_helper.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/stb_image_aug.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/image_DXT.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/SOIL.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/soil_wrapper.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/tgls_new.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tsdl/lib/tsdl_new.o -add-clib /home/superman/Dev/rml/Test/reprocessing-example/node_modules/sdl2/libSDL2.a  -I /home/superman/Dev/rml/Test/reprocessing-example/node_modules/sdl2/lib/ocaml/bytecode -I /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tsdl/lib/ocaml/bytecode -I /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Tgls/lib/ocaml/bytecode -I /home/superman/Dev/rml/Test/reprocessing-example/node_modules/Reasongl/lib/ocaml/bytecode -I /home/superman/Dev/rml/Test/reprocessing-example/node_modules/reprocessing/lib/ocaml/bytecode src/IndexHot.mlast src/index.mlast -link-bytecode indexhot.byte
/home/superman/Dev/rml/Test/reprocessing-example/node_modules/sdl2/libSDL2.a(SDL_mirvideo.o): In function `MIR_InitDisplayFromOutput':
/home/superman/Dev/rml/Test/reprocessing-example/node_modules/sdl2/src/video/mir/SDL_mirvideo.c:258: undefined reference to `mir_output_get_current_mode'
collect2: error: ld returned 1 exit status
@Schmavery
Copy link
Collaborator

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

@Schmavery
Copy link
Collaborator

@raould can you paste the contents of node_modules/sdl2/sdl2.pc?

@mciparelli
Copy link

mciparelli commented Feb 13, 2018

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?

@Schmavery
Copy link
Collaborator

Schmavery commented Feb 13, 2018

@mciparelli unless sdl is mentioned explicitly in the error message, that unfortunately looks like another occurrence of bsansouci/bsb-native#35 (and likely isn't related to this issue).

@bsansouci
Copy link
Owner

@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?

@mciparelli
Copy link

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

@Schmavery
Copy link
Collaborator

@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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants