Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does it work in Windows? #3

Open
soilc opened this issue Sep 27, 2022 · 3 comments
Open

Does it work in Windows? #3

soilc opened this issue Sep 27, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@soilc
Copy link

soilc commented Sep 27, 2022

Does it work in Windows? When I compile, this comes up:
$ make gdcv
gcc -o gdcv gdcv.c dictzip.c utils.c format.c index.c utfproc/utf8proc.c -Wall -Wextra -pedantic -LC:/msys64/mingw64/lib -lz -O2 -march=native
gdcv.c:3:10: fatal error: argp.h: No such file or directory
3 | #include <argp.h> //argp
| ^~~~~~~~
compilation terminated.

@konstare
Copy link
Owner

Sorry, it does not work on windows.

@pecheny
Copy link

pecheny commented May 16, 2023

I had succeeded compiling under msys (zlib, zlib-devel, libargp, libargp-devel installed) with following workaround added at the beginning of index.c

#if !defined(FNM_EXTMATCH)
#define FNM_EXTMATCH 0
#endif

and modified makefile:

CC=gcc
#clang
EMACS = emacs
CFLAGS=$(pkg-config --cflags  zlib) -Wall  -Wextra  -pedantic
OPTIMISATIONS= -O2  -march=native
LDLIBS=$(shell pkg-config --libs  zlib)
DEBUG= -O0 -g3 -ggdb 

.PHONY : test

gdcv: gdcv.c dictzip.c utils.c format.c index.c utfproc/utf8proc.c 
	$(CC)  -o $@ $^ $(CFLAGS) $(LDLIBS) -lz -largp $(OPTIMISATIONS)

emacs-module: gdcv-elisp.so gdcv.elc

gdcv-elisp.so: elisp.c dictzip.c utils.c format.c index.c utfproc/utf8proc.c
	$(CC) -shared -o $@ -fPIC $^ $(CFLAGS) $(LDLIBS)   $(OPTIMISATIONS)

gdcv_debug: gdcv.c dictzip.c utils.c format.c index.c utfproc/utf8proc.c 
	$(CC)  -o $@ $^ $(CFLAGS) $(LDLIBS) -lz -largp $(DEBUG)

clean:
	rm -f  gdcv gdcv-elisp.so gdcv_debug gdcv.elc

.SUFFIXES: .el .elc
.el.elc:
	$(EMACS) -batch -Q -L . -f batch-byte-compile $<

but it fails to index any dir with stackoverflow and following dump:

Exception: STATUS_STACK_OVERFLOW at rip=00010040AEA6
rax=0000000000009170 rbx=0000000A00001C62 rcx=00000007FFE03A30
rdx=0000000A00000490 rsi=0000000000000000 rdi=0000000000000002
r8 =0000000000000023 r9 =0000000A00000480 r10=0000000800000000
r11=000000010040431E r12=00000007FFFFCC30 r13=00000007FFFFCC50
r14=0000000000000000 r15=0000000000000002
rbp=00000007FFFFCAC0 rsp=00000007FFFFCA18
program=C:\Users\...\gdcv\gdcv_debug.exe, pid 2040, thread 
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame         Function      Args
0007FFFFCAC0  00010040AEA6 (000100406424, 0007FFFFCAC0, 00010040153C, 000A00000490) gdcv_debug.exe+0xAEA6
0007FFFFCAC0  000000201170 (0007FFFFCAC0, 00010040153C, 000A00000490, 000000000010) 
0007FFFFCAC0  0007FFFFCB20 (00010040153C, 000A00000490, 000000000010, 000A00000355) 
0007FFFFCAC0  000100406424 (000000000010, 000A00000355, 0001800AC2C4, 000000000000) gdcv_debug.exe+0x6424
0007FFFFCAC0  00010040153C (0007FFFFCC30, 000000000000, 0001800480D4, 0007FFFFCC50) gdcv_debug.exe+0x153C
0007FFFFCD30  000180048140 (000000000000, 000000000000, 000000000000, 000000000000) msys-2.0.dll+0x8140
0007FFFFFFF0  000180045C86 (000000000000, 000000000000, 000000000000, 000000000000) msys-2.0.dll+0x5C86
0007FFFFFFF0  000180045D34 (000000000000, 000000000000, 000000000000, 000000000000) msys-2.0.dll+0x5D34
End of stack trace

@konstare konstare added the enhancement New feature or request label May 17, 2023
@konstare
Copy link
Owner

Thank you. I did not think it can be compiled at all. I do not have any experience with windows programming, maybe the reason it does not work is due to difference between windows and linux paths.

Anyway, in my free time i am rewriting the program and hope that i'll fix this issue in the new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants