On Aug 8, 2013, at 20:02, O. Hartmann <ohart...@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):

CFLAGS+=    -DLDAP_DEPRECATED

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
about CPPFLAGS.

Probably the easiest workaround for your case, if you can miss LDAP
support, is to just turn off the LDAP option.

-Dimitry

_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to