Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 419665 - emacs-24.1_rc fails to start, bidi_mirror_table is nil
Summary: emacs-24.1_rc fails to start, bidi_mirror_table is nil
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-04 21:41 UTC by Fred Krogh
Modified: 2012-06-07 18:14 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
The debug info requested (emacs.gdb,3.11 KB, text/plain)
2012-06-05 13:25 UTC, Fred Krogh
Details
emacs-24.1_rc build log (app-editors:emacs-24.1_rc:20120605-150501.log,1.83 KB, text/plain)
2012-06-05 17:16 UTC, Fred Krogh
Details
More detail from gdb (emacs.gdb,22.95 KB, text/plain)
2012-06-05 20:21 UTC, Fred Krogh
Details
From emacs-updater -p (updater,61.59 KB, text/plain)
2012-06-07 14:09 UTC, Fred Krogh
Details
The find results (find_results,621.80 KB, text/plain)
2012-06-07 14:22 UTC, Fred Krogh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fred Krogh 2012-06-04 21:41:43 UTC
I can't get it to output anything other than, "Fatal error (6)Aborted".  This when starting with emacs -Q.  I tried running emacs in gdb, and it aborted with this (probably due to emacs not being compiled for debugging).

Starting program: /usr/bin/emacs 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGABRT, Aborted.
0x00007ffff4b43df7 in kill () from /lib64/libc.so.6

