-
Notifications
You must be signed in to change notification settings - Fork 174
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 plugin fails to build on aarch64 (oracle linux) #1164
Comments
ping @m32 |
Cant reproduce this error, fresh build: It must be around line 308, something like : |
Line 308 of what file? May I gather some other debug info somehow? |
First of all, try to build on completely fresh pulled repo (if it wasn't so) |
File "/home/opc/far2l/python/src/pythongen.py", line 43, in File "/usr/lib64/python3.6/site-packages/cffi/cparser.py", line 832, in _parse_constant I have also build on fresh checkout - no errors |
it is temporary commented out such expressions, now it fails with
|
|
0x000000ffUL is invalid in python, should be 0x000000ff |
May remove that suffixes if it only reason of, dunno why they're there - they're useless in definition of enum's fields. However its then unclear why works for intel builds. |
Worked! Thanks |
So it looks like UL suffixes may safely be removed. But I don't know what to do with expressions in ENUMs |
can you try to replace the with ul suffixes? (lowercased) may be it will work (and will be safer change) |
ValueError: invalid literal for int() with base 16: '0x000000fful' |
but why it works for intel? may be oracle linux has some older FFI of whatelse? |
while suffixes may be removed, removing complex expressions from farkeys.hpp is harder.. BTW regarding suffixes it seems it really was a bug there and fixed - https://foss.heptapod.net/pypy/cffi/-/issues/407 |
how do i check cffi version used by far2l? |
run this command in python/bin folder: |
|
KEY_CTRLSHIFTA = (KEY_CTRL | KEY_SHIFT) + 'A' - this is quite a complicated expression and cffi works fine. https://pypi.org/project/cffi has 1.15.0 for cffi on aarch64 for python >= 3.6 and one of them should be downloaded when far2l is built Which version of Python is on your machine? |
|
|
running
solved an issue with expressions in ENUMs for me |
What about UL suffixes? still making problems? |
nope :) |
so issue resolved? however due to looked at that code, i've made old planned change - refactored python plugin build, and now it doesn't create intermediate stuff in sources tree, but instead putting all that stuff into build directory. Also i've made preprocessing of far2l's header files also during build, instead of having 'hard-commited' copies on git. |
tried a fresh git checkout... still errors if trying to build without cffi update by running
in maybe we should keep this issue open for anyone who will encounter the same errors also? |
but i didnt fix it, for now it too complicated to eliminate that complex expressions, especially if this fixable just by updating python package |
may python packages be updated somehow from build script? |
there is still a file renaming in pluginmanager.py i did the same, with pycpp (preprocessor) i automatically change the headers to one far2l.hh file. I added one _FAR_PYTHON_GEN variable to the preprocessor definition, but I'm still testing it. INT_PTR - is hard coded for 64-bit systems, after this change fartty works on raspberry
|
I did it by hand so i did it automagically :) |
#1164 - automagic generation of far2lcffi.py file
but you broken 32 bits again:( or not? |
32/64 - I haven't touched that yet, in pythongen.py there is if True: for this task |
you may check if target bitness is 64 at prebuild.sh stage by |
-E invokes compiler in preprocessor mode, i.e. it doesnt compile, just processes macroses. See how it works:
|
however, I prefer in python: this works on pi and my laptop |
build system not always == target, sometimes its a cross-compilations :) |
..albeit im not sure that python plugin build fully OK for cross-compilation in other aspects.. |
then we need python as cross compiler ? would be hard todo |
I also compile python4android at home, only problems and it's not stable |
How to find PATH_MAX and NAME_MAX in python - i have hardcoded defaults from sys/limits.h ? |
in similar way, later i will add creating some incpy/target.h with that things obtained from gcc during configuration, but its tomorrow, its too late today already |
done in python #1173 |
still, i prefer to make it in cross-compile-friendly, so see 90b09cc |
It's OK for me |
Looks finished to me. |
still if it is not considered a problem, may close |
Maybe your python package cache is corrupted? |
tried |
check now plz |
|
adding
just after
fixes build |
now? |
great! closing. |
File "/usr/lib64/python3.6/site-packages/cffi/api.py", line 107, in cdef It looks like you are not using virtualenv - python3-cffi is in system installed packages, which is outdated |
Unfortunately I am not the only user of that aarch64 machine, so I am afraid to uninstall packages there |
Another option is virtualenv with no system packages: |
The text was updated successfully, but these errors were encountered: