Bug 181929 - net/openldap24-server: libtool: compile: gcc -g -O2 -Wall -DDO_SAMBA -I../../../include -I../../../include -I../../../servers/slapd -I/usr/heimdal/include -c smbk5pwd.c -fPIC -DPIC -o .libs/smbk5pwd.o eval: gcc: not found *** Error cod
Summary: net/openldap24-server: libtool: compile: gcc -g -O2 -Wall -DDO_SAMBA -I../.....
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: Xin LI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-08 08:20 UTC by O. Hartmann
Modified: 2013-09-09 14:50 UTC (History)
0 users

See Also:


Attachments
file.diff (1.24 KB, patch)
2013-09-08 08:20 UTC, O. Hartmann
no flags Details | Diff
openldap-sasl-client-2.4.36.log (7.07 KB, text/plain; charset=UTF-8)
2013-09-09 14:48 UTC, crest
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2013-09-08 08:20:00 UTC
After having built a world on CURRENT r255356 and having done "make delete-old" the outdated gnuish compiler stuff gets deleted. After that, port net/openldap[-sasl]-server rejects to compile due to the shown error.

Somehwere the compiler seems to be hardcoded. This somewhere is file

contrib/slapd-modules/smbk5pwd/Makefile.



[...] 
--- all-common ---
for page in slapacl.8            slapadd.8               slapauth.8              slapcat.8               slapd.8                 slapdn.8               slapindex.8              slappasswd.8            slapschema.8            slaptest.8; do  sed -e "s%LDVERSION%2.4.36%"  -e 's%ETCDIR%/usr/local/etc/openldap%g'  -e 's%LOCALSTATEDIR%/var/db%'  -e 's%SYSCONFDIR%/usr/local/etc/openldap%'  -e 's%DATADIR%/usr/local/share/openldap%'  -e 's%SBINDIR%/usr/local/sbin%'  -e 's%BINDIR%/usr/local/bin%'  -e 's%LIBDIR%/usr/local/lib%'  -e 's%LIBEXECDIR%/usr/local/libexec%'  -e 's%MODULEDIR%/usr/local/libexec/openldap%'  -e 's%RELEASEDATE%2013/08/17%'  ./$page  | (cd .; soelim -) > $page.tmp;  done
 
/usr/local/bin/libtool --mode=compile gcc -g -O2 -Wall -DDO_SAMBA -I../../../include -I../../../include -I../../../servers/slapd -I/usr/heimdal/include  -c smbk5pwd.c
libtool: compile:  gcc -g -O2 -Wall -DDO_SAMBA -I../../../include -I../../../include -I../../../servers/slapd -I/usr/heimdal/include -c smbk5pwd.c  -fPIC -DPIC -o .libs/smbk5pwd.o
eval: gcc: not found
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/net/openldap24-server/work/openldap-2.4.36/contrib/slapd-modules/smbk5pwd
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/openldap24-server
*** Error code 1

Stop.
make: stopped in /usr/ports/net/openldap24-server

===>>> make failed for net/openldap24-server
===>>> Aborting update

===>>> Killing background jobs

Fix: I attached a patch, simple one without knowing why people had hardcoded CC/gcc.

Patch attached with submission follows:
How-To-Repeat: Stay with most recent CURRENT, follow all deletions of GNU stuff (make delete-old), start building this port.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-09-08 08:20:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->delphij

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-09-08 10:00:01 UTC
Author: delphij
Date: Sun Sep  8 08:59:54 2013
New Revision: 326714
URL: http://svnweb.freebsd.org/changeset/ports/326714

Log:
  Don't assume that the user have gcc and do not override default CFLAGS.
  
  PR:		ports/181929
  Reported by:	O. Hartmann <ohartman zedat fu-berlin de>

Modified:
  head/net/openldap24-server/Makefile

Modified: head/net/openldap24-server/Makefile
==============================================================================
--- head/net/openldap24-server/Makefile	Sun Sep  8 08:54:25 2013	(r326713)
+++ head/net/openldap24-server/Makefile	Sun Sep  8 08:59:54 2013	(r326714)
@@ -56,7 +56,7 @@ BROKEN=			incompatible OpenLDAP version:
 .endif
 
 PORTREVISION_CLIENT=	0
-PORTREVISION_SERVER=	0
+PORTREVISION_SERVER=	1
 OPENLDAP_SHLIB_MAJOR=	8
 
 OPTIONS_DEFINE=	FETCH
@@ -501,6 +501,10 @@ PLIST_SUB+=		SHLIB_MAJOR=${OPENLDAP_SHLI
 post-patch:
 	@${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/run/,${LDAP_RUN_DIR}/,g' \
 		${SED_MODULES} ${WRKSRC}/servers/slapd/slapd.conf
+	@${REINPLACE_CMD} -e 's,^OPT =.*,OPT = ${CFLAGS},g' \
+		-e 's,^CC =.*,CC = ${CC},g' \
+		${SED_MODULES} ${WRKSRC}/contrib/slapd-modules/*/Makefile \
+		${WRKSRC}/contrib/slapd-modules/*/*/Makefile
 .if defined(CONFIGURE_SED)
 	@${REINPLACE_CMD} -E ${CONFIGURE_SED} \
 		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
_______________________________________________
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 3 Xin LI freebsd_committer freebsd_triage 2013-09-08 10:00:22 UTC
State Changed
From-To: open->closed

Fixed in HEAD.
Comment 4 crest 2013-09-09 14:48:35 UTC
The fix for this PR committed as r326714 to the ports breaks
net/openldap24-server (and the clients ports including its Makefile) in
the patch phase on FreeBSD 9.1/amd64.

===>  Patching for openldap-sasl-client-2.4.36
===>  Applying FreeBSD patches for openldap-sasl-client-2.4.36
sed: 1: "s,^OPT =.*,OPT = -O2 -p ...": bad flag in substitute command: '-'
*** [post-patch] Error code 1

Complete log of the failed build attached as
openldap-sasl-client-2.4.36.log.