Skip to content

build: remove -lrt link dependency - #2493

Closed
sam-github wants to merge 1 commit into
libuv:v1.xfrom
sam-github:remove-librt
Closed

build: remove -lrt link dependency#2493
sam-github wants to merge 1 commit into
libuv:v1.xfrom
sam-github:remove-librt

Conversation

@sam-github

Copy link
Copy Markdown
Contributor

It does not appear to be necessary, at least not for Node.js.

See:

It does not appear to be necessary, at least not for Node.js.

See:
- nodejs/node#29727
@sam-github

Copy link
Copy Markdown
Contributor Author

ci: https://ci.nodejs.org/view/libuv/job/libuv-test-commit/1588/

Any comment on this, or floating it in nodejs/node#29727?

@bnoordhuis

Copy link
Copy Markdown
Member

librt is needed with old versions of glibc (< 2.17) to pull in the real-time clock definitions. Since glibc 2.12 is still the baseline for us, nine years old though it may be, that means we can't accept this PR.

@bnoordhuis bnoordhuis closed this Sep 30, 2019
@bnoordhuis

Copy link
Copy Markdown
Member

But if you really want to get rid of librt, I'd be open to adding some kind of build flag that makes linking to it conditional. Node.js could then turn on that flag at configure time.

@sam-github
sam-github deleted the remove-librt branch September 30, 2019 14:45
cjihrig pushed a commit that referenced this pull request May 17, 2020
Using AC_CHECK_LIB ignores symbols already provided by
other libraries, or in other words it links libuv against
libraries that it does not need.

Attempts to remove specific libraries were met with arguments
that older libc versions would still require them.[0]

Fix this by using AC_SEARCH_LIBS instead of AC_CHECK_LIB while
using AX_PTHREAD for POSIX threads.

[0] E.g. #2493

PR-URL: #2823
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
ceejatec pushed a commit to couchbasedeps/libuv that referenced this pull request May 4, 2021
Using AC_CHECK_LIB ignores symbols already provided by
other libraries, or in other words it links libuv against
libraries that it does not need.

Attempts to remove specific libraries were met with arguments
that older libc versions would still require them.[0]

Fix this by using AC_SEARCH_LIBS instead of AC_CHECK_LIB while
using AX_PTHREAD for POSIX threads.

[0] E.g. libuv#2493

PR-URL: libuv#2823
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
JeffroMF pushed a commit to JeffroMF/libuv that referenced this pull request May 16, 2022
Using AC_CHECK_LIB ignores symbols already provided by
other libraries, or in other words it links libuv against
libraries that it does not need.

Attempts to remove specific libraries were met with arguments
that older libc versions would still require them.[0]

Fix this by using AC_SEARCH_LIBS instead of AC_CHECK_LIB while
using AX_PTHREAD for POSIX threads.

[0] E.g. libuv#2493

PR-URL: libuv#2823
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
liujinye-sys pushed a commit to open-vela/apps_system_libuv that referenced this pull request Jul 23, 2025
Using AC_CHECK_LIB ignores symbols already provided by
other libraries, or in other words it links libuv against
libraries that it does not need.

Attempts to remove specific libraries were met with arguments
that older libc versions would still require them.[0]

Fix this by using AC_SEARCH_LIBS instead of AC_CHECK_LIB while
using AX_PTHREAD for POSIX threads.

[0] E.g. libuv/libuv#2493

PR-URL: libuv/libuv#2823
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
liujinye-sys pushed a commit to open-vela/apps_system_libuv that referenced this pull request Dec 16, 2025
Using AC_CHECK_LIB ignores symbols already provided by
other libraries, or in other words it links libuv against
libraries that it does not need.

Attempts to remove specific libraries were met with arguments
that older libc versions would still require them.[0]

Fix this by using AC_SEARCH_LIBS instead of AC_CHECK_LIB while
using AX_PTHREAD for POSIX threads.

[0] E.g. libuv/libuv#2493

PR-URL: libuv/libuv#2823
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
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.

2 participants