kevina / syncfs

SyncFS is a Filesystem in Userspace (FUSE) that offers something between mounting a cloud storage system using FUSE while keeping all changes remotely, and syncing a Cloud drive locally.
GNU General Public License v3.0
15 stars 6 forks source link

Errors while doing make #2

Open hazrasudip9 opened 7 years ago

hazrasudip9 commented 7 years ago

error: invalid initialization of non-const reference of type ‘long long int&’ from an rvalue of type ‘long long int’

kevina commented 7 years ago

Could I have the complete error message with line numbers, also what compiler are you using.

hazrasudip9 commented 7 years ago

syncfs.cpp: In function ‘int syncfs_readdir(const char, void, fuse_fill_dir_t, off_t, fuse_file_info)’: syncfs.cpp:1027:34: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘off_t {aka long int}’ [-Wformat=] buf, filler, offset, fi); ^ syncfs.cpp: In function ‘int pending_read(char, size_t, off_t, fuse_file_info)’: syncfs.cpp:1641:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (offset >= len) ^ In file included from syncfs.cpp:55:0: sqlite3.hpp: In instantiation of ‘void SqlResult::get0(int, T&, Ts& ...) [with T = long unsigned int; Ts = {const char}]’: sqlite3.hpp:169:5: recursively required from ‘void SqlResult::get0(int, T&, Ts& ...) [with T = bool; Ts = {long int, long unsigned int, const char}]’ sqlite3.hpp:169:5: required from ‘void SqlResult::get0(int, T&, Ts& ...) [with T = std::__cxx11::basic_string; Ts = {bool, long int, long unsigned int, const char}]’ sqlite3.hpp:174:5: required from ‘void SqlResult::get(Ts& ...) [with Ts = {std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long int, long unsigned int, const char}]’ syncfs.cpp:1230:86: required from here sqlite3.hpp:168:5: error: no matching function for call to ‘get_column(int&, long unsigned int&)’ get_column(idx, arg); ^ In file included from syncfs.cpp:55:0: sqlite3.hpp:191:8: note: candidate: void SqlResult::get_column(int, const char&) void get_column(int idx, const char & val) {val = (const char )sqlite3_col ^ sqlite3.hpp:191:8: note: conversion of argument 2 would be ill-formed: In file included from syncfs.cpp:55:0: sqlite3.hpp:168:5: error: invalid conversion from ‘long unsigned int’ to ‘const char’ [-fpermissive] get_column(idx, arg); ^ sqlite3.hpp:168:5: error: cannot bind rvalue ‘(const char)arg’ to ‘const char*&’ In file included from syncfs.cpp:55:0: sqlite3.hpp:197:8: note: candidate: void SqlResult::get_column(int, bool&) void get_column(int idx, bool & val) {val = (bool)sqlite3_column_int(stmt, id ^ sqlite3.hpp:197:8: note: conversion of argument 2 would be ill-formed: In file included from syncfs.cpp:55:0: sqlite3.hpp:168:5: error: invalid initialization of non-const reference of type ‘bool&’ from an rvalue of type ‘bool’ get_column(idx, arg); ^ In file included from syncfs.cpp:55:0: sqlite3.hpp:198:8: note: candidate: void SqlResult::get_column(int, int&) void get_column(int idx, int & val) {val = sqlite3_column_int(stmt, idx);}; ^ sqlite3.hpp:198:8: note: conversion of argument 2 would be ill-formed: In file included from syncfs.cpp:55:0: sqlite3.hpp:168:5: error: invalid initialization of non-const reference of type ‘int&’ from an rvalue of type ‘int’ get_column(idx, arg); ^ In file included from syncfs.cpp:55:0: sqlite3.hpp:199:8: note: candidate: void SqlResult::get_column(int, unsigned int&) void get_column(int idx, unsigned int & val) {val = sqlite3_column_int(stmt, ^ sqlite3.hpp:199:8: note: conversion of argument 2 would be ill-formed: In file included from syncfs.cpp:55:0: sqlite3.hpp:168:5: error: invalid initialization of non-const reference of type ‘unsigned int&’ from an rvalue of type ‘unsigned int’ get_column(idx, arg); ^ In file included from syncfs.cpp:55:0: sqlite3.hpp:200:8: note: candidate: void SqlResult::get_column(int, long int&) void get_column(int idx, long int & val) {val = (long int)sqlite3_column_int6 ^ sqlite3.hpp:200:8: note: conversion of argument 2 would be ill-formed: In file included from syncfs.cpp:55:0: sqlite3.hpp:168:5: error: invalid initialization of non-const reference of type ‘long int&’ from an rvalue of type ‘long int’ get_column(idx, arg); ^ In file included from syncfs.cpp:55:0: sqlite3.hpp:201:8: note: candidate: void SqlResult::get_column(int, long long int&) void get_column(int idx, long long int & val) {val = (long int)sqlite3_column ^ sqlite3.hpp:201:8: note: conversion of argument 2 would be ill-formed: In file included from syncfs.cpp:55:0: sqlite3.hpp:168:5: error: invalid initialization of non-const reference of type ‘long long int&’ from an rvalue of type ‘long long int’ get_column(idx, arg); ^ make: *** [syncfs.o] Error 1

hazrasudip9 commented 7 years ago

I am using GCC version gcc (Ubuntu 5.4.1-2ubuntu1~16.04) 5.4.1 20160904

. What changes to the make file needs to be done?

kevina commented 7 years ago

Gcc 5.4.1 may not support enough of C++11 you might need to upgrade to a newer version. See the README.