unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Porting Emacs on new platform.
@ 2021-09-14 22:27 Рабочая Почта
  2021-09-15  1:15 ` Po Lu
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Рабочая Почта @ 2021-09-14 22:27 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]

Greetings.
Could you explain how a portable dumper Emacs works (bootstrap-emacs.pdmp)
and where it is placed in sources? I just haven't time to examine all the
source code. Forgive me for that.
It crashes. That's okay, because I'm with my protege porting Emacs to a new
platform (e2k).

Here are logs with errors.

Wrong type argument: listp, make[1]: * [Makefile:824: bootstrap-emacs.pdmp]
Ошибка сегментированияmake[1]: выход из каталога ((exit from directory))
«/root/emacs-27.2/src»make: * [Makefile:424: src] Ошибка  ((error)) 2

Wrong type argument: listp, make[1]: *** [Makefile:824:
bootstrap-emacs.pdmp] Segmentation fault
make[1]: выход из каталога ((exit from directory))
«/home/ddrdmakar/emacs/emacs-27.2/src»
make: *** [Makefile:424: src] Ошибка ((error)) 2

With --with-dumping=none it builds successfully, it works, but crashes
sometimes. That will be fixed by simple debugging.

BTW, could you send me instructions about working with your repo me to
merge changes right? I mean to give our changes to you properly .

Best regards, Gregory.

[-- Attachment #2: Type: text/html, Size: 1372 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Porting Emacs on new platform.
  2021-09-14 22:27 Porting Emacs on new platform Рабочая Почта
@ 2021-09-15  1:15 ` Po Lu
  2021-09-15 21:32   ` Рабочая Почта
  2021-09-15  6:05 ` Eli Zaretskii
  2021-09-16  7:30 ` Andreas Schwab
  2 siblings, 1 reply; 9+ messages in thread
From: Po Lu @ 2021-09-15  1:15 UTC (permalink / raw)
  To: Рабочая
	Почта
  Cc: emacs-devel

Рабочая Почта <work.mail.for.me.tgg@gmail.com> writes:

> Wrong type argument: listp, make[1]: * [Makefile:824:
> bootstrap-emacs.pdmp] Ошибка сегментированияmake[1]: выход из каталога
> ((exit from directory)) «/root/emacs-27.2/src»make: * [Makefile:424:
> src] Ошибка ((error)) 2
>
> Wrong type argument: listp, make[1]: *** [Makefile:824:
> bootstrap-emacs.pdmp] Segmentation fault make[1]: выход из каталога
> ((exit from directory)) «/home/ddrdmakar/emacs/emacs-27.2/src» make:
> *** [Makefile:424: src] Ошибка ((error)) 2

If I'm not mistaken, this bug does not lie in the portable dumper.
Instead, I think, something is corrupting memory during loadup, which is
causing Emacs to try to print an invalid object.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Porting Emacs on new platform.
  2021-09-14 22:27 Porting Emacs on new platform Рабочая Почта
  2021-09-15  1:15 ` Po Lu
