GNU bug report logs - #22065
core dumped during compilation (emacs-25 branch on FreeBSD 9)

Previous Next

Package: emacs;

Reported by: Joseph Mingrone <jrm <at> ftfl.ca>

Date: Mon, 30 Nov 2015 22:16:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22065 in the body.
You can then email your comments to 22065 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Mon, 30 Nov 2015 22:16:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joseph Mingrone <jrm <at> ftfl.ca>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 30 Nov 2015 22:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Joseph Mingrone <jrm <at> ftfl.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: core dumped during compilation (emacs-25 branch on FreeBSD 9)
Date: Mon, 30 Nov 2015 18:10:19 -0400
[Message part 1 (text/plain, inline)]
There is a compilation issue on FreeBSD 9 (which has about another
year of life) for the emacs-25 branch.  The error/warnings suggest the
problems may be related to bug 18410.  It compiles fine on FreeBSD 10.
Attached is a build log.

[emacs-devel-25.0.50.20151126,3.log (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]
Joseph
[signature.asc (application/pgp-signature, inline)]

Added indication that bug 22065 blocks19759 Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 02 Dec 2015 17:48:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Sat, 26 Dec 2015 21:23:02 GMT) Full text and rfc822 format available.

Message #10 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Joseph Mingrone <jrm <at> ftfl.ca>
Cc: 22065 <at> debbugs.gnu.org
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Sat, 26 Dec 2015 22:22:37 +0100
Joseph Mingrone <jrm <at> ftfl.ca> writes:

> sysdep.c: In function 'list_system_processes':
> sysdep.c:2775: warning: comparison is always true due to limited range of data type
> sysdep.c:2775: warning: comparison is always true due to limited range of data type
> sysdep.c: In function 'system_process_attributes':
> sysdep.c:3366: warning: comparison is always true due to limited range of data type
> sysdep.c:3366: warning: comparison is always true due to limited range of data type
> sysdep.c:3374: warning: comparison is always true due to limited range of data type

etc etc etc, and then temacs segfaulted.

It seems like these warnings are from lines like

      proclist = Fcons (make_fixnum_or_float (procs[i].ki_pid), proclist);
  attrs = Fcons (Fcons (Qegid, make_fixnum_or_float (proc.ki_svgid)), attrs);

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Sat, 13 Feb 2016 01:09:02 GMT) Full text and rfc822 format available.

Message #13 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Joseph Mingrone <jrm <at> ftfl.ca>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 22065 <at> debbugs.gnu.org
Subject: Re: core dumped during compilation (emacs-25 branch on FreeBSD 9)
Date: Fri, 12 Feb 2016 17:08:21 -0800
I doubt whether the “comparison is always true due to limited range of 
data type” messages are related to the core dump. Those messages are 
merely due to a boastful compiler announcing that it can optimize a 
comarison away. Although recent GCCs are less boastful, they’re still 
doing that optimization.

We’ve made some important changes to emacs-25 in this area since this 
bug was reported in November. Is the current version of emacs-25 still 
dumping core on FreeBSD 9? If not, we can close the bug. Otherwise, 
please run it under a debugger and give us a backtrace. Something like 
this, say:

$ make clean
$ make CFLAGS='-g3 -O0'
[Presumably this fails when temacs dumps core.]
$ cd src
$ gdb temacs
(gdb) source .gdbinit
(gdb) r --batch --load loadup bootstrap
[Presumably this segvs.]
(gdb) bt





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Sun, 14 Feb 2016 16:56:01 GMT) Full text and rfc822 format available.

Message #16 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Wolfgang Jenkner <wjenkner <at> inode.at>
To: Joseph Mingrone <jrm <at> ftfl.ca>
Cc: ashish <at> FreeBSD.org, 22065 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Sun, 14 Feb 2016 17:12:46 +0100
On Mon, Nov 30 2015, Joseph Mingrone wrote:

> There is a compilation issue on FreeBSD 9 (which has about another
> year of life) for the emacs-25 branch.  The error/warnings suggest the
> problems may be related to bug 18410.  It compiles fine on FreeBSD 10.
> Attached is a build log.

