cxl-micron-reskit / famfs

This is the user space repo for famfs, the fabric-attached memory file system
Apache License 2.0
31 stars 9 forks source link

compile failed for the famfs as the extent_type name has been changed to famfs_extent_type. #50

Closed guoanwu closed 4 months ago

guoanwu commented 4 months ago

compile failed as the error:

make all

make[3]: Entering directory '/root/famfs/debug' [ 3%] Building C object CMakeFiles/libfamfs.dir/src/famfs_lib.c.o /root/famfs/src/famfs_lib.c:423:28: warning: ‘enum extent_type’ declared inside parameter list will not be visible outside of this definition or declaration 423 | enum extent_type type) | ^~~ /root/famfs/src/famfs_lib.c:421:1: error: conflicting types for ‘famfs_get_device_size’; have ‘int(const char , size_t , enum extent_type )’ {aka ‘int(const char , long unsigned int , enum extent_type )’} 421 | famfs_get_device_size(const char fname, | ^~~~~ In file included from /root/famfs/src/famfs_lib.c:35: /root/famfs/src/famfs_lib.h:21:12: note: previous declaration of ‘famfs_get_device_size’ with type ‘int(const char , size_t , enum famfs_extent_type )’ {aka ‘int(const char , long unsigned int , enum famfs_extent_type )’} 21 | extern int famfs_get_device_size(const char fname, size_t size, enum famfs_extent_type *type); | ^~~~~ /root/famfs/src/famfs_lib.c: In function ‘famfs_mkfs’: /root/famfs/src/famfs_lib.c:3812:14: error: variable ‘type’ has initializer but incomplete type 3812 | enum extent_type type = SIMPLE_DAX_EXTENT; | ^~~ /root/famfs/src/famfs_lib.c:3812:26: error: storage size of ‘type’ isn’t known 3812 | enum extent_type type = SIMPLE_DAX_EXTENT; | ^~~~ /root/famfs/src/famfs_lib.c:3812:26: warning: unused variable ‘type’ [-Wunused-variable] make[3]: [CMakeFiles/libfamfs.dir/build.make:76: CMakeFiles/libfamfs.dir/src/famfs_lib.c.o] Error 1 make[3]: Leaving directory '/root/famfs/debug' make[2]: [CMakeFiles/Makefile2:184: CMakeFiles/libfamfs.dir/all] Error 2 make[2]: Leaving directory '/root/famfs/debug' make[1]: [Makefile:146: all] Error 2 make[1]: Leaving directory '/root/famfs/debug' make: [Makefile:13: debug] Error 2

jagalactic commented 4 months ago

Apologies for that - I introduced this ABI issue with the v2 patch set. I will push a fix today.

The fix will make the master branch compatible with the v1 patch set (i.e. v1 kernel), and there will be a famfs-v1 branch that is needed if you still want to run the v1 kernel.

Sorry for the inconvenience.