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

Windows build hitting a snag #1

Closed
drwbns opened this issue Feb 28, 2024 · 3 comments
Closed

Windows build hitting a snag #1

drwbns opened this issue Feb 28, 2024 · 3 comments

Comments

@drwbns
Copy link

drwbns commented Feb 28, 2024

Hey Gavin. This work you did is really awesome but I'm using Visual Studio on a Windows machine and it has been a pain to build. I finally was able to build and run it but I am hitting a weird access violation. Any ideas? Also, does it use some custom library versions of GKlib or Metis? Thanks for any help!

image

@drwbns
Copy link
Author

drwbns commented Feb 28, 2024

I got it working after changing lines in gk error.c file. Lines 22-24 need to change to:

__declspec(thread) int gk_cur_jbufs=-1;
__declspec(thread) jmp_buf gk_jbufs[MAX_JBUFS];
__declspec(thread) jmp_buf gk_jbuf;

Same sort of changes in gk_externs.h -

#ifndef GK_ERROR_C
/* declared in error.c */
__declspec(thread) int gk_cur_jbufs;
__declspec(thread) jmp_buf gk_jbufs[];
__declspec(thread) jmp_buf gk_jbuf;

#endif

Also had to add /FORCE:Multiple to the linker

@drwbns drwbns closed this as completed Feb 28, 2024
@gfaster
Copy link
Owner

gfaster commented Feb 29, 2024

This repository doesn't use a patched build of METIS or GKLib, but there are configure flags that can create differences on different platforms.

I don't use Windows anymore so I hadn't tried building it there, but the bug you encountered looks like it is a bug in METIS that has open pull requests

@drwbns
Copy link
Author

drwbns commented Feb 29, 2024

Ah ok. I will check that out. I got it running properly in Windows using a 64-bit configuration but it is giving me some sort of vector out of range exception when the rabbit model is moved to the very far extent so the program crashes at that point. I haven't spent too much time to figure that error out yet but I'll open a new issue if I can't figure it out. Thanks!

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

No branches or pull requests

2 participants