On Wed, Sep 06, 2023 at 02:18:29PM +0100, Zé Loff wrote: > On Wed, Sep 06, 2023 at 01:52:51PM +0100, Zé Loff wrote: > > > > TL,DR: Something weird is happening: the WXNEEDED is being stripped from > > R's binary when creating the package. > > > > Long version: > > I need math/R to be compiled with WXNEEDED, so I add USE_WXNEEDED=Yes to > > the Makefile, and roll my own package, which I then install. This has > > been working fine for some time now. I did this again, after Rafael > > Sadowski updated the port, but this time it failed. > > > > The R binary is built with the WXNEEDED flag on: > > > > $ make > > ... > > $ objdump -x /usr/ports/pobj/R-4.2.3/build-amd64/bin/exec/R > > ... > > OPENBSD_RANDOMIZE off 0x0000000000000e10 vaddr 0x0000000000002e10 > > paddr 0x0000000000002e10 align 2**3 > > filesz 0x0000000000000028 memsz 0x0000000000000028 flags rw- > > STACK off 0x0000000000000000 vaddr 0x0000000000000000 paddr > > 0x0000000000000000 align 2**0 > > filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw- > > OPENBSD_WXNEEDED off 0x0000000000000000 vaddr 0x0000000000000000 > > paddr 0x0000000000000000 align 2**0 > > filesz 0x0000000000000000 memsz 0x0000000000000000 flags --x > > NOTE off 0x000000000000032c vaddr 0x000000000000032c paddr > > 0x000000000000032c align 2**2 > > filesz 0x0000000000000018 memsz 0x0000000000000018 flags r-- > > ... > > > > > > But the binary that gets installed is not: > > > > $ make install > > ... > > $ objdump -x /usr/local/lib/R/bin/exec/R > > ... > > OPENBSD_RANDOMIZE off 0x0000000000000dd0 vaddr 0x0000000000002dd0 > > paddr 0x0000000000002dd0 align 2**3 > > filesz 0x0000000000000028 memsz 0x0000000000000028 flags rw- > > STACK off 0x0000000000000000 vaddr 0x0000000000000000 paddr > > 0x0000000000000000 align 2**0 > > filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw- > > NOTE off 0x00000000000002f4 vaddr 0x00000000000002f4 paddr > > 0x00000000000002f4 align 2**2 > > filesz 0x0000000000000018 memsz 0x0000000000000018 flags r-- > > ... > > > > > > Nor is the one that goes in the package: > > > > $ find /usr/ports/packages -name R-4.2.3.tgz -delete > > $ make package > > ... > > $ cd /tmp > > $ tar xzf /usr/ports/packages/amd64/ftp/R-4.2.3.tgz lib/R/bin/exec/R > > $ objdump -x lib/R/bin/exec/R > > ... > > OPENBSD_RANDOMIZE off 0x0000000000000dd0 vaddr 0x0000000000002dd0 > > paddr 0x0000000000002dd0 align 2**3 > > filesz 0x0000000000000028 memsz 0x0000000000000028 flags rw- > > STACK off 0x0000000000000000 vaddr 0x0000000000000000 paddr > > 0x0000000000000000 align 2**0 > > filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw- > > NOTE off 0x00000000000002f4 vaddr 0x00000000000002f4 paddr > > 0x00000000000002f4 align 2**2 > > filesz 0x0000000000000018 memsz 0x0000000000000018 flags r-- > > ... > > > > > > This is on amd64 -current (Sep 3), and a fresh ports tree, synced today > > (Sep 6) from CVS. > > > > Any clues as to what might be going on? > > > > Thanks in advance > > Zé > > > > -- > > > > > > Bad choice of subject line. It's obviously not being stripped. The > issue is that make package / make install go fetch the package from the > repository instead of packaging the newly compiled code: > > $ sha256 /usr/ports/packages/amd64/ftp/R-4.2.3.tgz > SHA256 (/usr/ports/packages/amd64/ftp/R-4.2.3.tgz) = > f36b4b99633dd1ab666c0a6f4b5adcf45f0c0ddac32551177b6907b447e93519 > $ cd /tmp > $ ftp > http://cdn.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/R-4.2.3.tgz > $ sha256 R-4.2.3.tgz > SHA256 (R-4.2.3.tgz) = > f36b4b99633dd1ab666c0a6f4b5adcf45f0c0ddac32551177b6907b447e93519 > > -- > >
Forgot to add REVISION=0 to the Makefile. Facepalm. I knew this _had_ to be my fault, just wasn't getting there, and was too trigger happy with the emails. Sorry for the noise. --