Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patchelf fails with "Assertion `splitIndex != -1' failed." on wpdecom #43

Open
spaskalev opened this issue May 20, 2023 · 1 comment
Open

Comments

@spaskalev
Copy link

I'm trying to build WP on a amd64 glibc void linux system. One of the patchelf invocations fails with the following output

+ patchelf --replace-needed libm.so.5 /home/user/pdev/wpunix/build/lib/libm.so.5 linux/ins/wpdecom
patchelf: patchelf.cc:504: void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Verneed, Elf_Versym>::shiftFile(unsigned int, size_t, size_t) [with Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Verneed = Elf32_Verneed; Elf_Versym = short unsigned int; size_t = long unsigned int]: Assertion `splitIndex != -1' failed.
build8.sh: line 102:  8883 Aborted                 patchelf --replace-needed "libm.so.5" "${topdir}/build/lib/libm.so.5" linux/ins/wpdecom
make: *** [Makefile:19: wordperfect8_i386] Error 134

Running it with debug outputs

$ patchelf --debug --replace-needed libm.so.5 /home/user/pdev/wpunix/build/lib/libm.so.5 linux/ins/wpdecom
patching ELF file 'linux/ins/wpdecom'
keeping DT_NEEDED entry '/home/user/pdev/wpunix/build/lib/libcompat.so'
replacing DT_NEEDED entry 'libm.so.5' with '/home/user/pdev/wpunix/build/lib/libm.so.5'
resizing .dynstr ...
keeping DT_NEEDED entry 'libc.so.5'
replacing section '.dynstr' with size 432
this is an executable
using replaced section '.dynstr'
last replaced is 4
looking at section '.interp'
replacing section '.interp' which is in the way
looking at section '.hash'
replacing section '.hash' which is in the way
looking at section '.dynsym'
replacing section '.dynsym' which is in the way
looking at section '.dynstr'
first reserved offset/addr is 0x67c/0x804767c
first page is 0x8047000
needed space is 1700
needed space is 1732
needed pages is 1
patchelf: patchelf.cc:504: void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Verneed, Elf_Versym>::shiftFile(unsigned int, size_t, size_t) [with Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Verneed = Elf32_Verneed; Elf_Versym = short unsigned int; size_t = long unsigned int]: Assertion `splitIndex != -1' failed.
Aborted
@abenson
Copy link

abenson commented May 21, 2023

This seems to be fixed with patchelf 0.18.0. I run into issues later on, though.

$ ./build/linux/ins/wpdecom 
Floating point exception

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants