Doloops / mcachefs

mcachefs : Simple filesystem-based file cache based on fuse
64 stars 15 forks source link

How do I make it? #1

Open PhilAndrew opened 8 years ago

PhilAndrew commented 8 years ago

Hello, how do I make this? On centos I tried

[root@iZ94qtf1aayZ src]# make gcc -c -O3 -I. -I. -I/usr/include/linux/ -I/usr/include/fuse -Wall -W -D_FILE_OFFSET_BITS=64 -o mcachefs.o mcachefs.c In file included from /usr/include/stdio.h:75, from mcachefs.h:17, from mcachefs.c:14: /usr/include/libio.h:332: error: expected specifier-qualifier-list before ‘size_t’ /usr/include/libio.h:364: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libio.h:373: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libio.h:495: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘_IO_sgetn’ In file included from mcachefs.h:17, from mcachefs.c:14: /usr/include/stdio.h:336: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdio.h:343: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdio.h:385: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdio.h:387: error: format string argument not a string type /usr/include/stdio.h:389: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdio.h:391: error: format string argument not a string type /usr/include/stdio.h:704: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘fread’ /usr/include/stdio.h:710: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘fwrite’ /usr/include/stdio.h:732: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘fread_unlocked’ /usr/include/stdio.h:734: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘fwrite_unlocked’ In file included from /usr/include/asm/fcntl.h:1, from /usr/include/linux/fcntl.h:4, from mcachefs.h:19, from mcachefs.c:14: /usr/include/asm-generic/fcntl.h:96: error: expected specifier-qualifier-list before ‘pid_t’ In file included from mcachefs.h:20, from mcachefs.c:14: /usr/include/dirent.h:319: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/dirent.h:319: error: nonnull argument with out-of-range operand number (argument 1, operand 4) In file included from mcachefs.h:22, from mcachefs.c:14: /usr/include/stdlib.h:140: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘*ctype_get_mb_cur_max’ In file included from /usr/include/sys/select.h:46, from /usr/include/sys/types.h:220, from /usr/include/stdlib.h:320, from mcachefs.h:22, from mcachefs.c:14: /usr/include/bits/time.h:76: error: redefinition of ‘struct timeval’ In file included from mcachefs.h:22, from mcachefs.c:14: /usr/include/stdlib.h:337: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdlib.h:367: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdlib.h:369: error: nonnull argument with out-of-range operand number (argument 1, operand 4) /usr/include/stdlib.h:471: error: expected ‘)’ before ‘size’ /usr/include/stdlib.h:473: error: expected ‘)’ before ‘nmemb’ /usr/include/stdlib.h:485: error: expected declaration specifiers or ‘...’ before ‘size_t’ In file included from /usr/include/stdlib.h:497, from mcachefs.h:22, from mcachefs.c:14: /usr/include/alloca.h:33: error: expected ‘)’ before ‘size’ In file included from mcachefs.h:22, from mcachefs.c:14: /usr/include/stdlib.h:503: error: expected ‘)’ before ‘size’ /usr/include/stdlib.h:508: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdlib.h:508: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdlib.h:756: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdlib.h:756: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdlib.h:757: error: nonnull argument with out-of-range operand number (argument 1, operand 5) /usr/include/stdlib.h:761: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdlib.h:761: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdlib.h:762: error: nonnull argument with out-of-range operand number (argument 1, operand 4) /usr/include/stdlib.h:860: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdlib.h:863: error: expected ‘)’ before ‘’ token /usr/include/stdlib.h:867: error: expected declaration specifiers or ‘...’ before ‘wchar_t’ /usr/include/stdlib.h:871: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘mbstowcs’ /usr/include/stdlib.h:874: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘wcstombs’ In file included from mcachefs.h:24, from mcachefs.c:14: /usr/include/sys/mman.h:62: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/sys/mman.h:77: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/sys/mman.h:82: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/sys/mman.h:90: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/sys/mman.h:95: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/sys/mman.h:99: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/sys/mman.h:104: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/sys/mman.h:107: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/sys/mman.h:124: error: expected declaration specifiers or ‘...’ before ‘size_t’ In file included from mcachefs.h:31, from mcachefs.c:14: /usr/include/sys/time.h:58: error: redefinition of ‘struct timezone’ /usr/include/sys/time.h:96: error: expected identifier before numeric constant /usr/include/sys/time.h:110: error: redefinition of ‘struct itimerval’ In file included from mcachefs.h:40, from mcachefs.c:14: mcachefs-config.h:52: error: field ‘fuse_args’ has incomplete type In file included from mcachefs-mutex.h:11, from mcachefs.h:41, from mcachefs.c:14: mcachefs-types.h:66: error: expected specifier-qualifier-list before ‘time_t’ mcachefs-types.h:77: error: expected specifier-qualifier-list before ‘size_t’ mcachefs-types.h:108: error: expected specifier-qualifier-list before ‘time_t’ In file included from mcachefs-mutex.h:13, from mcachefs.h:41, from mcachefs.c:14: /usr/include/pthread.h:297: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/pthread.h:298: error: nonnull argument with out-of-range operand number (argument 1, operand 2) /usr/include/pthread.h:302: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/pthread.h:361: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/pthread.h:362: error: nonnull argument with out-of-range operand number (argument 1, operand 2) /usr/include/pthread.h:368: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/pthread.h:375: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/pthread.h:376: error: nonnull argument with out-of-range operand number (argument 1, operand 3) /usr/include/pthread.h:382: error: expected declaration specifiers or ‘...’ before ‘size_t’ In file included from mcachefs-mutex.h:14, from mcachefs.h:41, from mcachefs.c:14: /usr/include/sys/timeb.h:34: error: expected specifier-qualifier-list before ‘time_t’ In file included from mcachefs.c:14: mcachefs.h:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘mcachefs_jiffy_sec’ mcachefs.h:52: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘mcachefs_get_jiffy_sec’ mcachefs.c: In function ‘main’: mcachefs.c:38: error: storage size of ‘tbm’ isn’t known mcachefs.c:38: warning: implicit declaration of function ‘localtime_r’ mcachefs.c:38: error: ‘struct timeb’ has no member named ‘time’ mcachefs.c:38: warning: implicit declaration of function ‘strftime’ mcachefs.c:38: warning: incompatible implicit declaration of built-in function ‘strftime’ mcachefs.c:38: error: ‘struct timeb’ has no member named ‘millitm’ mcachefs.c:38: warning: unused variable ‘tbm’ mcachefs.c:44: warning: implicit declaration of function ‘fuse_main’ mcachefs.c:46: error: storage size of ‘tbm’ isn’t known mcachefs.c:46: error: ‘struct timeb’ has no member named ‘time’ mcachefs.c:46: warning: incompatible implicit declaration of built-in function ‘strftime’ mcachefs.c:46: error: ‘struct timeb’ has no member named ‘millitm’ mcachefs.c:46: warning: unused variable ‘tbm’ make: * [mcachefs.o] Error 1

Doloops commented 6 years ago

Hi PhilAndrew,

Seems that I skipped your issue somehow... Sorry about that ! It's been two years now so I don't know if it's still the case.

I don't have a Centos env to play with, but I've been building mcachefs on debian, ubuntu, raspbian and osmc setups without any issue... With a decent gcc+make and libfuse-dev dependency, everything compiles smoothly.

If you have a chance to try again, I'll be glad to help !

Thanks in advance,