adam900710 / btrfs-fuse

A read-only, license friendly, FUSE based btrfs implementation
Other
26 stars 4 forks source link

btrfs-fuse fails to build on ppc64le #2

Closed davide125 closed 2 years ago

davide125 commented 3 years ago

See https://koji.fedoraproject.org/koji/taskinfo?taskID=78634323 for details (look at build.log there).

Found ninja-1.10.2 at /usr/bin/ninja
+ /usr/bin/meson compile -C redhat-linux-build -j 8 --verbose
ninja: Entering directory `redhat-linux-build'
[1/13] gcc -Ibtrfs-fuse.p -I. -I.. -I/usr/include/uuid -I/usr/include/lzo -I/usr/include/fuse3 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -MD -MQ btrfs-fuse.p/accessors.c.o -MF btrfs-fuse.p/accessors.c.o.d -o btrfs-fuse.p/accessors.c.o -c ../accessors.c
[2/13] gcc -Ibtrfs-fuse.p -I. -I.. -I/usr/include/uuid -I/usr/include/lzo -I/usr/include/fuse3 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -MD -MQ btrfs-fuse.p/inode.c.o -MF btrfs-fuse.p/inode.c.o.d -o btrfs-fuse.p/inode.c.o -c ../inode.c
FAILED: btrfs-fuse.p/inode.c.o 
gcc -Ibtrfs-fuse.p -I. -I.. -I/usr/include/uuid -I/usr/include/lzo -I/usr/include/fuse3 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -MD -MQ btrfs-fuse.p/inode.c.o -MF btrfs-fuse.p/inode.c.o.d -o btrfs-fuse.p/inode.c.o -c ../inode.c
In file included from /usr/include/asm-generic/types.h:7,
                 from ../inode.h:6,
                 from ../inode.c:6:
/usr/include/asm-generic/int-ll64.h:30:44: error: conflicting types for ‘__s64’; have ‘long long int’
   30 | __extension__ typedef __signed__ long long __s64;
      |                                            ^~~~~
In file included from /usr/include/asm/types.h:26,
                 from /usr/include/linux/types.h:5,
                 from /usr/include/asm/ptrace.h:28,
                 from /usr/include/asm/sigcontext.h:12,
                 from /usr/include/bits/sigcontext.h:30,
                 from /usr/include/signal.h:301,
                 from /usr/include/sys/param.h:28,
                 from ../inode.c:4:
/usr/include/asm-generic/int-l64.h:29:25: note: previous declaration of ‘__s64’ with type ‘__s64’ {aka ‘long int’}
   29 | typedef __signed__ long __s64;
      |                         ^~~~~
In file included from /usr/include/asm-generic/types.h:7,
                 from ../inode.h:6,
                 from ../inode.c:6:
/usr/include/asm-generic/int-ll64.h:31:42: error: conflicting types for ‘__u64’; have ‘long long unsigned int’
   31 | __extension__ typedef unsigned long long __u64;
      |                                          ^~~~~
In file included from /usr/include/asm/types.h:26,
                 from /usr/include/linux/types.h:5,
                 from /usr/include/asm/ptrace.h:28,
                 from /usr/include/asm/sigcontext.h:12,
                 from /usr/include/bits/sigcontext.h:30,
                 from /usr/include/signal.h:301,
                 from /usr/include/sys/param.h:28,
                 from ../inode.c:4:
/usr/include/asm-generic/int-l64.h:30:23: note: previous declaration of ‘__u64’ with type ‘__u64’ {aka ‘long unsigned int’}
   30 | typedef unsigned long __u64;
      |                       ^~~~~
[3/13] gcc -Ibtrfs-fuse.p -I. -I.. -I/usr/include/uuid -I/usr/include/lzo -I/usr/include/fuse3 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -MD -MQ btrfs-fuse.p/hash.c.o -MF btrfs-fuse.p/hash.c.o.d -o btrfs-fuse.p/hash.c.o -c ../hash.c
../hash.c: In function ‘hash_sha256’:
../hash.c:35:9: warning: ‘SHA256_Init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   35 |         SHA256_Init(&ctx);
      |         ^~~~~~~~~~~
In file included from ../hash.c:5:
/usr/include/openssl/sha.h:73:27: note: declared here
   73 | OSSL_DEPRECATEDIN_3_0 int SHA256_Init(SHA256_CTX *c);
      |                           ^~~~~~~~~~~
../hash.c:36:9: warning: ‘SHA256_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   36 |         SHA256_Update(&ctx, buf, length);
      |         ^~~~~~~~~~~~~
In file included from ../hash.c:5:
/usr/include/openssl/sha.h:74:27: note: declared here
   74 | OSSL_DEPRECATEDIN_3_0 int SHA256_Update(SHA256_CTX *c,
      |                           ^~~~~~~~~~~~~
../hash.c:37:9: warning: ‘SHA256_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   37 |         SHA256_Final(out, &ctx);
      |         ^~~~~~~~~~~~
In file included from ../hash.c:5:
/usr/include/openssl/sha.h:76:27: note: declared here
   76 | OSSL_DEPRECATEDIN_3_0 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
      |                           ^~~~~~~~~~~~
[4/13] gcc -Ibtrfs-fuse.p -I. -I.. -I/usr/include/uuid -I/usr/include/lzo -I/usr/include/fuse3 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -MD -MQ btrfs-fuse.p/messages.c.o -MF btrfs-fuse.p/messages.c.o.d -o btrfs-fuse.p/messages.c.o -c ../messages.c
[5/13] gcc -Ibtrfs-fuse.p -I. -I.. -I/usr/include/uuid -I/usr/include/lzo -I/usr/include/fuse3 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -MD -MQ btrfs-fuse.p/data.c.o -MF btrfs-fuse.p/data.c.o.d -o btrfs-fuse.p/data.c.o -c ../data.c
FAILED: btrfs-fuse.p/data.c.o 
gcc -Ibtrfs-fuse.p -I. -I.. -I/usr/include/uuid -I/usr/include/lzo -I/usr/include/fuse3 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -MD -MQ btrfs-fuse.p/data.c.o -MF btrfs-fuse.p/data.c.o.d -o btrfs-fuse.p/data.c.o -c ../data.c
In file included from /usr/include/asm-generic/types.h:7,
                 from ../inode.h:6,
                 from ../data.c:8:
/usr/include/asm-generic/int-ll64.h:30:44: error: conflicting types for ‘__s64’; have ‘long long int’
   30 | __extension__ typedef __signed__ long long __s64;
      |                                            ^~~~~
In file included from /usr/include/asm/types.h:26,
                 from /usr/include/linux/types.h:5,
                 from /usr/include/asm/ptrace.h:28,
                 from /usr/include/asm/sigcontext.h:12,
                 from /usr/include/bits/sigcontext.h:30,
                 from /usr/include/signal.h:301,
                 from /usr/include/sys/param.h:28,
                 from ../data.c:3:
/usr/include/asm-generic/int-l64.h:29:25: note: previous declaration of ‘__s64’ with type ‘__s64’ {aka ‘long int’}
   29 | typedef __signed__ long __s64;
      |                         ^~~~~
In file included from /usr/include/asm-generic/types.h:7,
                 from ../inode.h:6,
                 from ../data.c:8:
/usr/include/asm-generic/int-ll64.h:31:42: error: conflicting types for ‘__u64’; have ‘long long unsigned int’
   31 | __extension__ typedef unsigned long long __u64;
      |                                          ^~~~~
In file included from /usr/include/asm/types.h:26,
                 from /usr/include/linux/types.h:5,
                 from /usr/include/asm/ptrace.h:28,
                 from /usr/include/asm/sigcontext.h:12,
                 from /usr/include/bits/sigcontext.h:30,
                 from /usr/include/signal.h:301,
                 from /usr/include/sys/param.h:28,
                 from ../data.c:3:
/usr/include/asm-generic/int-l64.h:30:23: note: previous declaration of ‘__u64’ with type ‘__u64’ {aka ‘long unsigned int’}
   30 | typedef unsigned long __u64;
      |                       ^~~~~
../data.c: In function ‘lookup_file_extent’:
../data.c:283:61: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  283 |                 error("unexpected inline extent at inode %llu file offset %llu",
      |                                                          ~~~^
      |                                                             |
      |                                                             long long unsigned int
      |                                                          %lu
  284 |                       inode->ino, key.offset);
      |                       ~~~~~~~~~~                             
      |                            |
      |                            u64 {aka long unsigned int}
../data.c:283:78: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=]
  283 |                 error("unexpected inline extent at inode %llu file offset %llu",
      |                                                                           ~~~^
      |                                                                              |
      |                                                                              long long unsigned int
      |                                                                           %lu
  284 |                       inode->ino, key.offset);
      |                                   ~~~~~~~~~~                                  
      |                                      |
      |                                      __u64 {aka long unsigned int}
[6/13] gcc -Ibtrfs-fuse.p -I. -I.. -I/usr/include/uuid -I/usr/include/lzo -I/usr/include/fuse3 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -MD -MQ btrfs-fuse.p/main.c.o -MF btrfs-fuse.p/main.c.o.d -o btrfs-fuse.p/main.c.o -c ../main.c
FAILED: btrfs-fuse.p/main.c.o 
gcc -Ibtrfs-fuse.p -I. -I.. -I/usr/include/uuid -I/usr/include/lzo -I/usr/include/fuse3 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -MD -MQ btrfs-fuse.p/main.c.o -MF btrfs-fuse.p/main.c.o.d -o btrfs-fuse.p/main.c.o -c ../main.c
In file included from /usr/include/asm-generic/types.h:7,
                 from ../inode.h:6,
                 from ../main.c:11:
/usr/include/asm-generic/int-ll64.h:30:44: error: conflicting types for ‘__s64’; have ‘long long int’
   30 | __extension__ typedef __signed__ long long __s64;
      |                                            ^~~~~
In file included from /usr/include/asm/types.h:26,
                 from ../compat.h:6,
                 from ../ondisk_format.h:7,
                 from ../accessors.h:8,
                 from ../main.c:7:
/usr/include/asm-generic/int-l64.h:29:25: note: previous declaration of ‘__s64’ with type ‘__s64’ {aka ‘long int’}
   29 | typedef __signed__ long __s64;
      |                         ^~~~~
In file included from /usr/include/asm-generic/types.h:7,
                 from ../inode.h:6,
                 from ../main.c:11:
/usr/include/asm-generic/int-ll64.h:31:42: error: conflicting types for ‘__u64’; have ‘long long unsigned int’
   31 | __extension__ typedef unsigned long long __u64;
      |                                          ^~~~~
In file included from /usr/include/asm/types.h:26,
                 from ../compat.h:6,
                 from ../ondisk_format.h:7,
                 from ../accessors.h:8,
                 from ../main.c:7:
/usr/include/asm-generic/int-l64.h:30:23: note: previous declaration of ‘__u64’ with type ‘__u64’ {aka ‘long unsigned int’}
   30 | typedef unsigned long __u64;
      |                       ^~~~~
[7/13] gcc -Ibtrfs-fuse.p -I. -I.. -I/usr/include/uuid -I/usr/include/lzo -I/usr/include/fuse3 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -MD -MQ btrfs-fuse.p/super.c.o -MF btrfs-fuse.p/super.c.o.d -o btrfs-fuse.p/super.c.o -c ../super.c
../super.c: In function ‘btrfs_check_super’:
../super.c:59:52: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
   59 |                 error("unsupported super flags: %llx", btrfs_super_flags(sb));
      |                                                 ~~~^   ~~~~~~~~~~~~~~~~~~~~~
      |                                                    |   |
      |                                                    |   u64 {aka long unsigned int}
      |                                                    long long unsigned int
      |                                                 %lx
../super.c:103:54: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  103 |                 error("tree_root block unaligned: %llu", btrfs_super_root(sb));
      |                                                   ~~~^   ~~~~~~~~~~~~~~~~~~~~
      |                                                      |   |
      |                                                      |   u64 {aka long unsigned int}
      |                                                      long long unsigned int
      |                                                   %lu
../super.c:107:55: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  107 |                 error("chunk_root block unaligned: %llu",
      |                                                    ~~~^
      |                                                       |
      |                                                       long long unsigned int
      |                                                    %lu
  108 |                         btrfs_super_chunk_root(sb));
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~     
      |                         |
      |                         u64 {aka long unsigned int}
../super.c:112:53: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  112 |                 error("log_root block unaligned: %llu",
      |                                                  ~~~^
      |                                                     |
      |                                                     long long unsigned int
      |                                                  %lu
  113 |                         btrfs_super_log_root(sb));
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~     
      |                         |
      |                         u64 {aka long unsigned int}
../super.c:123:46: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  123 |                 error("invalid bytes_used %llu", btrfs_super_bytes_used(sb));
      |                                           ~~~^   ~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                              |   |
      |                                              |   u64 {aka long unsigned int}
      |                                              long long unsigned int
      |                                           %lu
../super.c:142:59: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  142 |                 warning("suspicious number of devices: %llu",
      |                                                        ~~~^
      |                                                           |
      |                                                           long long unsigned int
      |                                                        %lu
  143 |                         btrfs_super_num_devices(sb));
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~        
      |                         |
      |                         u64 {aka long unsigned int}
../super.c: In function ‘btrfs_unmount’:
../super.c:220:40: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  220 |                         warning("eb %llu unreleased", eb->start);
      |                                     ~~~^              ~~~~~~~~~
      |                                        |                |
      |                                        |                u64 {aka long unsigned int}
      |                                        long long unsigned int
      |                                     %lu
[8/13] gcc -Ibtrfs-fuse.p -I. -I.. -I/usr/include/uuid -I/usr/include/lzo -I/usr/include/fuse3 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -MD -MQ btrfs-fuse.p/metadata.c.o -MF btrfs-fuse.p/metadata.c.o.d -o btrfs-fuse.p/metadata.c.o -c ../metadata.c
../metadata.c: In function ‘verify_tree_block’:
../metadata.c:48:38: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
   48 |                 error("tree block %llu bad bytenr, has %llu expect %llu",
      |                                   ~~~^
      |                                      |
      |                                      long long unsigned int
      |                                   %lu
   49 |                         eb->start, btrfs_header_bytenr(eb), eb->start);
      |                         ~~~~~~~~~     
      |                           |
      |                           u64 {aka long unsigned int}
../metadata.c:48:59: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
   48 |                 error("tree block %llu bad bytenr, has %llu expect %llu",
      |                                                        ~~~^
      |                                                           |
      |                                                           long long unsigned int
      |                                                        %lu
   49 |                         eb->start, btrfs_header_bytenr(eb), eb->start);
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~ 
      |                                    |
      |                                    u64 {aka long unsigned int}
../metadata.c:48:71: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
   48 |                 error("tree block %llu bad bytenr, has %llu expect %llu",
      |                                                                    ~~~^
      |                                                                       |
      |                                                                       long long unsigned int
      |                                                                    %lu
   49 |                         eb->start, btrfs_header_bytenr(eb), eb->start);
      |                                                             ~~~~~~~~~  
      |                                                               |
      |                                                               u64 {aka long unsigned int}
../metadata.c:53:38: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
   53 |                 error("tree block %llu bad level, has %u expect %u",
      |                                   ~~~^
      |                                      |
      |                                      long long unsigned int
      |                                   %lu
   54 |                         eb->start, btrfs_header_level(eb), level);
      |                         ~~~~~~~~~     
      |                           |
      |                           u64 {aka long unsigned int}
../metadata.c:58:38: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
   58 |                 error("tree block %llu bad trasid, has %llu expect %llu",
      |                                   ~~~^
      |                                      |
      |                                      long long unsigned int
      |                                   %lu
   59 |                         eb->start, btrfs_header_generation(eb), transid);
      |                         ~~~~~~~~~     
      |                           |
      |                           u64 {aka long unsigned int}
../metadata.c:58:59: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
   58 |                 error("tree block %llu bad trasid, has %llu expect %llu",
      |                                                        ~~~^
      |                                                           |
      |                                                           long long unsigned int
      |                                                        %lu
   59 |                         eb->start, btrfs_header_generation(eb), transid);
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                    |
      |                                    u64 {aka long unsigned int}
../metadata.c:58:71: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
   58 |                 error("tree block %llu bad trasid, has %llu expect %llu",
      |                                                                    ~~~^
      |                                                                       |
      |                                                                       long long unsigned int
      |                                                                    %lu
   59 |                         eb->start, btrfs_header_generation(eb), transid);
      |                                                                 ~~~~~~~
      |                                                                 |
      |                                                                 u64 {aka long unsigned int}
../metadata.c:71:24: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
   71 |         "tree block %llu key mismatch, has (%llu %u %llu) want (%llu %u %llu)",
      |                     ~~~^
      |                        |
      |                        long long unsigned int
      |                     %lu
   72 |                               eb->start, found_key.objectid, found_key.type,
      |                               ~~~~~~~~~
      |                                 |
      |                                 u64 {aka long unsigned int}
../metadata.c:71:48: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=]
   71 |         "tree block %llu key mismatch, has (%llu %u %llu) want (%llu %u %llu)",
      |                                             ~~~^
      |                                                |
      |                                                long long unsigned int
      |                                             %lu
   72 |                               eb->start, found_key.objectid, found_key.type,
      |                                          ~~~~~~~~~~~~~~~~~~
      |                                                   |
      |                                                   __u64 {aka long unsigned int}
../metadata.c:71:56: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=]
   71 |         "tree block %llu key mismatch, has (%llu %u %llu) want (%llu %u %llu)",
      |                                                     ~~~^
      |                                                        |
      |                                                        long long unsigned int
      |                                                     %lu
   72 |                               eb->start, found_key.objectid, found_key.type,
   73 |                               found_key.offset, first_key->objectid,
      |                               ~~~~~~~~~~~~~~~~          
      |                                        |
      |                                        __u64 {aka long unsigned int}
../metadata.c:71:68: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=]
   71 |         "tree block %llu key mismatch, has (%llu %u %llu) want (%llu %u %llu)",
      |                                                                 ~~~^
      |                                                                    |
      |                                                                    long long unsigned int
      |                                                                 %lu
   72 |                               eb->start, found_key.objectid, found_key.type,
   73 |                               found_key.offset, first_key->objectid,
      |                                                 ~~~~~~~~~~~~~~~~~~~ 
      |                                                          |
      |                                                          __u64 {aka long unsigned int}
../metadata.c:71:76: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 8 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=]
   71 |         "tree block %llu key mismatch, has (%llu %u %llu) want (%llu %u %llu)",
      |                                                                         ~~~^
      |                                                                            |
      |                                                                            long long unsigned int
      |                                                                         %lu
......
   74 |                               first_key->type, first_key->offset);
      |                                                ~~~~~~~~~~~~~~~~~            
      |                                                         |
      |                                                         __u64 {aka long unsigned int}
[9/13] gcc -Ibtrfs-fuse.p -I. -I.. -I/usr/include/uuid -I/usr/include/lzo -I/usr/include/fuse3 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -MD -MQ btrfs-fuse.p/volumes.c.o -MF btrfs-fuse.p/volumes.c.o.d -o btrfs-fuse.p/volumes.c.o -c ../volumes.c
../volumes.c: In function ‘global_add_device’:
../volumes.c:111:70: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  111 |                         error("conflicting device found for devid %llu",
      |                                                                   ~~~^
      |                                                                      |
      |                                                                      long long unsigned int
      |                                                                   %lu
  112 |                                 devid);
      |                                 ~~~~~                                 
      |                                 |
      |                                 u64 {aka long unsigned int}
../volumes.c: In function ‘btrfs_open_devices’:
../volumes.c:220:43: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  220 |                         warning("devid %llu missing", device->devid);
      |                                        ~~~^           ~~~~~~~~~~~~~
      |                                           |                 |
      |                                           |                 u64 {aka long unsigned int}
      |                                           long long unsigned int
      |                                        %lu
../volumes.c:225:58: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  225 |                         warning("failed to open devid %llu path %s", device->devid,
      |                                                       ~~~^           ~~~~~~~~~~~~~
      |                                                          |                 |
      |                                                          |                 u64 {aka long unsigned int}
      |                                                          long long unsigned int
      |                                                       %lu
../volumes.c: In function ‘add_chunk_map’:
../volumes.c:318:43: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  318 |                         warning("devid %llu is missing", devid);
      |                                        ~~~^              ~~~~~
      |                                           |              |
      |                                           |              u64 {aka long unsigned int}
      |                                           long long unsigned int
      |                                        %lu
../volumes.c: In function ‘btrfs_read_sys_chunk_array’:
../volumes.c:366:60: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  366 |                         error("invalid disk key found, (%llu %u %llu)",
      |                                                         ~~~^
      |                                                            |
      |                                                            long long unsigned int
      |                                                         %lu
  367 |                                 btrfs_disk_key_objectid(disk_key),
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                 |
      |                                 u64 {aka long unsigned int}
../volumes.c:366:68: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  366 |                         error("invalid disk key found, (%llu %u %llu)",
      |                                                                 ~~~^
      |                                                                    |
      |                                                                    long long unsigned int
      |                                                                 %lu
......
  369 |                                 btrfs_disk_key_offset(disk_key));
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
      |                                 |
      |                                 u64 {aka long unsigned int}
../volumes.c:378:55: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  378 |                         error("failed to add chunk %llu: %d",
      |                                                    ~~~^
      |                                                       |
      |                                                       long long unsigned int
      |                                                    %lu
  379 |                                 btrfs_disk_key_offset(disk_key), ret);
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                 |
      |                                 u64 {aka long unsigned int}
../volumes.c: In function ‘read_one_dev’:
../volumes.c:404:35: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  404 |                 warning("devid %llu is missing", devid);
      |                                ~~~^              ~~~~~
      |                                   |              |
      |                                   |              u64 {aka long unsigned int}
      |                                   long long unsigned int
      |                                %lu
../volumes.c: In function ‘check_read’:
../volumes.c:491:35: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  491 |                 error("logical %llu is not in chunk range [%llu, %llu)",
      |                                ~~~^
      |                                   |
      |                                   long long unsigned int
      |                                %lu
  492 |                         logical, map->logical, map->logical + map->length);
      |                         ~~~~~~~    
      |                         |
      |                         u64 {aka long unsigned int}
../volumes.c:491:63: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  491 |                 error("logical %llu is not in chunk range [%llu, %llu)",
      |                                                            ~~~^
      |                                                               |
      |                                                               long long unsigned int
      |                                                            %lu
  492 |                         logical, map->logical, map->logical + map->length);
      |                                  ~~~~~~~~~~~~                  
      |                                     |
      |                                     u64 {aka long unsigned int}
../volumes.c:491:69: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  491 |                 error("logical %llu is not in chunk range [%llu, %llu)",
      |                                                                  ~~~^
      |                                                                     |
      |                                                                     long long unsigned int
      |                                                                  %lu
  492 |                         logical, map->logical, map->logical + map->length);
      |                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                             |
      |                                                             u64 {aka long unsigned int}
../volumes.c:496:53: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  496 |                 error("bad mirror_nr for logical %llu, has %u wanted %u",
      |                                                  ~~~^
      |                                                     |
      |                                                     long long unsigned int
      |                                                  %lu
  497 |                         logical, max_mirror, mirror_nr);
      |                         ~~~~~~~                      
      |                         |
      |                         u64 {aka long unsigned int}
../volumes.c: In function ‘btrfs_num_copies’:
../volumes.c:605:58: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  605 |                 error("can not find chunk for logical %llu", logical);
      |                                                       ~~~^   ~~~~~~~
      |                                                          |   |
      |                                                          |   u64 {aka long unsigned int}
      |                                                          long long unsigned int
      |                                                       %lu
../volumes.c: In function ‘btrfs_read_logical’:
../volumes.c:622:58: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  622 |                 error("can not find chunk for logical %llu", logical);
      |                                                       ~~~^   ~~~~~~~
      |                                                          |   |
      |                                                          |   u64 {aka long unsigned int}
      |                                                          long long unsigned int
      |                                                       %lu
../volumes.c: In function ‘btrfs_exit’:
../volumes.c:646:51: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘u64’ {aka ‘long unsigned int’} [-Wformat=]
  646 |                                 warning("devid %llu for fsid %s is not closed",
      |                                                ~~~^
      |                                                   |
      |                                                   long long unsigned int
      |                                                %lu
  647 |                                         dev->devid, fsid_buf);
      |                                         ~~~~~~~~~~ 
      |                                            |
      |                                            u64 {aka long unsigned int}
ninja: build stopped: subcommand failed.
sharkcz commented 3 years ago

I believe it needs just a little hack, see https://src.fedoraproject.org/rpms/smc-tools/blob/rawhide/f/smc-tools.spec#_33

adam900710 commented 3 years ago

Sorry, I'm not familiar with RPMbuild nor having a ppc64 environment, thus not much help can be provided from me.

But does the same problem reproduce when building without RPMbuild?

The type conflicts seems a little strange, as if <asm/types.h> is not handling u64/s64 properly, tons of project would fail to compile.

adam900710 commented 3 years ago

It looks inode.h is not including the correct types.

Mind to try the following diff?

diff --git a/inode.h b/inode.h
index 07575d08ba9d..4515efddbb96 100644
--- a/inode.h
+++ b/inode.h
@@ -3,7 +3,7 @@
 #ifndef BTRFS_FUSE_INODE_H
 #define BTRFS_FUSE_INODE_H

-#include <asm-generic/types.h>
+#include <linux/types.h>
 #include <sys/stat.h>
 #include "compat.h"
 #include "ondisk_format.h"
davide125 commented 3 years ago

That worked, thanks! https://koji.fedoraproject.org/koji/taskinfo?taskID=78669160

davide125 commented 3 years ago

Fixed in https://github.com/adam900710/btrfs-fuse/commit/626d9c952c036b032fe5fd0175b7407a280d510c

adam900710 commented 2 years ago

Sorry, I only fixed the compile error, but still left the format warning.

I have updated meson.build, mind to update the spec file for F36 and check the build log?

davide125 commented 2 years ago

Here you go: https://koji.fedoraproject.org/koji/buildinfo?buildID=1911276

adam900710 commented 2 years ago

Great! Now the warning are gone, just need to address the remaining warnings which only shows up in ppc64le.