net-nds/portmap-5b-r9 works fine. net-nds/portmap-6.0 causes a segmentation fault almost immediately: # portmap -d Segmentation fault # strace -f portmap -d execve("/sbin/portmap", ["portmap", "-d"], [/* 50 vars */]) = 0 brk(0) = 0x410b9000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40000000 newuname({sys="Linux", node="elmer", ...}) = 0 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=0, st_size=0, ...}) = 0 mmap(NULL, 14371, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4003a000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\2\1\3\0\0\0\0\0\0\0\0\0\3\0\17\0\0\0\1\0\1\356"..., 512) = 512 fstat64(3, {st_mode=0, st_size=0, ...}) = 0 mmap(NULL, 1391104, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40234000 mmap(0x4037f000, 28672, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14a000) = 0x4037f000 mmap(0x40386000, 6656, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40386000 close(3) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40001000 mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40002000 mprotect(0x410b3000, 20480, PROT_READ|PROT_WRITE) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40005000 mprotect(0x410b3000, 20480, PROT_READ|PROT_EXEC) = 0 munmap(0x4003a000, 14371) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ Process 21456 detached
works fine on hake ... but it has glibc-2.3.6 i doubt strace will be useful ... throw it into gdb
Created attachment 129373 [details] emerge --info gdb still has problems of its own, sadly.
# gdb portmap GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "hppa2.0-unknown-linux-gnu"... Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run -d Starting program: /sbin/portmap -d Program received signal SIGSEGV, Segmentation fault. 0x410b4a94 in ?? () (gdb)
Created attachment 129375 [details] Relevant info about the segfault as found in dmesg
This seems to be a linker bug. If I remove -pie from the LDFLAGS in the Makefile, it works. This is probably not the best solution. Vapier, any comment on this ?
Created attachment 139254 [details, diff] Patch to remove -pie from LDFLAGS
i'd forgotten that newer portmap adds -pie ... i thought PIE is known to be broken on hppa this is why `nscd` segfaults for example but i thought we fixed that too ? it's been a while
(In reply to comment #7) > this is why `nscd` segfaults for example > > but i thought we fixed that too ? it's been a while 29 Jul 2005; Mike Frysinger <vapier@gentoo.org> +files/2.3.4/hppa-no-pie.patch, glibc-2.3.2-r12.ebuild, glibc-2.3.3.20040420-r2.ebuild, glibc-2.3.4.20040619-r2.ebuild, glibc-2.3.4.20040808-r1.ebuild, glibc-2.3.4.20041102-r1.ebuild: Add patch to disable building nscd as PIE on hppa since PIE support is broken in glibc for parisc.
Commented out LDFLAGS on hppa in the ebuild. Please test and I'll mark stable if it works for everybody.
(In reply to comment #9) > Commented out LDFLAGS on hppa in the ebuild. > Please test and I'll mark stable if it works for everybody. For the record: it works, but then it works just as well without this patch and with a properly patched glibc-2.7-r1.
Let's call this fixed, then. :)