===================
emerge --info
Portage 2.1.10.64 (default/linux/amd64/10.0, gcc-4.6.3, glibc-2.15-r2, 3.4.0-gentoo x86_64)
=================================================================
System uname: Linux-3.4.0-gentoo-x86_64-Intel-R-_Core-TM-_i7-2600_CPU_@_3.40GHz-with-gentoo-2.1
Timestamp of tree: Mon, 04 Jun 2012 20:30:01 +0000
app-shells/bash:          4.2_p29
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.8-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.2
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.5, 1.12.1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3, 4.7.0
sys-devel/gcc-config:     1.7.2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.osuosl.org http://ftp.ucsb.edu/pub/mirrors/linux/gentoo http://cudlug.cudenver.edu/gentoo http://gentoo.binarycompass.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS=" --exclude=/.unionfs --exclude=.fuse_hidden*"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit X acl alsa amd64 apache2 apng auctex bash-completion bcmath berkdb bzip2 cairo cdrom clamav clamd cli colordiff consolekit cracklib crypt cups cxx dbus debugger device-mapper dri dvd dvdr dvdread emacs emul-linux86 fastcgi fortran ftpuf g3dvl gdbm gdu gpm graphite gtk gudev iconv icu ipod ipv6 java javascript jpeg kpathsea latex latin1 libclamav libwww logrotate mbox mmx modules mono mouse mp3 mudflap multilib mysql nat ncurses nls nptl nsplugin nvidia ogg openmp pam pcre pdf png policykit pop pop3d pppd preview-latex pulseaudio python qt-static qt3support qt4 readline regex samba session smbclient sockets sound spamassassin sqlite sse sse2 ssl sudoku svg symlink tcpd threads thunderbird truetype udev unicode vdpau vhosts webkit wxwidgets xcomposite xorg xulrunner zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers hwdb ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http python rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 1 Ulrich Müller gentoo-dev 2012-06-05 04:55:45 UTC
Could you post a gdb backtrace ("bt full") please? Preferably, with Emacs compiled with -ggdb.
Comment 2 Fred Krogh 2012-06-05 05:19:22 UTC
I'm sorry, but I will need help to do what is requested.  Do I just change CFLAGS and emerge emacs?  If so perhaps you would like to suggest precisely the flags you want.  And I don't know what a gdb backtrace ("bt full") is.  Give me more detail and I would be happy to comply.
Comment 3 Ulrich Müller gentoo-dev 2012-06-05 05:50:07 UTC
(In reply to comment #2)
> I'm sorry, but I will need help to do what is requested.  Do I just change
> CFLAGS and emerge emacs?

Right, just add "-ggdb" to CFLAGS.

> If so perhaps you would like to suggest precisely the flags you want.
> And I don't know what a gdb backtrace ("bt full") is. Give me more detail
> and I would be happy to comply.

Simply type "bt full" in gdb, after the program got the SIGABRT.
Comment 4 Fred Krogh 2012-06-05 13:25:45 UTC
Created attachment 314293 [details]
The debug info requested

I've compiled emacs with CFLAGS="-ggdb -march=native -pipe"
I've run gdb emacs, and then run -Q.  On the crash run bt-full.

The attached result, is certainly no help to me.  Perhaps I need to compile other packages with -ggdb?
Comment 5 Ulrich Müller gentoo-dev 2012-06-05 14:20:16 UTC
(In reply to comment #4)
> The attached result, is certainly no help to me.

Yes, I don't get any clue where it crashes. Also something is strange there; at least some of the stack frames should contain useful information.

So, can you attach Emacs' build.log please?

What is the output of "eselect emacs list"?

Can you run "emacs --version", or does it crash?
Comment 6 Fred Krogh 2012-06-05 17:16:48 UTC
Created attachment 314327 [details]
emacs-24.1_rc build log

mon1 ~ # eselect emacs list
Available Emacs symlink targets:
  [1]   emacs-23
  [2]   emacs-24 *
mon1 ~ # emacs --version
GNU Emacs 24.1.1

Sorry this took so long.  My internet has been down.
Comment 7 Ulrich Müller gentoo-dev 2012-06-05 19:49:20 UTC
Oops, I forgot to mention that in addition to -ggdb in CFLAGS, you also need to add "nostrip" (or "splitdebug") to FEATURES. Could you recompile Emacs with these settings and do a gdb backtrace again?

(See also <http://www.gentoo.org/proj/en/qa/backtraces.xml>.)
Comment 8 Fred Krogh 2012-06-05 20:21:08 UTC
Created attachment 314343 [details]
More detail from gdb
Comment 9 Ulrich Müller gentoo-dev 2012-06-05 21:41:17 UTC
So it calls abort in line 763 of bidi.c. The relevant code is:

  bidi_mirror_table = uniprop_table (intern ("mirroring"));
  if (NILP (bidi_mirror_table))
    abort ();
  staticpro (&bidi_mirror_table);

This doesn't look like a Gentoo specific problem, so I've forwarded this upstream (especially because the bidi code is new in Emacs 24).
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11634>
Comment 10 Ulrich Müller gentoo-dev 2012-06-06 05:15:13 UTC
OK, upstream says that this could be due to a misplaced environment variable like EMACSLOADPATH. What is the output of:

   $ printenv | grep -i EMACS

Can you successfully start Emacs with one of the following commands?

   $ env -i HOME=$HOME DISPLAY=$DISPLAY TERM=$TERM emacs -Q

   $ xrdb </dev/null; emacs -Q
Comment 11 Fred Krogh 2012-06-06 13:40:15 UTC
INFOPATH=/usr/share/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.3/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.22/info:/usr/share/info/emacs-23

Neither of the suggested commands worked -- same failure, Fatal error (6)Aborted

I changed the emacs-23 at the end of INOFPATH to emacs-24 and that gave no difference.

However export EMACSLOADPATH=/usr/share/emacs/24.1/lisp/ works!  So how was that supposed to get set?  Many thanks!
Comment 12 Fred Krogh 2012-06-06 14:02:05 UTC
One more problem.  Emacs-24.1 does not seem to find the stuff in /usr/share/emacs/site-lisp.  Is there something extra that needs to be said?  Thanks.
Comment 13 Ulrich Müller gentoo-dev 2012-06-06 14:24:54 UTC
Well, it shouldn't be necessary to set EMACSLOADPATH in the first place. Emacs should be able to determine the load-path automatically. So setting that variable is only a workaround for something that goes very wrong.

You should have a file /usr/share/emacs/24.1/src/epaths.h (since you've built emacs with USE=source). Can you look up what is defined there for PATH_LOADSEARCH and PATH_DUMPLOADSEARCH?
Comment 14 Fred Krogh 2012-06-06 14:52:03 UTC
#define PATH_LOADSEARCH "/etc/emacs:/usr/share/emacs/site-lisp:/usr/share/emacs/24.1/l
isp:/usr/share/emacs/24.1/leim"

/* Like PATH_LOADSEARCH, but used only during the build process
   when Emacs is dumping.  Configure (using "make epaths-force") sets
   this to $buildlisppath, which normally has the value: <srcdir>/lisp.
*/
#define PATH_DUMPLOADSEARCH "/var/tmp/portage/app-editors/emacs-24.1_rc/work/emacs-24.1/lisp"

Is there some way to check that these are actually getting set?
Comment 15 Ulrich Müller gentoo-dev 2012-06-06 20:29:05 UTC
(In reply to comment #14)
> #define PATH_LOADSEARCH
> "/etc/emacs:/usr/share/emacs/site-lisp:/usr/share/emacs/24.1/l
> isp:/usr/share/emacs/24.1/leim"
> 
> /* Like PATH_LOADSEARCH, but used only during the build process
>    when Emacs is dumping.  Configure (using "make epaths-force") sets
>    this to $buildlisppath, which normally has the value: <srcdir>/lisp.
> */
> #define PATH_DUMPLOADSEARCH
> "/var/tmp/portage/app-editors/emacs-24.1_rc/work/emacs-24.1/lisp"

These look good. (Assuming that the line break in "l ... isp" is an artefact of copy-and-paste and doesn't exist in the file.)

> Is there some way to check that these are actually getting set?

There is, but it's a little tedious:

   1. Extract the file emacs-24.1/src/.gdbinit from the emacs-24.1-rc tarball.
      (This will be needed for printing of lisp variables.)
   2. $ gdb emacs
   3. (gdb) break init_lread
   4. (gdb) run -Q
      It should stop in function init_lread in lread.c.
   5. (gdb) finish
      Should be in main program in emacs.c now.
   6. (gdb) source /path/to/.gdbinit
      (The path where you've saved the .gdbinit file from step 1.)
   7. (gdb) pv load-path
Comment 16 Ulrich Müller gentoo-dev 2012-06-06 20:35:25 UTC
Another thing that you could check is if anything in the site-lisp directories causes bad effects, by temporarily renaming them (don't forget to rename them back when finished):

   $ mv /usr/share/emacs/site-lisp /usr/share/emacs/site-lisp.safe
   $ mv /etc/emacs /etc/emacs.safe
Comment 17 Fred Krogh 2012-06-06 22:49:34 UTC
I'm hoping to avoid the business of unpacking the tar.gz file, and getting .gdbinit and re-emerging emacs with the --ggdb flag.  I have discovered that it will work from a root terminal window if I am in /usr/share/emacs/site-lisp.  Doing the same thing as a normal user does not pick up what I would like it too from site-lisp.  And no matter who the user is, that window needs to have
export EMACSLOADPATH=/usr/share/emacs/24.1/lisp/ prior to using emacs, or emacs doesn't even get started.  Does all of this suggest anything.
(I'm a bit slow in responding, as my internet is up and down on a regular basis.  Allegedly this gets fixed "soon".)
Comment 18 Fred Krogh 2012-06-06 22:51:45 UTC
I'm hoping to avoid the business of unpacking the tar.gz file, and getting .gdbinit and re-emerging emacs with the --ggdb flag.  I have discovered that it will work from a root terminal window if I am in /usr/share/emacs/site-lisp.  Doing the same thing as a normal user does not pick up what I would like it too from site-lisp.  And no matter who the user is, that window needs to have
export EMACSLOADPATH=/usr/share/emacs/24.1/lisp/ prior to using emacs, or emacs doesn't even get started.  Does all of this suggest anything.
(I'm a bit slow in responding, as my internet is up and down on a regular basis.  Allegedly this gets fixed "soon".)
Comment 19 Ulrich Müller gentoo-dev 2012-06-07 00:57:16 UTC
Please try if you can start Emacs after moving the site-lisp directories out of the way, as suggested in comment #16.
Comment 20 Fred Krogh 2012-06-07 03:02:49 UTC
Sorry, I did do that.  Emacs started, but in the messages buffer said

Warning: Lisp directory `/etc/emacs' does not exist.
Warning: Lisp directory `/usr/share/emacs/site-lisp' does not exist.

This warning is not there when I move these back.
Comment 21 Ulrich Müller gentoo-dev 2012-06-07 05:36:11 UTC
(In reply to comment #20)
> Sorry, I did do that.  Emacs started,

Just to make sure, this is without setting EMACSLOADPATH?

> but in the messages buffer said
> 
> Warning: Lisp directory `/etc/emacs' does not exist.
> Warning: Lisp directory `/usr/share/emacs/site-lisp' does not exist.

Yes, these warnings are expected.
Comment 22 Fred Krogh 2012-06-07 13:07:13 UTC
Yes this worked even when EMACSLOADPATH was not set.  But with these directories there, EMACSLOADPATH is needed to get emacs started.
Comment 23 Ulrich Müller gentoo-dev 2012-06-07 13:58:58 UTC
Hm, I'd really like to reproduce the problem. Maybe the most efficient way would be if you could send me a tarball of your /usr/share/emacs/site-lisp and /etc/emacs directories.

Alternatively, what is the output of "emacs-updater -p"? (The emacs-updater command is provided by package app-admin/emacs-updater.)
Comment 24 Fred Krogh 2012-06-07 14:09:23 UTC
Created attachment 314579 [details]
From emacs-updater -p

I believe that when I ran emacs-updater in the past there were four packages that failed in the emerge.  With the earlier emacs selected, emacs-updater could update all without problems.
Comment 25 Fred Krogh 2012-06-07 14:15:03 UTC
I am trying to send the tar file, but my internet connection is really flaky, and so far the best it has managed is to send 7% before crashing.  I'll try some more.
Comment 26 Ulrich Müller gentoo-dev 2012-06-07 14:19:56 UTC
(In reply to comment #24)
> Created attachment 314579 [details]
> From emacs-updater -p

Something is very wrong there. For example the following file shouldn't be in site-lisp:

> Found simple.elc (compiled by Emacs 23.3.1)

What does "find /usr/share/emacs/site-lisp -ls" output?


(In reply to comment #25)
> I am trying to send the tar file, but my internet connection is really
> flaky, and so far the best it has managed is to send 7% before crashing. 
> I'll try some more.

Maybe this isn't necessary, please post the output of "find" first.
Comment 27 Fred Krogh 2012-06-07 14:22:30 UTC
Created attachment 314589 [details]
The find results

I this helps.
Comment 28 Ulrich Müller gentoo-dev 2012-06-07 14:40:00 UTC
(In reply to comment #27)
> Created attachment 314589 [details]
> The find results

Oh my, how did all that stuff get into there? Looks like there are at least two Emacs 23 directory trees, which will confuse Emacs 24.

I suggest that you remove at least all of the following:

   /usr/share/emacs/site-lisp/etc
   /usr/share/emacs/site-lisp/not-needed-23.3
   /usr/share/emacs/site-lisp/leim
   /usr/share/emacs/site-lisp/lisp
   /usr/share/emacs/site-lisp/site-lisp

I'd guess that after doing this, Emacs 24 will properly start.
Comment 29 Fred Krogh 2012-06-07 14:44:46 UTC
I have no idea how all that stuff got in there.  I'm sorry that I've wasted so much or your time on this, but very grateful to you for getting it resolved.  All works perfectly now.
Comment 30 Ulrich Müller gentoo-dev 2012-06-07 15:04:09 UTC
Allow me a final note: There shouldn't be any files under /usr/share/emacs other than those installed there by Portage. All local stuff should go to /usr/local. Emacs can be made aware of it by adding a line like

   (add-to-list 'load-path "/usr/local/share/emacs/my/site-lisp/path")

for each local lisp directory, either to /etc/emacs/site-start.el or to your ~/.emacs file.
Comment 31 Fred Krogh 2012-06-07 16:14:13 UTC
I've moved what I know is possible into /usr/local/share/emacs/site-lisp.  All seems to work except for the mouse wheel and my color theme when editing as root, which I very rarely do.  Attempted use of the mouse wheel gives

Symbol's functino definition is void: screen-width

If you have a quick idea on how to fix this it would be much appreciated, I've given up figuring it out myself.
Comment 32 Ulrich Müller gentoo-dev 2012-06-07 17:34:26 UTC
Seems that one of your local files uses function "screen-width", which is obsolete since 1993 and was finally removed in Emacs 24.
Comment 33 Fred Krogh 2012-06-07 18:14:36 UTC
Thanks, not only did you find the problem, but I now have some idea how to track down similar problems should they occur.  Sroll-in-place was the problem and it does not appear to be necessary any more.  I love my new emacs!