Static build does not work for libmnl (-lmnl)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libmnl (Debian) |
Fix Committed
|
Unknown
|
|||
libmnl (Ubuntu) |
Fix Released
|
Undecided
|
Michał Małoszewski | ||
Jammy |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[Test Case]
$ cat > /tmp/hello.c <<EOF
#include <stdio.h>
int main() {
printf("Hello world! (and LP: #1971523)\n");
}
EOF
$ gcc -o /tmp/hello /tmp/hello.c -lmnl
(dynamic libs work)
$ gcc -static -o /tmp/hello /tmp/hello.c -lmnl
/usr/bin/ld: cannot find -lmnl: No such file or directory
[Original Report]
My program uses both -lmnl and -lnetfilter_queue and in Ubuntu 20.04 the -lnetfilter_queue did not work and -lmnl worked for static builds. In Ubuntu 22.04 the problem is reversed, -lnetfilter_queue works but -lmnl doesn't for static builds. This is very awkward during the transition 20.04->22.04 when both should be supported.
I compensated in Ubuntu 20.04 by building netfilter_queue locally;
https:/
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: libmnl0:amd64 1.0.4-3build2
ProcVersionSign
Uname: Linux 5.15.0-27-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: XFCE
Date: Wed May 4 07:33:26 2022
InstallationDate: Installed on 2018-09-07 (1334 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
SourcePackage: libmnl
UpgradeStatus: Upgraded to jammy on 2022-05-01 (2 days ago)
Related branches
- git-ubuntu bot: Approve
- Christian Ehrhardt (community): Approve
- Canonical Server Reporter: Pending requested
- Canonical Server Core Reviewers: Pending requested
- Canonical Server: Pending requested
- Robie Basak: Pending requested
-
Diff: 34 lines (+10/-0)3 files modifieddebian/changelog (+6/-0)
debian/libmnl-dev.install (+1/-0)
debian/rules (+3/-0)
Changed in libmnl (Debian): | |
status: | Unknown → Fix Committed |
description: | updated |
tags: | added: bitesize |
Changed in libmnl (Ubuntu): | |
assignee: | nobody → Michał Małoszewski (michal-maloszewski99) |
no longer affects: | libmnl (Ubuntu Impish) |
Changed in libmnl (Ubuntu Jammy): | |
assignee: | nobody → Michał Małoszewski (michal-maloszewski99) |
Changed in libmnl (Ubuntu Jammy): | |
status: | Triaged → Won't Fix |
Changed in libmnl (Ubuntu Jammy): | |
assignee: | Michał Małoszewski (michal-maloszewski99) → nobody |
tags: | removed: server-todo |
Hello Lars and thanks for this bug report. I can confirm this: libmnl-dev 1.0.4-2 installs
/usr/ lib/x86_ 64-linux- gnu/libmnl. a
while libmnl-dev 1.0.4-3 does not. I tracked this down to this Debian packaging change (see the debian/ libmnl- dev.install diff):
https:/ /salsa. debian. org/pkg- netfilter- team/pkg- libmnl/ -/commit/ 3526970e4dfb559 8a9023496211c90 8e9ab7c9dc
Dropping the .a file looks like unintentional to me, at least by reading the commit message. Ideally this should be fixed in Debian, to make Debian benefit from the fix and keep the packages in sync, lowering the maintenance work from the Ubuntu side.
Do you you think you can file a bug in Debian against the libmnl source package and report it back here? This would speed up things. Thanks!