The pkg-fallout list indicates that that the build has been broken since
13 Nov 2014, although at that time it failed while temacs was loading up
stuff, with a different error message.

http://docs.freebsd.org/cgi/mid.cgi?201411130859.sAD8xATU001375

According to

https://svnweb.freebsd.org/ports/head/editors/emacs-devel/Makefile?view=log

this seems to correlate to a ports update to emacs bzr version 118251
from the previous 117676 (on Aug 10 2014).

There's a prominent change concerning the stack in this time frame, viz.

  commit c7dfea947eba1980fe3a23ad13f04dd40c6c0d68
  Author: Dmitry Antipov
  Date:   Tue Sep 9 07:44:06 2014 +0400

  Add macros to allocate temporary Lisp objects with alloca.

So, on FreeBSD 10, in a jail containing a basic FreeBSD 9 amd64 userland
I bisected between the above commit, which is still good, and some later
bad commit.

As USE_STACK_LISP_OBJECTS wasn't turned on by default before 2014-09-24,
I configured with

$ ./configure --without-all --without-x CPPFLAGS=-DUSE_STACK_LISP_OBJECTS=1

In the last few steps I had to delete the INLINE specifier in the
definition of local_vector_init() in src/alloc.c because it conflicted
with a declaration in src/lisp.h.

The first bad commit turns out to be

  commit edb0288b83b45d295df52ce7644e897613358971
  Author: Dmitry Antipov <dmantipov <at> yandex.ru>
  Date:   Mon Sep 15 18:53:23 2014 +0400

  If USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack.

Unfortunately, --enable-checking or --enable-check-lisp-object-type
also somehow makes the bootstrapping failure disappear.

On a current emacs master, after adding
CPPFLAGS=-DUSE_STACK_LISP_OBJECTS=0 to the configure command line
bootstrapping emacs works (in the above jail).

Alternatively (though not very practically), adding CFLAGS="-g -O0"
works (but CFLAGS="-g -O" doesn't).

Alternatively, bootstrapping even with the oldest gcc available from
ports (4.6.4) works.

So, perhaps, the FreeBSD 9 default base cc (a patched gcc 4.2.1) has
some stack-related optimization bug, even on amd64?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Sun, 14 Feb 2016 19:49:02 GMT) Full text and rfc822 format available.

Message #19 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Wolfgang Jenkner <wjenkner <at> inode.at>, Joseph Mingrone <jrm <at> ftfl.ca>
Cc: ashish <at> FreeBSD.org, 22065 <at> debbugs.gnu.org,
 Dmitry Antipov <dmantipov <at> yandex.ru>
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Sun, 14 Feb 2016 11:47:57 -0800
[Message part 1 (text/plain, inline)]
Wolfgang Jenkner wrote:
> So, perhaps, the FreeBSD 9 default base cc (a patched gcc 4.2.1) has
> some stack-related optimization bug, even on amd64?

