• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[DEBIAN] Compile error help! OTClient and Physfs

olekpro

Member
Joined
Nov 1, 2014
Messages
121
Reaction score
6
Hello.
Code:
root@vps800535:/home/otclient/build# make
[  1%] Building CXX object CMakeFiles/otclient.dir/src/framework/core/filestream.cpp.o
then

Code:
/home/otclient/src/framework/core/filestream.cpp: In member function ‘void FileStream::cache()’:
/home/otclient/src/framework/core/filestream.cpp:71:62: error: ‘PHYSFS_readBytes’ was not declared in this scope
         if(PHYSFS_readBytes(m_fileHandle, m_data.data(), size) == -1)
                                                              ^
/home/otclient/src/framework/core/filestream.cpp: In member function ‘void FileStream::flush()’:
/home/otclient/src/framework/core/filestream.cpp:100:66: error: ‘PHYSFS_writeBytes’ was not declared in this scope
             if(PHYSFS_writeBytes(m_fileHandle, m_data.data(), len) != len)
                                                                  ^
/home/otclient/src/framework/core/filestream.cpp: In member function ‘int FileStream::read(void*, uint32, uint32)’:
/home/otclient/src/framework/core/filestream.cpp:112:70: error: ‘PHYSFS_readBytes’ was not declared in this scope
         int res = PHYSFS_readBytes(m_fileHandle, buffer, size * nmemb);
                                                                      ^
/home/otclient/src/framework/core/filestream.cpp: In member function ‘void FileStream::write(const void*, uint32)’:
/home/otclient/src/framework/core/filestream.cpp:133:57: error: ‘PHYSFS_writeBytes’ was not declared in this scope
         if(PHYSFS_writeBytes(m_fileHandle, buffer, count) != count)
                                                         ^
/home/otclient/src/framework/core/filestream.cpp: In member function ‘uint8 FileStream::getU8()’:
/home/otclient/src/framework/core/filestream.cpp:187:48: error: ‘PHYSFS_readBytes’ was not declared in this scope
         if(PHYSFS_readBytes(m_fileHandle, &v, 1) != 1)
                                                ^
/home/otclient/src/framework/core/filestream.cpp: In member function ‘int8 FileStream::get8()’:
/home/otclient/src/framework/core/filestream.cpp:250:48: error: ‘PHYSFS_readBytes’ was not declared in this scope
         if(PHYSFS_readBytes(m_fileHandle, &v, 1) != 1)
                                                ^
/home/otclient/src/framework/core/filestream.cpp: In member function ‘std::string FileStream::getString()’:
/home/otclient/src/framework/core/filestream.cpp:316:58: error: ‘PHYSFS_readBytes’ was not declared in this scope
             if(PHYSFS_readBytes(m_fileHandle, buffer, len) == 0)
                                                          ^
/home/otclient/src/framework/core/filestream.cpp: In member function ‘void FileStream::addU8(uint8)’:
/home/otclient/src/framework/core/filestream.cpp:357:49: error: ‘PHYSFS_writeBytes’ was not declared in this scope
         if(PHYSFS_writeBytes(m_fileHandle, &v, 1) != 1)
                                                 ^
/home/otclient/src/framework/core/filestream.cpp: In member function ‘void FileStream::add8(int8)’:
/home/otclient/src/framework/core/filestream.cpp:404:49: error: ‘PHYSFS_writeBytes’ was not declared in this scope
         if(PHYSFS_writeBytes(m_fileHandle, &v, 1) != 1)
                                                 ^
/home/otclient/src/framework/core/filestream.cpp: In member function ‘void FileStream::throwError(const string&, bool)’:
/home/otclient/src/framework/core/filestream.cpp:458:94: error: ‘PHYSFS_getLastErrorCode’ was not declared in this scope
         completeMessage += std::string(": ") + PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode());
                                                                                              ^
/home/otclient/src/framework/core/filestream.cpp:458:95: error: ‘PHYSFS_getErrorByCode’ was not declared in this scope
         completeMessage += std::string(": ") + PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode());
                                                                                               ^
CMakeFiles/otclient.dir/build.make:445: recipe for target 'CMakeFiles/otclient.dir/src/framework/core/filestream.cpp.o' failed
make[2]: *** [CMakeFiles/otclient.dir/src/framework/core/filestream.cpp.o] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/otclient.dir/all' failed
make[1]: *** [CMakeFiles/otclient.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2
root@vps800535:/home/otclient/build#

when i download phsfs and unzip, i want "make" i see

Code:
make: *** No targets specified and no makefile found.  Stop.

any help????????
 
Solution
You either need to install the libphysfs-dev package or completely compile and install it.

So first try apt install libphysfs-dev. If you connect as a user other than root, which you should be doing, you'll need to also add sudo before that command.

If you want to actually compile it, downloading and unzipping is just the first step. but ideally, you don't download zips of open source software. you clone the repo. then if you need a release version, like what comes in a zip, you just checkout that commit.

It goes something like this:
Bash:
# cd ~
# mkdir src
# cd src
# git clone https://github.com/criptych/physfs.git
# cd physfs
# mkdir build
# cd build
# cmake ../
I dunno the...
You either need to install the libphysfs-dev package or completely compile and install it.

So first try apt install libphysfs-dev. If you connect as a user other than root, which you should be doing, you'll need to also add sudo before that command.

If you want to actually compile it, downloading and unzipping is just the first step. but ideally, you don't download zips of open source software. you clone the repo. then if you need a release version, like what comes in a zip, you just checkout that commit.

It goes something like this:
Bash:
# cd ~
# mkdir src
# cd src
# git clone https://github.com/criptych/physfs.git
# cd physfs
# mkdir build
# cd build
# cmake ../
I dunno the state of your install, so if you already have a src in ~ mkdir will error. ignore it. if you dont have git and that gives an error, install it.
Note: The # symbol means comment to shell, like -- does in Lua. It's not part of the command.
 
Solution
Back
Top