You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
There is a solvable linkage problem on macOS: ld: symbol(s) not found for architecture x86_64.
Undefined symbols for architecture x86_64:
"_OS_impl_filehandle_table", referenced from:
_Test_OS_SocketConnect_Impl in coveragetest-bsd-sockets.c.o
_Test_OS_SocketAccept_Impl in coveragetest-bsd-sockets.c.o
_Test_OS_SocketRecvFrom_Impl in coveragetest-bsd-sockets.c.o
_OS_SocketOpen_Impl in os-impl-bsd-sockets.c.o
_OS_SocketBind_Impl in os-impl-bsd-sockets.c.o
_OS_SocketConnect_Impl in os-impl-bsd-sockets.c.o
_OS_SocketShutdown_Impl in os-impl-bsd-sockets.c.o
...
"_OS_stream_table", referenced from:
_Test_OS_SocketOpen_Impl in coveragetest-bsd-sockets.c.o
_Test_OS_SocketBind_Impl in coveragetest-bsd-sockets.c.o
_Osapi_Test_Setup in coveragetest-bsd-sockets.c.o
_OS_SocketOpen_Impl in os-impl-bsd-sockets.c.o
_OS_SocketBind_Impl in os-impl-bsd-sockets.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [unit-test-coverage/vxworks/coverage-vxworks-bsd-sockets-testrunner] Error 1
make[2]: *** [unit-test-coverage/vxworks/CMakeFiles/coverage-vxworks-bsd-sockets-testrunner.dir/all] Error 2
make[1]: *** [all] Error 2
Describe the solution you'd like
The issue seems to be coming from the differences between gcc on Linux and clang on macOS. The following simple modification makes the error to go away for the OS_module_table symbol.
It doesn't seem to be possible to implement it differently on macOS / clang.
Additional context
This solution makes sense only if the macOS OSAL is integrated into the OSAL CI. Otherwise, it will not be obvious to a Linux programmer that the practice of initializing the global variables has to be followed.
Requester Info
Stanislav Pankevich (Personal contribution)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
There is a solvable linkage problem on macOS:
ld: symbol(s) not found for architecture x86_64
.Describe the solution you'd like
The issue seems to be coming from the differences between
gcc
on Linux andclang
on macOS. The following simple modification makes the error to go away for theOS_module_table
symbol.and so on...
This change is implemented consistently in #1161.
Describe alternatives you've considered
It doesn't seem to be possible to implement it differently on macOS / clang.
Additional context
This solution makes sense only if the macOS OSAL is integrated into the OSAL CI. Otherwise, it will not be obvious to a Linux programmer that the practice of initializing the global variables has to be followed.
Requester Info
Stanislav Pankevich (Personal contribution)
The text was updated successfully, but these errors were encountered: