libyal / libfsapfs

Library and tools to access the Apple File System (APFS)
GNU Lesser General Public License v3.0
339 stars 38 forks source link

Error during make #82

Open swswsws583 opened 1 month ago

swswsws583 commented 1 month ago

Can someone help me with this error please:

libfsapfs-experimental-20240429.tar macOS 15.1 Xcode 16.1 beta macFUSE 4.8.0

I followed the steps for GCC for macOS documented here: https://github.com/libyal/libfsapfs/wiki/Building#using-gnu-compiler-collection-gcc

I also tried CC="xcrun gcc" ./configure make -j12 and got the same error messages.

These were the lines at the end with the error warnings:

libcaes_context.c:358:6: error: use of undeclared identifier 'libcaes_tables_initialized'; did you mean 'libcaes_context_initialize'?
  358 |         if( libcaes_tables_initialized == 0 )
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |             libcaes_context_initialize
libcaes_context.c:262:5: note: 'libcaes_context_initialize' declared here
  262 | int libcaes_context_initialize(
      |     ^
libcaes_context.c:372:3: error: use of undeclared identifier 'libcaes_tables_initialized'
  372 |                 libcaes_tables_initialized = 1;
      |                 ^
libcaes_context.c:3025:5: error: call to undeclared function 'libcaes_calculate_forward_table_round'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 3025 |                                 libcaes_calculate_forward_table_round(
      |                                 ^
libcaes_context.c:3041:4: error: call to undeclared function 'libcaes_calculate_forward_table_round'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 3041 |                         libcaes_calculate_forward_table_round(
      |                         ^
libcaes_context.c:3049:4: error: call to undeclared function 'libcaes_calculate_forward_substitution_round'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 3049 |                         libcaes_calculate_forward_substitution_round(
      |                         ^
libcaes_context.c:3061:5: error: call to undeclared function 'libcaes_calculate_reverse_table_round'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 3061 |                                 libcaes_calculate_reverse_table_round(
      |                                 ^
libcaes_context.c:3077:4: error: call to undeclared function 'libcaes_calculate_reverse_table_round'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 3077 |                         libcaes_calculate_reverse_table_round(
      |                         ^
mv -f .deps/libcaes_error.Tpo .deps/libcaes_error.Plo
mv -f .deps/libcaes_support.Tpo .deps/libcaes_support.Plo
libcaes_context.c:3085:4: error: call to undeclared function 'libcaes_calculate_reverse_substitution_round'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 3085 |                         libcaes_calculate_reverse_substitution_round(
      |                         ^
8 errors generated.
make[1]: *** [libcaes_context.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
libtool: compile:  xcrun gcc -DHAVE_CONFIG_H -I. -I../common -I../include -I../include -I../common -I../common -I../libcerror -I../libcerror -I/opt/homebrew/Cellar/openssl@3/3.3.1/include -I/opt/homebrew/opt/zlib/include -g -O2 -Wall -MT libcaes_tweaked_context.lo -MD -MP -MF .deps/libcaes_tweaked_context.Tpo -c libcaes_tweaked_context.c -o libcaes_tweaked_context.o >/dev/null 2>&1
mv -f .deps/libcaes_tweaked_context.Tpo .deps/libcaes_tweaked_context.Plo
make: *** [all-recursive] Error 1

Thanks!

swswsws583 commented 1 month ago

I've tried to build using libfsapfs-experimental-20240218.tar but go the same errors:

libcaes_context.c:358:6: error: use of undeclared identifier 'libcaes_tables_initialized'; did you mean 'libcaes_context_initialize'?
  358 |         if( libcaes_tables_initialized == 0 )
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |             libcaes_context_initialize
libcaes_context.c:262:5: note: 'libcaes_context_initialize' declared here
  262 | int libcaes_context_initialize(
      |     ^
libcaes_context.c:372:3: error: use of undeclared identifier 'libcaes_tables_initialized'
  372 |                 libcaes_tables_initialized = 1;
      |                 ^
libcaes_context.c:3025:5: error: call to undeclared function 'libcaes_calculate_forward_table_round'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 3025 |                                 libcaes_calculate_forward_table_round(
      |                                 ^
libcaes_context.c:3041:4: error: call to undeclared function 'libcaes_calculate_forward_table_round'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 3041 |                         libcaes_calculate_forward_table_round(
      |                         ^
libcaes_context.c:3049:4: error: call to undeclared function 'libcaes_calculate_forward_substitution_round'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 3049 |                         libcaes_calculate_forward_substitution_round(
      |                         ^
libcaes_context.c:3061:5: error: call to undeclared function 'libcaes_calculate_reverse_table_round'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 3061 |                                 libcaes_calculate_reverse_table_round(
      |                                 ^
libcaes_context.c:3077:4: error: call to undeclared function 'libcaes_calculate_reverse_table_round'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 3077 |                         libcaes_calculate_reverse_table_round(
      |                         ^
libcaes_context.c:3085:4: error: call to undeclared function 'libcaes_calculate_reverse_substitution_round'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 3085 |                         libcaes_calculate_reverse_substitution_round(
      |                         ^
8 errors generated.
make[1]: *** [libcaes_context.lo] Error 1
make: *** [all-recursive] Error 1
swswsws583 commented 1 month ago
export PKG_CONFIG="/opt/homebrew/Cellar/zlib/HEAD-545f194/lib/pkgconfig"
export LDFLAGS="-L/opt/homebrew/opt/zlib/lib"                         
export CPPFLAGS="-I/opt/homebrew/opt/zlib/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/zlib/lib/pkgconfig" 

I've uninstalled Xcode and ran these lines above and then ./configure and make again from a fresh extracted folder of libfsapfs-20240429, the previous errors were gone but I got a new error.

fsapfsmount.c:430:41: error: incompatible function pointer types assigning to 'int (*)(const char *, const char *, char *, size_t, uint32_t)' (aka 'int (*)(const char *, const char *, char *, unsigned long, unsigned int)') from 'int (*)(const char *, const char *, char *, size_t)' (aka 'int (*)(const char *, const char *, char *, unsigned long)') [-Wincompatible-function-pointer-types]
  430 |         fsapfsmount_fuse_operations.getxattr   = &mount_fuse_getxattr;
      |                                                ^ ~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [fsapfsmount.o] Error 1
make: *** [all-recursive] Error 1