Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32287 - xemacs fails to emerge on PPC
Summary: xemacs fails to emerge on PPC
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: High normal (vote)
Assignee: PPC Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-29 11:17 UTC by Eric Shelton
Modified: 2006-02-04 06:04 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Shelton 2003-10-29 11:17:25 UTC
A "emerge xemacs" on my iBook failed with the following message:

gcc -O2 -pipe -mcpu=750 -T
/var/tmp/portage/xemacs-21.4.9/work/xemacs-21.4.9/src/ppc.ldscript 
-Wl,-z,nocombreloc -L/usr/X11R6/lib -Wl,-export-dynamic -o temacs  abbrev.o
alloc.o blocktype.o buffer.o bytecode.o callint.o callproc.o casefiddle.o
casetab.o chartab.o cmdloop.o cmds.o console.o console-stream.o data.o device.o
dired.o doc.o doprnt.o dynarr.o editfns.o elhash.o emacs.o eval.o events.o
filelock.o unexelf.o balloon_help.o balloon-x.o menubar.o scrollbar.o dialog.o
toolbar.o menubar-x.o scrollbar-x.o dialog-x.o toolbar-x.o gui-x.o realpath.o
inline.o linuxplay.o esd.o miscplay.o console-tty.o device-tty.o event-tty.o
frame-tty.o objects-tty.o redisplay-tty.o cm.o terminfo.o gpmevent.o
event-unixoid.o database.o sysdll.o emodules.o process-unix.o event-stream.o
extents.o faces.o fileio.o  filemode.o floatfns.o fns.o font-lock.o frame.o
general.o glyphs.o glyphs-eimage.o glyphs-widget.o gui.o gutter.o  hash.o
imgproc.o indent.o insdel.o intl.o keymap.o  line-number.o lread.o lstream.o
macros.o marker.o md5.o minibuf.o objects.o opaque.o print.o process.o profile.o
rangetab.o redisplay.o redisplay-output.o regex.o search.o select.o  signal.o
sound.o specifier.o strftime.o symbols.o syntax.o sysdep.o undo.o console-x.o
device-x.o event-Xt.o frame-x.o glyphs-x.o objects-x.o redisplay-x.o select-x.o
xgccache.o widget.o window.o  lastfile.o vm-limit.o  EmacsFrame.o EmacsShell.o
TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o    ../lwlib/liblw.a 
-lXm -lpng -ljpeg -lz -lXpm -lXmu -lXt -lXext -lX11 -lSM -lICE -lgdbm -lgpm
-lncurses -L/usr/lib -lesd -laudiofile -lm -lm -lutil -lgcc -lc -lgcc
/usr/lib/crtn.o `gcc  -print-libgcc-file-name`
/usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x1e): In function `__libc_csu_init':
: undefined reference to `__init_array_start'
/usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x26): In function `__libc_csu_init':
: undefined reference to `__init_array_start'
/usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x2a): In function `__libc_csu_init':
: undefined reference to `__init_array_end'
/usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x2e): In function `__libc_csu_init':
: undefined reference to `__init_array_end'
/usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x82): In function `__libc_csu_fini':
: undefined reference to `__fini_array_start'
/usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x86): In function `__libc_csu_fini':
: undefined reference to `__fini_array_end'
/usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x8e): In function `__libc_csu_fini':
: undefined reference to `__fini_array_start'
/usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x92): In function `__libc_csu_fini':
: undefined reference to `__fini_array_end'
collect2: ld returned 1 exit status
make[1]: *** [temacs] Error 1
make[1]: Leaving directory `/var/tmp/portage/xemacs-21.4.9/work/xemacs-21.4.9/src'
make: *** [src] Error 2 

Applying the following patch gets the ebuild to work:

--- configure.orig      2003-10-21 21:42:18.000000000 -0700
+++ configure   2003-10-21 21:42:35.000000000 -0700
@@ -2966,8 +2966,6 @@
 fi


-test "$machine$opsys" = "powerpclinux" && start_flags="-T$srcdir/src/ppc.ldscript"
-
 if test "$unexec" = "unexaix.o"; then
   if   test "$dynamic" = "no"; then
   start_flags="-Wl,-bnso,-bnodelcsect" 

Looking through the Changes file in the xemacs distribution, it seems that
ppc.ldscript was added in 1998 to work around a PPC Linux build problem.  It
seems that in the last 5 years, this fix is not necessary in order to build xemacs.

This patch can be appended to xemacs-21.4.9-ppc.diff

This patch was tested against app-editors/xemacs-21.4.11, and it built at runs
successfully.  I believe that xemacs-21.4.11 can be unmasked for PPC as well.

Finally, perhaps there is a more elegant solution to copying and renaming
xemacs-21.4.8-ppc.diff everytime a new PPC ebuild of xemacs comes along.  It
causes problems when someone from x86 land puts out new xemacs ebuilds.  The
ebuild has this snippet in it:

	if [ ${ARCH} = "ppc" ] ; then
		epatch ${FILESDIR}/${P}-ppc.diff || die

Perhaps this should be tweaked to:

	if [ ${ARCH} = "ppc" ] ; then
		epatch ${FILESDIR}/xemacs-21.4.8-ppc.diff || die

and when a new patch is necessary (as suggested above), it gets incremented:

	if [ ${ARCH} = "ppc" ] ; then
		epatch ${FILESDIR}/xemacs-21.4.11-ppc.diff || die

This would reduce the maintenance needed by PPC Gentoo devs for this package.


Reproducible: Always
Steps to Reproduce:
1. emerge xemacs
2. fails with above message
Comment 1 Pieter Van den Abeele (RETIRED) gentoo-dev 2004-08-19 18:12:54 UTC
xemacs .15 fixes this problem