-
Notifications
You must be signed in to change notification settings - Fork 321
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
CentOS 7: pthread_setname_np issue #39
Comments
cc @amyspark |
Yes, my mistake (I was setting up Travis in my fork and it bit me). I've amended #38 to close this issue as well. |
The same file src/libcore/thread.cpp, line 444 : pthread_setname_np(threadName.c_str()); line 444 runs on OSX, I wonder whether it has the same issue ? @amyspark |
Line 444 works in MacOS because its pthreads library does not require the thread name. Conversely, Linux does, and this is why the build breaks in line 637:
My mistake was in #34, I replaced the old |
Mitsuba 0.6.0 works well on CentOS 7, thanks a lot. @amyspark |
src/libcore/thread.cpp: In static member function ‘static void mitsuba::Thread::initializeOpenMP(size_t)’:
src/libcore/thread.cpp:637:53: error: invalid conversion from ‘const char*’ to ‘pthread_t {aka long unsigned int}’ [-fpermissive]
pthread_setname_np(threadName.c_str());
^
src/libcore/thread.cpp:637:54: error: too few arguments to function ‘int pthread_setname_np(pthread_t, const char*)’
pthread_setname_np(threadName.c_str());
I modify pthread_setname_np(threadName.c_str()); to pthread_setname_np((pthread_self(),threadName.c_str()); It's OK.
The text was updated successfully, but these errors were encountered: