Bug 183432 - Port benchmarks/bonnie++ does not compile on clang
Summary: Port benchmarks/bonnie++ does not compile on clang
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: Ganael LAPLANCHE
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-29 06:40 UTC by Kenji Rikitake
Modified: 2013-11-06 08:30 UTC (History)
0 users

See Also:


Attachments
file.diff (255 bytes, patch)
2013-10-29 06:40 UTC, Kenji Rikitake
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenji Rikitake 2013-10-29 06:40:00 UTC
Port benchmark/bonnie++ does not compile with clang.

Fix: Setting USE_GCC=yes in the Makefile solved the problem. Patch attached.

Patch attached with submission follows:
How-To-Repeat: cd /usr/ports/benchmark/bonnie++
make clean && make
Comment 1 Edwin Groothuis freebsd_committer 2013-11-03 22:06:04 UTC
Responsible Changed
From-To: freebsd-ports-bugs->martymac

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter freebsd_committer 2013-11-06 08:22:58 UTC
Author: martymac
Date: Wed Nov  6 08:22:49 2013
New Revision: 332956
URL: http://svnweb.freebsd.org/changeset/ports/332956

Log:
  - Fix build with clang [1]
  - Fix wrong shebang in bon_csv2txt.in
  - Enable staging
  
  PR:		ports/183432 [1]
  Submitted by:	Kenji Rikitake <kenji@k2r.org> [1]

Modified:
  head/benchmarks/bonnie++/Makefile
  head/benchmarks/bonnie++/files/patch-Makefile.in   (contents, props changed)
  head/benchmarks/bonnie++/pkg-plist   (contents, props changed)

Modified: head/benchmarks/bonnie++/Makefile
==============================================================================
--- head/benchmarks/bonnie++/Makefile	Wed Nov  6 08:18:46 2013	(r332955)
+++ head/benchmarks/bonnie++/Makefile	Wed Nov  6 08:22:49 2013	(r332956)
@@ -3,6 +3,7 @@
 
 PORTNAME=	bonnie++
 PORTVERSION=	1.97
+PORTREVISION=	1
 CATEGORIES=	benchmarks
 MASTER_SITES=	http://www.coker.com.au/bonnie++/experimental/
 EXTRACT_SUFX=	.tgz
@@ -13,15 +14,15 @@ COMMENT=	Performance Test of Filesystem 
 LICENSE=	GPLv2
 
 GNU_CONFIGURE=	yes
+USE_GCC=	yes
 
-WRKSRC=	${WRKDIR}/${PORTNAME}-1.97.1
+USES=	shebangfix
+SHEBANG_FILES=	bon_csv2txt.in
 
-MAN1=	bon_csv2html.1 bon_csv2txt.1 generate_randfile.1
-MAN8=	bonnie++.8 getc_putc.8 zcav.8
+WRKSRC=	${WRKDIR}/${PORTNAME}-1.97.1
 
 PORTDOCS=	readme.html
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 post-patch:
@@ -32,8 +33,8 @@ post-patch:
 
 post-install:
 .if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/readme.html ${DOCSDIR}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/readme.html ${STAGEDIR}${DOCSDIR}
 .endif
 
 .include <bsd.port.mk>

Modified: head/benchmarks/bonnie++/files/patch-Makefile.in
==============================================================================
--- head/benchmarks/bonnie++/files/patch-Makefile.in	Wed Nov  6 08:18:46 2013	(r332955)
+++ head/benchmarks/bonnie++/files/patch-Makefile.in	Wed Nov  6 08:22:49 2013	(r332956)
@@ -1,5 +1,34 @@
---- Makefile.in.orig	Tue Jan  7 22:40:11 2003
-+++ Makefile.in	Tue Feb 25 17:21:00 2003
-@@ -12 +12 @@
+--- Makefile.in.orig	2008-12-30 22:04:25.000000000 +0100
++++ Makefile.in	2013-11-05 05:59:48.000000000 +0100
+@@ -9,7 +9,7 @@
+ eprefix=@exec_prefix@
+ #MORE_WARNINGS=-Weffc++
+ WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpointer-arith -Wwrite-strings -Wformat-security -Wswitch-enum -Winit-self $(MORE_WARNINGS)
 -CFLAGS=-O2 @debug@ -DNDEBUG $(WFLAGS) $(MORECFLAGS)
 +CFLAGS=${CXXFLAGS} -DNDEBUG $(WFLAGS) $(MORECFLAGS)
+ CXX=@CXX@ $(CFLAGS)
+ LINK=@CXX@
+ THREAD_LFLAGS=@thread_ldflags@
+@@ -52,15 +52,15 @@
+ 	$(LINK) generate_randfile.o -o generate_randfile
+ 
+ install-bin: $(EXE) $(EXES)
+-	mkdir -p $(eprefix)/bin $(eprefix)/sbin
+-	@INSTALL_PROGRAM@ @stripping@ $(EXES) $(eprefix)/sbin
+-	@INSTALL_PROGRAM@ @stripping@ $(EXE) $(eprefix)/bin
+-	@INSTALL_SCRIPT@ $(SCRIPTS) $(eprefix)/bin
++	mkdir -p $(DESTDIR)$(eprefix)/bin $(DESTDIR)$(eprefix)/sbin
++	@INSTALL_PROGRAM@ @stripping@ $(EXES) $(DESTDIR)$(eprefix)/sbin
++	@INSTALL_PROGRAM@ @stripping@ $(EXE) $(DESTDIR)$(eprefix)/bin
++	@INSTALL_SCRIPT@ $(SCRIPTS) $(DESTDIR)$(eprefix)/bin
+ 
+ install: install-bin
+-	mkdir -p @mandir@/man1 @mandir@/man8
+-	@INSTALL_DATA@ $(MAN1) @mandir@/man1
+-	@INSTALL_DATA@ $(MAN8) @mandir@/man8
++	mkdir -p $(DESTDIR)@mandir@/man1 $(DESTDIR)@mandir@/man8
++	@INSTALL_DATA@ $(MAN1) $(DESTDIR)@mandir@/man1
++	@INSTALL_DATA@ $(MAN8) $(DESTDIR)@mandir@/man8
+ 
+ %.o: %.cpp
+ 	$(CXX) -c $<

Modified: head/benchmarks/bonnie++/pkg-plist
==============================================================================
--- head/benchmarks/bonnie++/pkg-plist	Wed Nov  6 08:18:46 2013	(r332955)
+++ head/benchmarks/bonnie++/pkg-plist	Wed Nov  6 08:22:49 2013	(r332956)
@@ -5,3 +5,9 @@ sbin/bonnie++
 sbin/getc_putc
 sbin/getc_putc_helper
 sbin/zcav
+man/man1/bon_csv2html.1.gz
+man/man1/bon_csv2txt.1.gz
+man/man1/generate_randfile.1.gz
+man/man8/bonnie++.8.gz
+man/man8/getc_putc.8.gz
+man/man8/zcav.8.gz
_______________________________________________
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 Ganael LAPLANCHE freebsd_committer 2013-11-06 08:23:30 UTC
State Changed
From-To: open->closed

Committed, thanks!