Page 1 of 1

Python-3.5.0 - from mainline sources

Posted: Tue Nov 10, 2015 1:45 pm
by Belxjander
I've managed to minimally patch the python 3.5.0 mainline sources to only have the following show as missing

Python/pytime.o: In function `pymonotonic_new': 2 missing and 1 disabled due to missing functions.
../Python-3.5.0/Python/pytime.c:613: undefined reference to `clock_gettime' = missing
../Python-3.5.0/Python/pytime.c:626: undefined reference to `clock_getres' = missing
../Python-3.5.0/Python/pytime.c:632: undefined reference to `_PyTime_FromTimespec' = disabled
Modules/getpath.o: In function `calculate_path': 1 missing
../Python-3.5.0/Modules/getpath.c:309: undefined reference to `wcstok'
../Python-3.5.0/Modules/getpath.c:311: undefined reference to `wcstok'
../Python-3.5.0/Modules/getpath.c:313: undefined reference to `wcstok'

for anyone interested...the sources are stored online at https://github.com\Belxjander/Kirito.git

I've been working on this recently as a dependency for Perception-IME

I think I am doing okay for having made few if any modifications to the mainline sources.

Still hoping to have it build completely this year

Re: Python-3.5.0 - from mainline sources

Posted: Tue Nov 10, 2015 2:00 pm
by broadblues
Building a -libunix python is trivial, (it aint no perl) I did one as temporary measure whilst porting blender, a properly amiga version is more work.

Why make your IME depend on a component not present in the OS?

Re: Python-3.5.0 - from mainline sources

Posted: Tue Nov 10, 2015 4:30 pm
by Belxjander
I'm working on porting it for build-time scripting usage...

and the python3.x series has all strings as unicode by default

I only need to link "-lunix" then ? for completing the above ?

can you expand on the "-libunix" reference a bit more please ?

other than build time, I'm not depending on python itself at all (I just need the facilities to handle a couple of things ARexx simply is not equipped to handle in preprocessing some unicode data into the required indexing.

then it will make writing the C handling of the same data more trivial.

Re: Python-3.5.0 - from mainline sources

Posted: Tue Nov 10, 2015 6:51 pm
by broadblues
By libunix I mean compile with -lunix to support unix paths so you don;t ned to port the os modules completely.


If you need build time scriptingf support for utf8 then rather than try and port python why not use perl?

Check out http://perldoc.perl.org/utf8.html

5.16.3 comes with the SDK and unicode support is builtin.

Re: Python-3.5.0 - from mainline sources

Posted: Tue Nov 10, 2015 9:49 pm
by Belxjander
@Broadblues
Well I have run into no issues with pathing anything yet, I do however need to find out more about this "-lunix" linkage option you have mentioned

as I have managed to keep minimal patching and for the most part bypass existing problems...

I do however need to write some code for this... and as for using perl... will it allow me to recursively "fold" 13000 Kanji Unicode Characters into a 513 readings mapping B+Tree arrangement ?

I'm needing to deal with recursion in building this index...and my knowledge (limited as it is) of python is far greater than what I know of perl.

that it comes in the SDK gives me a chance to actively run "slic3r" for a reprap toolchain however.

I'm not porting python just as a build-scripting support for Perception-IME...I'm also going to be needing it for after Perception-IME's scripting to handle some other scripting tasks as well and will most likely move the amiga specific sources into the Polymorph-VMM tree

I'm just doing this the way I think I need to do it... if you want to explain a better alternative for that, I don't mind trying to explain the steps I have in mind and hearing about an alternative...if you have the time for that ?

Re: Python-3.5.0 - from mainline sources

Posted: Thu Dec 10, 2015 4:01 am
by Belxjander
I have managed to sort out a full build of python using the sources with minimal modifications currently in my http://github.com/Belxjander/Kirito.git repository.

There is a lot of functionality that seems to be stripped out or optimized away as part of the build process.

If anyone cares to help for AOS4/AROS as a build target?

gcc -c -fno-strict-aliasing -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O0 -Wall -Wstrict-prototypes -N -q -O0 -Wall -Wundef -Wpointer-arith -Wbad-function-cast -gstabs -I/SDK/includes/include_h/ -fPIC -shared -Werror=declaration-after-statement -I. -IInclude -I../Python-3.5.0/Include -DPy_BUILD_CORE -o Parser/myreadline.o ../Python-3.5.0/Parser/myreadline.c
../Python-3.5.0/Parser/myreadline.c: In function 'my_fgets':
../Python-3.5.0/Parser/myreadline.c:47: warning: will never be executed

is one of several hundred warning messages leading into a DSI exception that occurs during the build process.

any help with any of these warnings would be much appreciated.

Re: Python-3.5.0 - from mainline sources

Posted: Mon Dec 28, 2015 5:08 am
by Belxjander
Updated build again...

replacing the SDK:GCC with the newer archive from os4depot.net worked...

correcting the GCC:lib/GCC/ppc-amigaos/5.3.0/lib to GCC:lib/GCC/ppc-amigaos/5.3.0/new lib/lib path

this wiped most of the build errors and I still met a DSI during build when trying the _freeze_importlib command that is built and part of the build process.

Anyone mind helping me track down what I need to more specifically change to make this a more fully native build?