Thanks for the detective work. It inspired me to search GCC bug reports, where I 
found a couple that appear to be directly relevant. The corresponding bug was 
fixed in 2008 but GCC 4.2.1 predates the fix. I installed the attached patch 
into the emacs-25 branch, and I hope it works around the compiler bug with 
stack-allocated Lisp objects on FreeBSD 9. Please give it a try.
[emacs.diff (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Mon, 15 Feb 2016 04:06:01 GMT) Full text and rfc822 format available.

Message #22 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Joseph Mingrone <jrm <at> ftfl.ca>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: ashish <at> FreeBSD.org, Wolfgang Jenkner <wjenkner <at> inode.at>,
 22065 <at> debbugs.gnu.org, Dmitry Antipov <dmantipov <at> yandex.ru>
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Mon, 15 Feb 2016 00:05:37 -0400
[Message part 1 (text/plain, inline)]
Paul Eggert <eggert <at> cs.ucla.edu> writes:

> Wolfgang Jenkner wrote:
>> So, perhaps, the FreeBSD 9 default base cc (a patched gcc 4.2.1) has
>> some stack-related optimization bug, even on amd64?

> Thanks for the detective work. It inspired me to search GCC bug reports, where I
> found a couple that appear to be directly relevant. The corresponding bug was
> fixed in 2008 but GCC 4.2.1 predates the fix. I installed the attached patch
> into the emacs-25 branch, and I hope it works around the compiler bug with
> stack-allocated Lisp objects on FreeBSD 9. Please give it a try.

Thanks for taking a look at the problem, but unfortunately it persists.  A new log is attached.

While the ancient version of gcc is the default compiler in FreeBSD 9.3, clang is in the base system.  I tested using the base clang in 9.3 and the compiling finished without the error.  I'll submit a patch for the FreeBSD port to use clang.

[emacs-devel-25.log (application/octet-stream, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Mon, 15 Feb 2016 06:26:02 GMT) Full text and rfc822 format available.

Message #25 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: ashish <at> FreeBSD.org (Ashish SHUKLA)
To: Joseph Mingrone <jrm <at> ftfl.ca>
Cc: ashish <at> FreeBSD.org, Wolfgang Jenkner <wjenkner <at> inode.at>,
 Paul Eggert <eggert <at> cs.ucla.edu>, 22065 <at> debbugs.gnu.org,
 Dmitry Antipov <dmantipov <at> yandex.ru>
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Mon, 15 Feb 2016 11:26:53 +0530
[Message part 1 (text/plain, inline)]
On Mon, 15 Feb 2016 00:05:37 -0400, Joseph Mingrone <jrm <at> ftfl.ca> said:
| Paul Eggert <eggert <at> cs.ucla.edu> writes:

|| Wolfgang Jenkner wrote:
||| So, perhaps, the FreeBSD 9 default base cc (a patched gcc 4.2.1) has
||| some stack-related optimization bug, even on amd64?

|| Thanks for the detective work. It inspired me to search GCC bug reports, where I
|| found a couple that appear to be directly relevant. The corresponding bug was
|| fixed in 2008 but GCC 4.2.1 predates the fix. I installed the attached patch
|| into the emacs-25 branch, and I hope it works around the compiler bug with
|| stack-allocated Lisp objects on FreeBSD 9. Please give it a try.

| Thanks for taking a look at the problem, but unfortunately it persists.  A new log is attached.

| While the ancient version of gcc is the default compiler in FreeBSD
| 9.3, clang is in the base system.  I tested using the base clang in
| 9.3 and the compiling finished without the error.  I'll submit a patch
| for the FreeBSD port to use clang.

Hi Joseph (and everyone),

Thanks much for investigating. The port builds fine with clang, like Joseph
said in his reply. I'm building the port with all OPTIONS to catch any
possible errors with following diff:

[Makefile.diff (text/x-patch, inline)]
--- /usr/ports/editors/emacs-devel/Makefile	2016-02-08 04:16:55.000000000 +0530
+++ Makefile	2016-02-15 11:24:35.773237763 +0530
@@ -4,6 +4,7 @@
 PORTNAME=	emacs
 PORTVERSION=	${EMACS_VER}
 PORTEPOCH=	2
+PORTREVISION=	1
 CATEGORIES=	editors ipv6
 MASTER_SITES=	GNU_ALPHA/emacs/pretest
 PKGNAMESUFFIX=	-devel
@@ -14,7 +15,6 @@
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-BROKEN_FreeBSD_9=does not build
 BROKEN_sparc64=	fails to compile at bootstrap phase
 BROKEN_ia64=	Emacs 24.X does not currently build on ia64
 
@@ -189,6 +189,12 @@
 .endif
 .endif
 
+.if (${OSVERSION} < 1000000)
+CC=	/usr/bin/clang
+CPP=	/usr/bin/clang-cpp
+CXX=	/usr/bin/clang++
+.endif
+
 .if ${PORT_OPTIONS:MX11}
 INSTALLS_ICONS=	yes
 .if !${PORT_OPTIONS:MXFT}
[Message part 3 (text/plain, inline)]
And will commit once, it finishes building.

Thanks!
-- 
Ashish SHUKLA      | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0
Sent from my Emacs
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Mon, 15 Feb 2016 08:18:01 GMT) Full text and rfc822 format available.

Message #28 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Joseph Mingrone <jrm <at> ftfl.ca>
Cc: ashish <at> FreeBSD.org, Wolfgang Jenkner <wjenkner <at> inode.at>,
 22065 <at> debbugs.gnu.org, Dmitry Antipov <dmantipov <at> yandex.ru>
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Mon, 15 Feb 2016 00:17:16 -0800
Joseph Mingrone wrote:
> I'll submit a patch for the FreeBSD port to use clang.

Hold on a minute. Please don't do that, as Emacs is far more tested on GCC and 
(among other things) GCC has better compile-time checking on Emacs. Instead of 
papering over the bug (if there is a bug), let's fix it.  Here are some points:

1. I just now booted FreeBSD-9.3-RELEASE-i386 under VirtualBox and verified that 
Emacs dumped core without my recent patch 
<http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-25&id=1834ac7d24c60ecabb4fc2469d350a03db1798ab>. 
I also verified that Emacs build and runs fine with the patch. So, if Emacs is 
dumping core for you on FreeBSD 9 i386, there's something different about your 
configuration that is causing the problem. Are you sure you installed the patch 
correctly in your build?

2. My fix assumes Emacs is built with GCC 4.2.1, the standard GCC on FreeBSD 9 
i386. However, your recent email <http://bugs.gnu.org/22065#22> indicates that 
you're building with GCC 4.8.5. Possibly the problem is due to this compiler or 
its installation. Can you please try building with the standard GCC 4.2.1 instead?

3. Your most recent email says this:

Message from gcc-4.8.5_2:
To ensure binaries built with this toolchain find appropriate versions
of the necessary run-time libraries, you may want to link using

  -Wl,-rpath=/usr/local/lib/gcc48

And yet the same email's log says that Emacs was not linked with that flag. 
Perhaps this configuration glitch explains your problem?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Mon, 15 Feb 2016 13:35:01 GMT) Full text and rfc822 format available.

