Boost C++ Libraries: Ticket #5937: Sun C++ 5.11 Linux compilation errors: operations.cpp https://svn.boost.org/trac10/ticket/5937 <p> CC: Sun C++ 5.11 Linux_i386 2010/08/13 usage: CC [ options ] files. Use 'CC -flags' for details </p> <p> "libs/filesystem/v3/src/operations.cpp", line 1760: Error: DT_UNKNOWN is not defined. </p> <p> "libs/filesystem/v3/src/operations.cpp", line 1766: Error: DT_DIR is not defined. </p> <p> "libs/filesystem/v3/src/operations.cpp", line 1768: Error: DT_REG is not defined. </p> <p> "libs/filesystem/v3/src/operations.cpp", line 1770: Error: DT_LNK is not defined. </p> <p> 4 Error(s) detected. </p> <blockquote> <p> "CC" -library=stlport4 -xO4 -mt -erroff=%none -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -I"." -c -o "/home/pal/work/cpp/tmp/boost/bin.v2/libs/filesystem/build/sun/release/address-model-64/link-static/stdlib-sun-stlport/threading-multi/v3/src/operations.o" "libs/filesystem/v3/src/operations.cpp" </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5937 Trac 1.4.3 Peter Loibl <boost@…> Sat, 24 Sep 2011 12:47:39 GMT component changed; owner set https://svn.boost.org/trac10/ticket/5937#comment:1 https://svn.boost.org/trac10/ticket/5937#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Beman Dawes</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">filesystem</span> </li> </ul> Ticket Beman Dawes Sun, 25 Sep 2011 12:02:52 GMT status changed https://svn.boost.org/trac10/ticket/5937#comment:2 https://svn.boost.org/trac10/ticket/5937#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> The implication of those error messages is that something is really whacky about your dirent.h </p> <p> I need to see the contents of dirent.h for the library you are using. Please either send me a copy or post a link to somewhere I can view it. </p> <p> Thanks, </p> <p> --Beman </p> Ticket Peter Loibl <boost@…> Tue, 27 Sep 2011 17:02:47 GMT <link>https://svn.boost.org/trac10/ticket/5937#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5937#comment:3</guid> <description> <p> Hi! </p> <p> No problem. I attached the header file. Looking into the header file, it seems that the features.h file might be of interest as well. Is my assumption correct, that the function that you are using is the readdir() function is this context? If yes, then the man page for readdir() gives the following hint: </p> <div class="wiki-code"><div class="code"><pre> <span class="n">Feature</span> <span class="n">Test</span> <span class="n">Macro</span> <span class="n">Requirements</span> <span class="k">for</span> <span class="n">glibc</span> <span class="p">(</span><span class="n">see</span> <span class="n">feature_test_macros</span><span class="p">(</span><span class="mi">7</span><span class="p">))</span><span class="o">:</span> <span class="n">readdir_r</span><span class="p">()</span><span class="o">:</span> <span class="n">_POSIX_C_SOURCE</span> <span class="o">&gt;=</span> <span class="mi">1</span> <span class="o">||</span> <span class="n">_XOPEN_SOURCE</span> <span class="o">||</span> <span class="n">_BSD_SOURCE</span> <span class="o">||</span> <span class="n">_SVID_SOURCE</span> <span class="o">||</span> <span class="n">_POSIX_SOURCE</span> </pre></div></div><p> I also attached the output that the pre-processor is generating The output of the pre-processor has been created with the following command: </p> <p> CC -E -library=stlport4 -xO4 -mt -erroff=%none -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -I"." libs/filesystem/v3/src/operations.cpp &gt; ../operations.i </p> <p> Cheers, Peter Loibl </p> </description> <category>Ticket</category> </item> <item> <author>Peter Loibl <boost@…></author> <pubDate>Tue, 27 Sep 2011 17:04:37 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/5937 https://svn.boost.org/trac10/ticket/5937 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">usr_include_dirent.h</span> </li> </ul> <p> dirent.h </p> Ticket Peter Loibl <boost@…> Tue, 27 Sep 2011 17:05:54 GMT attachment set https://svn.boost.org/trac10/ticket/5937 https://svn.boost.org/trac10/ticket/5937 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">features.h</span> </li> </ul> <p> features.h </p> Ticket Peter Loibl <boost@…> Tue, 27 Sep 2011 17:06:49 GMT attachment set https://svn.boost.org/trac10/ticket/5937 https://svn.boost.org/trac10/ticket/5937 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">operations.i.gz</span> </li> </ul> <p> C-Preprocessor output (gzipped) </p> Ticket Peter Loibl <boost@…> Tue, 27 Sep 2011 17:59:30 GMT <link>https://svn.boost.org/trac10/ticket/5937#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5937#comment:4</guid> <description> <p> One more hint from my side: </p> <p> It seems that GNU-C++ does add -D_GNU_SOURCE automatically, CC does not. If I call CC and add -D_GNU_SOURCE to the compile arguments, then the source compiles fine :) Intel C++ seems to add -D_GNU_SOURCE automatically as well. </p> <p> I attached the detailed call arguments for an empty C++ file for demonstration purposes. </p> </description> <category>Ticket</category> </item> <item> <author>Peter Loibl <boost@…></author> <pubDate>Tue, 27 Sep 2011 17:59:51 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/5937 https://svn.boost.org/trac10/ticket/5937 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">compilers</span> </li> </ul> Ticket