git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 3/4] Linux: link against libdl

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Apr 9, 2026, 22:44 UTC
Message-ID
<20260409224434.1861422-4-sandals@crustytoothpaste.net>
In-Reply-To
<20260409224434.1861422-1-sandals@crustytoothpaste.net>

Older versions of Rust on Linux, such as that used in Debian 11 in our CI, require linking against libdl. Were we linking with Cargo, this would be included automatically, but since we're not, explicitly set it in the system-specific config.

This library is part of libc, so linking against it if it happens to be unnecessary will add no dependencies to the resulting binary. In addition, it is provided by both glibc and musl, so it should be portable to almost all Linux systems.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 config.mak.uname | 1 +
 1 file changed, 1 insertion(+)
diff --git a/config.mak.uname b/config.mak.uname
index ccb3f71881..7aab56c590 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -63,6 +63,7 @@ ifeq ($(uname_S),Linux)
 	PROCFS_EXECUTABLE_PATH = /proc/self/exe
 	HAVE_PLATFORM_PROCINFO = YesPlease
 	COMPAT_OBJS += compat/linux/procinfo.o
+	EXTLIBS += -ldl
 	# centos7/rhel7 provides gcc 4.8.5 and zlib 1.2.7.
         ifneq ($(findstring .el7.,$(uname_R)),)
 		BASIC_CFLAGS += -std=c99
Previous: brian m. carlsonNext: brian m. carlson
Message 3 of 14 in “Enable Rust by default”
  1. 0/4 Enable Rust by defaultbrian m. carlson, Apr 9, 2026
  2. 1/4 docs: update version with default Rust supportbrian m. carlson, Apr 9, 2026
  3. 3/4 Linux: link against libdlbrian m. carlson, Apr 9, 2026
  4. 4/4 Enable Rust by defaultbrian m. carlson, Apr 9, 2026
  5. 2/4 ci: install cargo on Alpinebrian m. carlson, Apr 9, 2026
  6. Derrick StoleeApr 10, 2026
  7. Re*: [PATCH v2 0/4] Enable Rust by defaultJunio C Hamano, Apr 10, 2026
  8. Derrick StoleeApr 10, 2026
  9. brian m. carlsonApr 10, 2026
  10. Junio C HamanoApr 10, 2026
  11. brian m. carlsonApr 10, 2026
  12. Junio C HamanoApr 10, 2026
  13. brian m. carlsonApr 10, 2026
  14. Derrick StoleeApr 10, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.