Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Mar 2007 06:20:11 +0300
From:      Alexander Zhuravlev <zaa@zaa.pp.ru>
To:        freebsd-ports@freebsd.org
Subject:   Re: php4 port - undefined ref to getopt_long
Message-ID:  <20070316032011.GB79888@orion.ulstu.ru>

next in thread | raw e-mail | index | archive | help

> 3) today i stopped being able to build php4 -- i get the following
> error
> that stops the upgrade:

> ext/standard/basic_functions.lo(.text+0x1507): undefined reference to
> `getopt_long'

If you still would like to build PHP on FreeBSD 4.11 you need to open
/usr/ports/Mk/bsd.port.mk and return the following code:

.if defined(USE_GETOPT_LONG)
.if ${OSVERSION} < 500041
LIB_DEPENDS+=   gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
CPPFLAGS+=              -I${LOCALBASE}/include
LDFLAGS+=               -L${LOCALBASE}/lib -lgnugetopt
CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
.endif
.endif

It can be added below this line:

.endif # USE_FAM

At least this resolved the issue for me.

PS. As an alternative you may move to pkgsrc (http://pkgsrc.org).
According to pkgsrc.org it supports FreeBSD and there is bootstrap code for
FreeBSD 4.7:
ftp://ftp.netbsd.org/pub/pkgsrc/packages/bootstrap-pkgsrc/bootstrap-pkgsrc-FreeBSD-4.7-RELEASE-i386-20021211.tar.gz




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070316032011.GB79888>