ftp/curl: FAILURE due to configure: using CFLAGS: -DLDAP_DEPRECATED
dim at FreeBSD.org
Thu Aug 8 19:06:55 UTC 2013
On Aug 8, 2013, at 20:02, O. Hartmann <ohartman at zedat.fu-berlin.de> wrote:
> On several most recently update FreeBSD 10.0-CURRENT machines the
> update of port ftp/curl went smoothly, but on exactly one box the
> portbuild fails with a very strange error:
> configure: using CFLAGS: -O2 -pipe -O3 -march=native -DLDAP_DEPRECATED
> -fno-strict-aliasing configure: CFLAGS error: CFLAGS may only be used
> to specify C compiler flags, not macro definitions. Use CPPFLAGS for:
> -DLDAP_DEPRECATED configure: error: Can not continue. Fix errors
> mentioned immediately above this line.
> I haven't set -DLDAP_DEPRECATED nor in /etc/make.conf neither
> in /etc/src.conf nor can I find in /etc or //usr/local/etc any settings
> of such a flag for CFLAGS! I delete /usr/ports/Mk
> and /usr/ports/Templates and checked them out again via subversion, but
> this mysterious CFLAGS setting is sticky like hell.
This is most likely because you are building the curl port with the LDAP
option on. Whenever this option is on, the port defines
USE_OPENLDAP=yes, and this pulls in /usr/ports/Mk/bsd.ldap.mk, which has
(around line 66):
It is a GNU convention to use CPPFLAGS for preprocessor-specific
compiler options, but the level of checking in this configure script is
overdoing it a little bit, in my opinion.
We can't just change the above line to read CPPFLAGS+=
-DLDAP_DEPRECATED, since a lot of other software does not use nor cares
Probably the easiest workaround for your case, if you can miss LDAP
support, is to just turn off the LDAP option.
More information about the freebsd-ports