Your message dated Sat, 18 Oct 2025 09:50:56 +0000
with message-id <[email protected]>
and subject line Bug#1104987: fixed in libselinux 3.9-1
has caused the Debian Bug report #1104987,
regarding libselinux FTBFS on musl: implicit declaration of lstat64
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1104987: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1104987
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: libselinux
Version: 3.8.1-1
Tags: patch ftbfs
User: [email protected]
Usertags: rebootstrap

libselinux fails to build from source for 64bit musl architectures.

aarch64-linux-musl-gcc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 
-Werror=implicit-function-declaration 
-ffile-prefix-map=/tmp/buildd/libselinux_1/libselinux-3.8.1=. 
-specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat 
-Werror=format-security -mbranch-protection=standard 
-fno-semantic-interposition -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include -D_GNU_SOURCE 
-DNO_ANDROID_BACKEND -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8 -DHAVE_STRLCPY 
-DHAVE_REALLOCARRAY  -c -o selinux_restorecon.o selinux_restorecon.c
selinux_restorecon.c: In function ‘filespec_add’:
selinux_restorecon.c:441:23: error: storage size of ‘sb’ isn’t known
  441 |         struct stat64 sb;
      |                       ^~
selinux_restorecon.c:455:31: error: implicit declaration of function ‘lstat64’; 
did you mean ‘lstat’? [-Wimplicit-function-declaration]
  455 |                         ret = lstat64(fl->file, &sb);
      |                               ^~~~~~~
      |                               lstat
selinux_restorecon.c:441:23: warning: unused variable ‘sb’ [-Wunused-variable]
  441 |         struct stat64 sb;
      |                       ^~

In order to use lstat64, -D_LARGEFILE64_SOURCE must be defined.
debian/rules defines this for 32bit, but it really is always required.
On 64bit, it would be ok to use lstat directly, but the use of the
lstat64 name requires the macro to be set.

Attaching a patch for your convenience.

Helmut
diff --minimal -Nru libselinux-3.8.1/debian/changelog 
libselinux-3.8.1/debian/changelog
--- libselinux-3.8.1/debian/changelog   2025-03-16 08:02:09.000000000 +0100
+++ libselinux-3.8.1/debian/changelog   2025-05-09 13:54:17.000000000 +0200
@@ -1,3 +1,10 @@
+libselinux (3.8.1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix musl FTBFS: Always define -D_LARGEFILE64_SOURCE. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Fri, 09 May 2025 13:54:17 +0200
+
 libselinux (3.8.1-1) unstable; urgency=medium
 
   * New upstream release, just change version number Closes: #1099888
diff --minimal -Nru libselinux-3.8.1/debian/rules libselinux-3.8.1/debian/rules
--- libselinux-3.8.1/debian/rules       2025-02-03 09:35:18.000000000 +0100
+++ libselinux-3.8.1/debian/rules       2025-05-09 13:54:15.000000000 +0200
@@ -28,10 +28,8 @@
 
 BUILT_USING=$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), 
' -W "libsepol-dev")
 
-ifeq ($(DEB_HOST_ARCH_BITS),32)
 # Use of lstat64 requires this macro.
 export DEB_CPPFLAGS_MAINT_APPEND += -D_LARGEFILE64_SOURCE
-endif
 
 # Upstream recommends using this flag
 export DEB_CFLAGS_MAINT_APPEND = -fno-semantic-interposition

--- End Message ---
--- Begin Message ---
Source: libselinux
Source-Version: 3.9-1
Done: Russell Coker <[email protected]>

We believe that the bug you reported is fixed in the latest version of
libselinux, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Russell Coker <[email protected]> (supplier of updated libselinux package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 17 Oct 2025 18:29:06 +1100
Source: libselinux
Architecture: source
Version: 3.9-1
Distribution: unstable
Urgency: medium
Maintainer: Debian SELinux maintainers <[email protected]>
Changed-By: Russell Coker <[email protected]>
Closes: 1104987
Changes:
 libselinux (3.9-1) unstable; urgency=medium
 .
   * 3.9 upstream release
   * Always use -D_LARGEFILE64_SOURCE thanks Helmut Grohne Closes: #1104987
   * Don't apply patch x32 becuase it conflicts and an upstream change appears
     to fix the problem.
   * Delegate Built-Using to dh-sequence-builtusing
     Refine pattern in debian/*.install with DEB_HOST_MULTIARCH
     use dpkg buildtools.mk Makefile snippet
     use dpkg buildopts.mk Makefile snippet
     use dpkg buildflags.mk Makefile snippet
     replace shell loops with Make loops
     remove obsolete dh_makeshlibs override
     avoid hardcoded duplications of libdir
     thanks Nicolas Boulenguez
Checksums-Sha1:
 80e1c24494615308748345a78dd0467271f99f8f 3014 libselinux_3.9-1.dsc
 7dc10c4b3f2d83a15d0da3ba5955a80c8f9875ff 205334 libselinux_3.9.orig.tar.gz
 dc9f1c0cff71787da431d467577aaa6e283bd916 833 libselinux_3.9.orig.tar.gz.asc
 6e29ce2f4c6960502a971e0b2dc9cd18a4ef9db7 37900 libselinux_3.9-1.debian.tar.xz
 ca9f7239411ca94da6ea4edbb646a7ee544b3b92 16618 libselinux_3.9-1_amd64.buildinfo
Checksums-Sha256:
 eb1d9887022e326110625982984a21258ab12a573da4524d8921cb0fed11eb6f 3014 
libselinux_3.9-1.dsc
 e7ee2c01dba64a0c35c9d7c9c0e06209d8186b325b0638a0d83f915cc3c101e8 205334 
libselinux_3.9.orig.tar.gz
 3529c5a905fdfa9e0a8e926ce0333f508213cccd9f6e35ca1011e37412042ca5 833 
libselinux_3.9.orig.tar.gz.asc
 e722bbb0a04409b6b7093da21c15b199f28b3903d3e43d098da971c411c6b15f 37900 
libselinux_3.9-1.debian.tar.xz
 bab33879dfee0122c84d6db3d35a195954bf4b93445e2a82629623919dc18900 16618 
libselinux_3.9-1_amd64.buildinfo
Files:
 b79e7f47d933c9c4243f79890a2bee6b 3014 libs optional libselinux_3.9-1.dsc
 4838497a9334a8c2b12714dd63db650b 205334 libs optional 
libselinux_3.9.orig.tar.gz
 e73b7c5d624ef1dcfbf786207278d894 833 libs optional 
libselinux_3.9.orig.tar.gz.asc
 30a93846ea3064f9eeb508ee0e9bcf10 37900 libs optional 
libselinux_3.9-1.debian.tar.xz
 a2ee4b9469f31ad18c342d8ef23e322c 16618 libs optional 
libselinux_3.9-1_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEn31hncwG9XwCqmbH0UHNMPxLj3kFAmjzXtAACgkQ0UHNMPxL
j3nvpw//eImCiCpRxLXybErlJvBdw0NrPdbNMINF1bVkylArQiVE9PgTwRV2ryZs
U2JLLjXdkFCFtYCL9OF6/VklV9AjQ99ZerTRP5SuJi5LrWPlem2M9nEOkmr4z1K2
sjFNMVHp0tkGY1d02MOz/mjHlfFLhBh8BZy+5Bouu3P7SBzEh0aS4tuTL/mDG5O5
/JPELO68V8JV4TpCGjCkrWdTYejPaT7EuYVXacp7VA9zdcDp5iAf5rbmBNbSPMsU
M8ELy4ISj/RhiZpa6phxMit8LwoP/lDq81BHcH5Qm8KlpC69zSVrYkgw1kVpeRtP
kRmGyX9CVfPYAaUGLV3asT7BxIP+KFKnY1Vcxp5Hskpi4sOdyq02K+tlazUUIlD+
isCd/GDhwdbTScZUMFZ7qayGYx6R3s9NPE6BvLeYtIqW1knROdfuYjbWmxtU/xxO
Xr3qW9ab7r4cDeAvaf6P+DW2zEaVAbKnUnQPumfeWkZfANj33PiKBMhO/kK6zM1e
veCXdF2SR4Ddrax5W20Z6XWQirRhd0Bod3nvHr0vy0ptazJ8FJoZIl/vC26KsChA
mmLCqR5vTlFigtV8JfDqywfBoLk0MPzlwdAooSCg1bPClYAivzEmhfmHJO9E/KFD
PfgJC0n7lwZYx+HPKM6SfIBJMjebZJo6E6Ixz++qgtFGLZQv7yo=
=SS1Z
-----END PGP SIGNATURE-----

Attachment: pgpZeILs3Wpav.pgp
Description: PGP signature


--- End Message ---

Reply via email to