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

Installation and build issues on latest raspbian bullseye and raspberry 3 #21

Open
IVIJL opened this issue Jul 11, 2023 · 2 comments
Open

Comments

@IVIJL
Copy link

IVIJL commented Jul 11, 2023

Hello tried to install this app and at first when I did try to install prerequisite packages this package no longer exist: ruby2.5-dev so I just used ruby-dev instead.

Then I tried to make in Clockit folder and got this error:

clockkit.cpp:(.text+0x1e8): undefined reference to `pthread_create'
/usr/bin/ld: clockkit.o: in function `ckInitialize(char const*)':
clockkit.cpp:(.text+0x1e8): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make: *** [Makefile:100: ckserver] Error 1
make: *** Waiting for unfinished jobs....
collect2: error: ld returned 1 exit status
make: *** [Makefile:103: ckphaselock] Error 1
collect2: error: ld returned 1 exit status
make: *** [Makefile:97: cktest-unit] Error 1
/usr/bin/ld: /tmp/ccuLpkEv.o: in function `void std::vector<std::thread, std::allocator<std::thread> >::_M_realloc_insert<void (dex::PhaseLockedClock::*)(std::atomic<bool>&), dex::PhaseLockedClock*&, std::reference_wrapper<std::atomic<bool> > >(__gnu_cxx::__normal_iterator<std::thread*, std::vector<std::thread, std::allocator<std::thread> > >, void (dex::PhaseLockedClock::*&&)(std::atomic<bool>&), dex::PhaseLockedClock*&, std::reference_wrapper<std::atomic<bool> >&&)':
test-standalone.cpp:(.text._ZNSt6vectorISt6threadSaIS0_EE17_M_realloc_insertIJMN3dex16PhaseLockedClockEFvRSt6atomicIbEERPS5_St17reference_wrapperIS7_EEEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_[_ZNSt6vectorISt6threadSaIS0_EE17_M_realloc_insertIJMN3dex16PhaseLockedClockEFvRSt6atomicIbEERPS5_St17reference_wrapperIS7_EEEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_]+0x1e4): undefined reference to `pthread_create'
/usr/bin/ld: /tmp/ccuLpkEv.o: in function `main':
test-standalone.cpp:(.text.startup+0x298): undefined reference to `pthread_create'
/usr/bin/ld: clockkit.o: in function `ckInitialize(char const*)':
clockkit.cpp:(.text+0x1e8): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make: *** [Makefile:94: cktest-standalone] Error 1

Any help ?

@camilleg
Copy link
Owner

At line 6 of Makefile, append -pthread. At line 7, append -lpthread. That should fix the "undefined reference to pthread_create," says https://stackoverflow.com/questions/1662909/undefined-reference-to-pthread-create-in-linux.

But why is this even happening? Half a year ago, this repo replaced pthreads with std::thread. What does make -n say? (I no longer have a raspi to check.)

@camilleg
Copy link
Owner

Thanks for the alert that ruby2.5-dev vanished after debian buster. I've updated clockkit's readme.

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

No branches or pull requests

2 participants