Message #31 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Wolfgang Jenkner <wjenkner <at> inode.at>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Joseph Mingrone <jrm <at> ftfl.ca>, ashish <at> FreeBSD.org, 22065 <at> debbugs.gnu.org,
 Dmitry Antipov <dmantipov <at> yandex.ru>
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Mon, 15 Feb 2016 14:08:40 +0100
On Mon, Feb 15 2016, Paul Eggert wrote:

> 1. I just now booted FreeBSD-9.3-RELEASE-i386 under VirtualBox and
> verified that Emacs dumped core without my recent patch
> <http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-25&id=1834ac7d24c60ecabb4fc2469d350a03db1798ab>. I also
> verified that Emacs build and runs fine with the patch.

The OP's build log says emacs was

    Configured for 'amd64-portbld-freebsd9.3'.

However, bootstrapping emacs-25 (d9ea795, which already contains your
fix) with

$ ./configure --without-all --without-x

in a FreeBSD 9 amd64 jail on my FreeBSD 10 system works fine with cc,
i.e. gcc 4.2.1.

> 2. My fix assumes Emacs is built with GCC 4.2.1, the standard GCC on
> FreeBSD 9 i386. However, your recent email
> <http://bugs.gnu.org/22065#22> indicates that you're building with GCC
> 4.8.5.

The build log says "cc", which is always the base system compiler:

  What compiler should emacs be built with?               cc -std=gnu99 -O2 -pipe -fstack-protector -fno-strict-aliasing
 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Mon, 15 Feb 2016 18:52:02 GMT) Full text and rfc822 format available.

Message #34 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Joseph Mingrone <jrm <at> ftfl.ca>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: ashish <at> FreeBSD.org, Wolfgang Jenkner <wjenkner <at> inode.at>,
 22065 <at> debbugs.gnu.org, Dmitry Antipov <dmantipov <at> yandex.ru>
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Mon, 15 Feb 2016 14:51:01 -0400
[Message part 1 (text/plain, inline)]
Paul Eggert <eggert <at> cs.ucla.edu> writes:

> Joseph Mingrone wrote:
>> I'll submit a patch for the FreeBSD port to use clang.

> Hold on a minute. Please don't do that, as Emacs is far more tested on GCC and
> (among other things) GCC has better compile-time checking on Emacs. Instead of
> papering over the bug (if there is a bug), let's fix it.  Here are some points:

Sure.  I'm willing to test further.  I just thought that since 1) clang is the
default compiler in FreeBSD 10+ and 2) if the problem was with the default,
ancient compiler in FreeBSD 9.x, I might be abusing everyone's valuable time.

> 1. I just now booted FreeBSD-9.3-RELEASE-i386 under VirtualBox and verified that
> Emacs dumped core without my recent patch
> <http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-25&id=1834ac7d24c60ecabb4fc2469d350a03db1798ab>. I
> also verified that Emacs build and runs fine with the patch. So, if Emacs is
> dumping core for you on FreeBSD 9 i386, there's something different about your
> configuration that is causing the problem. Are you sure you installed the patch
> correctly in your build?

I set the FreeBSD emacs-devel port (FreeBSD package building system) to pull
from commit 44b16f6 and I still see the problem on amd64 (with X), but not on
i386.

> 2. My fix assumes Emacs is built with GCC 4.2.1, the standard GCC on FreeBSD 9
> i386. However, your recent email <http://bugs.gnu.org/22065#22> indicates that
> you're building with GCC 4.8.5. Possibly the problem is due to this compiler or
> its installation. Can you please try building with the standard GCC 4.2.1
> instead?

> 3. Your most recent email says this:

> Message from gcc-4.8.5_2:
> To ensure binaries built with this toolchain find appropriate versions
> of the necessary run-time libraries, you may want to link using

>   -Wl,-rpath=/usr/local/lib/gcc48

> And yet the same email's log says that Emacs was not linked with that
> flag. Perhaps this configuration glitch explains your problem?

The newer GCC was referenced because a dependency required it, however Emacs
itself was built with the default compiler (cc) which is a patched GCC 4.2.1 (as
Wolfgang stated).

Joseph
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Mon, 15 Feb 2016 18:52:02 GMT) Full text and rfc822 format available.

Message #37 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Joseph Mingrone <jrm <at> ftfl.ca>
To: Wolfgang Jenkner <wjenkner <at> inode.at>
Cc: 22065 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>, ashish <at> FreeBSD.org,
 Dmitry Antipov <dmantipov <at> yandex.ru>
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Mon, 15 Feb 2016 14:51:35 -0400
[Message part 1 (text/plain, inline)]
Wolfgang Jenkner <wjenkner <at> inode.at> writes:
> However, bootstrapping emacs-25 (d9ea795, which already contains your
> fix) with

> $ ./configure --without-all --without-x

> in a FreeBSD 9 amd64 jail on my FreeBSD 10 system works fine with cc,
> i.e. gcc 4.2.1.

Confirmed.  On amd64, without X gives a successful build, with it gives the error.

Successful build without X: http://pkg.awarnach.mathstat.dal.ca/data/9amd64-default/2016-02-15_13h30m20s/logs/errors/emacs-devel-25.0.90,2.log*
Unsuccessful build With X:  http://pkg.awarnach.mathstat.dal.ca/data/9amd64-default/2016-02-15_13h54m53s/logs/errors/emacs-devel-25.0.90,2.log

* The package installation errors at the end are unrelated to Emacs.  I just didn't deal with file changes when I testing.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Wed, 17 Feb 2016 03:39:02 GMT) Full text and rfc822 format available.

Message #40 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Joseph Mingrone <jrm <at> ftfl.ca>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: ashish <at> FreeBSD.org, Wolfgang Jenkner <wjenkner <at> inode.at>,
 22065 <at> debbugs.gnu.org, Dmitry Antipov <dmantipov <at> yandex.ru>
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Tue, 16 Feb 2016 23:38:20 -0400
[Message part 1 (text/plain, inline)]
I was working on the requested backtrace and discovered a few things.  As I mentioned before, when testing with the FreeBSD port, the problem remained.  When testing without the port (manually doing ./configure (g)make) everything worked fine, even with the first pretest, 25.0.90.  I believe these lines in the FreeBSD port's Makefile are the problem.

CPPFLAGS+=      -I${LOCALBASE}/include
LDFLAGS+=       -L${LOCALBASE}/lib

After removing those lines, the FreeBSD port also builds fine.

Paul, when you confirmed the core dump, did you test by using the FreeBSD port system?

