-
Notifications
You must be signed in to change notification settings - Fork 403
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
build libiceoryx_platform.so error for QNX #1013
Comments
Currently we do not have a QNX CI build so it might easily break on QNX. I think we have to rework the cmake code for the platform a bit and also add a CI for QNX. Could you try to add the following line after https://github.com/eclipse-iceoryx/iceoryx/blob/master/iceoryx_hoofs/CMakeLists.txt#L234 target_link_libraries(iceoryx_platform PRIVATE socket) |
Yes, it works well, this code can fix that link error
|
@qclzdh I'll create a PR but need to clean things up a bit. Can I ping you to build that PR on QNX before we merge? |
@elBoberido Yes, you can. |
iox-#1013 Split iceoryx_platform cmake code into own file
Required information
Operating system:
E.g. Ubuntu 20.04 LTS
Compiler version:
aarch64-unknown-nto-qnx7.0.0-g++
Observed result or behaviour:
CMakeFiles/iceoryx_platform.dir/platform/qnx/source/socket.cpp.o: In function
iox_bind(int, sockaddr const*, unsigned int)': socket.cpp:(.text+0x0): undefined reference to
bind'CMakeFiles/iceoryx_platform.dir/platform/qnx/source/socket.cpp.o: In function
iox_socket(int, int, int)': socket.cpp:(.text+0x8): undefined reference to
socket'CMakeFiles/iceoryx_platform.dir/platform/qnx/source/socket.cpp.o: In function
iox_setsockopt(int, int, int, void const*, unsigned int)': socket.cpp:(.text+0x10): undefined reference to
setsockopt'CMakeFiles/iceoryx_platform.dir/platform/qnx/source/socket.cpp.o: In function
iox_sendto(int, void const*, unsigned long, int, sockaddr const*, unsigned int)': socket.cpp:(.text+0x18): undefined reference to
sendto'CMakeFiles/iceoryx_platform.dir/platform/qnx/source/socket.cpp.o: In function
iox_recvfrom(int, void*, unsigned long, int, sockaddr*, unsigned int*)': socket.cpp:(.text+0x20): undefined reference to
recvfrom'CMakeFiles/iceoryx_platform.dir/platform/qnx/source/socket.cpp.o: In function
iox_connect(int, sockaddr const*, unsigned int)': socket.cpp:(.text+0x28): undefined reference to
connect'collect2: error: ld returned 1 exit status
hoofs/CMakeFiles/iceoryx_platform.dir/build.make:173: recipe for target 'hoofs/libiceoryx_platform.so' failed
make[3]: *** [hoofs/libiceoryx_platform.so] Error 1
make[3]: Leaving directory '/home/qianchunlei/project/iceoryx/build'
CMakeFiles/Makefile2:165: recipe for target 'hoofs/CMakeFiles/iceoryx_platform.dir/all' failed
make[2]: *** [hoofs/CMakeFiles/iceoryx_platform.dir/all] Error 2
make[2]: Leaving directory '/home/qianchunlei/project/iceoryx/build'
CMakeFiles/Makefile2:172: recipe for target 'hoofs/CMakeFiles/iceoryx_platform.dir/rule' failed
make[1]: *** [hoofs/CMakeFiles/iceoryx_platform.dir/rule] Error 2
make[1]: Leaving directory '/home/qianchunlei/project/iceoryx/build'
Makefile:186: recipe for target 'iceoryx_platform' failed
make: *** [iceoryx_platform] Error 2
Expected result or behaviour:
no error
Conditions where it occurred / Performed steps:
build libiceoryx_platform.so on QNX
it looks like, link to libsocket is necessary under line https://github.com/eclipse-iceoryx/iceoryx/blob/master/iceoryx_hoofs/CMakeLists.txt#L233
target_link_libraries(iceoryx_platform
PRIVATE
socket
${ICEORYX_SANITIZER_FLAGS})
The text was updated successfully, but these errors were encountered: