rmlint: FTBFS on arm{el,hf}: undefined reference to `rm_xattr_is_deduplicated'

Bug #2066970 reported by Benjamin Drung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rmlint (Debian)
New
Unknown
rmlint (Ubuntu)
Fix Released
Undecided
Unassigned
scons (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Imported from Debian bug http://bugs.debian.org/1065947:

Source: rmlint
Version: 2.9.0-2.5
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: <email address hidden>

https://buildd.debian.org/status/fetch.php?pkg=rmlint&arch=armel&ver=2.9.0-2.5%2Bb1&stamp=1710031282&raw=0

gcc -o rmlint -Wl,-z,relro -Wl,-z,now -pthread src/rmlint.o librmlint.a -lblkid -ljson-glib-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lelf -lm -lelf
/usr/bin/ld: librmlint.a(session.o): in function `rm_session_dedupe_main':
./lib/session.c:227:(.text+0x79c): undefined reference to `rm_xattr_is_deduplicated'
/usr/bin/ld: ./lib/session.c:345:(.text+0xaf4): undefined reference to `rm_xattr_mark_deduplicated'
collect2: error: ld returned 1 exit status
scons: *** [rmlint] Error 1

Cheers
--
Sebastian Ramacher

Revision history for this message
Benjamin Drung (bdrung) wrote :

`rm_xattr_is_deduplicated` is defined in `lib/xattr.c` but this function is guarded by an HAVE_XATTR check.

Revision history for this message
Benjamin Drung (bdrung) wrote :

So either fix the missing rm_xattr_mark_deduplicated function or build rmlint with xattr support.

Revision history for this message
Benjamin Drung (bdrung) wrote :

Correction: The xattr support checks fails on armhf (but not on other archs like amd64).

Changed in rmlint (Debian):
importance: Undecided → Unknown
Revision history for this message
Benjamin Drung (bdrung) wrote :
Revision history for this message
Benjamin Drung (bdrung) wrote :
Revision history for this message
Benjamin Drung (bdrung) wrote (last edit ):

After applying https://github.com/sahib/rmlint/pull/663 SCons.Conftest.CheckFunc(context, "lgetxattr", "#include <sys/types.h>\n#include <sys/xattr.h>") will generate following C code:

```
#include <assert.h>
#include <sys/types.h>
#include <sys/xattr.h>

#if _MSC_VER && !__INTEL_COMPILER
    #pragma function(lgetxattr)
#endif

int main(void) {
#if defined (__stub_lgetxattr) || defined (__stub___lgetxattr)
   #error "lgetxattr has a GNU stub, cannot check"
#else
   lgetxattr();
#endif

     return 0;
}
```

This will fail to compile on armhf on Ubuntu 24.04 (noble):

```
$ gcc -o test test.c
test.c: In function ‘main’:
test.c:13:11: error: too few arguments to function ‘lgetxattr’
   13 | lgetxattr();
      | ^~~~~~~~~
In file included from test2.c:3:
/usr/include/arm-linux-gnueabihf/sys/xattr.h:67:16: note: declared here
   67 | extern ssize_t lgetxattr (const char *__path, const char *__name,
      | ^~~~~~~~~
```

Revision history for this message
Benjamin Drung (bdrung) wrote :

https://github.com/SCons/scons/pull/4445 added a `funcargs` parameter to `SCons.Conftest.CheckFunc` in commit edc14d6647d3819a9c6ee076ccc3c65f2283600b (version 4.7.0). So we need to update scons.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package scons - 4.5.2+dfsg-1ubuntu1

---------------
scons (4.5.2+dfsg-1ubuntu1) oracular; urgency=medium

  * Cherry-pich fix 4320: add an optional argument list string to the configure
    CheckFunc method. (LP: #2066970)
  * Build-depend on libharfbuzz-dev for PDF generation with fop
    (Closes: #1067317)

 -- Benjamin Drung <email address hidden> Mon, 27 May 2024 10:25:51 +0200

Changed in scons (Ubuntu):
status: New → Fix Released
Benjamin Drung (bdrung)
Changed in rmlint (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rmlint - 2.10.2-0ubuntu1

---------------
rmlint (2.10.2-0ubuntu1) oracular; urgency=medium

  * New upstream release (LP: #2039957)
  * d/rules: exclude jquery-fix.js from dh_sphinxdoc -prmlint-doc call
  * Drop patches applied upstream and refresh remaining patches
  * Build-depend on python3-xattr for new unit tests
  * Replace obsolete pkg-config by pkgconf
  * scons: add missing newline for included headers and check *xattr functions
    with correct arguments (Closes: #1065947, LP: #2066970)

 -- Benjamin Drung <email address hidden> Tue, 28 May 2024 11:20:05 +0200

Changed in rmlint (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.