Skip to content

Conversation

@Ecordonnier
Copy link
Contributor

@Ecordonnier Ecordonnier commented Jun 21, 2025

Use external libstdbuf.so when building with make, as embedding the library
is only needed to work around "cargo install" limitations with shared libraries.

Also change default installation directory to /usr/local/libexec/coreutils/ for consistency
with GNU coreutils

@github-actions
Copy link

GNU testsuite comparison:

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

@oech3
Copy link
Contributor

oech3 commented Jun 22, 2025

Is this trying to installing /usr/lib/libstdbuf.so? GNU Coreutils's default is /usr/lib/coreutils/libstdbuf.so if it is built with --libexecdir=/usr/lib.

mkdir and cp is replaced with install -Dm644

Use external libstdbuf.so when building with make, as embedding the library
is only needed to work around "cargo install" limitations with shared libraries.

Also change default installation directory to /usr/local/libexec/coreutils/ for consistency
with GNU coreutils

Signed-off-by: Etienne Cordonnier <[email protected]>
@Ecordonnier Ecordonnier force-pushed the eco/libstdbuf-makefile branch from 6949f6e to e1441ef Compare June 22, 2025 21:31
@Ecordonnier
Copy link
Contributor Author

Is this trying to installing /usr/lib/libstdbuf.so? GNU Coreutils's default is /usr/lib/coreutils/libstdbuf.so if it is built with --libexecdir=/usr/lib.

mkdir and cp is replaced with install -Dm644

  • I added install -m755
  • install -Dm755 does not work because of using a wildcard (libstdbuf*) to handle .so vs .dylib on macos, so it would need to be separated line "install -D". I kept mkdir -p for consistency with the other mkdir calls in the same code block.
  • the default of GNU coreutils is to be /usr/local/libexec/coreutils/libstdbuf.so:
ecordonnier@LC49NTQ3:~/dev/gnu-coreutils$ make install DESTDIR=./foobar
ecordonnier@LC49NTQ3:~/dev/gnu-coreutils$ find foobar/ -name libstdbuf*
foobar/usr/local/libexec/coreutils/libstdbuf.so

I changed the code to use the same directory in uutils-coreutils

@github-actions
Copy link

GNU testsuite comparison:

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

@Ecordonnier
Copy link
Contributor Author

This PR is ready to be reviewed. I am not working on it any more.

@sylvestre sylvestre merged commit 42339fe into uutils:main Jun 30, 2025
76 checks passed
@Ecordonnier Ecordonnier deleted the eco/libstdbuf-makefile branch June 30, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants