davidgiven / wordgrinder

A word processor which gets the hell out of your way and lets you get some work done.
http://cowlark.com/wordgrinder
951 stars 60 forks source link

0.8 build fails on Gentoo #173

Open sleepyeyessleep opened 3 years ago

sleepyeyessleep commented 3 years ago

Never used github before, so hopefully I'm doing this right.

Wanted to try wordgrinder out, but couldn't find an ebuild in any repository for it. Downloaded the latest release and verified that I had the dependencies installed via portage. Anyways, whether I select GCC10.3 or GCC11.2 to build with, it fails with the same warnings and errors:

Mr /home/wordgrinder-0.8 # make Windows toolchain: not found (WINCC=false, WINDRES=false, MAKENSIS=false) Detecting Curses in package 'ncursesw': found Detecting FreeType2 in package 'freetype2': found Detecting Xft in package '--cflags={-I/usr/include/X11} --libs={-lX11 -lXft}': found Detecting Minizip in package 'builtin': found Detecting lpeg in package 'builtin': found Detecting uthash in package 'builtin': found Detecting LuaBitOp in package 'builtin': found Detecting Lua in package 'builtin': found Detecting Lua in package 'lua-5.1': not found Detecting Lua in package 'lua-5.2': not found Detecting Lua in package 'lua-5.3': found Detecting Lua in package 'luajit': found The preferred Lua package is: 'builtin' [2/203] cc -MMD -MF .obj/builtin-x11-r...o .obj/builtin-x11-release/src/c/zip.o FAILED: .obj/builtin-x11-release/src/c/zip.o cc -MMD -MF .obj/builtin-x11-release/src/c/zip.o.d -g -DVERSION='"0.8"' -DFILEFORMAT=8 -DNOUNCRYPT -DNOCRYPT -Isrc/c -Wall -Wno-unused-function -ffunction-sections -fdata-sections -Werror=implicit-function-declaration --std=gnu99 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/X11 -Os -DNDEBUG -Isrc/c/emu/lua-5.1.5 -DWINSHIM -DLUA_USE_EMU_TMPNAM -Isrc/c/emu/luabitop -Isrc/c/emu/uthash -DARCH='"unix"' -Isrc/c/emu/minizip -Isrc/c/emu/lpeg -c src/c/zip.c -o .obj/builtin-x11-release/src/c/zip.o In file included from src/c/emu/minizip/unzip.h:57, from src/c/zip.c:8: src/c/emu/minizip/ioapi.h:38:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 38 | typedef voidpf (ZCALLBACK open_file_func) OF((voidpf opaque, const char filename, int mode)); | ^~ src/c/emu/minizip/ioapi.h:39:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 39 | typedef uLong (ZCALLBACK read_file_func) OF((voidpf opaque, voidpf stream, void buf, uLong size)); | ^~ src/c/emu/minizip/ioapi.h:40:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 40 | typedef uLong (ZCALLBACK write_file_func) OF((voidpf opaque, voidpf stream, const void buf, uLong size)); | ^~ src/c/emu/minizip/ioapi.h:41:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 41 | typedef long (ZCALLBACK tell_file_func) OF((voidpf opaque, voidpf stream)); | ^~ src/c/emu/minizip/ioapi.h:42:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 42 | typedef long (ZCALLBACK seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); | ^~ src/c/emu/minizip/ioapi.h:43:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 43 | typedef int (ZCALLBACK close_file_func) OF((voidpf opaque, voidpf stream)); | ^~ src/c/emu/minizip/ioapi.h:44:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 44 | typedef int (ZCALLBACK testerror_file_func) OF((voidpf opaque, voidpf stream)); | ^~ src/c/emu/minizip/ioapi.h:48:5: error: unknown type name ‘open_file_func’ 48 | open_file_func zopen_file; | ^~~~~~ src/c/emu/minizip/ioapi.h:49:5: error: unknown type name ‘read_file_func’ 49 | read_file_func zread_file; | ^~~~~~ src/c/emu/minizip/ioapi.h:50:5: error: unknown type name ‘write_file_func’ 50 | write_file_func zwrite_file; | ^~~~~~~ src/c/emu/minizip/ioapi.h:51:5: error: unknown type name ‘tell_file_func’ 51 | tell_file_func ztell_file; | ^~~~~~ src/c/emu/minizip/ioapi.h:52:5: error: unknown type name ‘seek_file_func’ 52 | seek_file_func zseek_file; | ^~~~~~ src/c/emu/minizip/ioapi.h:53:5: error: unknown type name ‘close_file_func’ 53 | close_file_func zclose_file; | ^~~~~~~ src/c/emu/minizip/ioapi.h:54:5: error: unknown type name ‘testerror_file_func’ 54 | testerror_file_func zerror_file; | ^~~~~~~ src/c/emu/minizip/ioapi.h:60:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 60 | void fill_fopen_filefunc OF((zlib_filefunc_def pzlib_filefunc_def)); | ^~ In file included from src/c/zip.c:8: src/c/emu/minizip/unzip.h:122:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 122 | extern int ZEXPORT unzStringFileNameCompare OF ((const char fileName1, | ^~ src/c/emu/minizip/unzip.h:135:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 135 | extern unzFile ZEXPORT unzOpen OF((const char path)); | ^~ src/c/emu/minizip/unzip.h:146:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 146 | extern unzFile ZEXPORT unzOpen2 OF((const char path, | ^~ src/c/emu/minizip/unzip.h:153:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 153 | extern int ZEXPORT unzClose OF((unzFile file)); | ^~ src/c/emu/minizip/unzip.h:160:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 160 | extern int ZEXPORT unzGetGlobalInfo OF((unzFile file, | ^~ src/c/emu/minizip/unzip.h:168:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 168 | extern int ZEXPORT unzGetGlobalComment OF((unzFile file, | ^~ src/c/emu/minizip/unzip.h:181:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 181 | extern int ZEXPORT unzGoToFirstFile OF((unzFile file)); | ^~ src/c/emu/minizip/unzip.h:187:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 187 | extern int ZEXPORT unzGoToNextFile OF((unzFile file)); | ^~ src/c/emu/minizip/unzip.h:194:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 194 | extern int ZEXPORT unzLocateFile OF((unzFile file, | ^~ src/c/emu/minizip/unzip.h:226:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 226 | extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file, | ^~ src/c/emu/minizip/unzip.h:252:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 252 | extern int ZEXPORT unzOpenCurrentFile OF((unzFile file)); | ^~ src/c/emu/minizip/unzip.h:258:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 258 | extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file, | ^~ src/c/emu/minizip/unzip.h:266:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 266 | extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file, | ^~ src/c/emu/minizip/unzip.h:279:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 279 | extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file, | ^~ src/c/emu/minizip/unzip.h:294:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 294 | extern int ZEXPORT unzCloseCurrentFile OF((unzFile file)); | ^~ src/c/emu/minizip/unzip.h:300:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 300 | extern int ZEXPORT unzReadCurrentFile OF((unzFile file, | ^~ src/c/emu/minizip/unzip.h:314:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 314 | extern z_off_t ZEXPORT unztell OF((unzFile file)); | ^~ src/c/emu/minizip/unzip.h:319:27: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 319 | extern int ZEXPORT unzeof OF((unzFile file)); | ^~ src/c/emu/minizip/unzip.h:324:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 324 | extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file, | ^~ In file included from src/c/zip.c:9: src/c/emu/minizip/zip.h:114:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 114 | extern zipFile ZEXPORT zipOpen OF((const char pathname, int append)); | ^~ src/c/emu/minizip/zip.h:134:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 134 | extern zipFile ZEXPORT zipOpen2 OF((const char pathname, | ^~ src/c/emu/minizip/zip.h:139:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 139 | extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file, | ^~ src/c/emu/minizip/zip.h:163:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 163 | extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file, | ^~ src/c/emu/minizip/zip.h:179:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 179 | extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file, | ^~ src/c/emu/minizip/zip.h:204:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 204 | extern int ZEXPORT zipWriteInFileInZip OF((zipFile file, | ^~ src/c/emu/minizip/zip.h:211:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 211 | extern int ZEXPORT zipCloseFileInZip OF((zipFile file)); | ^~ src/c/emu/minizip/zip.h:216:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 216 | extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file, | ^~ src/c/emu/minizip/zip.h:225:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘OF’ 225 | extern int ZEXPORT zipClose OF((zipFile file, | ^~ src/c/zip.c: In function ‘readfromzip_cb’: src/c/zip.c:115:22: error: implicit declaration of function ‘unzOpen’ [-Werror=implicit-function-declaration] 115 | unzFile zf = unzOpen(zipname); | ^~~ src/c/zip.c:115:22: warning: initialization of ‘unzFile’ {aka ‘void ’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] src/c/zip.c:118:25: error: implicit declaration of function ‘unzLocateFile’ [-Werror=implicit-function-declaration] 118 | int i = unzLocateFile(zf, subname, 0); | ^~~~~ src/c/zip.c:122:25: error: implicit declaration of function ‘unzGetCurrentFileInfo’ [-Werror=implicit-function-declaration] 122 | unzGetCurrentFileInfo(zf, &fi, | ^~~~~ src/c/zip.c:128:33: error: implicit declaration of function ‘unzOpenCurrentFile’ [-Werror=implicit-function-declaration] 128 | unzOpenCurrentFile(zf); | ^~~~~~ src/c/zip.c:129:37: error: implicit declaration of function ‘unzReadCurrentFile’ [-Werror=implicit-function-declaration] 129 | i = unzReadCurrentFile(zf, buffer, fi.uncompressed_size); | ^~~~~~ src/c/zip.c:139:17: error: implicit declaration of function ‘unzClose’ [-Werror=implicit-function-declaration] 139 | unzClose(zf); | ^~~~ src/c/zip.c: In function ‘writezip_cb’: src/c/zip.c:151:22: error: implicit declaration of function ‘zipOpen’; did you mean ‘popen’? [-Werror=implicit-function-declaration] 151 | zipFile zf = zipOpen(zipname, APPEND_STATUS_CREATE); | ^~~ | popen src/c/zip.c:151:22: warning: initialization of ‘zipFile’ {aka ‘void ’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] src/c/zip.c:163:33: error: implicit declaration of function ‘zipOpenNewFileInZip’ [-Werror=implicit-function-declaration] 163 | int i = zipOpenNewFileInZip(zf, key, NULL, | ^~~~~~~ src/c/zip.c:175:29: error: implicit declaration of function ‘zipWriteInFileInZip’ [-Werror=implicit-function-declaration] 175 | i = zipWriteInFileInZip(zf, value, valuelen); | ^~~~~~~ src/c/zip.c:182:29: error: implicit declaration of function ‘zipCloseFileInZip’ [-Werror=implicit-function-declaration] 182 | i = zipCloseFileInZip(zf); | ^~~~~ src/c/zip.c:192:17: error: implicit declaration of function ‘zipClose’; did you mean ‘pclose’? [-Werror=implicit-function-declaration] 192 | zipClose(zf, NULL); | ^~~~ | pclose cc1: some warnings being treated as errors [7/203] cc -MMD -MF .obj/builtin-x11-r...-x11-release/src/c/emu/lua-5.1.5/lgc.o ninja: build stopped: subcommand failed. make: *** [Makefile:125: all] Error 1

Any help would be greatly appreciated.

davidgiven commented 3 years ago

I haven't seen that one before, and that's not any of my code --- it looks like a zlib issue? Not sure why you're seeing it and nobody else is, however. Is gentoo applying any global compiler settings that might be affecting things?

dnalor commented 2 years ago

I have the same issue on Gentoo (Gentoo doesn't apply any global compiler settings). It seems that wordgrinder fails to compile when using the included minizip. It works with the system-wide installed minizip (from zlib-1.2.11): LUA_PACKAGE=luajit MINIZIP_PACKAGE=minizip make successfully builds wordgrinder, and it seems to work fine.

Sbatushe commented 2 years ago

@dnalor I got same error, but i can't find minizip in the portage tree. How have you installed it? I've tried to compile it manually but I haven't find a way to install it, can' find the binary.

EDIT: Managed to find a solution without the need to install minizip. I just cloned this repository and edited the configure file, adding the following line under the add CFLAGS -g line:

add CFLAGS -DOF=_Z_OF

then i compiled with make as usual. The resulting wordgrinder program is usable, but a bit uglier than on other distributions. Since I'm happy with the result and I'm not going to dive deeper in this problem i can link to this deprecated guide on how to compile it.