Closed OrkoHunter closed 9 years ago
I see few more files were modified. Should we consider mentioning them if there's a change of just few lines?
Along with the three more files I added, one file under GKlib/conf
and files under GKlib/tests
are removed too. I guess perhaps those need not to be mentioned.
I remember that I did more than just deleting files. I had to tweak the code somehow to make it build.
The diff gets kind of really big so, I could possibly have missed it. I think the major part is messing with the gklib.c
and Gklib.h
which has been mentioned. I can redo the diff if you say.
I just re-run the diff over the library. I found the code tweaks which helped building the library! Most of them are passing void
argument at places like this.
91c91
< int gk_malloc_init();
---
> int gk_malloc_init(void);
96,97c96,97
< size_t gk_GetCurMemoryUsed();
< size_t gk_GetMaxMemoryUsed();
---
> size_t gk_GetCurMemoryUsed(void);
> size_t gk_GetMaxMemoryUsed(void);
136c136
< void PrintBackTrace();
---
> void PrintBackTrace(void);
288c288
< gk_csr_t *gk_csr_Create();
---
> gk_csr_t *gk_csr_Create(void);
335c335
< gk_mcore_t *gk_gkmcoreCreate();
---
> gk_mcore_t *gk_gkmcoreCreate(void);
353c353
< gk_graph_t *gk_graph_Create();
---
> gk_graph_t *gk_graph_Create(void);
Out of curiosity, why were these changes important for setup.py
to build the c library?
Do you mean that without those changes the build would break?
To provide some background, AFAIK, in C90, func()
is indeed different from func(void)
. The former has an unspecified parameter list, while the latter has an empty parameter list. Such madness is pure legacy. IIRC, it was fixed in C99, where func()
is the same as func(void)
. Not sure if this helps.
Do you mean that without those changes the build would break?
I guess so. However I'm still stuck in defining comparison functors with custom objects. After that, I'll send a PR with the fix and networkx-metis
is good to go.
Are we going to pass extra_compile_args=['-std=c99']
to Extension
?
@chebee7i I think the build used to work fine without std=c99
. However, I added it in setup.py
, but the errors remain the same as of now.
What is the current status? Does it build or not?
Are we going to pass extra_compile_args=['-std=c99'] to Extension?
Can we make the libraries build without this flag?
It does not build as of now. Let's discuss it over #8.
Updated with the changes about gklib_sort.cc
.
IIRC, I had made other changes to the code to make the libraries build. Can you do a diff with the original METIS code?