Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 913363 - app-misc/tracker-miners-3.6_beta: configure doesn't detect btrfs subvolume support
Summary: app-misc/tracker-miners-3.6_beta: configure doesn't detect btrfs subvolume su...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2023-08-31 07:34 UTC by poncho
Modified: 2023-09-06 14:43 UTC (History)
1 user (show)

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


Attachments
meson log from ebuild configure (build.log,15.03 KB, text/x-log)
2023-08-31 07:34 UTC, poncho
Details
meson-log.txt (meson-log.txt,112.56 KB, text/plain)
2023-08-31 07:38 UTC, poncho
Details
testfile.c (testfile.c,311 bytes, text/x-csrc)
2023-08-31 17:17 UTC, poncho
Details
Use cc.has_header_symbol to check for BTRFS_IOC_INO_LOOKUP (c08fbe0650d4a2ae915a21764f54c02eda9406d5.patch,1.31 KB, patch)
2023-09-03 15:55 UTC, poncho
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description poncho 2023-08-31 07:34:27 UTC
Created attachment 869075 [details]
meson log from ebuild configure

I'm having issues with tracker and my btrfs subvolumes. While looking into it I've noticed, that the configure script doesn't enable btrfs subvolume support on my system.

Checking if "BTRFS_IOC_INO_LOOKUP ioctl is available" runs: NO (1)

and

Feature Support:
    BTRFS subvolumes:                       false

The check was introduced here: https://gitlab.gnome.org/GNOME/tracker-miners/-/merge_requests/449/diffs?commit_id=c4eb04fb540511f51c2f49c0a62ee992442db7d7 and seems to report false on my system despite using btrfs and btrfs subvolumes.




Portage 3.0.49 (python 3.11.5-final-0, default/linux/amd64/17.1/desktop/gnome/systemd/merged-usr, gcc-12, glibc-2.37-r3, 6.4.12-gentoo-dist x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.4.12-gentoo-dist-x86_64-Intel-R-_Core-TM-_i7-9700K_CPU_@_3.60GHz-with-glibc2.37
KiB Mem:    32772760 total,   1107168 free
KiB Swap:   33554428 total,  33554172 free
Head commit of repository gnome-next: 3e7afa45723d4c92a84cabdb7d921cefeb4724eb

Head commit of repository steam-overlay: bcbce9c5c716ed52d7d8b3bca0b90bf47193310a

Timestamp of repository gentoo: Thu, 31 Aug 2023 06:16:53 +0000
Head commit of repository gentoo: 139036b2415680c30fe47d43f7b87497ddc4b536

Head commit of repository poncho: 8902adebf321e47287897100887e9b714d292213

Head commit of repository torbrowser: 1680fdaed9bdc820261b6484d2692ee7d24eb850

sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.40 p5) 2.40.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-lang/perl:             5.36.1-r3::gentoo
dev-lang/python:           3.11.5::gentoo
dev-lang/rust:             1.69.0-r1::gentoo
dev-util/cmake:            3.26.5-r2::gentoo
dev-util/meson:            1.1.1::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/sandbox:          2.37::gentoo
sys-apps/systemd:          253.6::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/gcc:             12.3.1_p20230526::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             15.0.7::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r3::gentoo
Repositories:

gnome-next
    location: /var/db/repos/gnome-next
    sync-type: git
    sync-uri: https://github.com/MeisterP/gnome-overlay.git
    sync-user: poncho
    masters: gentoo
    priority: 50
    volatile: True

steam-overlay
    location: /var/db/repos/steam
    sync-type: git
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50
    volatile: True

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    sync-user: poncho
    priority: 1000
    volatile: True
    sync-git-verify-commit-signature: true

poncho
    location: /var/db/repos/poncho
    sync-type: git
    sync-uri: https://github.com/MeisterP/poncho-overlay.git
    sync-user: poncho
    masters: gentoo
    priority: 1050
    volatile: True

torbrowser
    location: /var/db/repos/torbrowser
    sync-type: git
    sync-uri: https://github.com/MeisterP/torbrowser-overlay.git
    sync-user: poncho
    masters: gentoo
    priority: 1050
    volatile: True

