NetBSD Problem Report #43091

From www@NetBSD.org  Wed Mar 31 22:01:48 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 08C8C63B86C
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 31 Mar 2010 22:01:48 +0000 (UTC)
Message-Id: <20100331220147.CF15663B11D@www.NetBSD.org>
Date: Wed, 31 Mar 2010 22:01:47 +0000 (UTC)
From: schaecsn@gmx.net
Reply-To: schaecsn@gmx.net
To: gnats-bugs@NetBSD.org
Subject: emacs20 doesn't work
X-Send-Pr-Version: www-1.0

>Number:         43091
>Category:       pkg
>Synopsis:       emacs20 doesn't work
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    linux-pkg-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 31 22:05:00 +0000 2010
>Last-Modified:  Thu Apr 08 21:00:04 +0000 2010
>Originator:     Stefan
>Release:        
>Organization:
>Environment:
Linux vaio 2.6.29.6 #2 Mon Dec 7 17:31:46 CST 2009 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux

>Description:
1. editors/emacs20 tries to link against libXaw.so (-lXaw). This library is called in pkgsrc libXaw6.so a/o libXaw7.so.

Options:

        emacs-pop inet6 x11 xaw


        * XAW_TYPE = standard


2. On linux, emacs20 does not run (slackware 13 - gcc-4.3.3, CLAGS=-O2 -march=pentium4)

# /usr/current/bin/emacs
Fatal error (11).Segmentation fault


Nowadays, emacs20 coredumps on a lot of machines. Time to retire this package?
>How-To-Repeat:
bmake
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->linux-pkg-people
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Wed, 31 Mar 2010 22:14:35 +0000
Responsible-Changed-Why:
Linux pkgsrc problem, at least point 2


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/43091: emacs20 doesn't work
Date: Thu, 8 Apr 2010 09:51:03 +0000

 On Wed, Mar 31, 2010 at 10:05:01PM +0000, schaecsn@gmx.net wrote:
  > 1. editors/emacs20 tries to link against libXaw.so (-lXaw). This
  > library is called in pkgsrc libXaw6.so a/o libXaw7.so.

 It works for me (TM):

 % ldd /usr/pkg/bin/emacs
 /usr/pkg/bin/emacs:
         -lXaw7.7 => /usr/pkg/lib/libXaw7.so.7
             :

 That's emacs20 with pkgsrc libXaw-1.0.7. However, that's not on Linux.
 Perhaps the configure script is examining your /usr/X11R6, but the
 build is using the buildlinked pkgsrc libs?

  > 2. On linux, emacs20 does not run (slackware 13 - gcc-4.3.3, CLAGS=-O2 -march=pentium4)
  > 
  > # /usr/current/bin/emacs
  > Fatal error (11).Segmentation fault

 What's it crashing on? If it's using mixed versions of X libraries (as
 point (1) suggests it may be) core dumping isn't particularly a
 surprise.

 -- 
 David A. Holland
 dholland@netbsd.org

From: Stefan Schaeckeler <schaecsn@gmx.net>
To: gnats-bugs@NetBSD.org
Cc: 	linux-pkg-people@netbsd.org,gnats-admin@netbsd.org,pkgsrc-bugs@netbsd.org
Subject: Re: pkg/43091: emacs20 doesn't work
Date: Thu,  8 Apr 2010 14:00:12 -0700 (PDT)

 > The following reply was made to PR pkg/43091; it has been noted by GNATS.
 > 
 > From: David Holland <dholland-pbugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: pkg/43091: emacs20 doesn't work
 > Date: Thu, 8 Apr 2010 09:51:03 +0000
 > 
 >  On Wed, Mar 31, 2010 at 10:05:01PM +0000, schaecsn@gmx.net wrote:
 >   > 1. editors/emacs20 tries to link against libXaw.so (-lXaw). This
 >   > library is called in pkgsrc libXaw6.so a/o libXaw7.so.
 >  
 >  It works for me (TM):
 >  
 >  % ldd /usr/pkg/bin/emacs
 >  /usr/pkg/bin/emacs:
 >          -lXaw7.7 => /usr/pkg/lib/libXaw7.so.7
 >              :

 >  
 >  That's emacs20 with pkgsrc libXaw-1.0.7. However, that's not on Linux.
 >  Perhaps the configure script is examining your /usr/X11R6, but the
 >  build is using the buildlinked pkgsrc libs?

 Now, that I try to compile emacs20 again, I don't have any problems with linking libXaw, anymore.

 I used to have X stuff from my linux distribution installed, but not anymore. When I filed the bug report I *may* have had still the X stuff from my linux distribution. So, you may be right.


 >   > 2. On linux, emacs20 does not run (slackware 13 - gcc-4.3.3, CLAGS=-O2 -march=pentium4)
 >   > 
 >   > # /usr/current/bin/emacs
 >   > Fatal error (11).Segmentation fault
 >  
 >  What's it crashing on? If it's using mixed versions of X libraries (as
 >  point (1) suggests it may be) core dumping isn't particularly a
 >  surprise.

 It crashes on startup. I found the problem. From the Makefile:

 # This matches NetBSD <1.7 releases and 1.6A-1.6P, where ld is <2.13.2.1.
 .if (${OPSYS} == "NetBSD" && \
     (empty(OS_VERSION:M1.[0-5]*) && \
      empty(OS_VERSION:M1.6_*) && \
      empty(OS_VERSION:M1.6) && \
      empty(OS_VERSION:M1.6.[0-9]*) && \
      empty(OS_VERSION:M1.6[A-P]*))) || \
     (${OPSYS} == "DragonFly")
 # If using GNU ld 2.13.2.1 or later, avoid creating combined reloc
 # sections and .data reloc sections, both of which Emacs can't handle
 # properly.  Analyzed by Stephen Ma.
 LDFLAGS+=	-Wl,-z,nocombreloc
 .endif


 Nowadays, most Linux-distributions should have ld 2.13.2.1 or later. Suggestion:

 Replace

     (${OPSYS} == "DragonFly")

 with

     (${OPSYS} == "DragonFly") ||
     (${OPSYS} == "Linux")

 With that change, emacs20 works on linux slackware 13.0.




 I encountered one voodoo-magic problem

 When I compile editors/emacs20 with -O2 or -O1, I get

 /tmp/pkgsrc/editors/emacs20/work/emacs-20.7/lib-src/sorted-doc.c:12: error: conflicting types for 'malloc'
 /tmp/pkgsrc/editors/emacs20/work/emacs-20.7/lib-src/sorted-doc.c: In function 'fatal':


 mk.conf:
 CFLAGS+=		-O2
 CXXFLAGS+=		-O2


 (commenting out the two malloc declarations in sorted-doc.c fixes the problem).



 When I compile emacs20 with -O0, everything compiles (the error is now a warning and there is a built-in function opposed to ???).

 /tmp/pkgsrc/editors/emacs20/work/emacs-20.7/lib-src/sorted-doc.c:12: warning: conflicting types for built-in function 'malloc'

 mk.conf:
 CFLAGS+=-O0
 CXXFLAGS+=-O0



 Environment: gcc-4.3.3 on Slackware 13.0

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.