@ 2021-09-15  6:05 ` Eli Zaretskii
  2021-09-15 22:20   ` Рабочая Почта
  2021-09-16  7:30 ` Andreas Schwab
  2 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-09-15  6:05 UTC (permalink / raw)
  To: Рабочая
	Почта
  Cc: emacs-devel

> From: Рабочая Почта
>  <work.mail.for.me.tgg@gmail.com>
> Date: Wed, 15 Sep 2021 01:27:55 +0300
> 
> Could you explain how a portable dumper Emacs works (bootstrap-emacs.pdmp) and where it is placed in
> sources?

The portable dumper code is mainly in pdumper.c and pdumper.h.

> I just haven't time to examine all the source code. Forgive me for that.
> It crashes. That's okay, because I'm with my protege porting Emacs to a new platform (e2k).

What is special about that platform?  Which OS kernel and what C
library are you using to build Emacs?  Is e2k similar to any other
common Posix platforms?

> Here are logs with errors.
> 
> Wrong type argument: listp, make[1]: * [Makefile:824: bootstrap-emacs.pdmp] Ошибка
> сегментированияmake[1]: выход из каталога ((exit from directory)) «/root/emacs-27.2/src»make: *
> [Makefile:424: src] Ошибка  ((error)) 2
> 
> Wrong type argument: listp, make[1]: *** [Makefile:824: bootstrap-emacs.pdmp] Segmentation fault
> make[1]: выход из каталога ((exit from directory)) «/home/ddrdmakar/emacs/emacs-27.2/src»
> make: *** [Makefile:424: src] Ошибка ((error)) 2

These just say Emacs segfaulted, but not much else.  If there are
other messages around this one, please show them as well.

> With --with-dumping=none it builds successfully, it works, but crashes sometimes. That will be fixed by
> simple debugging. 

Regardless of whether it works with pdumper or not, the first step
towards understanding the problem is to run the failing command line
under GDB and getting the backtrace from the crash site, preferably
also understanding what was the immediate cause of the crash.  Only
then it would be possible to tell whether the code in pdumper.c is
part of the issue.

> BTW, could you send me instructions about working with your repo me to merge changes right? I mean to
> give our changes to you properly .

We prefer patches in "git format-patch" form, but if that's hard for
you, diffs produced by the Diff utility will also be okay.  See the
file CONTRIBUTE for more about this.

Thank you for your interest in Emacs.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Porting Emacs on new platform.
  2021-09-15  1:15 ` Po Lu
@ 2021-09-15 21:32   ` Рабочая Почта
  2021-09-16  3:14     ` Po Lu
  2021-09-16  5:22     ` Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Рабочая Почта @ 2021-09-15 21:32 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]

Thanks for answering.

This is a bug of building Emacs, not using it.

./autogen.sh
./configure --with-x-toolkit=no --with-xpm=no --with-jpeg=no --with-png=no
--with-gif=no --with-tiff=no
make
make install

You can't repeat this bug. Because this bug is due to a new processor.
But I would be happy if you said how to set flags to compile Emacs with
debug information.

ср, 15 сент. 2021 г. в 04:15, Po Lu <luangruo@yahoo.com>:

> Рабочая Почта <work.mail.for.me.tgg@gmail.com> writes:
>
> > Wrong type argument: listp, make[1]: * [Makefile:824:
> > bootstrap-emacs.pdmp] Ошибка сегментированияmake[1]: выход из каталога
> > ((exit from directory)) «/root/emacs-27.2/src»make: * [Makefile:424:
> > src] Ошибка ((error)) 2
> >
> > Wrong type argument: listp, make[1]: *** [Makefile:824:
> > bootstrap-emacs.pdmp] Segmentation fault make[1]: выход из каталога
> > ((exit from directory)) «/home/ddrdmakar/emacs/emacs-27.2/src» make:
> > *** [Makefile:424: src] Ошибка ((error)) 2
>
> If I'm not mistaken, this bug does not lie in the portable dumper.
> Instead, I think, something is corrupting memory during loadup, which is
> causing Emacs to try to print an invalid object.
>

[-- Attachment #2: Type: text/html, Size: 1788 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Porting Emacs on new platform.
  2021-09-15  6:05 ` Eli Zaretskii
@ 2021-09-15 22:20   ` Рабочая Почта
  2021-09-15 22:49     ` Stephen Berman
  0 siblings, 1 reply; 9+ messages in thread
From: Рабочая Почта @ 2021-09-15 22:20 UTC (permalink / raw)
  To: Eli Zaretskii, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 3032 bytes --]

 Thanks for answering.

Thanks for pointing out where places dumper in.
Yes, E2K, when Linux is installed, is a common Posix platform.
No important messages around, only in/out directory and compiling. But i
can send this btw, then will be working with the machine again.
Could you say, how to compile emacs with debugging information? I mean
proper building with scripts like this:
./autogen.sh
./configure --with-x-toolkit=no --with-xpm=no --with-jpeg=no --with-png=no
--with-gif=no --with-tiff=no
make
make install

