From nobody@FreeBSD.org  Fri Jul 22 12:50:11 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 760F816A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 22 Jul 2005 12:50:11 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2BAE443D46
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 22 Jul 2005 12:50:11 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j6MCoBHp059271
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 22 Jul 2005 12:50:11 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j6MCoA1r059270;
	Fri, 22 Jul 2005 12:50:10 GMT
	(envelope-from nobody)
Message-Id: <200507221250.j6MCoA1r059270@www.freebsd.org>
Date: Fri, 22 Jul 2005 12:50:10 GMT
From: Konstantin Belousov <kostikbel@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] lang/smalltalk tries to use backtrace_symbols_fd
X-Send-Pr-Version: www-2.3

>Number:         83905
>Category:       ports
>Synopsis:       [patch] lang/smalltalk tries to use backtrace_symbols_fd
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 22 12:50:15 GMT 2005
>Closed-Date:    Tue Jul 26 15:51:38 GMT 2005
>Last-Modified:  Tue Jul 26 15:51:38 GMT 2005
>Originator:     Konstantin Belousov
>Release:        FreeBSD 5-STABLE
>Organization:
>Environment:
FreeBSD deviant.zoral.local 5.4-STABLE FreeBSD 5.4-STABLE #59: Mon Jul 18 11:31:54 EEST 2005 root@deviant.zoral.local:/usr/obj/usr/src/sys/DEVIANT  i386
>Description:
When linking gst binary (smalltalk interpreter itself), the following linker error is raised:

cc -O -pipe -march=pentiumpro -Wall -Wno-strict-aliasing -Wno-switch -fno-gcse -fstrict-aliasing -Wno-format -Wno-parentheses -Wpointer-arith -o gst main.o -Wl,--export-dynamic  -L/usr/local/lib libgst/.libs/libgst.a -lreadline -lm
libgst/.libs/libgst.a(interp.o)(.text+0x138ef): In function `interrupt_handler':
: undefined reference to `backtrace'
libgst/.libs/libgst.a(interp.o)(.text+0x13907): In function `interrupt_handler':
: undefined reference to `backtrace_symbols_fd'

This is glibc-specific interfaces, available under FreeBSD as devel/libexecinfo.

>How-To-Repeat:
Do an install of the lang/smalltalk (ver. 2.1.5_1)
>Fix:
      Add explicit devel/libexecinfo dependency to the port:

RCS file: /usr/local/arch/ncvs/ports/lang/smalltalk/Makefile,v
retrieving revision 1.60
diff -u -r1.60 Makefile
--- Makefile    12 Apr 2005 03:25:52 -0000      1.60
+++ Makefile    22 Jul 2005 12:38:18 -0000
@@ -15,7 +15,8 @@
 MAINTAINER=    ports@FreeBSD.org
 COMMENT=       GNU Smalltalk
 
-LIB_DEPENDS=   gdbm.3:${PORTSDIR}/databases/gdbm
+LIB_DEPENDS=   gdbm.3:${PORTSDIR}/databases/gdbm \
+               execinfo.1:${PORTSDIR}/devel/libexecinfo
 
 USE_REINPLACE= yes
 USE_GMAKE=     yes

and put the following patch into lang/smalltalk/files:
deviant% cat files/patch-libgst-Makefile.in
--- libgst/Makefile.in  Wed Sep 24 00:58:02 2003
+++ /tmp/libgst/Makefile.in     Fri Jul 22 15:27:43 2005
@@ -212,7 +212,7 @@
 
 # definitions for libgst.la
 libgst_la_LIBADD = $(top_builddir)/lib-src/library.la $(LIBSIGSEGV) \
-       @LIBLTDL@ @LIBSNPRINTFV@ @LIBREADLINE@ @LIBGMP@
+       @LIBLTDL@ @LIBSNPRINTFV@ @LIBREADLINE@ @LIBGMP@ -lexecinfo
 
 
 libgst_la_LDFLAGS = -version-info $(VERSION_INFO)

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: vs 
State-Changed-When: Tue Jul 26 15:50:29 GMT 2005 
State-Changed-Why:  
Committed, thanks! 
Please use /usr/ports/Tools/scripts/patchtool.py for new patches 
and cvs diff -urN to get a patch which is easier applicable next time. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=83905 
>Unformatted:
