On Mon, Jan 18, 2021 at 11:20:21PM +0100, David Sterba wrote:
> Hi,
> 
> btrfs-progs version 5.10 have been released.

I got a report that static build is broken. It's caused by libmount that
has some internal functions with the same name as is in progs
(canonicalize_path, parse_size). I don't have a final fix, only
workarounds hiding or renaming the functions but there are still some
other problems that can't be solved by that.

ld: /../lib64/libmount.a(libcommon_la-canonicalize.o): in function 
`canonicalize_dm_name':
util-linux-2.34/lib/canonicalize.c:58: multiple definition of 
`canonicalize_dm_name';
        common/path-utils.static.o:btrfs-progs/common/path-utils.c:286: first 
defined here

similar for canonicalize_path and parse_size, and then it's

ld: ../lib64/libmount.a(la-utils.o): in function `mnt_get_gid':
util-linux-2.34/libmount/src/utils.c:625: warning: Using 'getgrnam_r' in 
statically linked applications requires at runtime the shared libraries from 
the glibc version used for linking
ld: ../lib64/libmount.a(la-utils.o): in function `mnt_get_uid':
util-linux-2.34/libmount/src/utils.c:598: warning: Using 'getpwnam_r' in 
statically linked applications requires at runtime the shared libraries from 
the glibc version used for linking
ld: ../lib64/libmount.a(la-utils.o): in function `mnt_get_username':
util-linux-2.34/libmount/src/utils.c:577: warning: Using 'getpwuid_r' in 
statically linked applications requires at runtime the shared libraries from 
the glibc version used for linking

Only warnings but I haven't checked if that affects runtime.

ld: ../lib64/libmount.a(la-optstr.o): in function `mnt_optstr_fix_secontext':
util-linux-2.34/libmount/src/optstr.c:909: undefined reference to 
`selinux_trans_to_raw_context'
ld: util-linux-2.34/libmount/src/optstr.c:934: undefined reference to `freecon'

The functions are from selinux that's pulled by libmount.so.1 and adds
yet another library dependency.

We want to support the static build so this will get fixed.

Reply via email to