mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[GH-ISSUE #469] Possible small bug in latest code (in master branch) #259
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#259
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @iambesi-zz on GitHub (Sep 16, 2016).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/469
Hello,
Earlier today (Fri, 16-Sep), I pulled down the latest code and ran the following commands:
cd s3fs-fuse
./autogen.sh
./configure
make
However, it failed during the make portion with the following error:
[@ s3fs-fuse]$ make
make all-recursive
make[1]: Entering directory
/workarea/besi/s3fs-fuse' Making all in src make[2]: Entering directory/workarea/besi/s3fs-fuse/src'g++ -DHAVE_CONFIG_H -I. -I.. -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2 -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT s3fs.o -MD -MP -MF .deps/s3fs.Tpo -c -o s3fs.o s3fs.cpp
s3fs.cpp: In function ‘int main(int, char*)’:
s3fs.cpp:4947: error: invalid conversion from ‘int ()(const char_, const char_)’ to ‘int ()(const char, const char_, unsigned int)’
make[2]: *_* [s3fs.o] Error 1
make[2]: Leaving directory
/workarea/besi/s3fs-fuse/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/workarea/besi/s3fs-fuse'make: *** [all] Error 2
Am I doing something wrong here? Please let me know your thoughts.
Thanks,
iambesi
@ggtakec commented on GitHub (Sep 19, 2016):
@iambesi
If you can know your code's sha1, please let us know.
This error probaly is occurred at setting callback functions to fuse_operations structure, but I could not find same error.
Then we need to know your codes base for solving this problem.
Or if you can, please use latest codes in masteer branch.
Thanks in advance for your help.
@gaul commented on GitHub (Sep 20, 2016):
Which system are you compiling under?
@iambesi-zz commented on GitHub (Sep 20, 2016):
@ggtakec and @andrewgaul,
Thanks for your responses. Unfortunately, I do not know my code's SHA1, but I can tell you that I am trying to compile this on
[root@ s3fs-fuse]# cat /etc/redhat-rel*
Red Hat Enterprise Linux Server release 6.6 (Santiago)
In addition, I tried to compile the latest code from the master branch, which was freshly downloaded today (Tue, 20-Sep-16) -- i.e.,
git clone https://github.com/s3fs-fuse/s3fs-fuse.git
cd s3fs-fuse
./autogen.sh
./configure
[root@ s3fs-fuse]# make
make all-recursive
make[1]: Entering directory
/workarea/besi/s3fs-fuse' Making all in src make[2]: Entering directory/workarea/besi/s3fs-fuse/src'g++ -DHAVE_CONFIG_H -I. -I.. -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2 -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT s3fs.o -MD -MP -MF .deps/s3fs.Tpo -c -o s3fs.o s3fs.cpp
s3fs.cpp: In function ‘int main(int, char*)’:
s3fs.cpp:4963: error: invalid conversion from ‘int ()(const char_, const char_)’ to ‘int ()(const char, const char_, unsigned int)’
make[2]: *_* [s3fs.o] Error 1
make[2]: Leaving directory
/workarea/besi/s3fs-fuse/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/workarea/besi/s3fs-fuse'make: *** [all] Error 2
-- and as you can see, I still got the same error as before. If it helps any, I downloaded and compiled the following version of fuse:
wget https://github.com/libfuse/libfuse/releases/download/fuse_2_9_4/fuse-2.9.4.tar.gz
tar -xvzf fuse-2.9.4.tar.gz
./configure
make -j8
make install
and related fuse packages:
[root@ s3fs-fuse]# rpm -qa | grep fuse
fuse-devel-2.9.4-1.0.1.el6.x86_64
fuse-libs-2.9.4-1.0.1.el6.x86_64
In short, I hope that this information helps, but if not, please let me know what other details are needed.
Thanks,
iambesi
@gaul commented on GitHub (Sep 20, 2016):
Odd, compile fails here:
Why does FUSE expect a three-argument rename call?
@iambesi-zz commented on GitHub (Sep 22, 2016):
Hi guys,
Any further developments on this issue? Is there anything else that I should try and/or any additional information that you need from me? Please let me know.
Thanks,
iambesi
@iambesi-zz commented on GitHub (Sep 30, 2016):
Hello @ggtakec and @andrewgaul,
I wanted to provide an update to you -- and anyone else who may run into this at some point -- on this issue. When andrewgaul made mention of the compilation failing at the rename portion of the code (as indicated by the line number seen below), I tried an older version s3fs code and got the exact same error.
[user@server s3fs-fuse]$ make
make all-recursive
make[1]: Entering directory
/workarea/besi/s3fs-fuse' Making all in src make[2]: Entering directory/workarea/besi/s3fs-fuse/src'g++ -DHAVE_CONFIG_H -I. -I.. -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2 -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT s3fs.o -MD -MP -MF .deps/s3fs.Tpo -c -o s3fs.o s3fs.cpp
s3fs.cpp: In function ‘int main(int, char**)’:
s3fs.cpp:4963: error: invalid conversion from ‘int ()(const char, const char)’ to ‘int ()(const char, const char, unsigned int)’**
[...]
It was at this point that I started inspecting the code in s3fs.cpp -- specifically the s3fs_oper struct and the s3fs_rename() function. After seeing that s3fs.h includes fuse.h, I began wondering if there could be something else on my system that had its own version of the fuse.h file that expected three(3) arguments instead of two(2). To check this, I did a quick find of all fuse.h files -- i.e.,
[root@server s3fs-fuse-1.79]# find / -name fuse.h
/usr/src/fuse-2.9.4/include/old/fuse.h
/usr/src/fuse-2.9.4/include/fuse.h
/usr/include/fuse/fuse.h
/usr/include/fuse.h
/usr/include/linux/fuse.h
/usr/local/include/fuse/fuse.h
/usr/local/include/fuse.h
and then, I searched each one for rename and found the following:
[root@server include]# pwd
/usr/src/fuse-2.9.4/include
[root@server include]# grep rename fuse.h
int (*rename) (const char *, const char *);
int fuse_fs_rename(struct fuse_fs *fs, const char *oldpath,
--
[root@server fuse]# pwd
/usr/include/fuse
[root@server fuse]# grep rename fuse.h
**int (*rename) (const char , const char , unsigned int);
int fuse_fs_rename(struct fuse_fs *fs, const char *oldpath,
Aha!
With this find, I suspected that the aforementioned fuse.h was being found and included during the compilation of the s3fs binary.
In attempts to fix this, I initially tried adding the CPPFLAGS="-I/usr/src/fuse-2.9.4/include" option to configure, but that still failed:
make[2]: Entering directory `/workarea/besi/s3fs-fuse/src'
g++ -DHAVE_CONFIG_H -I. -I.. -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2 -I/usr/src/fuse-2.9.4/include -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT s3fs.o -MD -MP -MF .deps/s3fs.Tpo -c -o s3fs.o s3fs.cpp
s3fs.cpp: In function ‘int main(int, char*)’:
s3fs.cpp:4963: error: invalid conversion from ‘int ()(const char_, const char_)’ to ‘int ()(const char, const char_, unsigned int)’
make[2]: *_* [s3fs.o] Error 1
I then tried adding the --includedir=/usr/src/fuse-2.9.4/include option to configure, but it failed again:
make[2]: Entering directory `/workarea/besi/s3fs-fuse/src'
g++ -DHAVE_CONFIG_H -I. -I.. -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2 -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT s3fs.o -MD -MP -MF .deps/s3fs.Tpo -c -o s3fs.o s3fs.cpp
s3fs.cpp: In function ‘int main(int, char*)’:
s3fs.cpp:4963: error: invalid conversion from ‘int ()(const char_, const char_)’ to ‘int ()(const char, const char_, unsigned int)’
make[2]: *_* [s3fs.o] Error 1
Effectively, g++ was still somehow including the /usr/include/fuse directory first. After a bit of digging, I found this line in the Makefile:
DEPS_CFLAGS = -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -I/usr/include/libxml2
It then occurred to me to try the following:
[user@server s3fs-fuse]$ ./configure DEPS_CFLAGS="-D_FILE_OFFSET_BITS=64 -I/usr/src/fuse-2.9.4/include -I/usr/include/fuse -I/usr/include/libxml2"
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
[...]
and then, when I ran the make command, it succeeded!
[user@server s3fs-fuse]$ make
make all-recursive
make[1]: Entering directory
/workarea/besi/s3fs-fuse' Making all in src make[2]: Entering directory/workarea/besi/s3fs-fuse/src'g++ -DHAVE_CONFIG_H -I. -I.. -D_FILE_OFFSET_BITS=64 -I/usr/src/fuse-2.9.4/include -I/usr/include/fuse -I/usr/include/libxml2 -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT s3fs.o -MD -MP -MF .deps/s3fs.Tpo -c -o s3fs.o s3fs.cpp
mv -f .deps/s3fs.Tpo .deps/s3fs.Po
g++ -DHAVE_CONFIG_H -I. -I.. -D_FILE_OFFSET_BITS=64 -I/usr/src/fuse-2.9.4/include -I/usr/include/fuse -I/usr/include/libxml2 -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT curl.o -MD -MP -MF .deps/curl.Tpo -c -o curl.o curl.cpp
mv -f .deps/curl.Tpo .deps/curl.Po
g++ -DHAVE_CONFIG_H -I. -I.. -D_FILE_OFFSET_BITS=64 -I/usr/src/fuse-2.9.4/include -I/usr/include/fuse -I/usr/include/libxml2 -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT cache.o -MD -MP -MF .deps/cache.Tpo -c -o cache.o cache.cpp
mv -f .deps/cache.Tpo .deps/cache.Po
[..]
g++ -DHAVE_CONFIG_H -I. -I.. -D_FILE_OFFSET_BITS=64 -I/usr/src/fuse-2.9.4/include -I/usr/include/fuse -I/usr/include/libxml2 -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT test_string_util.o -MD -MP -MF .deps/test_string_util.Tpo -c -o test_string_util.o test_string_util.cpp
mv -f .deps/test_string_util.Tpo .deps/test_string_util.Po
g++ -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -o test_string_util string_util.o test_string_util.o -lrt
make[2]: Leaving directory
/workarea/besi/s3fs-fuse/src' Making all in test make[2]: Entering directory/workarea/besi/s3fs-fuse/test'make[2]: Nothing to be done for
all'. make[2]: Leaving directory/workarea/besi/s3fs-fuse/test'Making all in doc
make[2]: Entering directory
/workarea/besi/s3fs-fuse/doc' make[2]: Nothing to be done forall'.make[2]: Leaving directory
/workarea/besi/s3fs-fuse/doc' make[2]: Entering directory/workarea/besi/s3fs-fuse'make[2]: Leaving directory
/workarea/besi/s3fs-fuse' make[1]: Leaving directory/workarea/besi/s3fs-fuse'And ultimately, I was of course able to run make install and install the s3fs binary. Therefore, this issue can be marked as Resolved.
Regards,
iambesi
@ggtakec commented on GitHub (Oct 2, 2016):
@iambesi
I'm sorry for my late reply.
I found three type rename prototype in fuse.h, it maybe later(or test) version after 2.9.5
github.com/libfuse/libfuse@b49cf754f9So I think that something different version has slipped to libfuse on your enviroment.
Could you check your libfuse version and header files/library?
Thanks in advance for your assistance.
@ggtakec commented on GitHub (Dec 4, 2016):
@iambesi This issue is that it seems that your fuse.h maybe libfuse v3.0(rc).
https://github.com/libfuse/libfuse/blob/fuse-3.0/include/fuse.h#L338
We should also support libfuse 3.0, but it is not yet the time for now.
Please review your environment and try to build it with libfuse 2.9.x yet.
Thank you for your help.