Opened 11 years ago
Closed 11 years ago
#5936 closed Bugs (duplicate)
Missing prototype for pthread_mutex_timedlock causes Oracle/SUN CC to fail on Linux
Reported by: | Owned by: | viboes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | thread |
Version: | Boost 1.47.0 | Severity: | Problem |
Keywords: | Cc: | viboes |
Description
CC: Sun C++ 5.11 Linux_i386 2010/08/13 usage: CC [ options ] files. Use 'CC -flags' for details
"./boost/thread/pthread/mutex.hpp", line 154: Error: The function "pthread_mutex_timedlock" must have a prototype.
"./boost/thread/pthread/mutex.hpp", line 154: Error: The function "pthread_mutex_timedlock" must have a prototype.
"/usr/include/linux/kernel.h", line 26: Error: An array cannot have zero size unless you use the option -features=zla. 3 Error(s) detected.
"CC" -library=stlport4 -xO4 -mt -erroff=%none -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_POSIX -DNDEBUG -I"." -c -o "/home/pal/work/cpp/tmp/boost/bin.v2/libs/thread/build/sun/release/address-model-64/link-static/stdlib-sun-stlport/threading-multi/pthread/thread.o" "libs/thread/src/pthread/thread.cpp"
...failed sun.compile.c++ /home/pal/work/cpp/tmp/boost/bin.v2/libs/thread/build/sun/release/address-model-64/link-static/stdlib-sun-stlport/threading-multi/pthread/thread.o...
Attachments (1)
Change History (4)
comment:1 by , 11 years ago
by , 11 years ago
Attachment: | warning.out added |
---|
comment:2 by , 11 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Status: | new → assigned |
I don't know I understand correctly.
Could you send the file where pthread_mutex_timedlock is defined?
It is up to the user to add the -D_GNU_SOURCE manually in your configuration? If yes, which of the warnings are related to Boost.Thread?
comment:3 by , 11 years ago
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
Duplicate of #3639 Boost.Thread doesn't build with Sun-5.9 on Linux
It seems that CC does not use -D_GNU_SOURCE (see ticket #5937). If I call CC and add -D_GNU_SOURCE manually, then the source file complies without an error, but generates a rather huge warning (see attached file).