TAKAHASHI Naoto | 2 Mar 07:35

[FWD] compiling emacs-bidi

Can anybody answer the following question?

> Hi,
> 
> I am trying to compile emacs-bidi but I get a "Segmentation fault" in the compilation process. Below is the
log of the compilation process after I execute "make". I am running Fedora Linux with the 2.4.22-1.2115
kernel. Any help that you can provide in ovecoming this problem will be greatly appreciated. Thanks.
> 
> R****
> 
> ----------------------------------------------------------------------------------
> cd lib-src; make all  \
>   CC='gcc' CFLAGS='-g -O2' CPPFLAGS='-D_BSD_SOURCE  ' \
>   LDFLAGS='-L/usr/X11R6/lib' MAKE='make'
> make[1]: Entering directory `/extras/emacs-bidi/emacs-bidi/lib-src'
> gcc -D_BSD_SOURCE -DHAVE_CONFIG_H -I. -I../src -I/extras/emacs-bidi/emacs-bidi/lib-src
-I/extras/emacs-bidi/emacs-bidi/lib-src/../src -L/usr/X11R6/lib -D_BSD_SOURCE   -g -O2 -o
test-distrib /extras/emacs-bidi/emacs-bidi/lib-src/test-distrib.c
> ./test-distrib /extras/emacs-bidi/emacs-bidi/lib-src/testfile
> gcc -D_BSD_SOURCE -DHAVE_CONFIG_H -I. -I../src -I/extras/emacs-bidi/emacs-bidi/lib-src
-I/extras/emacs-bidi/emacs-bidi/lib-src/../src -L/usr/X11R6/lib -D_BSD_SOURCE   -g -O2
/extras/emacs-bidi/emacs-bidi/lib-src/make-docfile.c -lc -o make-docfile
> gcc -D_BSD_SOURCE -DHAVE_CONFIG_H -I. -I../src -I/extras/emacs-bidi/emacs-bidi/lib-src
-I/extras/emacs-bidi/emacs-bidi/lib-src/../src -L/usr/X11R6/lib -D_BSD_SOURCE   -g -O2
/extras/emacs-bidi/emacs-bidi/lib-src/profile.c -lc -o profile
> gcc -D_BSD_SOURCE -DHAVE_CONFIG_H -I. -I../src -I/extras/emacs-bidi/emacs-bidi/lib-src
-I/extras/emacs-bidi/emacs-bidi/lib-src/../src -L/usr/X11R6/lib -D_BSD_SOURCE   -g -O2
/extras/emacs-bidi/emacs-bidi/lib-src/digest-doc.c -lc -o digest-doc
> gcc -D_BSD_SOURCE -DHAVE_CONFIG_H -I. -I../src -I/extras/emacs-bidi/emacs-bidi/lib-src
-I/extras/emacs-bidi/emacs-bidi/lib-src/../src -L/usr/X11R6/lib -D_BSD_SOURCE   -g -O2
(Continue reading)

Eli Zaretskii | 2 Mar 17:45
Picon

Re: [FWD] compiling emacs-bidi

> Date: Tue, 2 Mar 2004 15:35:17 +0900 (JST)
> From: TAKAHASHI Naoto <ntakahas <at> m17n.org>
> 
> Can anybody answer the following question?

I don't know any way to debug this except by running GDB on the
resultant core file.  Perhaps when the backtrace from the deceased
Emacs is posted here, more specific ideas will pop up.

Btw, these warnings:

> > In file included from /extras/emacs-bidi/emacs-bidi/src/regex.c:257:
> > /extras/emacs-bidi/emacs-bidi/src/regex.h:541:1: warning: "__restrict_arr" redefined
> > In file included from /usr/include/features.h:295,
> >                  from /usr/include/string.h:26,
> >                  from ../src/config.h:899,
> >                  from /extras/emacs-bidi/emacs-bidi/src/regex.c:40:
> > /usr/include/sys/cdefs.h:246:1: warning: this is the location of the previous definition

Don't sound good; I'd investigate them.

HTH
TAKAHASHI Naoto | 3 Mar 03:08

Re: [FWD] compiling emacs-bidi

Thank you, Eli.
I advised the sender to join this list to investigate the problem.

Eli Zaretskii writes:

> I don't know any way to debug this except by running GDB on the
> resultant core file.  Perhaps when the backtrace from the deceased
> Emacs is posted here, more specific ideas will pop up.

--

-- 
TAKAHASHI Naoto
ntakahas <at> m17n.org
http://www.m17n.org/ntakahas/
Kenichi Handa | 4 Mar 01:07

branch emacs-bidi is created

I've just made a branch "emacs-bidi" and commited several
changes including Eli's bidi code so that people other than
I can start working on it.

But, although I can compile the code and start up Emacs,
when I set the buffer local variable enable-bidi-display,
Emacs crashes.   Eli, I need your help.

In the reseat_1 (in xdisp.c), I put this code.

  if (it->bidi_p)
    {
      bidi_init_it (pos.charpos, L2R, &it->bidi_it);
      bidi_get_next_char_visually (&it->bidi_it);

      pos.charpos = it->bidi_it.charpos;
      pos.bytepos = it->bidi_it.bytepos;
      it->current.pos = it->position = pos;
    }

But, as bidi_init_it doesn't set bidi_it->ch_len,
bidi_get_next_char_visually sets it->bidi_it.bytepos to less
than it->bidi_it.charpos.

bidi_init_it has this code:

bidi_init_it (int pos, bidi_dir_t dir, struct bidi_it *bidi_it)
{
  if (! bidi_initialized)
    bidi_initialize ();
(Continue reading)

Philipp Reichmuth | 5 Mar 16:25
Picon

Emacs-bidi on Win32?

Hi,

is there anybody who got emacs-bidi working on Win32?

When trying to compile with nmake/MSVC, I get this:

Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
temacs0.lib(emacs.obj) : error LNK2001: Unresolved external symbol 
_init_bidi
temacs0.lib(emacs.obj) : error LNK2001: Unresolved external symbol 
_syms_of_bidi
temacs1.lib(xdisp.obj) : error LNK2001: Unresolved external symbol 
_set_iterator_to_next_visually
temacs1.lib(xdisp.obj) : error LNK2001: Unresolved external symbol 
_release_prefetched_elements
temacs1.lib(xdisp.obj) : error LNK2001: Unresolved external symbol 
_get_next_display_element_visually
obj-spd/i386/temacs.bin : fatal error LNK1120: 5 unresolved external 
references
NMAKE : fatal error U1077: 'link' : Return code '0x460'
Stop.
NMAKE : fatal error U1077: '"C:\Programme\Microsoft Visual 
Studio\VC98\Bin\NMAKE.EXE"' : Return code '0x2'
Stop.

With gcc-mingw, I get basically the same.

Thanks in advance -
--

-- 
(Continue reading)

Eli Zaretskii | 6 Mar 15:30
Picon

Re: branch emacs-bidi is created

> Date: Thu, 4 Mar 2004 09:07:22 +0900 (JST)
> From: Kenichi Handa <handa <at> m17n.org>
> 
> I've just made a branch "emacs-bidi" and commited several
> changes including Eli's bidi code so that people other than
> I can start working on it.

Thanks!

> But, although I can compile the code and start up Emacs,
> when I set the buffer local variable enable-bidi-display,
> Emacs crashes.   Eli, I need your help.

I will look into this as soon as I have time, hopefully today or
tomorrow.
Eli Zaretskii | 7 Mar 15:36
Picon

Re: branch emacs-bidi is created

> Date: Thu, 4 Mar 2004 09:07:22 +0900 (JST)
> From: Kenichi Handa <handa <at> m17n.org>
> 
> I've just made a branch "emacs-bidi" and commited several
> changes including Eli's bidi code so that people other than
> I can start working on it.

Does this branch use the emacs-unicode as its base, or did you start
from CVS HEAD?

> But, although I can compile the code and start up Emacs,
> when I set the buffer local variable enable-bidi-display,
> Emacs crashes.   Eli, I need your help.

I didn't have time to check out the bidi branch, so the following is
based on code inspection.

> In the reseat_1 (in xdisp.c), I put this code.
> 
>   if (it->bidi_p)
>     {
>       bidi_init_it (pos.charpos, L2R, &it->bidi_it);
>       bidi_get_next_char_visually (&it->bidi_it);
> 
>       pos.charpos = it->bidi_it.charpos;
>       pos.bytepos = it->bidi_it.bytepos;
>       it->current.pos = it->position = pos;
>     }
> 
> But, as bidi_init_it doesn't set bidi_it->ch_len,
(Continue reading)

rs6233 | 13 Mar 08:12
Picon
Favicon

Re: [FWD] compiling emacs-bidi,

Hi,

I did gdb on the core. I found out the it is dumping
core when the make executes:

./temacs -batch -l loadup dump

When I ran gdb on it, I got:

GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General
Public License, and you are
welcome to change it and/or distribute copies of it
under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show
warranty" for details.
This GDB was configured as
"i386-redhat-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".

DISPLAY = :0.0
TERM = xterm
Breakpoint 1 at 0x80d3b4a: file emacs.c, line 415.
Breakpoint 2 at 0x80b7708: file xterm.c, line 12501.
(gdb) run -batch -l loadup dump
Starting program:
/extras/emacs-bidi/emacs-bidi/src/temacs -batch -l
loadup dumpLoading loadup.el (source)...
(Continue reading)

Eli Zaretskii | 13 Mar 12:12
Picon

Re: [FWD] compiling emacs-bidi,

> Date: Fri, 12 Mar 2004 23:12:46 -0800 (PST)
> From: rs6233 <rs6233 <at> yahoo.com>
> 
> Dumping under names emacs and emacs-21.3.50.1
>  
> Program received signal SIGSEGV, Segmentation fault.
> 0x00c21dcc in memcpy () from /lib/tls/libc.so.6
> 
> 
> 
> 
> When I did a backtrace, I got:
> 
> 
> 
> #0  0x00c21dcc in memcpy () from /lib/tls/libc.so.6
> #1  0x081547d2 in unexec (
>     new_name=0x97877e0
> "/extras/emacs-bidi/emacs-bidi/src/emacs",
>     old_name=0x978780c
> "/extras/emacs-bidi/emacs-bidi/src/temacs",
>     data_start=135852012, bss_start=0, entry_address=0) at unexelf.c:925

This is where you should start debugging: in frame #1 unexelf.c called
memcpy with bad arguments.  So the first thing to do is to find which
argument is bad, and then try to figure out why.

Therefore, please look at line 925 of unexelf.c and print the values
of the arguments it passes to memcpy.  One or more of them should be
wrong (e.g., NULL pointers etc.).
(Continue reading)

rs6233 | 8 Mar 08:13
Picon
Favicon

Re: [FWD] compiling emacs-bidi,

Where do I find the resultant core file to run GDB? I
did
find . -name core -print
in the emacs-bidi directory where I compiled
emacs-bidi but nothing returned.  Thanks.

Rafi

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

Gmane