Bug 70936 - devel/calltree: update to callgrind 0.9.8 (repo-copy)
Summary: devel/calltree: update to callgrind 0.9.8 (repo-copy)
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: Sergey Matveychuk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-25 12:30 UTC by Simon Barner
Modified: 2004-09-01 17:27 UTC (History)
0 users

See Also:


Attachments
MOVED.diff (368 bytes, patch)
2004-08-25 12:30 UTC, Simon Barner
no flags Details | Diff
kcachegrind.diff (1.84 KB, patch)
2004-08-25 12:30 UTC, Simon Barner
no flags Details | Diff
valgrind.diff (752 bytes, patch)
2004-08-25 12:30 UTC, Simon Barner
no flags Details | Diff
callgrind.patch (5.23 KB, patch)
2004-08-31 14:42 UTC, Simon Barner
no flags Details | Diff
valgrind.patch (989 bytes, patch)
2004-08-31 14:42 UTC, Simon Barner
no flags Details | Diff
valgrind-snapshot.patch (1008 bytes, patch)
2004-08-31 14:42 UTC, Simon Barner
no flags Details | Diff
kcachegrind.patch (1.93 KB, patch)
2004-08-31 14:42 UTC, Simon Barner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Barner 2004-08-25 12:30:30 UTC
This PR is a bit large, so here are instructions to the individual patch files:

1. calltree.diff
================
calltree was renamed to callgrind, so devel/calltree needs to be "repo-moved" to
devel/callgrind before applying the patch.

2. valgrind.diff and valgrind-snapshot.diff
===========================================
Callgrind needs a header file from valgrind that currently is not installed by
our FreeBSD ports.

3. kcachegrind.diff
===================
kcachegrind depends on calltree. This patch reflects the name change
as well as it brings the following two changes:
 - a fixed pkg-plist
 - an optional run-time dependency to graphics/graphviz (the dot tool
   is needed to render call graphs).

4. MOVED.diff
=============
Sample entry for portupgrade support file.

Fix: diff -ruN calltree/Makefile callgrind/Makefile
--- calltree/Makefile	Wed Aug 25 09:56:42 2004
+++ callgrind/Makefile	Wed Aug 25 10:05:26 2004
@@ -1,15 +1,14 @@
-# New ports collection makefile for:	calltree
+# New ports collection makefile for:	callgrind
 # Date created:				Jun 3 2004
 # Whom:					Simon Barner <barner@gmx.de>
 #
 # $FreeBSD: ports/devel/calltree/Makefile,v 1.2 2004/08/02 10:45:40 lofi Exp $
 #
 
-PORTNAME=	calltree
-PORTVERSION=	0.9.7
+PORTNAME=	callgrind
+PORTVERSION=	0.9.8
 CATEGORIES=	devel
-MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
-MASTER_SITE_SUBDIR=	kcachegrind
+MASTER_SITES=	http://kcachegrind.sourceforge.net/
 
 MAINTAINER=	barner@gmx.de
 COMMENT=	Valgrind skin for cache simulation and call tracing
diff -ruN calltree/distinfo callgrind/distinfo
--- calltree/distinfo	Wed Aug 25 09:56:42 2004
+++ callgrind/distinfo	Wed Aug 25 10:05:36 2004
@@ -1,2 +1,2 @@
-MD5 (calltree-0.9.7.tar.gz) = f1bb4e6446f26219cf5772849630b380
-SIZE (calltree-0.9.7.tar.gz) = 156812
+MD5 (callgrind-0.9.8.tar.gz) = 5d98a82128b66a8ad4a931b728db420b
+SIZE (callgrind-0.9.8.tar.gz) = 178524
diff -ruN calltree/files/patch-src::Makefile.in callgrind/files/patch-src::Makefile.in
--- calltree/files/patch-src::Makefile.in	Wed Aug 25 09:56:42 2004
+++ callgrind/files/patch-src::Makefile.in	Wed Aug 25 10:07:43 2004
@@ -1,11 +1,13 @@
---- src/Makefile.in.orig	Thu Jun  3 05:08:28 2004
-+++ src/Makefile.in	Thu Jun  3 05:08:54 2004
-@@ -116,7 +116,7 @@
+--- src/Makefile.in.orig	Thu Aug 19 22:46:55 2004
++++ src/Makefile.in	Wed Aug 25 10:07:20 2004
+@@ -167,8 +167,8 @@
+ target_alias = @target_alias@
  SUBDIRS = .
