Doesn't build - errors in ioapi.h, unzip.h, unzip.c
Doesn't matter if I try to build from Qt-Creator shipped with Qt5 or if I try to build manually by passing all needed by cmake directories - I get these errors. I can't use the precompiled linux x86_64 version, because it requires libpng.so.12, but my system has libpng.so.16. OS is Gentoo
$ make
[ 1%] Automoc for target MultiMC
[ 1%] Built target MultiMC_automoc
[ 1%] Automoc for target libUtil
[ 1%] Built target libUtil_automoc
[ 3%] Built target libUtil
[ 4%] Automoc for target libSettings
[ 4%] Built target libSettings_automoc
[ 6%] Built target libSettings
[ 6%] Automoc for target xz-embedded
[ 6%] Built target xz-embedded_automoc
[ 8%] Built target xz-embedded
[ 8%] Automoc for target unpack200
[ 8%] Built target unpack200_automoc
[ 11%] Built target unpack200
[ 11%] Automoc for target quazip
[ 11%] Built target quazip_automoc
[ 11%] Building C object depends/quazip/CMakeFiles/quazip.dir/unzip.c.o
In file included from /home/crabman/games/MultiMC5/depends/quazip/unzip.h:59:0,
from /home/crabman/games/MultiMC5/depends/quazip/unzip.c:44:
/home/crabman/games/MultiMC5/depends/quazip/ioapi.h:40:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/ioapi.h:41:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/ioapi.h:42:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/ioapi.h:43:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/ioapi.h:44:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/ioapi.h:45:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/ioapi.h:46:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/ioapi.h:50:5: error: unknown type name ‘open_file_func’
/home/crabman/games/MultiMC5/depends/quazip/ioapi.h:51:5: error: unknown type name ‘read_file_func’
/home/crabman/games/MultiMC5/depends/quazip/ioapi.h:52:5: error: unknown type name ‘write_file_func’
/home/crabman/games/MultiMC5/depends/quazip/ioapi.h:53:5: error: unknown type name ‘tell_file_func’
/home/crabman/games/MultiMC5/depends/quazip/ioapi.h:54:5: error: unknown type name ‘seek_file_func’
/home/crabman/games/MultiMC5/depends/quazip/ioapi.h:55:5: error: unknown type name ‘close_file_func’
/home/crabman/games/MultiMC5/depends/quazip/ioapi.h:56:5: error: unknown type name ‘testerror_file_func’
/home/crabman/games/MultiMC5/depends/quazip/ioapi.h:62:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
In file included from /home/crabman/games/MultiMC5/depends/quazip/unzip.c:44:0:
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:124:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:137:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:148:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:155:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:162:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:170:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:183:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:189:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:196:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:228:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:254:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:260:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:268:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:281:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:296:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:302:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:316:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:321:27: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.h:326:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:168:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.c: In function ‘unzlocal_getByte’:
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:179:20: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:187:13: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c: At top level:
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:198:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:226:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:329:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.c: In function ‘unzlocal_SearchCentralDir’:
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:343:9: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:347:17: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:369:13: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:372:13: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c: In function ‘unzOpen2’:
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:425:21: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:436:9: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:484:9: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c: In function ‘unzClose’:
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:524:5: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c: At top level:
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:568:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
/home/crabman/games/MultiMC5/depends/quazip/unzip.c: In function ‘unzlocal_GetCurrentFileInfoInternal’:
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:605:9: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:679:17: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:694:17: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:700:17: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:720:17: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:726:17: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c: In function ‘unzlocal_CheckCurrentFileCoherencyHeader’:
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:979:9: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c: In function ‘unzOpenCurrentFile3’:
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:1178:13: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:1183:12: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c: In function ‘unzReadCurrentFile’:
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:1279:17: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:1285:17: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c: In function ‘unzGetLocalExtrafield’:
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:1476:9: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:1483:9: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c: In function ‘unzGetGlobalComment’:
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:1553:9: error: invalid type argument of unary ‘*’ (have ‘int’)
/home/crabman/games/MultiMC5/depends/quazip/unzip.c:1559:11: error: invalid type argument of unary ‘*’ (have ‘int’)
make[2]: *** [depends/quazip/CMakeFiles/quazip.dir/unzip.c.o] Error 1
make[1]: *** [depends/quazip/CMakeFiles/quazip.dir/all] Error 2
make: *** [all] Error 2
As for the building, what compiler/version are you using?
Also, does your distro not provide a package specifically for libpng12? I know on Arch Linux, there are separate packages for libpng16 and libpng12. I think the same is true for Debian as well.
Yeah, you are right. Looks like I can install both libpng16 and libpng12. But still, I would prefer to build the program myself.
As for compiler: gcc-4.7.3 and g++-4.7.3 I think the problem is: in the file depends/quazip/ioapi.h line #32 is performed and that's where all the errors come from.
#define ZCALLBACK
this still an issue?
Not that I care anymore, but yes. The problem with compilation persists.
Well, I have no idea. I've never seen the issue myself, CI works and we get builds out just fine.