unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Yavor Doganov <yavor@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: [Emacs.app dev]: Emacs.app now in GNU Emacs CVS
Date: Wed, 16 Jul 2008 20:54:23 +0300	[thread overview]
Message-ID: <87tzepiuk0.GNU's_Not_Unix!%yavor@gnu.org> (raw)
In-Reply-To: <buok5fmgx67.fsf@dhapc248.dev.necel.com>

Miles Bader wrote:
> 
> FWIW, here's a little gdb session with stack backtrace... not very
> useful looking but...
> 
> [It dies even if I just run src/bootstrap-emacs without any arguments]

It fails also on gNewSense 2.0 as well with older versions of the
GNUstep (-base 1.14.1, -gui 0.12.0) libraries.

Further debugging (with GNUstep Base built with libffi, as libffcall
munges the backtrace more aggressively) shows that the fault is in
nsterm.m:

void *
ns_alloc_autorelease_pool ()
/* --------------------------------------------------------------------------
     Allocate a pool for temporary objects (callable from C)
   -------------------------------------------------------------------------- */
{
  return [[NSAutoreleasePool alloc] init];
}

This function is called in emacs.c and it appears that this is the
first ObjC function called at initialization.  Maybe there are
necessary compiler/linker flags and options that are omitted for some
reason (deliberate or not); perhaps it is related to -nostdlib and
-lgcc used in Emacs' build system (for reasons I can't fully
understand) or some other oddity.

If it would be of any help, here is how GNUstep Make compiles a random
GNUstep application on GNU/Linux:

gcc Section.m -c \
	      -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -D_REENTRANT -fPIC -g -Wall -DDEBUG -fno-omit-frame-pointer -DGSWARN -DGSDIAGNOSE -Wno-import -g -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fgnu-runtime -fconstant-string-class=NSConstantString -I. -I/home/yavor/GNUstep/Library/Headers -I/usr/local/include/GNUstep -I/usr/include/GNUstep \
	       -o obj/Section.o

Link stage:

gcc  -rdynamic      -shared-libgcc -fexceptions -fgnu-runtime -o HelpViewer.app/./HelpViewer \
	./obj/main.o ./obj/mainWindowController.o ./obj/Label.o ./obj/Controller.o ./obj/FigureCell.o ./obj/Legend.o ./obj/HandlerStructureXLP.o ./obj/TextFormatterXLP.o ./obj/BrowserCell.o ./obj/NoteCell.o ./obj/ModNSString.o ./obj/BRCell.o ./obj/Page.o ./obj/Section.o      -L/home/yavor/GNUstep/Library/Libraries -L/usr/local/lib -L/usr/lib     -lgnustep-gui    -lgnustep-base   -lpthread -lobjc   -lm

I tried a dirty workaround by modifying src/Makefile to include the
missing flags, to no avail.

This is, IMVHO, a grave problem caused by miscompilation/linking on
GNU/Linux; but it looks rather obscure to me right now so I am sorry I
can't really help.

It is unfortunate that the Emacs.app developers run primarily Muck OS
and the code was not tested on GNUstep under GNU/Linux.  Anyway, such
failures right after the merge are more or less expected.  I'll dive
into this tomorrow, unless someone fixes the problem.

Nevertheless, it is a great day for all the GNUsteppers who are also
monks in the GNU Emacs Church -- we've been waiting for the Holy Merge
for years.  Thanks to all the people who made it happen, and of course
Adrian for keeping up with Emacs changes through the years.





  parent reply	other threads:[~2008-07-16 17:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <476AEFF3-F98D-4D19-A8B0-219C790536F7@gmail.com>
     [not found] ` <19e566510807151217q7276dd61wa93aaa13b842e296@mail.gmail.com>
     [not found]   ` <170476C2-EF90-40DC-BB6F-0C54AFA10884@gmail.com>
     [not found]     ` <64B63861-E635-420F-BC96-8DA189246E72@gmail.com>
2008-07-16  0:23       ` [Emacs.app dev]: Emacs.app now in GNU Emacs CVS David Reitter
2008-07-16  1:09         ` Glenn Morris
2008-07-16  5:22           ` David Reitter
2008-07-16  6:18             ` CHENG Gao
2008-07-16 12:36             ` Adrian Robert
2008-07-16  1:49         ` Stefan Monnier
2008-07-16  3:01           ` Adrian Robert
2008-07-16  3:09             ` Cezar Halmagean
2008-08-09 18:36               ` Peter Dyballa
2008-07-16  4:15             ` CHENG Gao
2008-07-16  2:03         ` Seiji Zenitani
2008-07-16  3:06         ` Miles Bader
2008-07-16  6:28           ` Miles Bader
2008-07-16  6:36             ` Miles Bader
2008-07-16 17:54             ` Yavor Doganov [this message]
     [not found]             ` <87tzepiuk0.GNU\'s_Not_Unix!%yavor@gnu.org>
2008-07-17 19:03               ` Adrian Robert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='87tzepiuk0.GNU'\''s_Not_Unix'\!'%yavor@gnu.org' \
    --to=yavor@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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 read-only IMAP folder(s) and NNTP newsgroup(s).