Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 234095 - app-editors/emacs MIPS support
Summary: app-editors/emacs MIPS support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: MIPS Linux
: High enhancement (vote)
Assignee: MIPS Porters
URL:
Whiteboard:
Keywords: KEYWORDREQ
Depends on:
Blocks:
 
Reported: 2008-08-06 15:26 UTC by Jon Akers
Modified: 2011-06-14 04:34 UTC (History)
1 user (show)

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


Attachments
Patch to allow compile against mips based machines (emacs-22.2-mips64el.patch,349 bytes, patch)
2008-08-07 14:37 UTC, Jon Akers
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Akers 2008-08-06 15:26:53 UTC
First, because of the build system that emacs has underneath it, I had to patch the configure.in file in order to get it to build on my system.

System: Lemote Fulong (Loonson 2E Chipset)

Once I made the small patch (just a detection item to allow the system to build), it built fine. emacs used to build on the Fulong without problems about six months ago, but I think changes to the kernel made detection of the operating system different, which made the detection process fail.

Even then, I would receive this error that would pop up in a second window:

Emergency (alloc): Warning: past 95% of memory limit

Even if I close the window, it immediately pops up again. This is despite just opening emacs with no file and there being plenty of memory available:

kiona emacs # free
             total       used       free     shared    buffers     cached
Mem:       1034928     975856      59072          0      49296     748304
-/+ buffers/cache:     178256     856672
Swap:      1317296        336    1316960

Searching on the net, I have found very few references to this problem, and apparently they were all in NetBSD with no resolution.

Reproducible: Always

Steps to Reproduce:
1. Compile emacs on mips based architecture
2. Start emacs with "emacs -nw"


Actual Results:  
Error message in separate window of emacs. This window will not go away:

Emergency (alloc): Warning: past 95% of memory limit

Expected Results:  
This window should not appear, since there is plenty of memory available.

kiona emacs # emerge --info
Portage 2.2_rc6 (default/linux/mips/2008.0/developer, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23.14-mipsgit-20080206-lm2e mips64)
=================================================================
System uname: Linux-2.6.23.14-mipsgit-20080206-lm2e-mips64-ICT_Loongson-2_V0.2_FPU_V0.1-with-glibc2.0
Timestamp of tree: Wed, 06 Aug 2008 14:03:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.4.4-r5, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.17-r1, 2.18-r2, 2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="mips ~mips"
CBUILD="mips64-unknown-linux-gnu"
CFLAGS="-Os -mabi=32 -pipe -mips3"
CHOST="mips64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-Os -mabi=32 -pipe -mips3"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache collision-protect cvs digest distcc distlocks fixpackages multilib-strict nostrip parallel-fetch preserve-libs sfperms sign splitdebug strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB en_AU en"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib aiglx akode alisp alsa aotuv apache2 arts audiofile autoipd avahi bcmath berkdb bindist bitmap-fonts bluetooth bonobo bookmarks boost bzip2 cairo calendar ccache cgi chardet chm cjk cle266 cli clucene cracklib crypt ctype cups curl cviewer daap dbase dbus decibel divx djvu dts dvd dvdread dxr3 encode etcproposals examples exif exiv2 fam fame fbcon ffmpeg fftw filepicker filter firefox fits flac flatfile font-server fontconfig fortran fpx ftp gd gdbm gif gimp gimpprint gitsendemail glib gmedia gmp gnutls gpm gps graphviz gs gstreamer gtk gtk2 hash howl-compat hyperestraier iconv idn imagemagick imap imlib inifile inkjar inotify ipod iproute2 ipv6 isdnlog javascript jbig jingle jpeg json kde kig-scripting ksolver lcms libcaca libclamav log lzo mailwrapper mbrola md5sum mdnsresponder-compat midi mikmod mips mjpeg mmap mng mnt modplug mozbranding mozdom mozsha1 mp3 mp3rtp mp4 mpeg mplayer mssql mtp mudflap multislot multiuser musepack musicbrainz mysql nas ncurses network network_manager newxkb nis njb nls nptl nptlonly nsplugin oav odbc ogg openexr opengl openmp oss pam passwordsave pch pcntl pcre pdf pdflib perl plugin png povray ppds pppd pvm python qmax qt qt3 qt3support quicktime rdesktop readline realmedia reflection replytolist restrict-javascript samba sametime sdl session sharedext sid simplexml slp sms sndfile snmp soap sockets softmmu speex spell spl sqlite sqlite3 ssl startup-notification suhosin svg sysfs sysvipc taglib tcl tcltk tcpd tetex theora threads tidy tiff tk tokenizer tpctl truetype truetype-fonts type1-fonts unicode usb userlocales userpriv utf8 v4l vcd vidix vim-syntax visualization vnc vorbis vorbis-psy wavpack wddx webdav winbind wma wmf wmp wxgtk1 xattr xerces-c xforms xml xmlreader xmlrpc xmlwriter xorg xsl xv yaz zeroconf zip zlib" 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 authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en_AU en" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-08-07 00:53:00 UTC
It's probably a good idea to attach a unified diff with the changes to configure.in.
Comment 2 Ulrich Müller gentoo-dev 2008-08-07 06:48:05 UTC
Unfortunately, nobody in the Emacs team has MIPS hardware available, so we have no way to test or reproduce this. If you provide us with a working patch for MIPS support, we are happy to include it.

