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

python 3 or pypy support #23

Open
tingletech opened this issue Sep 19, 2019 · 4 comments
Open

python 3 or pypy support #23

tingletech opened this issue Sep 19, 2019 · 4 comments

Comments

@tingletech
Copy link

I need to migrate to either pypy or python 3 after Jan 2020. Any ideas for a good migration path for a python2 project that uses akara and needs to be migrated?

@tingletech
Copy link
Author

specifically, with pypy -- there seems to be a problem here -- at least on Mac OS

lib/src/expat/lib/internal.h
 77 #if SIZEOF_INT >= 4
 78 typedef unsigned int ICHAR32;
 79 #elif SIZEOF_LONG >= 4
 80 typedef unsigned long ICHAR32;
 81 #else
 82 #error No suitable type found for 32-bit storage!
 83 #endif
cc -pthread -arch x86_64 -DNDEBUG -O2 -fPIC -g -DHAVE_EXPAT_CONFIG_H -DExpat_BUILDING_MODULE -Ilib/src -Ilib/src/expat -I/Users/tingle/code/amara/pypy/include -c lib/src/expat/lib/xmlparse.c -o build/temp.macosx-10.14-x86_64-2.7/lib/src/expat/lib/xmlparse.o
lib/src/expat/lib/xmlparse.c:89:2: error: memmove does not exist on this platform, nor is a substitute available
#error memmove does not exist on this platform, nor is a substitute available
 ^
In file included from lib/src/expat/lib/xmlparse.c:93:
lib/src/expat/lib/internal.h:82:2: error: No suitable type found for 32-bit storage!
#error No suitable type found for 32-bit storage!
 ^
In file included from lib/src/expat/lib/xmlparse.c:94:
lib/src/expat/lib/xmltok.h:176:32: error: unknown type name 'ICHAR32'
                               ICHAR32 **toP,
                               ^
lib/src/expat/lib/xmltok.h:177:38: error: unknown type name 'ICHAR32'
                               const ICHAR32 *toLim);
                                     ^
lib/src/expat/lib/xmltok.h:294:45: error: unknown type name 'ICHAR32'
int FASTCALL XmlUtf32Encode(int charNumber, ICHAR32 *buf);
                                            ^
5 errors generated.
error: command 'cc' failed with exit status 1

@uogbuji
Copy link
Contributor

uogbuji commented Sep 21, 2019

Oh goodness! I'm a bit stumped on how to help. I haven't even looked at the Amara 2 codebase for probably five years. It's been all Amara 3 for me, which I know doesn't help because that isn't compatible with Akara (I've also left off Akara in favor of combining custom aiohttp server code with Amara 3).

Looking at those gcc errors I wonder whether updating the embedded expat to 2.2.8 would do the trick (i.e. putting that in lib/src/expat/lib/). That would also have the advantage of patching the recent security bugs in expat.

@tingletech
Copy link
Author

tingletech commented Sep 21, 2019 via email

@tingletech
Copy link
Author

FWIW, it looks like the expat there has been modified as part of the domlette work

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