- 
  AM_CFLAGS = $(WERROR) -DVG_LIBDIR="\"$(libdir)"\" \
-- -Winline -Wall -Wshadow -O -fomit-frame-pointer @PREFERRED_STACK_BOUNDARY@ -g
-+ -fomit-frame-pointer @PREFERRED_STACK_BOUNDARY@
- 
+- -Winline -Wall -Wshadow -O2 -fomit-frame-pointer \
+- @PREFERRED_STACK_BOUNDARY@ -g
++ -fomit-frame-pointer \
++ @PREFERRED_STACK_BOUNDARY@
  
  valdir = $(libdir)/valgrind
+ incincdir = $(includedir)/valgrind
diff -ruN calltree/files/patch-src::ct_main.c callgrind/files/patch-src::ct_main.c
--- calltree/files/patch-src::ct_main.c	Wed Aug 25 09:56:42 2004
+++ callgrind/files/patch-src::ct_main.c	Wed Aug 25 10:21:41 2004
@@ -1,11 +1,10 @@
---- src/ct_main.c.orig	Thu Jun  3 05:04:08 2004
-+++ src/ct_main.c	Thu Jun  3 05:05:51 2004
-@@ -5758,7 +5758,7 @@
-    /* Install own SIGILL handler */
-    sigill_new.ksa_handler  = cpuid_SIGILL_handler;
-    sigill_new.ksa_flags    = 0;
--   sigill_new.ksa_restorer = NULL;
-+   //   sigill_new.ksa_restorer = NULL;
-    res = VG_(ksigemptyset)( &sigill_new.ksa_mask );
-    CT_ASSERT(res == 0);
+--- src/ct_main.c.orig	Wed Aug 25 10:10:18 2004
++++ src/ct_main.c	Wed Aug 25 10:13:36 2004
+@@ -32,6 +32,7 @@
+ */
  
+ #include "vg_skin.h"
++#include "vg_unistd.h"
+ #include "callgrind.h"
+ #include "ct_include.h"
+ #include "ct_events.h"
diff -ruN calltree/files/patch-src::ct_sim.c callgrind/files/patch-src::ct_sim.c
--- calltree/files/patch-src::ct_sim.c	Thu Jan  1 01:00:00 1970
+++ callgrind/files/patch-src::ct_sim.c	Wed Aug 25 10:21:41 2004
@@ -0,0 +1,11 @@
+--- src/ct_sim.c.orig	Wed Aug 25 10:20:57 2004
++++ src/ct_sim.c	Wed Aug 25 10:21:12 2004
+@@ -537,7 +537,7 @@
+    /* Install own SIGILL handler */
+    sigill_new.ksa_handler  = cpuid_SIGILL_handler;
+    sigill_new.ksa_flags    = 0;
+-   sigill_new.ksa_restorer = NULL;
++   //sigill_new.ksa_restorer = NULL;
+    res = VG_(ksigemptyset)( &sigill_new.ksa_mask );
+    CT_ASSERT(res == 0);
+ 
diff -ruN calltree/pkg-descr callgrind/pkg-descr
--- calltree/pkg-descr	Wed Aug 25 09:56:42 2004
+++ callgrind/pkg-descr	Wed Aug 25 13:06:43 2004
@@ -1,9 +1,9 @@
-Calltree uses runtime instrumentation via the Valgrind framework for its
+Callgrind uses runtime instrumentation via the Valgrind framework for its
 cache simulation and call tracing. This way, even shared libraries and
 dynamically opened plugins can be profiled. The data files generated by
