Cloud-Automation / node-soem

Simple Open EtherCAT Master (SOEM) Port for Node.js
18 stars 9 forks source link

npm install fails with the last SOEM changes #8

Closed tadibatt closed 7 years ago

tadibatt commented 7 years ago

Fails with: SOLINK_MODULE(target) Release/obj.target/node-soem.node /usr/bin/ld: ../lib/build/libsoem.a(ethercatmain.c.o): Die Umlagerung von ../lib/build/libsoem.a: error adding symbols: Ungültiger Wert collect2: error: ld returned 1 exit status node-soem.target.mk:132: die Regel für Ziel „Release/obj.target/node-soem.node“ scheiterte make: *** [Release/obj.target/node-soem.node] Fehler 1 make: Verzeichnis „/home/helyman83/node-soem/build“ wird verlassen

In the last SOEM changes, they have cleaned up the CMakeLists.txt file.

In preinstall.sh this fails: sed -i "/target_link_libraries(soem\ pthread\ rt)/a \ \ set_property(TARGET soem PROPERTY POSITION_INDEPENDENT_CODE ON)" CMakeLists.txt

because "target_link_libraries(soem pthread rt)" was replaced by "target_link_libraries(soem ${OS_LIBS})"

preinstall.sh works again if we replace it with: sed -i '/target_link_libraries(soem\ ${OS_LIBS})/a \ \ set_property(TARGET soem PROPERTY POSITION_INDEPENDENT_CODE ON)' CMakeLists.txt

stefanpoeter commented 7 years ago

Can you make this a pull request?

stefanpoeter commented 7 years ago

Thanks a lot. See pull request #9