Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  1 Feb 2007 21:59:00 +0300 (MSK)
From:      Sergey Zaharchenko <doublef-ctm@yandex.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/108664: [PATCH] devel/fnccheck: linking fails if library is stripped
Message-ID:  <20070201185900.4956A172DE@shark>
Resent-Message-ID: <200702011910.l11JAJUH015771@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         108664
>Category:       ports
>Synopsis:       [PATCH] devel/fnccheck: linking fails if library is stripped
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 01 19:10:18 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Zaharchenko
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
Volgograd state technical university
>Environment:
System: FreeBSD shark.localdomain 7.0-CURRENT FreeBSD 7.0-CURRENT #4: Fri Jan 12 16:30:54 MSK 2007 root@shark.localdomain:/var/obj/src/usr.src/sys/GENERIC.USB_DEBUG i386

>Description:
	The devel/fnccheck port strips its shared library when
	installing. This causes attepts to link against the library
	to fail.
>How-To-Repeat:
	Install the port, take a C program and attept to link it
	against libfnccheck.so. You should get the following output:

$ gcc -o foo -finstrument-functions -g foo.c -L/usr/local/lib -lfnccheck -lm
/var/tmp//cc0RFVU1.o(.text+0x29): In function `main':
/home/df/fnccheck/foo.c:3: undefined reference to `__cyg_profile_func_enter'
/var/tmp//cc0RFVU1.o(.text+0x41):/home/df/fnccheck/foo.c:5: undefined reference to `__cyg_profile_func_exit'
*** Error code 1

>Fix:

The minimal way to fix this is to apply the following patch:

--- devel/fnccheck/Makefile.ctm	Sun Sep  3 11:35:48 2006
+++ devel/fnccheck/Makefile	Thu Feb  1 21:47:08 2007
@@ -22,6 +22,8 @@
 		doc/fncdump.info doc/html/fncdump_toc.html \
 		doc/html/fncdump.html
 
+STRIP=
+
 do-install:
 .for B in fncdump fncaverage
 	${INSTALL_PROGRAM} ${WRKSRC}/bin/$B ${PREFIX}/bin

It will also make the two executable files not be stripped, but they are
small, so that doesn't make much difference.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070201185900.4956A172DE>