From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Fabrice Popineau Newsgroups: gmane.emacs.devel Subject: Re: Building Emacs on WSL Date: Tue, 20 Dec 2016 13:40:37 +0100 Message-ID: References: <4829e397-ac70-ab22-9c01-848ae876db46@alice.it> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e01493e640ec5d0054416593d X-Trace: blaine.gmane.org 1482256306 20375 195.159.176.226 (20 Dec 2016 17:51:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 20 Dec 2016 17:51:46 +0000 (UTC) Cc: Emacs developers To: Angelo Graziosi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 20 18:51:42 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJOZe-0004WD-2Q for ged-emacs-devel@m.gmane.org; Tue, 20 Dec 2016 18:51:38 +0100 Original-Received: from localhost ([::1]:52672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJOZi-00018d-GB for ged-emacs-devel@m.gmane.org; Tue, 20 Dec 2016 12:51:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJOXu-0007sP-B0 for emacs-devel@gnu.org; Tue, 20 Dec 2016 12:49:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJOXr-0001hO-7e for emacs-devel@gnu.org; Tue, 20 Dec 2016 12:49:50 -0500 Original-Received: from smtp2.supelec.fr ([160.228.120.31]:49595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJOXq-0001gG-Sq for emacs-devel@gnu.org; Tue, 20 Dec 2016 12:49:47 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by smtp2.supelec.fr (Postfix) with ESMTP id 00BDF800F9 for ; Tue, 20 Dec 2016 18:49:41 +0100 (CET) X-Virus-Scanned: amavisd-new at smtp2.supelec.fr Original-Received: from smtp2.supelec.fr ([127.0.0.1]) by localhost (smtp2.supelec.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ok9Y3AbH7jR4 for ; Tue, 20 Dec 2016 18:49:40 +0100 (CET) Original-Received: from mail-wj0-f182.google.com (mail-wj0-f182.google.com [209.85.210.182]) by smtp2.supelec.fr (Postfix) with ESMTPSA id 5FDD4800F8 for ; Tue, 20 Dec 2016 18:49:40 +0100 (CET) Original-Received: by mail-wj0-f182.google.com with SMTP id tg4so184014444wjb.1 for ; Tue, 20 Dec 2016 09:49:40 -0800 (PST) X-Gm-Message-State: AIkVDXJYNurfQy4OD6XYGslNh39puUnLenbkLTe/QwzpCJI/q+M+nNGvqcV0P2mlmnLa8hA4NDgXut3urVVGXA== X-Received: by 10.194.243.231 with SMTP id xb7mr21021241wjc.60.1482237657660; Tue, 20 Dec 2016 04:40:57 -0800 (PST) Original-Received: by 10.28.153.205 with HTTP; Tue, 20 Dec 2016 04:40:37 -0800 (PST) In-Reply-To: X-Gmail-Original-Message-ID: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 160.228.120.31 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210664 Archived-At: --089e01493e640ec5d0054416593d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > > > Emacs master fails with the same configuration. It fails bootstrapping: > > (gdb) run --batch --load loadup bootstrap > Starting program: /mnt/d/Source/emacs/build-emacs-ubuntu/src/temacs > --batch --load loadup bootstrap > warning: Error disabling address space randomization: Succ=C3=A8s > warning: linux_ptrace_test_ret_to_nx: PTRACE_KILL waitpid returned -1: > Appel syst=C3=A8me interrompu > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1"= . > process 17622 is executing new program: /mnt/d/Source/emacs/build- > emacs-ubuntu/src/temacs > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1"= . > process 17622 is executing new program: /mnt/d/Source/emacs/build- > emacs-ubuntu/src/temacs > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1"= . > process 17622 is executing new program: /mnt/d/Source/emacs/build- > emacs-ubuntu/src/temacs > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1"= . > process 17622 is executing new program: /mnt/d/Source/emacs/build- > emacs-ubuntu/src/temacs > > I must admit that I don't know how to read what gdb is reporting. > > However, there is a simple fix: diff --git a/src/emacs.c b/src/emacs.c index dc13b15..46a0593 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -699,6 +699,7 @@ main (int argc, char **argv) bool disable_aslr =3D dumping; # endif +#if 0 if (disable_aslr && disable_address_randomization ()) { /* Set this so the personality will be reverted before execs @@ -712,6 +713,7 @@ main (int argc, char **argv) /* If the exec fails, warn and then try anyway. */ perror (argv[0]); } +#endif #ifndef CANNOT_DUMP might_dump =3D !initialized; Now, Spacemacs loads as well with master. Fabrice --089e01493e640ec5d0054416593d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Emacs master fails with the same configuration. It fails bootstrapp= ing:

(gdb) run =C2=A0--batch =C2=A0--load loa= dup bootstrap
Starting program: /mnt/d/Source/emacs/build-em= acs-ubuntu/src/temacs --batch =C2=A0--load loadup bootstrap
warni= ng: Error disabling address space randomization: Succ=C3=A8s
warn= ing: linux_ptrace_test_ret_to_nx: PTRACE_KILL waitpid returned -1: Appel sy= st=C3=A8me interrompu
[Thread debugging using libthread_db enable= d]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
process 17622 is executing new progra= m: /mnt/d/Source/emacs/build-emacs-ubuntu/src/temacs
[Thread= debugging using libthread_db enabled]
Using host libthread_db li= brary "/lib/x86_64-linux-gnu/libthread_db.so.1".
p= rocess 17622 is executing new program: /mnt/d/Source/emacs/build-emacs= -ubuntu/src/temacs
[Thread debugging using libthread_db enabled]<= /div>
Using host libthread_db library "/lib/x86_64-linux-gnu/= libthread_db.so.1".
process 17622 is executing new program: = /mnt/d/Source/emacs/build-emacs-ubuntu/src/temacs
[Thread de= bugging using libthread_db enabled]
Using host libthread_db libra= ry "/lib/x86_64-linux-gnu/libthread_db.so.1".
proc= ess 17622 is executing new program: /mnt/d/Source/emacs/build-emacs-ub= untu/src/temacs

I must admit that I don'= t know how to read what gdb is reporting.=C2=A0

<= /blockquote>

However, there is a simple fix:
<= br>
diff --git a/src/emacs.c b/src/emacs.c
index dc13b1= 5..46a0593 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -699,6 +699,7 @@ main (int argc, char **argv)
=C2=A0 = =C2=A0bool disable_aslr =3D dumping;
=C2=A0# endif

=
+#if 0
=C2=A0 =C2=A0if (disable_aslr && disabl= e_address_randomization ())
=C2=A0 =C2=A0 =C2=A0{
=C2= =A0 =C2=A0 =C2=A0 =C2=A0/* Set this so the personality will be reverted bef= ore execs
@@ -712,6 +713,7 @@ main (int argc, char **argv)
<= div>=C2=A0 =C2=A0 =C2=A0 =C2=A0/* If the exec fails, warn and then try anyw= ay. =C2=A0*/
=C2=A0 =C2=A0 =C2=A0 =C2=A0perror (argv[0]);
=C2=A0 =C2=A0 =C2=A0}
+#endif

=C2=A0#= ifndef CANNOT_DUMP
=C2=A0 =C2=A0might_dump =3D !initialized;

Now, Spacemacs loads as well with master.
Fabrice
--089e01493e640ec5d0054416593d--