Installed sets: @fonts, @kernels, @python-modules, @virtualbox
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA FraunhoferFDK NVIDIA-CUDA PUEL-11"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/thumbnailers/ffmpegthumbnailer.thumbnailer"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --ask --jobs=8 --load-average=9 --verbose"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live cgroup config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync mount-sandbox multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="https://mirror.init7.net/gentoo/ 	http://distfiles.gentoo.org"
INSTALL_MASK=" /etc/init.d /etc/conf.d"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="en en_US"
MAKEOPTS="-j8 -l9"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RUSTFLAGS="-Ctarget-cpu=native"
SHELL="/bin/zsh"
USE="X a52 aac acl acpi aften alsa amd64 argyllcms bluetooth bzip2 cairo cdda cdio cdr cli colord crypt cryptsetup css cuda cups dav1d dbus device-mapper dist-kernel dri drm dts dvd dvdr encode evo exif fdk ffmpeg flac fontconfig fortran gdbm gif gnome gnome-keyring gnome-online-accounts gstreamer gtk gui harfbuzz heif iconv icu id3tag introspection ipv6 jpeg keyring kms lame lcms libass libnotify libplacebo libproxy libtirpc mad mng mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl nss nvenc nvidia ogg opengl openmp opus pam pango pcre pdf pipewire png policykit postscript ppds pulseaudio raw readline rtmp sdl seccomp sndfile sound speex spell ssl startup-notification svg sysprof systemd test-rust theora tiff tracker truetype udev udisks unicode upower usb v4l vaapi vorbis vpx vulkan wavpack webp x264 x265 xattr xcb xft xml xmp xps xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en_US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" SANE_BACKENDS="hp" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

