matteoserva / MegaFuse

MEGA client for linux, based on FUSE
Other
249 stars 79 forks source link

src/EventsHandler.cpp:43:26: error: expected initializer before ':' token #10

Open nephaste opened 10 years ago

nephaste commented 10 years ago

Hi i am trying to cross compil your application to use on a Thecus NAS. I already cross compiled all dependencies in my Prefix directory

also modified your Makefile as follow

http://pastebin.com/RX7LG9P5

but when i launch the make command

http://pastebin.com/PhBSKKMX

any chance you bring me a fix ?

i ll be glad to propose your application on whole Thecus NAS

thanks

Stéphane

matteoserva commented 10 years ago

the offending line requires c++11 to be compiled. first try changing "-std=c++0x" into "-std=c++11";

If it doesn't work, replace the two lines with:

for(std::set<EventsListener >::iterator it = listeners[e].begin(); it !=listeners[e].end();++it) (it)->notifyEvent(er);

nephaste commented 10 years ago

thanks

The first solution bring me an error while modifying the Makefile

x86_64-unknown-linux-gnu-g++ -I inc -I /raid/data/module/MegaFuse/sys/include/cryptopp -I sdk -std=c++11 -O0 -g -fstack-protector-all -Wall -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_DEBUG -I/raid/data/module/MegaFuse/sys/include -c src/MegaFuseApp.cpp -o src/MegaFuseApp.o cc1plus: error: unrecognized command line option "-std=c++11" make: *\ [src/MegaFuseApp.o] Error 1

I am not sure what you mean by

If it doesn't work, replace the two lines with:

for(std::set::iterator it = listeners[e].begin(); it !=listeners[e].end();++it) (*it)->notifyEvent(er);

is it in src/EventsHandler.cpp

nephaste commented 10 years ago

i put back the "-std=c++0x"

and modify in src/EventsHandler.cpp

replacing

for(EventsListener * it : listeners[e])
    it->notifyEvent(er);

by

for(std::set::iterator it = listeners[e].begin(); it !=listeners[e].end();++it) (*it)->notifyEvent(er);

still push me an error

/raid/data/module/MegaFuse/sys/include/cryptopp/misc.h: At global scope: /raid/data/module/MegaFuse/sys/include/cryptopp/misc.h:548:20: warning: 'std::string CryptoPP::StringNarrow(const wchart, bool)' defined but not used x86_64-unknown-linux-gnu-g++ -I inc -I /raid/data/module/MegaFuse/sys/include/cryptopp -I sdk -std=c++0x -O0 -g -fstack-protector-all -Wall -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_DEBUG -I/raid/data/module/MegaFuse/sys/include -c src/EventsHandler.cpp -o src/EventsHandler.o src/EventsHandler.cpp: In member function 'int EventsHandler::notifyEvent(EventsHandler::event, int, std::string)': src/EventsHandler.cpp:43:10: error: 'template<class _Key, class _Compare, class _Allocator> class std::_debug::set' used without template parameters src/EventsHandler.cpp:43:24: error: expected ';' before 'it' src/EventsHandler.cpp:43:51: error: 'it' was not declared in this scope make: ** [src/EventsHandler.o] Error 1

matteoserva commented 10 years ago

sorry, github deleted part of the line.

http://pastebin.com/5uJx0LSF

nephaste commented 10 years ago

it is ok, seem to go on now, I have another problem linked with libcurl and undefined reference to openssl but it is not a problem linked to MegaFuse.

Thanks again

Stéphane

nephaste commented 10 years ago

Finally found the rror i had was also link to the Makefile missing some libs link added

to the LDFLAGS -lssl -liconv -lcrypto -lz

now i have a full megafuse binary :)))

here is Make File modification i did

http://pastebin.com/XaCXGvgz

nephaste commented 10 years ago

not sure what happen but launching the MegaFuse Binary show me an eternal

API request failed, retrying in 100 ms - Use 'retry' to retry immediately... API request failed, retrying in 200 ms - Use 'retry' to retry immediately... API request failed, retrying in 400 ms - Use 'retry' to retry immediately... API request failed, retrying in 800 ms - Use 'retry' to retry immediately... API request failed, retrying in 1600 ms - Use 'retry' to retry immediately... API request failed, retrying in 3200 ms - Use 'retry' to retry immediately... API request failed, retrying in 6400 ms - Use 'retry' to retry immediately...

did i miss something ? the conf file is well filled

matteoserva commented 10 years ago

Sometimes the MEGA server is offline. If you still cannot connect after 1 hour, write another post here. Can you connect from your ordinary PC with the same credentials?

nephaste commented 10 years ago

still the same :(((

caricata la variabile MOUNTPOINT con il valore /raid/data/MEGA API request failed, retrying in 100 ms - Use 'retry' to retry immediately... API request failed, retrying in 200 ms - Use 'retry' to retry immediately... API request failed, retrying in 400 ms - Use 'retry' to retry immediately... API request failed, retrying in 800 ms - Use 'retry' to retry immediately... API request failed, retrying in 1600 ms - Use 'retry' to retry immediately... API request failed, retrying in 3200 ms - Use 'retry' to retry immediately... API request failed, retrying in 6400 ms - Use 'retry' to retry immediately... API request failed, retrying in 12800 ms - Use 'retry' to retry immediately...

and no problem to log within a a web browser

can it be link to a free acoount, i registered for my test ?

matteoserva commented 10 years ago

I have a free account too. What i mean is: try megafuse on a ubuntu or debian computer or laptop, compiled with a normal gcc (not cross compiled). If it works, then i'll try to simulate the NAS to see what goes wrong

nephaste commented 10 years ago

thanks, let me know

I will also try to compile it on a PPC NAS Thecus N2310, which doesnt require Cross compilation, all is done through a chrooted environment. but i am sure it is not related to my ToolChain, neither my NAS connection...