And how do you advise debugging Elisp code?

And where to send the patches? To this mail?

Thanks for helping.

ср, 15 сент. 2021 г. в 09:06, Eli Zaretskii <eliz@gnu.org>:

> > From: Рабочая Почта
> >  <work.mail.for.me.tgg@gmail.com>
> > Date: Wed, 15 Sep 2021 01:27:55 +0300
> >
> > Could you explain how a portable dumper Emacs works
> (bootstrap-emacs.pdmp) and where it is placed in
> > sources?
>
> The portable dumper code is mainly in pdumper.c and pdumper.h.
>
> > I just haven't time to examine all the source code. Forgive me for that.
> > It crashes. That's okay, because I'm with my protege porting Emacs to a
> new platform (e2k).
>
> What is special about that platform?  Which OS kernel and what C
> library are you using to build Emacs?  Is e2k similar to any other
> common Posix platforms?
>
> > Here are logs with errors.
> >
> > Wrong type argument: listp, make[1]: * [Makefile:824:
> bootstrap-emacs.pdmp] Ошибка
> > сегментированияmake[1]: выход из каталога ((exit from directory))
> «/root/emacs-27.2/src»make: *
> > [Makefile:424: src] Ошибка  ((error)) 2
> >
> > Wrong type argument: listp, make[1]: *** [Makefile:824:
> bootstrap-emacs.pdmp] Segmentation fault
> > make[1]: выход из каталога ((exit from directory))
> «/home/ddrdmakar/emacs/emacs-27.2/src»
> > make: *** [Makefile:424: src] Ошибка ((error)) 2
>
> These just say Emacs segfaulted, but not much else.  If there are
> other messages around this one, please show them as well.
>
> > With --with-dumping=none it builds successfully, it works, but crashes
> sometimes. That will be fixed by
> > simple debugging.
>
> Regardless of whether it works with pdumper or not, the first step
> towards understanding the problem is to run the failing command line
> under GDB and getting the backtrace from the crash site, preferably
> also understanding what was the immediate cause of the crash.  Only
> then it would be possible to tell whether the code in pdumper.c is
> part of the issue.
>
> > BTW, could you send me instructions about working with your repo me to
> merge changes right? I mean to
> > give our changes to you properly .
>
> We prefer patches in "git format-patch" form, but if that's hard for
> you, diffs produced by the Diff utility will also be okay.  See the
> file CONTRIBUTE for more about this.
>
> Thank you for your interest in Emacs.
>

