Boost C++ Libraries: Ticket #5936: Missing prototype for pthread_mutex_timedlock causes Oracle/SUN CC to fail on Linux https://svn.boost.org/trac10/ticket/5936 <p> CC: Sun C++ 5.11 Linux_i386 2010/08/13 usage: CC [ options ] files. Use 'CC -flags' for details </p> <p> "./boost/thread/pthread/mutex.hpp", line 154: Error: The function "pthread_mutex_timedlock" must have a prototype. </p> <p> "./boost/thread/pthread/mutex.hpp", line 154: Error: The function "pthread_mutex_timedlock" must have a prototype. </p> <p> "/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. </p> <blockquote> <p> "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" </p> </blockquote> <p> ...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... </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5936 Trac 1.4.3 Peter Loibl <boost@…> Tue, 27 Sep 2011 18:03:16 GMT <link>https://svn.boost.org/trac10/ticket/5936#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5936#comment:1</guid> <description> <p> It seems that CC does not use -D_GNU_SOURCE (see ticket <a class="assigned ticket" href="https://svn.boost.org/trac10/ticket/5937" title="#5937: Bugs: Sun C++ 5.11 Linux compilation errors: operations.cpp (assigned)">#5937</a>). 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). </p> </description> <category>Ticket</category> </item> <item> <author>Peter Loibl <boost@…></author> <pubDate>Tue, 27 Sep 2011 18:03:52 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/5936 https://svn.boost.org/trac10/ticket/5936 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">warning.out</span> </li> </ul> Ticket viboes Fri, 02 Dec 2011 22:12:12 GMT owner, status changed; cc set https://svn.boost.org/trac10/ticket/5936#comment:2 https://svn.boost.org/trac10/ticket/5936#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">viboes</span> added </li> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> I don't know I understand correctly. </p> <p> Could you send the file where pthread_mutex_timedlock is defined? </p> <p> 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? </p> Ticket viboes Sun, 04 Dec 2011 09:33:28 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5936#comment:3 https://svn.boost.org/trac10/ticket/5936#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Duplicate of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3639" title="#3639: Bugs: Boost.Thread doesn't build with Sun-5.9 on Linux (closed: fixed)">#3639</a> Boost.Thread doesn't build with Sun-5.9 on Linux </p> Ticket