Changing severity to "enhancement" since app-editors/emacs doesn't have any mips keywords.
Comment 3 Jon Akers 2008-08-07 14:37:45 UTC
Created attachment 162426 [details, diff]
Patch to allow compile against mips based machines

Here is the patch I used to allow compilation of emacs on a mips machine like the lemote fulong.
Comment 4 Ulrich Müller gentoo-dev 2008-12-01 16:01:23 UTC
MIPS support was recently added to the upstream CVS trunk:
<http://cvs.savannah.gnu.org/viewvc/emacs/configure.in?root=emacs&r1=1.576&r2=1.578>

Could you please try if app-editors/emacs-cvs-23.0.9999.ebuild works for you?
Comment 5 Jon Akers 2008-12-03 17:30:57 UTC
OK... it compiles fine now, but I do still get that error about 95% memory usage.
Comment 6 Ulrich Müller gentoo-dev 2008-12-04 12:00:17 UTC
The memory warning is displayed in vm-limit.c, functions check_memory_limits and get_lim_data are the relevant ones.

1. Please attach the full build.log

2. Can you find out which implementation of get_lim_data is used (there are several #if conditionals)?

3. Also it would be interesting to use GDB and set a breakpoint in check_memory_limits, to see what the values of the following variables are:
lim_data, cp, data_space_start
Comment 7 Christian Faulhammer (RETIRED) gentoo-dev 2009-08-16 13:43:40 UTC
I tried to compile Emacs 23.1 on the Lemote Yeeloong and it succeeded.  It works fine, apart from some display errors, the CPU is a Loongson 2F, N32 userland, 64-bit little endian.  The shipped Debian installation with Emacs 22 on the other hand shows the same message as reported by the original reporter.
Comment 8 Ulrich Müller gentoo-dev 2009-10-10 15:58:34 UTC
(In reply to comment #7)
> I tried to compile Emacs 23.1 on the Lemote Yeeloong and it succeeded.
> It works fine, apart from some display errors, the CPU is a Loongson 2F, N32
> userland, 64-bit little endian.  The shipped Debian installation with Emacs 22
> on the other hand shows the same message as reported by the original reporter.

So, no patch needed? Just add the keyword?
Comment 9 Christian Faulhammer (RETIRED) gentoo-dev 2009-10-15 22:41:40 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > I tried to compile Emacs 23.1 on the Lemote Yeeloong and it succeeded.
> > It works fine, apart from some display errors, the CPU is a Loongson 2F, N32
> > userland, 64-bit little endian.  The shipped Debian installation with Emacs 22
> > on the other hand shows the same message as reported by the original reporter.
> 
> So, no patch needed? Just add the keyword?

 I would say yes, but I only tested a limited scope of all possibilities...MIPS team?

Comment 10 Ulrich Müller gentoo-dev 2010-10-13 07:58:37 UTC
(In reply to comment #9)
> > So, no patch needed? Just add the keyword?
> 
>  I would say yes, but I only tested a limited scope of all possibilities...
> MIPS team?

One year has passed. About time for a reminder.
Comment 11 Matt Turner gentoo-dev 2010-12-14 02:28:59 UTC
Does anyone on Gentoo/MIPS use emacs? Someone test it please?
Comment 12 Matt Turner gentoo-dev 2011-06-14 04:34:52 UTC
Added ~mips.