[-- Attachment #2: Type: text/html, Size: 3667 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Porting Emacs on new platform.
  2021-09-15 22:20   ` Рабочая Почта
@ 2021-09-15 22:49     ` Stephen Berman
  0 siblings, 0 replies; 9+ messages in thread
From: Stephen Berman @ 2021-09-15 22:49 UTC (permalink / raw)
  To: Рабочая
	Почта
  Cc: Eli Zaretskii, emacs-devel

On Thu, 16 Sep 2021 01:20:46 +0300 Рабочая Почта <work.mail.for.me.tgg@gmail.com> wrote:

>  Thanks for answering.
>
> Thanks for pointing out where places dumper in.
> Yes, E2K, when Linux is installed, is a common Posix platform.
> No important messages around, only in/out directory and compiling. But
> i can send this btw, then will
> be working with the machine again.
> Could you say, how to compile emacs with debugging information? I mean
> proper building with scripts like this:
> ./autogen.sh
> ./configure --with-x-toolkit=no --with-xpm=no --with-jpeg=no
> --with-png=no --with-gif=no --with-tiff=no
> make
> make install

<emacs>/etc/DEBUG say this:

  *** Configuring Emacs for debugging
  
  It is best to configure and build Emacs with special options that will
  make the debugging easier.  Here are the configure-time options we
  recommend (they are in addition to any other options you might need,
  such as --prefix):
  
    ./configure --enable-checking='yes,glyphs' --enable-check-lisp-object-type \
      CFLAGS='-O0 -g3'
  
  The -O0 flag is important, as debugging optimized code can be hard.
  If the problem happens only with optimized code, you may need to
  enable optimizations.  If that happens, try using -Og first instead of
  -O2, as -Og disables some optimizations that make debugging some code
  exceptionally hard.

> And how do you advise debugging Elisp code?

See the above mentioned file for more details.

> And where to send the patches? To this mail?

Probably best to send to the debbugs issue tracker; using `M-x
submit-emacs-patch' might be helpful for that.

> Thanks for helping.

Steve Berman



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Porting Emacs on new platform.
  2021-09-15 21:32   ` Рабочая Почта
@ 2021-09-16  3:14     ` Po Lu
  2021-09-16  5:22     ` Eli Zaretskii
  1 sibling, 0 replies; 9+ messages in thread
From: Po Lu @ 2021-09-16  3:14 UTC (permalink / raw)
  To: Рабочая
	Почта
  Cc: emacs-devel

Рабочая Почта <work.mail.for.me.tgg@gmail.com> writes:

> Thanks for answering.
>
> This is a bug of building Emacs, not using it.
>
> ./autogen.sh
> ./configure --with-x-toolkit=no --with-xpm=no --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no
> make
> make install
>
> You can't repeat this bug. Because this bug is due to a new processor.
> But I would be happy if you said how to set flags to compile Emacs with debug information.

Please compile Emacs with:

  ./configure --enable-checking='yes,glyphs' --enable-check-lisp-object-type \
    CFLAGS='-O0 -g3'



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Porting Emacs on new platform.
  2021-09-15 21:32   ` Рабочая Почта
  2021-09-16  3:14     ` Po Lu
@ 2021-09-16  5:22     ` Eli Zaretskii
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2021-09-16  5:22 UTC (permalink / raw)
  To: Рабочая
	Почта
  Cc: luangruo, emacs-devel

> From: Рабочая Почта
>  <work.mail.for.me.tgg@gmail.com>
> Date: Thu, 16 Sep 2021 00:32:26 +0300
> Cc: emacs-devel@gnu.org
> 
> This is a bug of building Emacs, not using it.
> 
> ./autogen.sh
> ./configure --with-x-toolkit=no --with-xpm=no --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no
> make
> make install

But building Emacs involves running the built Emacs binary, so these
two are not really separated.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Porting Emacs on new platform.
  2021-09-14 22:27 Porting Emacs on new platform Рабочая Почта
  2021-09-15  1:15 ` Po Lu
  2021-09-15  6:05 ` Eli Zaretskii
@ 2021-09-16  7:30 ` Andreas Schwab
  2 siblings, 0 replies; 9+ messages in thread
From: Andreas Schwab @ 2021-09-16  7:30 UTC (permalink / raw)
  To: Рабочая
	Почта
  Cc: emacs-devel

On Sep 15 2021, Рабочая Почта wrote:

> With --with-dumping=none it builds successfully, it works, but crashes
> sometimes. That will be fixed by simple debugging.

This could be a GC problem.  Perhaps stack marking doesn't find all live
roots, causing objects to be collected too early.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-09-16  7:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 22:27 Porting Emacs on new platform Рабочая Почта
2021-09-15  1:15 ` Po Lu
2021-09-15 21:32   ` Рабочая Почта
2021-09-16  3:14     ` Po Lu
2021-09-16  5:22     ` Eli Zaretskii
2021-09-15  6:05 ` Eli Zaretskii
2021-09-15 22:20   ` Рабочая Почта
2021-09-15 22:49     ` Stephen Berman
2021-09-16  7:30 ` Andreas Schwab

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).