node-3d / 3d-core-raub

An extensible Node.js 3D core for desktop applications
https://github.com/node-3d/node-3d
MIT License
72 stars 4 forks source link

/usr/bin/ld: Release/obj.target/glfw/cpp/glfw.o: in function `_init': glfw.cpp:(.text+0x67c0): multiple definition of `_init'; /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../lib/crti.o:(.init+0x0): first defined here #1

Closed RossComputerGuy closed 5 years ago

RossComputerGuy commented 5 years ago
make: Entering directory '/home/spaceboyross/Droid.JS/node_modules/deps-opengl-raub/build'
  ACTION binding_gyp_remove_extras_target_Unnecessary_binaries_removed_ build
  TOUCH Release/obj.target/remove_extras.stamp
make: Leaving directory '/home/spaceboyross/Droid.JS/node_modules/deps-opengl-raub/build'
make: Entering directory '/home/spaceboyross/Droid.JS/node_modules/deps-freeimage-raub/build'
  ACTION binding_gyp_remove_extras_target_Unnecessary_binaries_removed_ build
  TOUCH Release/obj.target/remove_extras.stamp
make: Leaving directory '/home/spaceboyross/Droid.JS/node_modules/deps-freeimage-raub/build'
make: Entering directory '/home/spaceboyross/Droid.JS/node_modules/glfw-raub/build'
  CXX(target) Release/obj.target/glfw/cpp/glfw.o
  SOLINK_MODULE(target) Release/obj.target/glfw.node
/usr/bin/ld: Release/obj.target/glfw/cpp/glfw.o: in function `_init':
glfw.cpp:(.text+0x67c0): multiple definition of `_init'; /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../lib/crti.o:(.init+0x0): first defined here
collect2: error: ld returned 1 exit status
make: *** [glfw.target.mk:140: Release/obj.target/glfw.node] Error 1
make: Leaving directory '/home/spaceboyross/Droid.JS/node_modules/glfw-raub/build'
raub commented 5 years ago

Right, I remember seeing it here https://github.com/SpaceboyRoss01/node-glfw/commit/816774ae7b43cfb62fcde6b9bf44a792b6443939

Btw as I run the CI https://travis-ci.com/node-3d/glfw-raub it also compiles C++ on linux, but I don't have this issue there.

Do you get this error for 3d-core-raub@0.0.13 or 3d-core-raub@GITHUB? or both?

RossComputerGuy commented 5 years ago

Whatever one was published to NPM.

raub commented 5 years ago

@SpaceboyRoss01 Could you please try to clone the 3d-core-raub repo and try npm i to see if the problem is solved in the current codebase?

It is not yet published to NPM in this latest state. If everything works, I will come back to close this issue as soon as the module is published.

eard7 commented 5 years ago

Hi @raub I'm having that issue for 3d-core-raub@0.0.13 Do you have any workaround? I have Centos 7, previously i was able to install the package but now is not working Thanks

EDIT--- After trying your suggestion above, cloned the repo and ran npm i, i got this error

make: Entering directory `/home/erivera/Repos/3d-core-raub/node_modules/glfw-raub/build'
  CXX(target) Release/obj.target/glfw/cpp/bindings.o
../cpp/bindings.cpp: In function ‘void initBindings(V8_VAR_OBJ)’:
../cpp/bindings.cpp:38:21: error: ‘blitFrameBuffer’ is not a member of ‘glfw’
  JS_GLFW_SET_METHOD(blitFrameBuffer);
raub commented 5 years ago

@eard7 You've probably had a bad luck, because yesterday I've been changing some stuff. Give it another try. There's no workaround regarding 3d-core-raub@0.0.13, because it is as it has been published to NPM. I'm currently making a lot of preparations to create the 3d-core-raub@1.0.0, that involves linux and osx CI where applicable. I guess you can track it here.

eard7 commented 5 years ago

@raub Oh you're right, i gave another shot this morning and it worked like a charm, doing npm in after cloning the github repo again allowed to proceed with the npm installation but got this new error when trying to ran the nonpow2 example i've got this error:

  return process.dlopen(module, path._makeLong(filename));
                 ^
Error: libjpeg.so.8: cannot open shared object file: No such file or directory
raub commented 5 years ago

@eard7 please consider commenting further on this new issue https://github.com/node-3d/image-raub/issues/1 separated from this one.

Anyway, I've just pushed the lib, you can now try again and it should hopefully run (if your libc will happen to be compatible). Please share the result in the new issue mentioned above.

eard7 commented 5 years ago

@raub regarding the main issue here, i was able to install the package on my project using the github url but not the npm package (i think is because the new version is not yet on npm)

raub commented 5 years ago

Should work correctly since https://github.com/node-3d/3d-core-raub/tree/v1.0.0 npm i 3d-core-raub@1.0.0