Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 879321 - dev-util/ostree-2022.6 - In function '_checkout_overlayfs_whiteout_at': src/libostree/ostree-repo-checkout.c:689:30: error: 'ALLPERMS' undeclared (first use in this function) (on musl)
Summary: dev-util/ostree-2022.6 - In function '_checkout_overlayfs_whiteout_at': src/l...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Zac Medico
URL:
Whiteboard:
Keywords: PATCH, REGRESSION
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2022-11-03 11:21 UTC by ernsteiswuerfel
Modified: 2022-11-05 23:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (ostree-2022.6:20221103-104117.log,257.15 KB, text/plain)
2022-11-03 11:21 UTC, ernsteiswuerfel
Details
emerge --info (file_879321.txt,7.38 KB, text/plain)
2022-11-03 11:21 UTC, ernsteiswuerfel
Details
musl-missing_include.patch (musl-missing_include.patch,472 bytes, patch)
2022-11-04 21:07 UTC, ernsteiswuerfel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2022-11-03 11:21:16 UTC
Created attachment 826865 [details]
build.log

[...]
libtool: compile:  x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I. -DDATADIR=\"/usr/share\" -DLIBEXECDIR=\"/usr/libexec\" -DLOCALEDIR=\"/usr/share/locale\" -DSYSCONFDIR=\"/etc\" -DTARGET_PREFIX=\"/usr\" -DSHORTENED_SYSCONFDIR=\"etc\" "-DOSTREE_FEATURES=\"libcurl libsoup gpgme ex-fsverity openssl release p2p\"" -DOSTREE_COMPILATION -DG_LOG_DOMAIN=\"OSTree\" -DOSTREE_GITREV=\"\" -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66 "-DGLIB_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,70)" -DSOUP_VERSION_MIN_REQUIRED=SOUP_VERSION_2_40 "-DSOUP_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,48)" -std=gnu99 -fno-strict-aliasing -pipe -Wall -Werror=shadow -Werror=empty-body -Werror=strict-prototypes -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=format=2 -Werror=format-security -Werror=format-nonliteral -Werror=pointer-arith -Werror=init-self -Werror=missing-declarations -Werror=return-type -Werror=switch -Werror=overflow -Werror=int-conversion -Werror=parentheses -Werror=undef -Werror=incompatible-pointer-types -Werror=misleading-indentation -Werror=missing-include-dirs -Wstrict-aliasing=2 -Werror=unused-result -I./bsdiff -I./libglnx -I./src/libotutil -I./src/libostree -I./src/libostree -I/usr/include/gio-unix-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/libffi/include -pthread -I/usr/include/libmount -I/usr/include/blkid -fvisibility=hidden "-D_OSTREE_PUBLIC=__attribute__((visibility(\"default\"))) extern" -DPKGLIBEXECDIR=\"/usr/libexec/libostree\" -Os -march=bdver3 -mtune=bdver3 -pipe -c src/libostree/ostree-repo-checkout.c  -fPIC -DPIC -o src/libostree/.libs/libostree_1_la-ostree-repo-checkout.o
src/libostree/ostree-repo-checkout.c: In function '_checkout_overlayfs_whiteout_at':
src/libostree/ostree-repo-checkout.c:689:30: error: 'ALLPERMS' undeclared (first use in this function)
  689 |             if ((file_mode & ALLPERMS) != (dest_stbuf.st_mode & ALLPERMS))
      |                              ^~~~~~~~
src/libostree/ostree-repo-checkout.c:689:30: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [Makefile:5280: src/libostree/libostree_1_la-ostree-repo-checkout.lo] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-util/ostree-2022.6/work/libostree-2022.6'
make[1]: *** [Makefile:7859: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-util/ostree-2022.6/work/libostree-2022.6'
make: *** [Makefile:3208: all] Error 2
 * ERROR: dev-util/ostree-2022.6::gentoo failed (compile phase):
 *   emake failed
Comment 1 ernsteiswuerfel archtester 2022-11-03 11:21:50 UTC
Created attachment 826867 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2022-11-03 11:32:17 UTC
Regression over ostree-2022.2 which builds fine on musl.
Comment 3 ernsteiswuerfel archtester 2022-11-04 21:07:17 UTC
Created attachment 827135 [details, diff]
musl-missing_include.patch

Seems the ALLPERMS missing here is a glibc-ism. The patch simply adds ALLPERMS when missing. ostree-2022.6 builds fine then.

Patch borrowed from dev-libs/elfutils-0.187-r2 where the same logic is applied in several files. Luckily it's only needed in one place in ostree-2022.6.
Comment 4 Zac Medico gentoo-dev 2022-11-05 23:07:17 UTC
(In reply to ernsteiswuerfel from comment #3)
> Created attachment 827135 [details, diff] [details, diff]
> musl-missing_include.patch
> 
> Seems the ALLPERMS missing here is a glibc-ism. The patch simply adds
> ALLPERMS when missing. ostree-2022.6 builds fine then.
> 
> Patch borrowed from dev-libs/elfutils-0.187-r2 where the same logic is
> applied in several files. Luckily it's only needed in one place in
> ostree-2022.6.

Thanks @ernsteiswuerfel, this looks good. Will you please send this patch as a pull request to https://github.com/ostreedev/ostree/pulls?
Comment 5 Larry the Git Cow gentoo-dev 2022-11-05 23:09:00 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b09efe8df162f8c422196ef872235a06b0f622bd

commit b09efe8df162f8c422196ef872235a06b0f622bd
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2022-11-05 22:48:44 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2022-11-05 23:08:56 +0000

    dev-util/ostree: add patch to fix musl build
    
    Closes: https://bugs.gentoo.org/879321
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 dev-util/ostree/files/ostree-2022.6-musl-allperms.patch | 17 +++++++++++++++++
 dev-util/ostree/ostree-2022.6.ebuild                    |  4 ++++
 2 files changed, 21 insertions(+)