Opened 12 years ago
Last modified 8 years ago
#5234 new Bugs
Boost 1.46 doesn't build on FreeBSD 7.1-RELEASE
Reported by: | Owned by: | Vladimir Prus | |
---|---|---|---|
Milestone: | To Be Determined | Component: | build |
Version: | Boost 1.46.0 | Severity: | Problem |
Keywords: | Cc: | flast@… |
Description
kvs@tishina boost_1_46_0:> ./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:> 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'
I seems that FreeBSD 7.1 doesn't have strndup() function.
Change History (5)
comment:1 by , 11 years ago
comment:3 by , 10 years ago
edit tools/build/v2/engine/jam.c
and replace (at 2 places)
strndup(buf, size)
by
strdup(buf)
At least you will be able to build j2 to then build boost.
comment:4 by , 8 years ago
Cc: | added |
---|---|
Component: | Building Boost → build |
Owner: | set to |
This is boost.build's issue. And is FreeBSD 7 still supported?
comment:5 by , 8 years ago
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.
Hi, have you found a workaround for this? (ie implementing strndup yourself or compiling on FreeBSD 8.x, etc. etc.) Thanks!