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

-pthread is missing #933

Closed
yurivict opened this issue Jan 10, 2023 · 4 comments · Fixed by #938
Closed

-pthread is missing #933

yurivict opened this issue Jan 10, 2023 · 4 comments · Fixed by #938

Comments

@yurivict
Copy link

Describe the bug

ld: error: undefined symbol: pthread_create
>>> referenced by recorder_impl.cpp
@FlorianReimold
Copy link
Member

Please provide any information. We cannot help you, like that.

@yurivict
Copy link
Author

Here is the log.
FreeBSD 13.1

Please let me know what other info do you need.

@KerstinKeller
Copy link
Contributor

So rec_addon_core links privately to threads:

target_link_libraries(${PROJECT_NAME}
PRIVATE
Threads::Threads
)

and rec_addon_dummy (which actually causes the linker problem) also links privately to rec_addon_core
target_link_libraries(${PROJECT_NAME} PRIVATE eCAL::rec_addon_core)

Quetsion now: does rec_addon_dummy implicitly or explicitly creates threads, too?

std::thread thread([this]()

It explicitly creates new threads.

So wee neew in rec_addon_dummy/CMakeLists.txt a

find_package(Threads REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE eCAL::rec_addon_core Threads::Threads)

@KerstinKeller
Copy link
Contributor

KerstinKeller commented Jan 26, 2023

@yurivict we saw there is now an eCAL FreeBSD port available! 👍 🥳

I also realized that you patched the portable endian file.
https://cgit.freebsd.org/ports/tree/net/ecal/files/patch-lib_ecal__utils_include_ecal__utils_portable__endian.h
Is there something we can add to make it compatible with FreeBSD in general (e.g. with additional #if / #elseif?
Or even better to change it on the original file here?
https://gist.github.com/panzi/6856583#file-portable_endian-h

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

Successfully merging a pull request may close this issue.

3 participants