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

Issue with GAP_MakeStringWithLen and MarkBag for GAP v4.13.0 #22

Open
jorgens opened this issue Apr 26, 2024 · 2 comments
Open

Issue with GAP_MakeStringWithLen and MarkBag for GAP v4.13.0 #22

jorgens opened this issue Apr 26, 2024 · 2 comments

Comments

@jorgens
Copy link

jorgens commented Apr 26, 2024

Hi There

I just tried to install gappy on top of gap v4.13 and it seems that there are some issues with MarkBag and GAP_MakeStringWithLen.

gcc -pthread -B /opt/conda/compiler_compat -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/include -fPIC -O2 -isystem /opt/conda/include -fPIC -DCYTHON_USE_PYLONG_INTERNALS=0 -I/tmp/pip-build-env-1hqozfcp/overlay/lib/python3.11/site-packages/cysignals -Ibuild/temp.linux-x86_64-cpython-311/include -I/usr/local/src/gap-4.13.0/gen -I/opt/conda/include -I/opt/conda/include/python3.11 -c gappy/core.c -o build/temp.linux-x86_64-cpython-311/gappy/core.o
8.558       gappy/core.c:816:23: error: conflicting types for ‘GAP_MakeStringWithLen’; have ‘struct OpaqueBag *(char *, size_t)’ {aka ‘struct OpaqueBag *(char *, long unsigned int)’}
8.558         816 |     static inline Obj GAP_MakeStringWithLen(char *s, size_t len) {
8.558             |                       ^~~~~~~~~~~~~~~~~~~~~
8.558       In file included from gappy/core.c:782:
8.558       build/temp.linux-x86_64-cpython-311/include/gap/libgap-api.h:553:5: note: previous declaration of ‘GAP_MakeStringWithLen’ with type ‘struct OpaqueBag *(const char *, UInt)’ {aka ‘struct OpaqueBag *(const char *, long unsigned int)’}
8.558         553 | Obj GAP_MakeStringWithLen(const char * string, UInt len);
8.558             |     ^~~~~~~~~~~~~~~~~~~~~
8.558       gappy/core.c: In function ‘__pyx_f_5gappy_4core_gasman_callback’:
8.558       gappy/core.c:3857:5: error: too few arguments to function ‘MarkBag’
8.558        3857 |     MarkBag(((struct __pyx_obj_5gappy_4core_ObjWrapper *)__pyx_v_obj)->value);
8.558             |     ^~~~~~~
8.558       In file included from gappy/core.c:809:
8.558       build/temp.linux-x86_64-cpython-311/include/gap/gasman.h:758:6: note: declared here
8.558         758 | void MarkBag(Bag bag, void * ref);
8.558             |      ^~~~~~~
8.558       error: command '/usr/bin/gcc' failed with exit code 1
8.558       [end of output]

I am at a complete loss here, but it looks like you were aware of the coming issue with: GAP_MakeStringWithLen. The MarkBag Issue might be a bit more involved, since the number of parameters has been extended.

Any chance you could have a look? That would be greatly appreciated!

@embray
Copy link
Owner

embray commented Apr 28, 2024

I haven't maintaining gappy for some time, not that I wouldn't like to. I believe it's part of sage as well, so this should be fixed. If anyone from the Sage or GAP projects would like to help contribute it would be welcome.

I don't know what this new void* ref argument is for MarkBag. Maybe you can find out? Pull requests would be welcome too.

michaelontiveros added a commit to michaelontiveros/gappy that referenced this issue May 1, 2024
@jorgens
Copy link
Author

jorgens commented May 6, 2024

@embray Thanks for your reply. I will try to see if I can find the related code within sage.

Unfortunately, I do not really understand the code well enough, even though I have tried, to make any meaningful contributions.

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