coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

GNUMakefile: fix compilation on Macs

Open kevinburke opened this issue 6 months ago • 5 comments

Previously, attempting to compile on Macs would bring in the SELinux dependencies (runcon) which led to compilation errors on Macs.

Fixes #7695.

kevinburke avatar May 20 '25 17:05 kevinburke

could you please add a job in the CI to make sure we don't regress ?

sylvestre avatar May 20 '25 17:05 sylvestre

There's a Mac ARM build in there already, and it's passing on main/master. So I would need to find the difference between the Mac ARM build in CI, and my Mac. I'm not sure the best way to do that.

kevinburke avatar May 20 '25 17:05 kevinburke

Ah - the CICD sets the feat_os_macos flag, which I wasn't. So I can reproduce the behavior on main with the following target:

make install PREFIX=/Users/kburke/local/coreutils BUILD_SPEC_FEATURES=feat_os_macos

And we can make CICD reproduce my failing build by removing the feat_os_macos flag.

I don't know, it feels a bit duplicative to have to set that flag explicitly.

kevinburke avatar May 20 '25 17:05 kevinburke

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

github-actions[bot] avatar May 20 '25 18:05 github-actions[bot]

@kevinburke can you check if the ifeq ($(SELINUX_ENABLED),1) based solution described in #7996 works for you?

kpcyrd avatar May 26 '25 12:05 kpcyrd

Now that you found the culprit, could you please extend the ci to the test this combination? Thanks

sylvestre avatar May 27 '25 19:05 sylvestre

@sylvestre here is that commit, it is the only commit that does not have a "features" tag - https://github.com/kevinburke/coreutils/commit/24ff36ee8

I'm still a bit confused - isn't there something that can set default "features" based on the compilation architecture, and then you can override it if need be.

kevinburke avatar May 27 '25 22:05 kevinburke

@kpcyrd I can compile on Mac with no problems if I remove this patch and apply your patch.

kevinburke avatar May 27 '25 22:05 kevinburke

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

github-actions[bot] avatar May 27 '25 22:05 github-actions[bot]