Public bug reported:

Example;
# 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


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://github.com/Nordix/nfqueue-loadbalancer#build

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: libmnl0:amd64 1.0.4-3build2
ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
Uname: Linux 5.15.0-27-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: unknown
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)

** Affects: libmnl (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug jammy

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1971523

Title:
  Static build does not work for libmnl (-lmnl)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libmnl/+bug/1971523/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to