Bug 180648 - ftp/curl 7.31.0 failed to compile with LDAP
Summary: ftp/curl 7.31.0 failed to compile with LDAP
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-19 09:50 UTC by Stephane D'Alu
Modified: 2013-09-18 23:21 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane D'Alu 2013-07-19 09:50:00 UTC
Some sanity check are triggered during configure to force use of CPPFLAGS (instead of actual CFLAGS) for -DLDAP_DEPRECATED

configure: using CFLAGS: -O2 -pipe -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.

How-To-Repeat: $ cd /usr/ports/ftp/curl
$ make config

enable LDAP

$ make
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-07-19 10:37:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sunpoet

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Stephane D'Alu 2013-07-19 11:23:22 UTC
A fix seems to edit /usr/ports/Mk/bsd.ldap.mk
to change:
CFLAGS+=  -DLDAP_DEPRECATED
to:
CPPFLAGS+=  -DLDAP_DEPRECATED

but i don't know the consequences on other ports

-- 
Stephane D'Alu
Comment 3 mueller6724 2013-08-03 06:28:12 UTC
> From: 	Stephane D'Alu <Stephane.DAlu@insa-lyon.fr> [submitter]
> To: 	bug-followup@FreeBSD.org, Stephane.Dalu@insa-lyon.fr
> Date: 	Fri, 19 Jul 2013 12:23:22 +0200
> A fix seems to edit /usr/ports/Mk/bsd.ldap.mk
> to change:
> CFLAGS+= -DLDAP_DEPRECATED
> to:
> CPPFLAGS+= -DLDAP_DEPRECATED

> but i don't know the consequences on other ports

-- 
> Stephane D'Alu

I searched the problem report database and found the PR, 
tried the solution by modifying $PORTSDIR/Mk/bsd.ldap.mk
and it worked.

I was able to build/portmaster ftp/curl and ports that depended on ftp/curl.

I don't know if there would be adverse consequences on other ports, but
suspect CFLAGS instead of CPPFLAGS might have just been an error.

Thomas Mueller
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-09-18 23:13:30 UTC
Author: sunpoet
Date: Wed Sep 18 22:13:21 2013
New Revision: 327585
URL: http://svnweb.freebsd.org/changeset/ports/327585

Log:
  - Disable CFLAGS=-D* check temporarily: workaround for LDAP issue [1] and CPUTYPE [2]
  - Remove note in pre-configure: since it does not help to avoid bug-report mails
  
  PR:		ports/177401 [1], ports/180648 [1], ports/180944 [2]

Modified:
  head/ftp/curl/Makefile
  head/ftp/curl/files/patch-configure

Modified: head/ftp/curl/Makefile
==============================================================================
--- head/ftp/curl/Makefile	Wed Sep 18 22:03:12 2013	(r327584)
+++ head/ftp/curl/Makefile	Wed Sep 18 22:13:21 2013	(r327585)
@@ -250,16 +250,6 @@ post-patch:
 	@${REINPLACE_CMD} -e 's|\(flags_dbg_off=\)".*"|\1""|; s|\(flags_opt_off=\)".*"|\1""|' ${WRKSRC}/configure
 	@${REINPLACE_CMD} -e '/^SUBDIRS = / s|$$| docs|; /^DIST_SUBDIRS = / s| docs||; /cd docs &&/d' ${WRKSRC}/Makefile.in
 
-pre-configure:
-.if ${PORT_OPTIONS:MLDAP}
-	@${ECHO_MSG} "Note:"
-	@${ECHO_MSG} ""
-	@${ECHO_MSG} "  Enabling LDAP option is known to fail with unpatched Mk/bsd.ldap.mk."
-	@${ECHO_MSG} "  See PR/177401 for detailed information."
-	@${ECHO_MSG} "  URL: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/177401"
-	@${ECHO_MSG} ""
-.endif
-
 post-install:
 .if !defined(BUILDING_HIPHOP)
 	${INSTALL_DATA} ${WRKSRC}/docs/libcurl/libcurl.m4 ${PREFIX}/share/aclocal/

