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

[PATCH 3/4] Linux: link against libdl

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Apr 3, 2026, 01:12 UTC
Message-ID
<20260403011249.4133372-4-sandals@crustytoothpaste.net>
In-Reply-To
<20260403011249.4133372-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: Patrick Steinhardt
Message 7 of 9 in “Enable Rust by default”
  1. 0/4 Enable Rust by defaultbrian m. carlson, Apr 3, 2026
  2. 4/4 Enable Rust by defaultbrian m. carlson, Apr 3, 2026
  3. Patrick SteinhardtApr 8, 2026
  4. 2/4 ci: install cargo on Alpinebrian m. carlson, Apr 3, 2026
  5. Patrick SteinhardtApr 8, 2026
  6. 1/4 docs: update version with default Rust supportbrian m. carlson, Apr 3, 2026
  7. 3/4 Linux: link against libdlbrian m. carlson, Apr 3, 2026
  8. Patrick SteinhardtApr 8, 2026
  9. Junio C HamanoApr 3, 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.