app-misc/tracker-miners-3.6_beta::gentoo was built with the following:
USE="exif ffmpeg gif gsf jpeg networkmanager pdf playlist raw (seccomp) tiff upower xml xmp xps -cue -gstreamer -iptc -iso (-rss) -test" ABI_X86="(64)"
CFLAGS="-march=native -O2 -pipe -DTRACKER_DEBUG -DG_DISABLE_CAST_CHECKS"
FEATURES="multilib-strict assume-digests ebuild-locks xattr ipc-sandbox buildpkg-live sandbox protect-owned sfperms usersandbox cgroup binpkg-dostrip strict userfetch merge-sync unmerge-logs qa-unresolved-soname-deps config-protect-if-modified preserve-libs usersync parallel-install unknown-features-warn mount-sandbox parallel-fetch unmerge-orphans binpkg-logs distlocks pid-sandbox fixlafiles network-sandbox binpkg-docompress news userpriv"
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-31 07:35:53 UTC
Could you include meson-log.txt?
Comment 2 poncho 2023-08-31 07:38:58 UTC
Created attachment 869080 [details]
meson-log.txt
Comment 3 poncho 2023-08-31 07:40:31 UTC
(In reply to Sam James from comment #1)
> Could you include meson-log.txt?

log file added. I think this is the relevant part:

Running compile:
Working directory:  /var/tmp/portage/app-misc/tracker-miners-3.6_beta/work/tracker-miners-3.6_beta-build/meson-private/tmp6f8o0dro
Command line:  x86_64-pc-linux-gnu-gcc /var/tmp/portage/app-misc/tracker-miners-3.6_beta/work/tracker-miners-3.6_beta-build/meson-private/tmp6f8o0dro/testfile.c -o /var/tmp/portage/app-misc/tracker-miners-3.6_beta/work/tracker-miners-3.6_beta-build/meson-private/tmp6f8o0dro/output.exe -march=native -O2 -pipe -DTRACKER_DEBUG -DG_DISABLE_CAST_CHECKS -D_FILE_OFFSET_BITS=64 -O0 -Wl,-O1 -Wl,--as-needed 

Code:
 
    #include <errno.h>
    #include <fcntl.h>
    #include <sys/ioctl.h>
    #include <linux/btrfs.h>

    int main (int argc, char *argv[]) {
      struct btrfs_ioctl_ino_lookup_args args = { 0, };
      int fd = open ("/", O_RDONLY);
      int ret = ioctl (fd, BTRFS_IOC_INO_LOOKUP, &args);
      return (ret < 0 && errno != ENOTTY) ? 1 : 0;
    }
  
Compiler stdout:
 
Compiler stderr:
 
Program stdout:


Program stderr:


Checking if "BTRFS_IOC_INO_LOOKUP ioctl is available" runs: NO (1)
Comment 4 poncho 2023-08-31 08:20:44 UTC
(In reply to poncho from comment #0)
> I'm having issues with tracker and my btrfs subvolumes.

If I have the test return true either way, my issues are fixed. So it's really just the configure check that seems wrong.

diff --unified --new-file --recursive --show-c-function '--color=auto' tracker-miners-3.6.beta/meson.build tracker-miners-3.6.beta-fix/meson.build
--- tracker-miners-3.6.beta/meson.build	2023-08-11 00:18:58.000000000 +0200
+++ tracker-miners-3.6.beta-fix/meson.build	2023-08-31 09:20:46.767479152 +0200
@@ -197,7 +197,7 @@ result = cc.run('''
 if result.compiled() and result.returncode() == 0
   have_btrfs_ioctl = true
 else
-  have_btrfs_ioctl = false
+  have_btrfs_ioctl = true
 endif
 
 ####################################################################
Comment 5 Matt Turner gentoo-dev 2023-08-31 16:58:37 UTC
I don't use btrfs and the check succeeds here. I don't think it's related to whether you're using btrfs.

> Checking if "BTRFS_IOC_INO_LOOKUP ioctl is available" runs: YES


I don't see anything in your meson-log.txt that shows why the compile fails.

If you put the contents of the configure test C code into a file and run the command meson says it's executing to build it, what does the compiler say?
Comment 6 Matt Turner gentoo-dev 2023-08-31 17:01:12 UTC
Oh, it actually runs the program as well (result = cc.run(...)), so it may compile fine and then fail to run for some reason on your system.
Comment 7 poncho 2023-08-31 17:17:24 UTC
Created attachment 869108 [details]
testfile.c

(In reply to Matt Turner from comment #6)
> Oh, it actually runs the program as well (result = cc.run(...)), so it may
> compile fine and then fail to run for some reason on your system.

The file compiles and runs fine. Returns 1 on my system for some reason.

from /proc/mounts:
/dev/mapper/luks-XXX / btrfs rw,noatime,compress=zstd:3,ssd,discard=async,space_cache,subvolid=256,subvol=/root 0 0
Comment 8 Matt Turner gentoo-dev 2023-08-31 18:45:34 UTC
(In reply to poncho from comment #7)
> Created attachment 869108 [details]
> testfile.c
> 
> (In reply to Matt Turner from comment #6)
> > Oh, it actually runs the program as well (result = cc.run(...)), so it may
> > compile fine and then fail to run for some reason on your system.
> 
> The file compiles and runs fine. Returns 1 on my system for some reason.

Yeah, returning 1 means it failed. You'll have to debug it to understand why.
Comment 9 poncho 2023-08-31 19:24:28 UTC
(In reply to Matt Turner from comment #8)
> You'll have to debug it to understand why.

I'm sorry but I don't know how to debug the issue further. I'd need some help to do that.
Comment 10 poncho 2023-08-31 19:48:55 UTC
adding printf("%d %d %s\n", ret, errno, strerror(errno));

as user, I get:
-1 1 Operation not permitted 

as root, I get:
-1 2 No such file or directory
Comment 11 poncho 2023-09-03 15:55:59 UTC
Created attachment 869474 [details, diff]
Use cc.has_header_symbol to check for BTRFS_IOC_INO_LOOKUP

A fix was merged upstream.

https://gitlab.gnome.org/GNOME/tracker-miners/-/commit/c08fbe0650d4a2ae915a21764f54c02eda9406d5
Comment 12 Larry the Git Cow gentoo-dev 2023-09-06 14:43:50 UTC
The bug has been closed via the following commit(s):

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

commit 591b0d2ae92492651b64ed0e495b5c08d9e85817
Author:     Guillermo Joandet <gjoandet@gmail.com>
AuthorDate: 2023-09-06 13:45:30 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2023-09-06 14:42:14 +0000

    app-misc/tracker-miners: Version bump to 3.6_rc
    
    Closes: https://bugs.gentoo.org/913363
    Closes: https://github.com/gentoo/gentoo/pull/32653
    Signed-off-by: Guillermo Joandet <gjoandet@gmail.com>
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 app-misc/tracker-miners/Manifest                   |   1 +
 .../tracker-miners/tracker-miners-3.6_rc.ebuild    | 177 +++++++++++++++++++++
 2 files changed, 178 insertions(+)