Modified: head/ftp/curl/files/patch-configure
==============================================================================
--- head/ftp/curl/files/patch-configure	Wed Sep 18 22:03:12 2013	(r327584)
+++ head/ftp/curl/files/patch-configure	Wed Sep 18 22:13:21 2013	(r327585)
@@ -6,19 +6,32 @@ Forwarded: not-needed
 Author: Peter Pentchev <roam@FreeBSD.org>
 Last-Update: 2010-12-19
 
---- configure.orig	2013-02-06 17:47:26.000000000 +0800
-+++ configure	2013-02-18 18:25:16.000000000 +0800
-@@ -16651,6 +16651,9 @@
+--- configure.orig	2013-06-22 06:29:35.000000000 +0800
++++ configure	2013-09-18 01:39:42.256041308 +0800
+@@ -3626,9 +3626,10 @@
+   xc_bad_var_cflags=no
+   for xc_word in $CFLAGS; do
+     case "$xc_word" in
+-      -D*)
+-        xc_bad_var_cflags=yes
+-        ;;
++# Temporarily disable -D* flag check (PR/177401, PR/180944)
++#      -D*)
++#        xc_bad_var_cflags=yes
++#        ;;
+       -U*)
+         xc_bad_var_cflags=yes
+         ;;
+@@ -16912,6 +16913,8 @@
      tmp_CFLAGS="$CFLAGS"
      tmp_CPPFLAGS="$CPPFLAGS"
  
-+# Do not remove the user-supplied debug flags in CFLAGS
-+# PR: 150854
++# Do not remove the user-supplied debug flags in CFLAGS (PR/150854)
 +if false; then
      ac_var_stripped=""
    for word1 in $tmp_CFLAGS; do
      ac_var_strip_word="no"
-@@ -16681,6 +16684,7 @@
+@@ -16942,6 +16945,7 @@
    done
      tmp_CPPFLAGS="$ac_var_stripped"
    squeeze tmp_CPPFLAGS
@@ -26,17 +39,16 @@ Last-Update: 2010-12-19
  
      #
      if test "$want_debug" = "yes"; then
-@@ -16898,6 +16902,9 @@
+@@ -17159,6 +17163,8 @@
      #
      if test "$honor_optimize_option" = "yes"; then
  
-+# Do not remove the user-supplied optimization flags in CFLAGS
-+# PR: 150854
++# Do not remove the user-supplied optimization flags in CFLAGS (PR/150854)
 +if false; then
      ac_var_stripped=""
    for word1 in $tmp_CFLAGS; do
      ac_var_strip_word="no"
-@@ -16928,6 +16935,7 @@
+@@ -17189,6 +17195,7 @@
    done
      tmp_CPPFLAGS="$ac_var_stripped"
    squeeze tmp_CPPFLAGS
@@ -44,7 +56,7 @@ Last-Update: 2010-12-19
  
        if test "$want_optimize" = "yes"; then
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts optimizer enabling options" >&5
-@@ -21379,7 +21387,8 @@
+@@ -21614,7 +21621,8 @@
          PKGTEST="no"
      PREFIX_OPENSSL=$OPT_SSL
  
@@ -54,7 +66,7 @@ Last-Update: 2010-12-19
      { $as_echo "$as_me:${as_lineno-$LINENO}: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&5
  $as_echo "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;}
      if test -f "$OPENSSL_PCDIR/openssl.pc"; then
-@@ -24725,29 +24734,30 @@
+@@ -24962,29 +24970,30 @@
      ;;
    off)
          LIB_RTMP="-lrtmp"
@@ -94,3 +106,17 @@ Last-Update: 2010-12-19
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
+@@ -39256,9 +39265,10 @@
+   xc_bad_var_cflags=no
+   for xc_word in $CFLAGS; do
+     case "$xc_word" in
+-      -D*)
+-        xc_bad_var_cflags=yes
+-        ;;
++# Temporarily disable -D* flag check (PR/177401, PR/180944)
++#      -D*)
++#        xc_bad_var_cflags=yes
++#        ;;
+       -U*)
+         xc_bad_var_cflags=yes
+         ;;
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Po-Chuan Hsieh freebsd_committer freebsd_triage 2013-09-18 23:21:44 UTC
State Changed
From-To: open->closed

Fixed in r327585.