Joseph
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Wed, 17 Feb 2016 07:57:01 GMT) Full text and rfc822 format available.

Message #43 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Joseph Mingrone <jrm <at> ftfl.ca>
Cc: ashish <at> FreeBSD.org, Wolfgang Jenkner <wjenkner <at> inode.at>,
 22065 <at> debbugs.gnu.org, Dmitry Antipov <dmantipov <at> yandex.ru>
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Tue, 16 Feb 2016 23:56:13 -0800
Joseph Mingrone wrote:
> Paul, when you confirmed the core dump, did you test by using the FreeBSD port system?

I don't recall asking for the port system. I just built on a freshly installed 
FreeBSD-9.3-RELEASE-i386-dvd1.iso running under VirtualBox, mostly by choosing 
defaults. I vaguely recall something about port.txz being installed by default 
but I didn't pay much attention. Sorry, I don't know much about the FreeBSD port 
system.

I just now did a similar build with FreeBSD-9.3-RELEASE-amd64-dvd1.iso and the 
latest emacs-25 commit (15a946479c96fdce693c13acfe41a66266ffcadb) and it also 
worked.

Neither build used X, though. I guess X isn't part of the base release. What's 
an easy way to install the X development packages on a bare FreeBSD 9 install?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Wed, 17 Feb 2016 13:24:01 GMT) Full text and rfc822 format available.

Message #46 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Wolfgang Jenkner <wjenkner <at> inode.at>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Joseph Mingrone <jrm <at> ftfl.ca>, ashish <at> FreeBSD.org, 22065 <at> debbugs.gnu.org,
 Dmitry Antipov <dmantipov <at> yandex.ru>
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Wed, 17 Feb 2016 14:23:39 +0100
On Tue, Feb 16 2016, Paul Eggert wrote:

> Neither build used X, though. I guess X isn't part of the base
> release. What's an easy way to install the X development packages on
> a bare FreeBSD 9 install?

The OP's log shows that the failed build used gtk2, actually, which

pkg add gtk2

would install (with all library headers, as they are never packaged
separately).  However, he also said that building emacs from sources
with this configuration works, only using the FreeBSD package building
system (aka "ports") for that doesn't, so the problem seems to be there.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Wed, 17 Feb 2016 15:37:01 GMT) Full text and rfc822 format available.

Message #49 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Joseph Mingrone <jrm <at> ftfl.ca>
To: Wolfgang Jenkner <wjenkner <at> inode.at>
Cc: 22065 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>, ashish <at> FreeBSD.org,
 Dmitry Antipov <dmantipov <at> yandex.ru>
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Wed, 17 Feb 2016 11:35:55 -0400
[Message part 1 (text/plain, inline)]
Wolfgang Jenkner <wjenkner <at> inode.at> writes:

> On Tue, Feb 16 2016, Paul Eggert wrote:

>> Neither build used X, though. I guess X isn't part of the base
>> release. What's an easy way to install the X development packages on
>> a bare FreeBSD 9 install?

> The OP's log shows that the failed build used gtk2, actually, which

> pkg add gtk2

> would install (with all library headers, as they are never packaged
> separately).  However, he also said that building emacs from sources
> with this configuration works, only using the FreeBSD package building
> system (aka "ports") for that doesn't, so the problem seems to be there.

Right.  So after

% pkg install gtk2 (you want pkg *install*, not pkg *add*)
% pkg install gmake

(there may be other dependencies)

% ./configure
% gmake

should work with and without the patch.

However,

make -C /usr/ports/editors/emacs-devel

will not.

The two lines from the FreeBSD port haven't changed in years.  I've submitted a
patch for the FreeBSD port.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Wed, 17 Feb 2016 17:50:02 GMT) Full text and rfc822 format available.

Message #52 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Wolfgang Jenkner <wjenkner <at> inode.at>
To: Joseph Mingrone <jrm <at> ftfl.ca>
Cc: 22065 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>, ashish <at> FreeBSD.org,
 Dmitry Antipov <dmantipov <at> yandex.ru>
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Wed, 17 Feb 2016 18:49:50 +0100
On Tue, Feb 16 2016, Joseph Mingrone wrote:

> When testing without the port (manually doing ./configure (g)make) everything worked fine, even with the first pretest, 25.0.90.  

But bootstrapping it still fails with base gcc in a FreeBSD 9 amd64
jail, so I wouldn't trust the binary from a non-bootstrap build either.

gmake maintainer-clean && ./autogen.sh &&
./configure --without-all --without-x && gmake




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Wed, 17 Feb 2016 22:46:01 GMT) Full text and rfc822 format available.

Message #55 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Joseph Mingrone <jrm <at> ftfl.ca>
To: Wolfgang Jenkner <wjenkner <at> inode.at>
Cc: 22065 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>, ashish <at> FreeBSD.org,
 Dmitry Antipov <dmantipov <at> yandex.ru>
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Wed, 17 Feb 2016 18:45:37 -0400
[Message part 1 (text/plain, inline)]
Wolfgang Jenkner <wjenkner <at> inode.at> writes:

> On Tue, Feb 16 2016, Joseph Mingrone wrote:

>> When testing without the port (manually doing ./configure (g)make) everything worked fine, even with the first pretest, 25.0.90.  

> But bootstrapping it still fails with base gcc in a FreeBSD 9 amd64
> jail, so I wouldn't trust the binary from a non-bootstrap build either.

> gmake maintainer-clean && ./autogen.sh &&
> ./configure --without-all --without-x && gmake

Unless I'm missing something, bootstrapping doesn't fail here with base gcc in a
FreeBSD 9 adm64 jail.  I've attached a script log.

Joseph

[emacs-25.0.90-freebsd-9amd64-build.log (application/octet-stream, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Thu, 18 Feb 2016 13:41:02 GMT) Full text and rfc822 format available.

Message #58 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Wolfgang Jenkner <wjenkner <at> inode.at>
To: Joseph Mingrone <jrm <at> ftfl.ca>
Cc: ashish <at> FreeBSD.org, 22065 <at> debbugs.gnu.org,
 Dmitry Antipov <dmantipov <at> yandex.ru>, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Thu, 18 Feb 2016 14:39:06 +0100
On Wed, Feb 17 2016, Joseph Mingrone wrote:

> gmake[2]: Nothing to be done for 'compile-first'.

That's not a bootstrap build (and it's actually that target where
bootstrapping fails).

You can also just do `gmake bootstrap' instead of following my previous
suggestion.




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sun, 20 Mar 2016 02:41:01 GMT) Full text and rfc822 format available.

Notification sent to Joseph Mingrone <jrm <at> ftfl.ca>:
bug acknowledged by developer. (Sun, 20 Mar 2016 02:41:01 GMT) Full text and rfc822 format available.

Message #63 received at 22065-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 22065-done <at> debbugs.gnu.org
Subject: Re: bug#22065: core dumped during compilation (emacs-25 branch on
 FreeBSD 9)
Date: Sat, 19 Mar 2016 19:40:00 -0700
Given that you have a workaround that fixes the problem for you (use clang 
rather than gcc for that old FreeBSD version) and given that I don't have time 
to navigate through the FreeBSD ports system to reproduce the problem on that 
old FreeBSD version, I'm inclined to declare victory for this particular bug and 
close the bug report.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22065; Package emacs. (Sun, 20 Mar 2016 02:53:01 GMT) Full text and rfc822 format available.

Message #66 received at 22065 <at> debbugs.gnu.org (full text, mbox):

From: Joseph Mingrone <jrm <at> ftfl.ca>
To: help-debbugs <at> gnu.org (GNU bug Tracking System)
Cc: 22065 <at> debbugs.gnu.org
Subject: Re: bug#22065: closed (Re: bug#22065: core dumped during compilation
 (emacs-25 branch on FreeBSD 9))
Date: Sat, 19 Mar 2016 23:52:02 -0300
[Message part 1 (text/plain, inline)]
I think that's a wise investment of time.  Sorry I didn't get back to you sooner about the bootstrap build issue.  Spare cycles from work had run out.  And, (from a user perspective) it is working with the old gcc in FreeBSD 9.

Thanks,

Joseph
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 17 Apr 2016 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 4 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.