storj-archived/libstorj

Error compiling Windows DLL

kaloyan-raev opened this issue · 6 comments

Until recently I was able to successfully compile libstorj to a Windows DLL following these instructions: https://github.com/Storj/libstorj#cross-compiling-dependencies-from-ubuntu-1604

I pulled from master today and tried to build again, but I've got the following errors:

cli_callback.c: In function ‘printdir’:
cli_callback.c:63:5: error: unknown type name ‘DIR’
     DIR *dp;
     ^
cli_callback.c:73:15: warning: implicit declaration of function ‘opendir’ [-Wimplicit-function-declaration]
     if ((dp = opendir(dir)) == NULL) {
               ^
cli_callback.c:73:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     if ((dp = opendir(dir)) == NULL) {
             ^
cli_callback.c:79:21: warning: implicit declaration of function ‘readdir’ [-Wimplicit-function-declaration]
     while ((entry = readdir(dp)) != NULL) {
                     ^
cli_callback.c:79:19: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     while ((entry = readdir(dp)) != NULL) {
                   ^
cli_callback.c:80:9: warning: implicit declaration of function ‘lstat’ [-Wimplicit-function-declaration]
         lstat(entry->d_name, &statbuf);
         ^
cli_callback.c:80:20: error: dereferencing pointer to incomplete type ‘struct dirent’
         lstat(entry->d_name, &statbuf);
                    ^
cli_callback.c:89:25: warning: implicit declaration of function ‘realpath’ [-Wimplicit-function-declaration]
             full_path = realpath(entry->d_name, NULL);
                         ^
cli_callback.c:95:5: warning: implicit declaration of function ‘closedir’ [-Wimplicit-function-declaration]
     closedir(dp);
     ^
cli_callback.c: In function ‘file_exists’:
cli_callback.c:102:5: error: unknown type name ‘gid_t’
     gid_t  st_grpid;
     ^
cli_callback.c:136:14: error: ‘S_IFSOCK’ undeclared (first use in this function)
         case S_IFSOCK:
              ^
cli_callback.c:136:14: note: each undeclared identifier is reported only once for each function it appears in
Makefile:525: recipe for target 'cli_callback.lo' failed

Is there anything missing in the instructions that has to be added for the latest changes?

I don't think there has been any testing yet on windows for some of the new CLI functionality, so it may relate to all windows builds.

v2.0.0-beta2 is running fine on my windows PC

That doesn't include some of the new CLI commands, we can make another beta build soon here. We should at the least do one round of cross compilation testing for the commands before though.