Linking fails, glibc errors (no thanks)

Stefan Bruda yellowdog-general@lists.terrasoftsolutions.com
Tue Aug 26 09:53:01 2003


Hi.

I managed to get rid of the problem and build XEmacs.  To recap, the
problem was the following errors in the linking phase:

At 18:42 -0400 on 2003-8-22 Stefan Bruda wrote:
 >
 > /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+0x22): In function
 > `__libc_csu_init':
 > : undefined reference to `__init_array_end'
 > /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+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+0x8a): In function
 > `__libc_csu_fini':
 > : undefined reference to `__fini_array_start'
 > /usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x8e): In function
 > `__libc_csu_fini':
 > : undefined reference to `__fini_array_end'

The problem is a "magic" for ppc systems which is no longer relevant;
in fact, once eliminated the build process works without a hitch.  To
the point, edit the configure script and delete the following line:

test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"

By the way, the YDL 3 Motif progress bar is broken, so make sure you
build with Athena widgets or set `progress-feedback-use-echo-area' to
`t' from within Emacs.

Now to the rant: After hours of struggles (and after finding out the
problem) it just went to my mind that Terrasoft actually built the
thing.  So I unpacked the RPM and sure enough there is a patch in
there that does essentially exactly what I did.  Should anybody at
Terrasoft bothered to watch the list a bit and share their expertise I
would have spent less time on what it turns out to be an easy fix
(once you know where to look that is).

Cheers,
Stefan

-- 
If it was so, it might be; and if it were so, it would be; but as
it isn't, it ain't. That's logic.
    --Lewis Carroll, Through the Looking-Glass