You are not logged in.

#1 2018-07-06 01:27:23

sajmonella9
Member
Registered: 2015-08-26
Posts: 29

Compiling Problem, No Reported Issue.

i like on subject i have problem with compling one AUR package : apfs-fuse-git.

i got message like this.


[ 97%] Linking CXX executable ../bin/apfs-dump
cd /home/empty/.cache/yay/apfs-fuse-git/src/apfs-fuse/build/ApfsDump && /usr/bin/cmake -E cmake_link_script CMakeFiles/apfs-dump.dir/link.txt --verbose=1
/usr/lib/ccache/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -O3 -DNDEBUG  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -rdynamic CMakeFiles/lzfse_cli.dir/src/lzfse_main.c.o  -o ../../bin/lzfse ../../lib/liblzfse.a 
/usr/lib/ccache/bin/c++  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt  -std=c++11 -Wall -Wextra -march=native -O3 -DNDEBUG  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -rdynamic CMakeFiles/apfs-dump-quick.dir/ApfsDumpQuick.o  -o ../bin/apfs-dump-quick  -L/home/empty/.cache/yay/apfs-fuse-git/src/apfs-fuse/build/lib ../lib/libApfsLib.a -licuuc -lz -lbz2 ../lib/liblzfse.a 
/usr/lib/ccache/bin/c++  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt  -std=c++11 -Wall -Wextra -march=native -O3 -DNDEBUG  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -rdynamic CMakeFiles/apfs-dump.dir/Apfs.o  -o ../bin/apfs-dump  -L/home/empty/.cache/yay/apfs-fuse-git/src/apfs-fuse/build/lib ../lib/libApfsLib.a -licuuc -lz -lbz2 ../lib/liblzfse.a 
/home/empty/.cache/yay/apfs-fuse-git/src/apfs-fuse/apfsfuse/ApfsFuse.cpp:36:10: fatal error: attr/xattr.h: No such file or directory
 #include <attr/xattr.h>
          ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [apfsfuse/CMakeFiles/apfs-fuse.dir/build.make:66: apfsfuse/CMakeFiles/apfs-fuse.dir/ApfsFuse.o] Error 1
make[2]: Leaving directory '/home/empty/.cache/yay/apfs-fuse-git/src/apfs-fuse/build'
make[1]: *** [CMakeFiles/Makefile2:1275: apfsfuse/CMakeFiles/apfs-fuse.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/empty/.cache/yay/apfs-fuse-git/src/apfs-fuse/build'
[ 97%] Built target lzfse_cli
make[2]: Leaving directory '/home/empty/.cache/yay/apfs-fuse-git/src/apfs-fuse/build'
make[2]: Leaving directory '/home/empty/.cache/yay/apfs-fuse-git/src/apfs-fuse/build'
[ 97%] Built target apfs-dump-quick
[ 97%] Built target apfs-dump
make[1]: Leaving directory '/home/empty/.cache/yay/apfs-fuse-git/src/apfs-fuse/build'
make: *** [Makefile:87: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
Error making: apfs-fuse-git

I have installed all dep packages. attr   / lib32-atrr from official repo. And still got a problem.

Offline

#2 2018-07-06 08:00:44

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,081

Re: Compiling Problem, No Reported Issue.

https://bbs.archlinux.org/viewtopic.php?id=238259

Report a bug to the apfs-fuse project that they should be using sys/xattr.h instead

Last edited by V1del (2018-07-06 08:01:02)

Offline

#3 2018-07-06 12:22:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Compiling Problem, No Reported Issue.

What does this thread title mean?  Please edit the title to actually reflect the issue.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2018-07-08 11:28:50

a821
Member
Registered: 2012-10-31
Posts: 389

Re: Compiling Problem, No Reported Issue.

I got a working PKGBUILD (meaning it builds in a clean chroot) by replacing `attr/xattr.h` to `sys/xattr.h`in the code (as suggested by V1del) and defining `ENOATTR` (it's not defined in `sys/xattr.h`). I also corrected the depends array: it should depend on fuse2 instead of fuse3 (as pointed out in a comment). I did not test the resulting package.

PKGBUILD patch:

diff --git a/PKGBUILD b/PKGBUILD
index cde6c20..7a6e4ba 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,25 @@
 # Maintainer: Adam Harvey <adam@adamharvey.name>
 pkgname=apfs-fuse-git
-pkgver=r45.7da8083
+pkgver=r53.0ca2e1f
 pkgrel=1
 pkgdesc="FUSE driver for APFS (Apple File System)"
 arch=('i686' 'x86_64')
 url="https://github.com/sgan81/apfs-fuse"
 license=('GPL')
 groups=()
-depends=('fuse3')
-makedepends=('git' 'fuse3' 'cmake')
+depends=('fuse2' 'icu' 'zlib' 'bzip2')
+makedepends=('git' 'cmake')
 provides=("${pkgname%-git}")
 conflicts=("${pkgname%-git}")
 replaces=()
 backup=()
 options=()
 install=
-source=('apfs-fuse::git+https://github.com/sgan81/apfs-fuse')
+source=('apfs-fuse::git+https://github.com/sgan81/apfs-fuse'
+        'fix-missing-xattr-header.patch')
 noextract=()
-md5sums=('SKIP')
+md5sums=('SKIP'
+         '4b5e24cc6306738805cb9f5a0093c864')

 pkgver() {
        cd "$srcdir/${pkgname%-git}"
@@ -27,6 +29,7 @@ pkgver() {
 prepare() {
        cd "$srcdir/${pkgname%-git}"
   git submodule update --init
+  patch -p1 < ../fix-missing-xattr-header.patch
 }

 build() {

the patch (save as fix-missing-xattr-header.patch)

diff --git a/apfsfuse/ApfsFuse.cpp b/apfsfuse/ApfsFuse.cpp
index 84f1fa2..dce376a 100644
--- a/apfsfuse/ApfsFuse.cpp
+++ b/apfsfuse/ApfsFuse.cpp
@@ -33,7 +33,10 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #ifdef __linux__
-#include <attr/xattr.h>
+#include <sys/xattr.h>
+#ifndef ENOATTR
+# define ENOATTR ENODATA        /* No such attribute */
+#endif
 #endif

 #include <ApfsLib/ApfsContainer.h>

Offline

Board footer

Powered by FluxBB