-
Notifications
You must be signed in to change notification settings - Fork 9
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
undefined reference to pthread_create #148
Comments
Have you tried However, if you want/need to use pthread, add this underneath
Also, the And, not that I have any examples or am using it in PropWare yet, but I recently learned about
|
Thanks for the tip with the compile options. I tested it with Runnable in XMMC mode, and it also returns -1 there. As I've read in XMMC mode there can only ever be one cog running at the same time as only one can read from the sdcard at once, is that true? Any other alternatives? Or to go back one step any other ideas to combat memory/programm size issues besides xmmc? I added the link library line in the CMake, however it still shows the same error as above when trying to use pthread. Edit: |
Can you upload your project, or email it to me if its confidential? Or a link if it's opensource, of course. I'll have to tinker with it to see why linking against pthread isn't working. |
Thank you very much! Do you prefer another way of communication instead of this issue (email, etc) or is it fine this way? Thanks for all the help so for. |
After further testing I still wasn't able to compile it with pthreads nor am I able to start a cog in xmmc mode even on a different machine and after updating to the dev branch. |
FYI: Haven't forgotten about you, but today filled up and I don't suspect I'll have any time tomorrow either. Look for a response Friday maybe? |
Yee, No worries about that, thank you for your help :) |
Okay, after even more research and scanning through a ton of header files, I was able to find a way how to start a cog in XMMC mode: if you add the line Still haven't found a way to link pthread, however that is less important now with the ability to run cogs normally. So to help any other people that want to run cogs in XMMC mode and prevent them from ages of searching, are you able to document it somewhere? Or even better, when using the normal makefile to build it, would it be possible to add that as a Marco via the commandline? (I think -D or something is the option, not sure about that tho) Edit: To expand on this: I sometimes get the warning |
That's very interesting. The compiler should add that automatically. But yes, I can absolutely add that to the command line automatically for you |
Okay, I just tested it again, without the line and it apperently works as well (no idea why it didn't before). |
Okay, so I thiiiink I found the final problem.... It was working on my PC at home where no simpleide is installed, however when I just tried it on my Laptop, where simpleide is installed, it suddenly didn't work anymore (as well as Now after uninstalling simpleide and setting the path variable for propware it suddenly works. |
Ohh, I'm fairly certain the PropGCC shipped with CLion completely stripped out all XMM* support. That would explain that problem at least. And yes, I saw the So this conversation has gotten pretty long and I'm not sure if I have any action items. Are you completely set now? Is there any changes you'd like to see made, or documentation that you'd like updated? |
If you mean simpleide with clion, then ye, that would explain veeeery much! there is a tiny problem that I have to fix by copy pasting the simple libraries and add the And on the documentation side of things, maybe adding somewhere that simpleide is not supported and the stuff with atleast |
Hey, it's me again, running in the same problem this issue was originally created for. I'm getting the same errors for the atomic library
|
Yep, but that should be a different problem from pthread btw
Beware of code size though. There's a reason this isn't even an exposed option lol |
Ah, awesome, thanks for the info :)
David Zemon <[email protected]> schrieb am Do., 31. Jan. 2019, 13:30:
… Yep, but that should be a different problem from pthread btw
target_link_libraries(my_target PUBLIC stdc++)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#148 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHwpZibQhOCwYtcBIMUz_YlmpVRageRaks5vIuHsgaJpZM4aDIF_>
.
|
Very likely this is a user error, but I am not sure and out of ideas how to resolve it.
(.text.startup.main+0xb8): undefined reference to 'pthread_create(_thread**, pthread_attr_t const*, void* (*)(void*), void*)'
I am in XMMC memory model and trying to use pthread instead of cogrun as that apperently only works in lmm mode. (if there are other ways around that limitation I am open to new ideas.)
Cmake file:
Thanks for all the help.
The text was updated successfully, but these errors were encountered: