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:    maya
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 31 22:05:00 +0000 2010
>Closed-Date:    Mon Jun 05 06:00:17 +0000 2017
>Last-Modified:  Sun Jul 23 05:25:00 +0000 2017
>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

Responsible-Changed-From-To: linux-pkg-people->maya
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Fri, 11 Nov 2016 09:14:07 +0000
Responsible-Changed-Why:
I am the address to complaints


State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Fri, 11 Nov 2016 09:14:07 +0000
State-Changed-Why:
Finally actually commit the change :-) sorry about that...


State-Changed-From-To: closed->open
State-Changed-By: maya@NetBSD.org
State-Changed-When: Fri, 11 Nov 2016 09:17:05 +0000
State-Changed-Why:
oops, should've noticed the other half of the problem - your compiler trying to replace emacs homebrewed malloc incorrectly


From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43091 CVS commit: pkgsrc/editors/emacs20
Date: Fri, 11 Nov 2016 09:10:41 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Fri Nov 11 09:10:41 UTC 2016

 Modified Files:
 	pkgsrc/editors/emacs20: Makefile

 Log Message:
 emacs20: retire elaborate logic to match versions of NetBSD below 1.7

 older binutils worked fine without this option, and it was a performance
 hit, but it's unrealistic to see anyone using such old binutils today.

 not matching some operating systems will cause runtime crashes.

 forgotten to apply patch in PR pkg/43091: emacs20 doesn't work
 (..on linux, which doesn't match the elaborate logic)

 bump PKGREVISION as it is only apparent at runtime.


 To generate a diff of this commit:
 cvs rdiff -u -r1.53 -r1.54 pkgsrc/editors/emacs20/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Mon, 05 Jun 2017 06:00:17 +0000
State-Changed-Why:
I believe this problem is solved. If you still have issues, feel free to mention them.
I'm closing rather than putting in feedback to avoid GNATS bugging you to provide feedback for an old bug.


From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43091 CVS commit: pkgsrc/editors/emacs20
Date: Sun, 23 Jul 2017 05:22:38 +0000

 Module Name:	pkgsrc
 Committed By:	dholland
 Date:		Sun Jul 23 05:22:38 UTC 2017

 Modified Files:
 	pkgsrc/editors/emacs20: Makefile distinfo
 	pkgsrc/editors/emacs20/patches: patch-aj

 Log Message:
 Roll a couple bits into the jumbo patch, one from patch-aj, another
 mentioned in passing in PR 43091. Bump PKGREVISION again, to 24.


 To generate a diff of this commit:
 cvs rdiff -u -r1.58 -r1.59 pkgsrc/editors/emacs20/Makefile
 cvs rdiff -u -r1.36 -r1.37 pkgsrc/editors/emacs20/distinfo
 cvs rdiff -u -r1.2 -r1.3 pkgsrc/editors/emacs20/patches/patch-aj

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.