Error compiling pkg port

Hi to all!
I'm having problems compiling pkg 1.8.3 in one of the servers. The OS is 9.1-RELEASE FreeBSD 9.1-RELEASE, I know is old, we are planning to upgrade really soon. As usual I've updated the ports tree and the from within a jail I try to make the pkg port.
The error I have is:
Code:
CC  libpkg_la-pkg_cudf.lo
pkg_add.c: In function 'set_attrs':
pkg_add.c:214: warning: passing argument 1 of 'getcwd' from incompatible pointer type
pkg_add.c:237: warning: passing argument 1 of 'chdir' from incompatible pointer type
  CC  libpkg_static_la-pkg_cudf.lo
  CC  libpkg_la-pkg_create.lo
pkg_add.c: In function 'set_attrs':
pkg_add.c:214: warning: passing argument 1 of 'getcwd' from incompatible pointer type
pkg_add.c:237: warning: passing argument 1 of 'chdir' from incompatible pointer type
  CC  libpkg_static_la-pkg_create.lo
pkg.c: In function 'pkg_open_root_fd':
pkg.c:1796: error: 'F_DUPFD_CLOEXEC' undeclared (first use in this function)
pkg.c:1796: error: (Each undeclared identifier is reported only once
pkg.c:1796: error: for each function it appears in.)
pkg.c: In function 'pkg_open_root_fd':
pkg.c:1796: error: 'F_DUPFD_CLOEXEC' undeclared (first use in this function)
pkg.c:1796: error: (Each undeclared identifier is reported only once
pkg.c:1796: error: for each function it appears in.)
*** [libpkg_la-pkg.lo] Error code 1
*** [libpkg_static_la-pkg.lo] Error code 1
2 errors
*** [all-recursive] Error code 1
1 error
*** [all-recursive] Error code 1
1 error
*** [all] Error code 2
1 error


I've tried on another jail and the problem is the same.
Any help would be appreciated (and sorry for my English ;) ).
 
According to https://wiki.freebsd.org/AtomicCloseOnExec F_DUPFD_CLOEXEC was added in 9.2, so 9.1-RELEASE doesn't have it (https://svnweb.freebsd.org/base?view=revision&revision=239856).

So options are
 
According to https://wiki.freebsd.org/AtomicCloseOnExec F_DUPFD_CLOEXEC was added in 9.2, so 9.1-RELEASE doesn't have it (https://svnweb.freebsd.org/base?view=revision&revision=239856).

So options are
Thanks for the reply, we well decide what to do.
 
use a pkg version before May 2016 i.e. <= 1.7.2, e.g. by using the quarterly branch (currently 2016Q2) of the ports tree which gets security updates only and still has pkg 1.7.2 and plan to do your system upgrade before July 2016
I would actually suggest upgrading to 10.3-RELEASE. The whole 9.x branch will be end-of-life at the end of this year.
 
Back
Top