Boost C++ Libraries: Ticket #5234: Boost 1.46 doesn't build on FreeBSD 7.1-RELEASE https://svn.boost.org/trac10/ticket/5234 <pre class="wiki">kvs@tishina boost_1_46_0:&gt; ./bootstrap.sh Building Boost.Jam with toolset gcc... Failed to build Boost.Jam Consult 'bootstrap.log' for more details kvs@tishina boost_1_46_0:&gt; cat bootstrap.log ### ### Using 'gcc' toolset. ### rm -rf bootstrap mkdir bootstrap gcc -o bootstrap/jam0 command.c compile.c debug.c expand.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c newstr.c option.c output.c parse.c pathunix.c pathvms.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c jam.c: In function 'executable_path': jam.c:615: warning: incompatible implicit declaration of built-in function 'strndup' /var/tmp//ccApIIrd.o(.text+0xc48): In function `executable_path': : undefined reference to `strndup' </pre><p> I seems that FreeBSD 7.1 doesn't have strndup() function. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5234 Trac 1.4.3 grayaii Wed, 07 Sep 2011 12:38:33 GMT <link>https://svn.boost.org/trac10/ticket/5234#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5234#comment:1</guid> <description> <p> Hi, have you found a workaround for this? (ie implementing strndup yourself or compiling on FreeBSD 8.x, etc. etc.) Thanks! </p> </description> <category>Ticket</category> </item> <item> <author>gtpoxa@…</author> <pubDate>Tue, 19 Feb 2013 22:51:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5234#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5234#comment:2</guid> <description> <p> Is it possbile to buil boost-jam on freebsd 7.1? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 05 Mar 2013 13:42:16 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5234#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5234#comment:3</guid> <description> <p> edit <code>tools/build/v2/engine/jam.c</code> and replace (at 2 places) </p> <pre class="wiki">strndup(buf, size) </pre><p> by </p> <pre class="wiki">strdup(buf) </pre><p> At least you will be able to build j2 to then build boost. </p> </description> <category>Ticket</category> </item> <item> <author>Kohei Takahashi <flast@…></author> <pubDate>Thu, 09 Oct 2014 05:57:58 GMT</pubDate> <title>component changed; cc, owner set https://svn.boost.org/trac10/ticket/5234#comment:4 https://svn.boost.org/trac10/ticket/5234#comment:4 <ul> <li><strong>cc</strong> <span class="trac-author">flast@…</span> added </li> <li><strong>owner</strong> set to <span class="trac-author">Vladimir Prus</span> </li> <li><strong>component</strong> <span class="trac-field-old">Building Boost</span> → <span class="trac-field-new">build</span> </li> </ul> <p> This is boost.build's issue. And is FreeBSD 7 still supported? </p> Ticket Vladimir Prus Thu, 09 Oct 2014 06:08:07 GMT <link>https://svn.boost.org/trac10/ticket/5234#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5234#comment:5</guid> <description> <p> The second use of strndup in jam.c is for linux case, I don't think it has to change, especially given that readlink documentation does not state that it will zero-terminate the string. I'd be happy to accept a pull request for FreeBSD 7, assuming it includes a comment explaining why on FreeBSD, the string will be zero-terminated and therefore using strdup is safe. I don't have access to FreeBSD to try this myself. </p> </description> <category>Ticket</category> </item> </channel> </rss>