From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marion Hakanson Newsgroups: gmane.lisp.guile.bugs Subject: Re: Undefined symbol _start first referenced in file .libs/libguile_la-g Date: Sat, 17 Apr 2010 14:40:55 -0700 Message-ID: <4BCA2AE7.4020901@easystreet.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050506090904010300070704" X-Trace: dough.gmane.org 1271541974 18830 80.91.229.12 (17 Apr 2010 22:06:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 17 Apr 2010 22:06:14 +0000 (UTC) To: bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Apr 18 00:06:13 2010 connect(): No such file or directory Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O3G9V-0003Wm-2j for guile-bugs@m.gmane.org; Sun, 18 Apr 2010 00:06:13 +0200 Original-Received: from localhost ([127.0.0.1]:49560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3G9U-0006Rh-9l for guile-bugs@m.gmane.org; Sat, 17 Apr 2010 18:06:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O3Fl9-0007Sc-1i for bug-guile@gnu.org; Sat, 17 Apr 2010 17:41:03 -0400 Original-Received: from [140.186.70.92] (port=47533 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3Fl7-0007SD-LL for bug-guile@gnu.org; Sat, 17 Apr 2010 17:41:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O3Fl5-0001SO-92 for bug-guile@gnu.org; Sat, 17 Apr 2010 17:41:01 -0400 Original-Received: from mail-pz0-f198.google.com ([209.85.222.198]:56458) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3Fl5-0001SB-45 for bug-guile@gnu.org; Sat, 17 Apr 2010 17:40:59 -0400 Original-Received: by pzk36 with SMTP id 36so3006707pzk.24 for ; Sat, 17 Apr 2010 14:40:56 -0700 (PDT) Original-Received: by 10.142.210.15 with SMTP id i15mr1484555wfg.256.1271540456747; Sat, 17 Apr 2010 14:40:56 -0700 (PDT) Original-Received: from [192.168.76.2] (69-30-98-123.dv1sf.easystreet.com [69.30.98.123]) by mx.google.com with ESMTPS id 21sm3680518pzk.12.2010.04.17.14.40.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 17 Apr 2010 14:40:56 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.9) Gecko/20100318 Lightning/1.0b1 Thunderbird/3.0.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Sat, 17 Apr 2010 18:06:07 -0400 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:4581 Archived-At: This is a multi-part message in MIME format. --------------050506090904010300070704 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Apologies for reviving an old topic. There was no resolution posted, and the same problem is happening today with guile-1.8.7 on Solaris-10 x86 platform, compiling with Sun Studio 12, all patches current as of early March-2010. The earlier response, archived here, gave a clue to solution: http://lists.gnu.org/archive/html/bug-guile/2009-03/msg00009.html I was able to get past the problem by updating gc_os_dep.c's "#ifdef SUNOS5" sections with the same sections lifted out of a more recent Boehme GC release (gc-6.8), file gcconfig.h. Regards, Marion --------------050506090904010300070704 Content-Type: text/x-patch; name="libguile.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="libguile.patch" --- libguile/gc_os_dep.c.1 Sat Apr 10 18:56:24 2010 +++ libguile/gc_os_dep.c Sat Apr 17 13:35:43 2010 @@ -711,13 +711,17 @@ extern int etext; # ifdef SUNOS5 # define OS_TYPE "SUNOS5" - extern int _etext; - extern int _end; - extern char * GC_SysVGetDataStart(); -# define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, &_etext) -# define DATAEND (&_end) -# ifndef USE_MMAP + extern int _etext[]; + extern int _end[]; + extern ptr_t GC_SysVGetDataStart(); +# define DATASTART GC_SysVGetDataStart(0x10000, _etext) +# define DATAEND (_end) +# if !defined(USE_MMAP) && defined(REDIRECT_MALLOC) # define USE_MMAP + /* Otherwise we now use calloc. Mmap may result in the */ + /* heap interleaved with thread stacks, which can result in */ + /* excessive blacklisting. Sbrk is unusable since it */ + /* doesn't interact correctly with the system malloc. */ # endif # ifdef USE_MMAP # define HEAP_START (ptr_t)0x40000000 @@ -725,10 +729,18 @@ # define HEAP_START DATAEND # endif # define PROC_VDB -/* HEURISTIC1 reportedly no longer works under 2.7. Thus we */ -/* switched to HEURISTIC2, eventhough it creates some debugging */ -/* issues. */ -# define HEURISTIC2 +/* HEURISTIC1 reportedly no longer works under 2.7. */ +/* HEURISTIC2 probably works, but this appears to be preferable. */ +/* Apparently USRSTACK is defined to be USERLIMIT, but in some */ +/* installations that's undefined. We work around this with a */ +/* gross hack: */ +# include +# ifdef USERLIMIT + /* This should work everywhere, but doesn't. */ +# define STACKBOTTOM USRSTACK +# else +# define HEURISTIC2 +# endif # include # define GETPAGESIZE() sysconf(_SC_PAGESIZE) /* getpagesize() appeared to be missing from at least one */ @@ -802,15 +814,29 @@ # endif # ifdef SUNOS5 # define OS_TYPE "SUNOS5" - extern int etext, _start; - extern char * GC_SysVGetDataStart(); -# define DATASTART GC_SysVGetDataStart(0x1000, &etext) -# define STACKBOTTOM ((ptr_t)(&_start)) -/** At least in Solaris 2.5, PROC_VDB gives wrong values for dirty bits. */ -/*# define PROC_VDB*/ + extern int _etext[], _end[]; + extern ptr_t GC_SysVGetDataStart(); +# define DATASTART GC_SysVGetDataStart(0x1000, _etext) +# define DATAEND (_end) +/* # define STACKBOTTOM ((ptr_t)(_start)) worked through 2.7, */ +/* but reportedly breaks under 2.8. It appears that the stack */ +/* base is a property of the executable, so this should not break */ +/* old executables. */ +/* HEURISTIC2 probably works, but this appears to be preferable. */ +# include +# define STACKBOTTOM USRSTACK +/* At least in Solaris 2.5, PROC_VDB gives wrong values for dirty bits. */ +/* It appears to be fixed in 2.8 and 2.9. */ +# ifdef SOLARIS25_PROC_VDB_BUG_FIXED +# define PROC_VDB +# endif # define DYNAMIC_LOADING -# ifndef USE_MMAP +# if !defined(USE_MMAP) && defined(REDIRECT_MALLOC) # define USE_MMAP + /* Otherwise we now use calloc. Mmap may result in the */ + /* heap interleaved with thread stacks, which can result in */ + /* excessive blacklisting. Sbrk is unusable since it */ + /* doesn't interact correctly with the system malloc. */ # endif # ifdef USE_MMAP # define HEAP_START (ptr_t)0x40000000 --------------050506090904010300070704--