-Calltree can be loaded into KCachegrind for browsing the performance results.
+Callgrind can be loaded into KCachegrind for browsing the performance results.
 
-But there is also a command line tool in the Calltree package to get ASCII
-reports from Calltree data files without the need to use KCachegrind.
+But there is also a command line tool in the Callgrind package to get ASCII
+reports from Callgrind data files without the need to use KCachegrind.
 
 WWW: http://kcachegrind.sourceforge.net
diff -ruN calltree/pkg-plist callgrind/pkg-plist
--- calltree/pkg-plist	Wed Aug 25 09:56:42 2004
+++ callgrind/pkg-plist	Wed Aug 25 10:26:14 2004
@@ -1,7 +1,7 @@
-bin/calltree
-bin/ct_annotate
-bin/ct_control
-include/valgrind/calltree.h
-lib/valgrind/vgskin_calltree.so
+bin/callgrind
+bin/callgrind_annotate
+bin/callgrind_control
+include/valgrind/callgrind.h
+lib/valgrind/vgskin_callgrind.so
 share/doc/valgrind/ct_main.html
 share/doc/valgrind/ct_techdocs.html
--- calltree.diff ends here ---

--- pkg-plist.orig	Wed Aug 25 11:23:23 2004
+++ pkg-plist	Wed Aug 25 11:03:53 2004
@@ -7,6 +7,7 @@
 include/valgrind/vg_constants_skin.h
 include/valgrind/vg_kerneliface.h
 include/valgrind/vg_skin.h
+include/valgrind/vg_unistd.h
 lib/valgrind/default.supp
 lib/valgrind/glibc-2.1.supp
 lib/valgrind/glibc-2.2.supp
--- Makefile.orig	Wed Aug 25 11:01:33 2004
+++ Makefile	Wed Aug 25 11:22:39 2004
@@ -7,6 +7,7 @@
 
 PORTNAME=	valgrind
 PORTVERSION=	352
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	http://www.rabson.org/
 PKGNAMESUFFIX=	-snapshot
@@ -58,5 +59,9 @@
 	${FIND} ${WRKSRC} -name "Makefile.in" -exec \
 		${REINPLACE_CMD} -e "s/docs//g" {} \;
 .endif
+
+post-install:
+	${INSTALL_DATA} ${WRKSRC}/coregrind/vg_unistd.h \
+		${LOCALBASE}/include/valgrind
 
 .include <bsd.port.post.mk>
--- valgrind-snapshot.diff ends here ---
How-To-Repeat: 
N/A
Comment 1 Simon Barner 2004-08-25 12:56:14 UTC
Simon Barner wrote:
> 3. kcachegrind.diff
> ===================
> kcachegrind depends on calltree. This patch reflects the name change
> as well as it brings the following two changes:
>  - a fixed pkg-plist
>  - an optional run-time dependency to graphics/graphviz (the dot tool
>    is needed to render call graphs).

Please see also if http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/70932
(gcc 3.4.2 fix) is already in the tree - thanks.
Comment 2 Sergey Matveychuk freebsd_committer 2004-08-26 18:38:36 UTC
State Changed
From-To: open->repocopy

Repocopy request: 
devel/calltree -> devel/callgrind 


Comment 3 Sergey Matveychuk freebsd_committer 2004-08-26 18:38:36 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

Repocopy request: 
devel/calltree -> devel/callgrind
Comment 4 Joe Marcus Clarke freebsd_committer 2004-08-28 06:56:08 UTC
State Changed
From-To: repocopy->open

Repo-copy completed. 


Comment 5 Joe Marcus Clarke freebsd_committer 2004-08-28 06:56:08 UTC
Responsible Changed
From-To: portmgr->sem

Repo-copy completed.
Comment 6 Sergey Matveychuk freebsd_committer 2004-08-28 20:37:33 UTC
The first problem is with valgrind package (with 5.3-BETA2):
===>  Building package for valgrind-352_1
Creating package /spool/packages5/All/valgrind-352_1.tbz
Registering depends:.
Registering conflicts: valgrind-snapshot-[0-9]*.
Creating bzip'd tar ball in '/spool/packages5/All/valgrind-352_1.tbz'
tar: include/valgrind/vg_unistd.h: Could not stat: No such file or directory
pkg_create: make_dist: tar command failed with code 256
*** Error code 1

Stop in /usr/ports/devel/valgrind.


It looks like not complete PREFIX compliant. I've got a strange file:
# ll /usr/local/include/valgrind
-r--r--r--  1 root  wheel  18650 Aug 28 23:33 /usr/local/include/valgrind

when PREFIX was other then /usr/local.

---
Sem.
Comment 7 Sergey Matveychuk freebsd_committer 2004-08-30 15:21:00 UTC
Anyway this file is not installed. So callgrind fail to build then.

Please, answer ASAP. Repocopy was done and the ports tree freeze date 
too close.
-- 
Sem.
Comment 8 Simon Barner 2004-08-31 14:42:05 UTC
Sergey Matveychuk wrote:
> Anyway this file is not installed. So callgrind fail to build then.
> 
> Please, answer ASAP. Repocopy was done and the ports tree freeze date 
> too close.

Hi,

here are updated patches. I did the following test: I deinstalled
kcachegrind, valgrind and callgrind, and issued a `make install
PREFIX=/tmp/foo' in ports/devel/kcachegrind.

This worked with both valgrind and valgrind-stable. The problem was that
I incidentally used ${LOCALBASE} instead of ${PREFIX} in my last patches
for the valgrind ports.

Further fixes (please only use the patches from this email and not from
my initial PR!)
 - (yet another) pkg-plist correction
 - add knob to callgrind to depend on either valgrind or
   valgrind-snapshot

Sorry for all the trouble and the delay (I was not at home over the
weekend).

Simon
Comment 9 Sergey Matveychuk freebsd_committer 2004-08-31 20:15:44 UTC
valgrind-snapshot does not build on 4.10:

cc -DHAVE_CONFIG_H -I. -I. -I..  -I./demangle -I../include -I./x86 
-DVG_LIBDIR="
\"/usr/local/lib/valgrind"\"   -Winline -Wall -Wshadow -O 
-fno-omit-frame-pointe
r -mpreferred-stack-boundary=2 -g -DELFSZ=32  -c vg_signals.c
vg_signals.c: In function `fill_ehdr':
vg_signals.c:1393: `ELFMAG' undeclared (first use in this function)
vg_signals.c:1393: (Each undeclared identifier is reported only once
vg_signals.c:1393: for each function it appears in.)
vg_signals.c:1393: `SELFMAG' undeclared (first use in this function)
vg_signals.c: In function `vgPlain_route_signals':
vg_signals.c:2457: warning: unused variable `si'
vg_signals.c:2454: warning: unused variable `zero'
gmake[4]: *** [vg_signals.o] Error 1
gmake[4]: Leaving directory 
`/usr/ports/devel/valgrind-snapshot/work/valgrind-cu
rrent-352/coregrind'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory 
`/usr/ports/devel/valgrind-snapshot/work/valgrind-cu
rrent-352/coregrind'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory 
`/usr/ports/devel/valgrind-snapshot/work/valgrind-cu
rrent-352/coregrind'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory 
`/usr/ports/devel/valgrind-snapshot/work/valgrind-cu
rrent-352'


All other ports looks good.

---
Sem.
Comment 10 Sergey Matveychuk freebsd_committer 2004-09-01 17:27:32 UTC
State Changed
From-To: open->closed

Committed, thanks!