ports/177812: Can't build Firefox 20 on FreeBSD 9.1
Jan Beich
jbeich at tormail.org
Wed Apr 17 09:20:02 UTC 2013
The following reply was made to PR ports/177812; it has been noted by GNATS.
From: Jan Beich <jbeich at tormail.org>
To: Michael Fausten <ports at michael-fausten.de>
Cc: bug-followup at freebsd.org
Subject: Re: ports/177812: Can't build Firefox 20 on FreeBSD 9.1
Date: Tue, 16 Apr 2013 22:11:44 -1100
Michael Fausten <ports at michael-fausten.de> writes:
> Am 13.04.2013 03:04, schrieb Jan Beich:
>
>> Michael Fausten <ports at michael-fausten.de> writes:
>>
>>> FreeBSD glaukos 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #0: Mon Jun 11
>>> 23:52:38 UTC 2012
>>> root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386
>> [...]
>>> g++46 -o FileUtils.o ...
>>> /usr/ports/www/firefox/work/mozilla-release/xpcom/glue/FileUtils.cpp:
>>> In function 'bool mozilla::fallocate(PRFileDesc*, int64_t)':
>>> /usr/ports/www/firefox/work/mozilla-release/xpcom/glue/FileUtils.cpp:25:67:
>>> error: 'posix_fallocate' was not declared in this scope
>> Try adding the following line into FileUtils.cpp before <fcntl.h>.
>>
>> #define _XOPEN_SOURCE 600
>>
>> If it does help try checking which macro affects __BSD_VISIBLE and
>> __POSIX_VISIBLE by inspecting compiler output from adding -E to cflags.
>
> Firstly, I want to clarify that the target OS is FreeBSD 8.3 and not
> 9.1 I accidentally wrote. Sorry if that might confused.
>
> I added "#define _XOPEN_SOURCE 600" to my
> work/mozilla-release/xpcom/glue/FileUtils.cpp, but unfortunately it
> didn't help :(
Make sure your /usr/include/fcntl.h is identical to
http://svnweb.freebsd.org/base/releng/8.3/sys/sys/fcntl.h?view=co
I guess you have libc with posix_fallocate() but not declared in fcntl.h
which can be illustrated as
// test.c: snippet from configure
#define _XOPEN_SOURCE 600
#include <fcntl.h>
int main()
{
posix_fallocate(0, 0, 0);
return 0;
}
# if succeeds configure defines HAVE_POSIX_FALLOCATE
$ gcc46 -Wall test.c
test.c: In function 'main':
test.c:7:5: warning: implicit declaration of function 'posix_fallocate' [-Wimplicit-function-declaration]
# but FileUtils.cpp is built with C++ compiler
$ g++46 -Wall test.c
test.c: In function 'int main()':
test.c:7:28: error: 'posix_fallocate' was not declared in this scope
Exit 1
--
an interrupted upgrade left the system in an inconsistent state?
More information about the freebsd-gecko
mailing list