Hi,
I am just seeing that rustc segfault at runtime with latest ld.so
(tested on i386).
$ rustc -vV
Segmentation fault (core dumped)
$ ldd /usr/local/bin/rustc
/usr/local/bin/rustc:
/usr/local/bin/rustc: signal 11
Backing out last commit (support for DT_RUNPATH and DT_FLAGS) makes it work
again.
$ cd /usr/src/libexec/ld.so
$ cvs up -r 1.45 library_subr.c
$ cvs up -r 1.75 resolve.c
$ doas make && doas make install
$ rustc -vV
rustc 1.14.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: i686-unknown-openbsd
release: 1.14.0
LLVM version: 3.9
$ ldd /usr/local/bin/rustc
/usr/local/bin/rustc:
Start End Type Open Ref GrpRef Name
1497e000 34981000 exe 2 0 0 /usr/local/bin/rustc
07439000 274bb000 rlib 0 1 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_driver-f5a209a9.so
0bb29000 2bba4000 rlib 0 33 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/libstd-f5a209a9.so
0877a000 287a3000 rlib 0 35 0 /usr/lib/libc.so.89.2
0ac09000 2ac71000 rlib 0 1 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_typeck-f5a209a9.so
0032a000 20347000 rlib 0 1 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_resolve-f5a209a9.so
00ad0000 20afd000 rlib 0 1 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_save_analysis-f5a209a9.so
03f76000 23f8a000 rlib 0 1 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_passes-f5a209a9.so
02fc9000 22fef000 rlib 0 1 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_lint-f5a209a9.so
070f1000 27155000 rlib 0 1 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_trans-f5a209a9.so
04b2e000 24b4f000 rlib 0 2 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_incremental-f5a209a9.so
05b7f000 25bab000 rlib 0 1 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_borrowck-f5a209a9.so
09e02000 29e32000 rlib 0 2 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_mir-f5a209a9.so
05197000 251b2000 rlib 0 6 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_const_eval-f5a209a9.so
03c86000 23c8e000 rlib 0 1 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_plugin-f5a209a9.so
084e3000 2851c000 rlib 0 2 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_metadata-f5a209a9.so
0ffd7000 30002000 rlib 0 2 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/libsyntax_ext-f5a209a9.so
0a725000 2a72f000 rlib 0 1 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_privacy-f5a209a9.so
0eb52000 2ec43000 rlib 0 14 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc-f5a209a9.so
058e0000 258e7000 rlib 0 9 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_const_math-f5a209a9.so
01d9c000 21da7000 rlib 0 8 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_data_structures-f5a209a9.so
0f257000 2f26c000 rlib 0 6 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_back-f5a209a9.so
0e8c9000 2e96e000 rlib 0 19 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/libsyntax-f5a209a9.so
0ae34000 2ae41000 rlib 0 18 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_errors-f5a209a9.so
0eb4a000 2eb51000 rlib 0 18 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/libsyntax_pos-f5a209a9.so
00fcb000 20fde000 rlib 0 6 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/libserialize-f5a209a9.so
0da05000 2da0b000 rlib 0 5 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/liblog-f5a209a9.so
08812000 298b3000 rlib 0 4 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_llvm-f5a209a9.so
04d18000 24d1d000 rlib 0 5 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/libgraphviz-f5a209a9.so
0cce7000 2ccee000 rlib 0 2 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/libgetopts-f5a209a9.so
0583e000 25843000 rlib 0 3 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/libflate-f5a209a9.so
0a073000 2a079000 rlib 0 13 0 /usr/lib/libpthread.so.23.0
02d1c000 22d27000 rlib 0 9 0 /usr/lib/libm.so.10.0
09e96000 29eb0000 rlib 0 2 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/librustc_platform_intrinsics-f5a209a9.so
0d8eb000 2d8f0000 rlib 0 3 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/libfmt_macros-f5a209a9.so
03b84000 23b8a000 rlib 0 1 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/libproc_macro-f5a209a9.so
004b5000 204b8000 rlib 0 1 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/libarena-f5a209a9.so
0b325000 2b337000 rlib 0 1 0
/usr/local/lib/rustlib/i686-unknown-openbsd/lib/libterm-f5a209a9.so
0c8f9000 2c901000 rlib 0 1 0 /usr/lib/libz.so.5.0
04bb3000 24c44000 rlib 0 1 0 /usr/local/lib/libestdc++.so.17.0
0efae000 0efae000 rtld 0 1 0 /usr/libexec/ld.so
The binary is compiled by default with RPATH + RUNPATH. Maybe it is a
linuxisme that should be removed from lang/rust port ?
The lang/rust port is available on amd64 and i386, but I didn't check if
it works with new ld.so on amd64.
$ readelf -d /usr/local/bin/rustc
Dynamic section at offset 0x1f04 contains 20 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library:
[librustc_driver-f5a209a9.so]
0x00000001 (NEEDED) Shared library: [libstd-f5a209a9.so]
0x00000001 (NEEDED) Shared library: [libc.so.89.2]
0x0000000f (RPATH) Library rpath:
[$ORIGIN/../lib:/usr/local/lib/rustlib/i686-unknown-openbsd/lib]
0x0000001d (RUNPATH) Library runpath:
[$ORIGIN/../lib:/usr/local/lib/rustlib/i686-unknown-openbsd/lib]
0x00000004 (HASH) 0x2000002c
0x00000005 (STRTAB) 0x20000268
0x00000006 (SYMTAB) 0x200000e8
0x0000000a (STRSZ) 293 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000015 (DEBUG) 0x0
0x00000003 (PLTGOT) 0x20001fd4
0x00000002 (PLTRELSZ) 48 (bytes)
0x00000014 (PLTREL) REL
0x00000017 (JMPREL) 0x200003a0
0x00000011 (REL) 0x20000390
0x00000012 (RELSZ) 16 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x6ffffffa (RELCOUNT) 1
0x00000000 (NULL) 0x0
Thanks.
--
Sebastien Marie
OpenBSD 6.0-current (GENERIC.MP) #12: Mon Jan 23 11:29:13 CET 2017
[email protected]:/home/openbsd/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Genuine Intel(R) CPU T2400 @ 1.83GHz ("GenuineIntel" 686-class) 1.83 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM,PERF,SENSOR
real mem = 2137354240 (2038MB)
avail mem = 2083676160 (1987MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 06/13/07, BIOS32 rev. 0 @ 0xffa10, SMBIOS rev. 2.4 @
0xf7980 (44 entries)
bios0: vendor Dell Inc. version "A17" date 06/13/2007
bios0: Dell Inc. MM061
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC MCFG SLIC BOOT SSDT
acpi0: wakeup devices LID_(S3) PBTN(S4) MBTN(S5) PCI0(S3) USB0(S0) USB1(S0)
USB2(S0) USB3(S0) EHCI(S0) AZAL(S3) PCIE(S4) RP01(S4) RP02(S3) RP03(S3)
RP04(S3) RP05(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 166MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Genuine Intel(R) CPU T2400 @ 1.83GHz ("GenuineIntel" 686-class) 1.83 GHz
cpu1:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM,PERF,SENSOR
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf0000000, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 3 (PCIE)
acpiprt3 at acpi0: bus 11 (RP01)
acpiprt4 at acpi0: bus -1 (RP02)
acpiprt5 at acpi0: bus -1 (RP03)
acpiprt6 at acpi0: bus 12 (RP04)
acpiprt7 at acpi0: bus -1 (RP05)
acpiprt8 at acpi0: bus -1 (RP06)
acpicpu0 at acpi0: !C3(250@85 io@0x1015), !C2(500@1 io@0x1014), C1(1000@1
halt), PSS
acpicpu1 at acpi0: !C3(250@85 io@0x1015), !C2(500@1 io@0x1014), C1(1000@1
halt), PSS
acpitz0 at acpi0: critical temperature is 126 degC
"*pnp0c14" at acpi0 not configured
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model " DELLUD2649" serial 878 type LION oem "Sanyo"
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: PBTN
acpibtn2 at acpi0: SBTN
"PNP0C32" at acpi0 not configured
"PNP0F13" at acpi0 not configured
"PNP0303" at acpi0 not configured
acpivideo0 at acpi0: VID_
acpivideo1 at acpi0: VID_
acpivout0 at acpivideo1: LCD_
acpivideo2 at acpi0: VID2
bios0: ROM list: 0xc0000/0xe800! 0xce800/0x1800
cpu0: Enhanced SpeedStep 1829 MHz: speeds: 1833, 1333, 1000 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
inteldrm0 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03
drm0 at inteldrm0
intagp0 at inteldrm0
agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
inteldrm0: apic 2 int 16
inteldrm0: 1280x800, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x01: msi
azalia0: codecs: Sigmatel STAC9200, Conexant/0x2bfa, using Sigmatel STAC9200
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x01: apic 2 int 16
pci1 at ppb0 bus 11
wpi0 at pci1 dev 0 function 0 "Intel PRO/Wireless 3945ABG" rev 0x02: msi, MoW2,
address 00:13:02:2e:8b:46
ppb1 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x01: apic 2 int 19
pci2 at ppb1 bus 12
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x01: apic 2 int 20
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x01: apic 2 int 21
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x01: apic 2 int 22
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x01: apic 2 int 23
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x01: apic 2 int 20
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00
addr 1
ppb2 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe1
pci3 at ppb2 bus 3
bce0 at pci3 dev 0 function 0 "Broadcom BCM4401B1" rev 0x02: apic 2 int 17,
address 00:15:c5:0b:8b:7a
bmtphy0 at bce0 phy 1: BCM4401 10/100baseTX PHY, rev. 0
"Ricoh 5C832 Firewire" rev 0x00 at pci3 dev 1 function 0 not configured
sdhc0 at pci3 dev 1 function 1 "Ricoh 5C822 SD/MMC" rev 0x19: apic 2 int 18
sdhc0: SDHC 1.0, 33 MHz base clock
sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed
"Ricoh 5C843 MMC" rev 0x01 at pci3 dev 1 function 2 not configured
"Ricoh 5C592 Memory Stick" rev 0x0a at pci3 dev 1 function 3 not configured
"Ricoh 5C852 xD" rev 0x05 at pci3 dev 1 function 4 not configured
ichpcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x01: PM disabled
pciide0 at pci0 dev 31 function 2 "Intel 82801GBM SATA" rev 0x01: DMA, channel
0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <ST96812AS>
wd0: 16-sector PIO, LBA48, 57241MB, 117231408 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <_NEC, DVD+-RW ND-6650A, 102C> ATAPI 5/cdrom
removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x01: apic 2 int 17
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
spdmem1 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00
addr 1
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pms0: Synaptics touchpad, firmware 6.2
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
vmm0 at mainbus0: VMX
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on wd0a (055d82c92ce5e61f.a) swap on wd0b dump on wd0b