[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep-3.8.11-908f on NetBSD 9.0
From: |
Bruno Haible |
Subject: |
Re: grep-3.8.11-908f on NetBSD 9.0 |
Date: |
Mon, 02 Jan 2023 11:32:56 +0100 |
On NetBSD 9.0, the compilation succeeds and 1 test fails:
FAIL: filename-lineno
Since the test suite log contains the string
grep: Shared object "libpcre2-8.so.0" not found
I looked around for libpcre. Indeed, there is a file
/usr/pkg/lib/libpcre2-8.so.0
that is a symbolic link pointing to
/usr/pkg/lib/libpcre2-8.so.0.10.2
and the latter is an ELF shared library.
The reason why it could not be found is probably that /usr/pkg/lib is not
among the runtime linker's search path and not declared as an RPATH:
$ readelf -d grep
Dynamic section at offset 0x36028 contains 20 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libintl.so.10]
0x0000000000000001 (NEEDED) Shared library: [libpcre2-8.so.0]
0x0000000000000001 (NEEDED) Shared library: [libc.so.12]
0x000000000000000f (RPATH) Library rpath: [/home/bruno/lib]
0x000000000000000c (INIT) 0x402710
0x000000000000000d (FINI) 0x428f90
0x0000000000000004 (HASH) 0x400210
0x0000000000000005 (STRTAB) 0x4013e8
0x0000000000000006 (SYMTAB) 0x400668
0x000000000000000a (STRSZ) 1612 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000015 (DEBUG) 0x0
0x0000000000000003 (PLTGOT) 0x6361d8
0x0000000000000002 (PLTRELSZ) 3096 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0x401af8
0x0000000000000007 (RELA) 0x401a38
0x0000000000000008 (RELASZ) 192 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x0000000000000000 (NULL) 0x0
$ objdump -x -j .dynamic grep
/tmp/grep: file format elf64-x86-64
/tmp/grep
architecture: i386:x86-64, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x0000000000402f60
Program Header:
PHDR off 0x0000000000000040 vaddr 0x0000000000400040 paddr
0x0000000000400040 align 2**3
filesz 0x0000000000000188 memsz 0x0000000000000188 flags r--
INTERP off 0x00000000000001c8 vaddr 0x00000000004001c8 paddr
0x00000000004001c8 align 2**0
filesz 0x0000000000000017 memsz 0x0000000000000017 flags r--
LOAD off 0x0000000000000000 vaddr 0x0000000000400000 paddr
0x0000000000400000 align 2**21
filesz 0x0000000000035d14 memsz 0x0000000000035d14 flags r-x
LOAD off 0x0000000000036000 vaddr 0x0000000000636000 paddr
0x0000000000636000 align 2**21
filesz 0x0000000000000738 memsz 0x0000000000011570 flags rw-
DYNAMIC off 0x0000000000036028 vaddr 0x0000000000636028 paddr
0x0000000000636028 align 2**3
filesz 0x0000000000000190 memsz 0x0000000000000190 flags rw-
NOTE off 0x00000000000001e0 vaddr 0x00000000004001e0 paddr
0x00000000004001e0 align 2**2
filesz 0x000000000000002c memsz 0x000000000000002c flags r--
EH_FRAME off 0x000000000002fc60 vaddr 0x000000000042fc60 paddr
0x000000000042fc60 align 2**2
filesz 0x0000000000000dd4 memsz 0x0000000000000dd4 flags r--
Dynamic Section:
NEEDED libintl.so.10
NEEDED libpcre2-8.so.0
NEEDED libc.so.12
RPATH /home/bruno/lib
INIT 0x0000000000402710
FINI 0x0000000000428f90
HASH 0x0000000000400210
STRTAB 0x00000000004013e8
SYMTAB 0x0000000000400668
STRSZ 0x000000000000064c
SYMENT 0x0000000000000018
DEBUG 0x0000000000000000
PLTGOT 0x00000000006361d8
PLTRELSZ 0x0000000000000c18
PLTREL 0x0000000000000007
JMPREL 0x0000000000401af8
RELA 0x0000000000401a38
RELASZ 0x00000000000000c0
RELAENT 0x0000000000000018
Sections:
Idx Name Size VMA LMA File off Algn
19 .dynamic 00000190 0000000000636028 0000000000636028 00036028 2**3
CONTENTS, ALLOC, LOAD, DATA
SYMBOL TABLE:
0000000000636028 l d .dynamic 0000000000000000 .dynamic
0000000000636028 l O .dynamic 0000000000000000 _DYNAMIC
I plan to fix the missing/broken rpath problem with pkgconfig this year [1];
this ought to fix this situation. Therefore I wouldn't mind if you leave
this problem aside for now.
Bruno
[1] https://gitlab.com/ghwiki/gnow-how/-/wikis/Discussion-about-pkg-config
- Re: grep-3.8.11-908f on NetBSD 9.0,
Bruno Haible <=