Bug 240850 - sysutils/coreutils fails to build with PIE
Summary: sysutils/coreutils fails to build with PIE
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs mailing list
Depends on:
Reported: 2019-09-27 01:44 UTC by Miyashita Touka
Modified: 2019-10-08 19:17 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (jharris)

build log (634.00 KB, text/plain)
2019-09-27 01:44 UTC, Miyashita Touka
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miyashita Touka 2019-09-27 01:44:25 UTC
Created attachment 207865 [details]
build log

The coreutils port fails in the package stage with the following error on 12-STABLE amd64:

gmake[1]: Leaving directory '/wrkdirs/usr/ports/sysutils/coreutils/work/coreutils-8.31'
strip: open /wrkdirs/usr/ports/sysutils/coreutils/work/stage/usr/local/libexec/coreutils/libstdbuf.so failed: No such file or directory
*** Error code 1

To reproduce:
1) enable WITH_PIE=yes in src.conf and rebuild (if it's not default)
2) set kern.elf64.aslr.enable and kern.elf64.aslr.pie_enable sysctls to 1
3) add the following to make.conf:
LDFLAGS+= -pie
4) build the port

Perhaps it just needs an updated plist file.
Comment 1 jharris 2019-10-08 19:17:33 UTC
Sorry, I'm not setup to duplicate/test this.

Please send a patch that a committer can check for correctness.