-
Notifications
You must be signed in to change notification settings - Fork 97
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 with cmake: missing -lpthread #355
Comments
@suedwestlicht Thanks a lot! Do you mind submitting a PR with the working code and add me to the list of reviewers, so I can check and merge it? |
Since build/src/CMakeFiles/calfjackhost.dir/link.txt is generated by cmake and I don't have any deeper cmake knowledge I am sorry that I can't help fixing it. |
@suedwestlicht Can you please try if #356 fixes it on your system? |
Nearly. The reported bug is fixed. "make" completes without errors. But "sudo make install" gives:
|
@suedwestlicht Please try again. |
It's getting better and better. No errors with "make" and "sudo make install" anymore. But the links to calf libs go to the build directory (in my case in /tmp) instead of the lib directory:
It should be:
|
@suedwestlicht I just rebased to the current master, there were a lot of changes. Can you please test again now? |
I cloned the repo freshly and used the main branch.
|
Sorry again. Please retry now, but please use branch |
It builds with cmake and the links are ok. Building the pthread branch the old way produces working plugins. |
With "the old way", you mean using automake? |
|
I made some more tests. The new build method produces /usr/local/lib/calf/*.so that have the same libs shown by ldd as the old method. But loading an existing .*carxp into Carla makes it use 100% CPU and the machine becomes unusable when the plugins are built with the new build method. I'll examine it further. |
One reason I could imagine would be the different Your Automake (old way) build seems to be release mode (since you did not specify |
Branch pthreads, build type cmake: It's unset. Shall I set it explicitely? How? |
Unset means a "system specific" build type is being used. You could try building once with |
I think I have sorted it out. I loaded Multiband Compressor and Multiband Limiter into Carla and determined their realtime CPU usage. autogen: 17% That means that CMAKE_BUILD_TYPE should default to Release or an empty CMAKE_BUILD_TYPE should build as if was set to Release. Then automake and cmake have the same default results. Loading my real world mastering chain into Carla with many Calf plugins simply made the Computer unusable due to high realtime CPU load when Calf plugins were build with Debug. |
Awesome, thank you! I remember there were some debug flags which I could add to |
Unchanged. About 57% when Carla has loaded Multiband Compressor and Multiband Limiter. |
@suedwestlicht One more idea: Can you please compile in the old way, but when configuring, use |
A little bit more. 58% instead of 57% – and with more and higher CPU spikes compared to the cmake debug build. |
Perfect. That proves that CMake did not make it worse. I merged all relevant commits to master, so please feel free to close the issue. |
But the default cmake build is a debug build. The default automake build is a release build. I recommend making the default cmake build a release build else people will think that CALF plugins are very ressource hungry. |
Good point! I fixed it in #359 and merged it to master. |
Perfect. |
When I use the new cmake build system then calfjackhost cannot be linked together because of missing -lpthread.
Appending -lpthread in src/CMakeFiles/calfjackhost.dir/link.txt fixes it.
The text was updated successfully, but these errors were encountered: