Porting of Python 2.1.1 to QNX6.1 solved ...

bridged with qdn.public.qnxrtp.porting
Frank Liu

Re: Correction ...Porting of Python 2.1.1 to QNX6.1 solved .

Post by Frank Liu » Sun Oct 14, 2001 5:09 am

frankly, I am no good at c++, and all the kde stuff are written
around qt lib and c++. this shouldn't normally be a problem, but
given the mess of c++/rtp6.1, i will just shy away from it. there
are more qualified people in this group than me, hope someone
can do it. rumors said someone from qssl already had kde/kdeveloper
ported ...
I am still scratching my head on the ddd port. no surprise it is
written in c++. see my posts in the "qdn.public.qnxrtp.devtools" group...

Frank

On Sat, 13 Oct 2001, Miguel Simon wrote:
Frank...

I see your port now. Great work! :) Thanks.

I wonder if you are thinking about porting KDevelop? Would this be a
difficult task? Has someone done this before?

Also, where you successful in porting ddd with your XFree86 4.1 port?

Bests...

Miguel.

Frank Liu wrote:

ok, it is up there now.
any quesitons, please join the mailing list at
http://lists.sourceforge.net/lists/list ... -developer

frank

On Sat, 13 Oct 2001, Armin wrote:

Armin wrote:

David Alessio wrote:

Hello,

I don't know exactly what the problem was, but if I adjust Armin's
procedure, it works for me. I even have Tkinter working (on 8.3.2) with
most of Guido's and Matt's demos.

Now if we can only get XPhoton fixed, it'd stay up longer...

Hmmm ... add the neccessary X server, libs a.s.o to the X11R6
directories of XPhoton and you can run XFree86 if you have a
critical X application. (~ 2-3 MB of binaries ... )

BTW ... the port of XFree86 version 4.1 available at

http://www.sourceforge.net/projects/openqnx

Big thanks to Frank !!

Sorry ... too early. Version 4.1 will be available in a short time
frame ....

Armin



Armin



Cheers,
-david



David Alessio wrote:

This compiles and Python comes up, but
import math
fails with a SIGSEGV three calls into libc from dlopen("math.so",
RTLD_NOW) in dynload_shlib.c

Does anyone else have this problem? Any ideas?

Thanks,
david

Armin Steinhoff wrote:

Hi all,

the port of Python 2.1.1 can to be done with the following steps:

1) install the Python archive at /
then do the export cmds: export PYTHONPATH=/Python-2.1.1 ,
export PYTHONHOME=/Python-2.1.1

2) copy all *.py files from /Python-2.1.1/Lib to
/Python-2.1.1/lib/python2.1
(there is a curious fault in the UNIX distribution..)


Don't do the copy, instead, use a link:

2) cd /Python-2.1.1
mkdir lib
ln -s /Python-2.1.1/Lib lib/python2.1

Yes ... of course that's better :)

3) configure: CC=qcc LDFLAGS=-Wl,-E CCSHARED="-shared -fPIC"
CFLAGSFORSHARED="-shared -fPIC" LDSHARED="qcc -shared"
BLDSHARED="qcc -shared" ./configure --with-threads
(in ONE cmd line ..)

4) make



4.5) You will now have a directory something like this:
/Python-2.1.1/build/lib.qnx-6.1.0-x86pc-2.1
Create a link Lib/lib-dynload that points to this directory:
ln -s /Python-2.1.1/build/lib.qnx-6.1.0-x86pc-2.1 Lib/lib-dynload

I will 'repare' in the next days the 'getpath' module ... so that
configure and make are only neccessary to build python 2.1.1

5) make install

6) export cmds: export PYTHONPATH=/usr/local/lib/python2.1
export PYTHONHOME=/usr/local/lib/python2.1


Hmmm, I don't need these.

At least one of them should be set .. IMHO

7) copy all shared objects from $PYTHONPATH/lib-dynload to
$PYTHONPATH/lib/python2.1 (as you know ... there is a curious
faulr ...)

I didn't need to do this. I think this is necessary only if the Env
Vars are defined in (6)

interesting ...

Armin






--
---
my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.
---
Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

Frank Liu

Re: Porting of Python 2.1.1 to QNX6.1 solved ...

Post by Frank Liu » Sun Oct 14, 2001 5:13 am

Given the fact that there is little development in Xphoton
and phinx, can QSSL release the source early? I checked
http://cvs.qnx.com and they are not there yet. Does QSSL
consider them "core technology" and won't release the source?

Frank

On 13 Oct 2001, Chris McKillop wrote:
David Alessio <david.alessio@hsa.hitachi.com> wrote:


Hello,

I don't know exactly what the problem was, but if I adjust Armin's
procedure, it works for me. I even have Tkinter working (on 8.3.2) with
most of Guido's and Matt's demos.

Now if we can only get XPhoton fixed, it'd stay up longer...


Something to try...

slay Xphoton gtwm
Xphoton -nocrc &
gtwm &

chris

--

cdm@qnx.com "The faster I go, the behinder I get."
Chris McKillop -- Lewis Carroll --
Software Engineer, QSSL

David S. Alessio

Re: Porting of Python 2.1.1 to QNX6.1 solved ...

Post by David S. Alessio » Mon Oct 15, 2001 7:46 am

A few notes on compiling for Tkinter support:

----- Original Message -----
From: "David Alessio" <david.alessio@hsa.hitachi.com>
Newsgroups: qdn.public.qnxrtp.porting
Sent: Friday, October 12, 2001 9:48 PM
Subject: Re: Porting of Python 2.1.1 to QNX6.1 solved ...

Hello,

I don't know exactly what the problem was, but if I adjust Armin's
procedure, it works for me. I even have Tkinter working (on 8.3.2) with
most of Guido's and Matt's demos.

Now if we can only get XPhoton fixed, it'd stay up longer...

Cheers,
-david



David Alessio wrote:

This compiles and Python comes up, but
import math
fails with a SIGSEGV three calls into libc from dlopen("math.so",
RTLD_NOW) in dynload_shlib.c

Does anyone else have this problem? Any ideas?

Thanks,
david

Armin Steinhoff wrote:

Hi all,

the port of Python 2.1.1 can to be done with the following steps:

1) install the Python archive at /
then do the export cmds: export PYTHONPATH=/Python-2.1.1 ,
export PYTHONHOME=/Python-2.1.1


2) copy all *.py files from /Python-2.1.1/Lib to
/Python-2.1.1/lib/python2.1
(there is a curious fault in the UNIX distribution..)

Don't do the copy, instead, use a link:

2) cd /Python-2.1.1
mkdir lib
ln -s /Python-2.1.1/Lib lib/python2.1
2.5) edit Modules/Setup and uncomment the lines for _tkinter and its libs.
Change the tk and tcl lib version to 8.3 (of course you must have installed
tcl and tk).
from line 300 in Setup:

# *** Always uncomment this (leave the leading underscore in!):
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
-L/usr/local/lib \
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
-I/usr/local/include \
# *** Uncomment and edit to reflect where your X11 header files are:
-I/usr/X11R6/include \
# *** Or uncomment this for Solaris:
# -I/usr/openwin/include \
# *** Uncomment and edit for Tix extension only:
# -DWITH_TIX -ltix8.1.8.2 \
# *** Uncomment and edit for BLT extension only:
# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
# *** Uncomment and edit for PIL (TkImaging) extension only:
# (See http://www.pythonware.com/products/pil/ for more info)
# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
# *** Uncomment and edit for TOGL extension only:
# -DWITH_TOGL togl.c \
# *** Uncomment and edit to reflect your Tcl/Tk versions:
-ltk8.3 -ltcl8.3 \
# *** Uncomment and edit to reflect where your X11 libraries are:
-L/usr/X11R6/lib \
# *** Or uncomment this for Solaris:
# -L/usr/openwin/lib \
# *** Uncomment these for TOGL extension only:
# -lGL -lGLU -lXext -lXmu \
# *** Uncomment for AIX:
# -lld \
# *** Always uncomment this; X11 libraries to link with:
-lX11

3) configure: CC=qcc LDFLAGS=-Wl,-E CCSHARED="-shared -fPIC"
CFLAGSFORSHARED="-shared -fPIC" LDSHARED="qcc -shared"
BLDSHARED="qcc -shared" ./configure --with-threads
(in ONE cmd line ..)

4) make


4.5) You will now have a directory something like this:
/Python-2.1.1/build/lib.qnx-6.1.0-x86pc-2.1
Create a link Lib/lib-dynload that points to this directory:
ln -s /Python-2.1.1/build/lib.qnx-6.1.0-x86pc-2.1 Lib/lib-dynload

5) make install


6) export cmds: export PYTHONPATH=/usr/local/lib/python2.1
export PYTHONHOME=/usr/local/lib/python2.1

Hmmm, I don't need these.


7) copy all shared objects from $PYTHONPATH/lib-dynload to
$PYTHONPATH/lib/python2.1 (as you know ... there is a curious
faulr ...)

I didn't need to do this. I think this is necessary only if the Env
Vars are defined in (6)



8) Have fun with Python :)

Armin

Now I can. Thanks Armin!

9) copy Tools and Demo to /usr/local/lib:

(cd /Python-2.1.1; tar -c Tools) | (cd /usr/local/lib/python2.1; tar -vx)
(cd /Python-2.1.1; tar -c Demo) | (cd /usr/local/lib/python2.1; tar -vx)

10) Create a link in /usr/local/bin to idle.py:

cd /usr/local/bin
ln -s /usr/local/lib/python2.1/Tools/idle/idle.py idle.py

11) And now the kluge (I don't know the "right" fix)

After
import sys
Add the following line:
sys.path.append('/usr/local/lib/python2.1/Tools')
before:
import IdleConf

Enjoy Python/Tk GUI development (the debugger work too!),
-david

Armin

Re: Porting of Python 2.1.1 to QNX6.1 solved ...

Post by Armin » Mon Oct 15, 2001 10:34 am

David S. Alessio wrote:
A few notes on compiling for Tkinter support:

Thanks for your hints. Tcl/Tk works only stable without thread and
dll suport ... so it must be
statically linked to python. It's a pitty because it increases the size
of python.

Armin

----- Original Message -----
From: "David Alessio" <david.alessio@hsa.hitachi.com
Newsgroups: qdn.public.qnxrtp.porting
Sent: Friday, October 12, 2001 9:48 PM
Subject: Re: Porting of Python 2.1.1 to QNX6.1 solved ...


Hello,

I don't know exactly what the problem was, but if I adjust Armin's
procedure, it works for me. I even have Tkinter working (on 8.3.2) with
most of Guido's and Matt's demos.

Now if we can only get XPhoton fixed, it'd stay up longer...

Cheers,
-david



David Alessio wrote:

This compiles and Python comes up, but
import math
fails with a SIGSEGV three calls into libc from dlopen("math.so",
RTLD_NOW) in dynload_shlib.c

Does anyone else have this problem? Any ideas?

Thanks,
david

Armin Steinhoff wrote:

Hi all,

the port of Python 2.1.1 can to be done with the following steps:

1) install the Python archive at /
then do the export cmds: export PYTHONPATH=/Python-2.1.1 ,
export PYTHONHOME=/Python-2.1.1


2) copy all *.py files from /Python-2.1.1/Lib to
/Python-2.1.1/lib/python2.1
(there is a curious fault in the UNIX distribution..)

Don't do the copy, instead, use a link:

2) cd /Python-2.1.1
mkdir lib
ln -s /Python-2.1.1/Lib lib/python2.1



2.5) edit Modules/Setup and uncomment the lines for _tkinter and its libs.
Change the tk and tcl lib version to 8.3 (of course you must have installed
tcl and tk).
from line 300 in Setup:

# *** Always uncomment this (leave the leading underscore in!):
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
-L/usr/local/lib \
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
-I/usr/local/include \
# *** Uncomment and edit to reflect where your X11 header files are:
-I/usr/X11R6/include \
# *** Or uncomment this for Solaris:
# -I/usr/openwin/include \
# *** Uncomment and edit for Tix extension only:
# -DWITH_TIX -ltix8.1.8.2 \
# *** Uncomment and edit for BLT extension only:
# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
# *** Uncomment and edit for PIL (TkImaging) extension only:
# (See http://www.pythonware.com/products/pil/ for more info)
# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
# *** Uncomment and edit for TOGL extension only:
# -DWITH_TOGL togl.c \
# *** Uncomment and edit to reflect your Tcl/Tk versions:
-ltk8.3 -ltcl8.3 \
# *** Uncomment and edit to reflect where your X11 libraries are:
-L/usr/X11R6/lib \
# *** Or uncomment this for Solaris:
# -L/usr/openwin/lib \
# *** Uncomment these for TOGL extension only:
# -lGL -lGLU -lXext -lXmu \
# *** Uncomment for AIX:
# -lld \
# *** Always uncomment this; X11 libraries to link with:
-lX11


3) configure: CC=qcc LDFLAGS=-Wl,-E CCSHARED="-shared -fPIC"
CFLAGSFORSHARED="-shared -fPIC" LDSHARED="qcc -shared"
BLDSHARED="qcc -shared" ./configure --with-threads
(in ONE cmd line ..)

4) make


4.5) You will now have a directory something like this:
/Python-2.1.1/build/lib.qnx-6.1.0-x86pc-2.1
Create a link Lib/lib-dynload that points to this directory:
ln -s /Python-2.1.1/build/lib.qnx-6.1.0-x86pc-2.1 Lib/lib-dynload

5) make install


6) export cmds: export PYTHONPATH=/usr/local/lib/python2.1
export PYTHONHOME=/usr/local/lib/python2.1

Hmmm, I don't need these.

7) copy all shared objects from $PYTHONPATH/lib-dynload to
$PYTHONPATH/lib/python2.1 (as you know ... there is a curious
faulr ...)

I didn't need to do this. I think this is necessary only if the Env
Vars are defined in (6)


8) Have fun with Python :)

Armin

Now I can. Thanks Armin!




9) copy Tools and Demo to /usr/local/lib:

(cd /Python-2.1.1; tar -c Tools) | (cd /usr/local/lib/python2.1; tar -vx)
(cd /Python-2.1.1; tar -c Demo) | (cd /usr/local/lib/python2.1; tar -vx)

10) Create a link in /usr/local/bin to idle.py:

cd /usr/local/bin
ln -s /usr/local/lib/python2.1/Tools/idle/idle.py idle.py

11) And now the kluge (I don't know the "right" fix)

After
import sys
Add the following line:
sys.path.append('/usr/local/lib/python2.1/Tools')
before:
import IdleConf

Enjoy Python/Tk GUI development (the debugger work too!),
-david


David Alessio

Re: Porting of Python 2.1.1 to QNX6.1 solved ...

Post by David Alessio » Mon Oct 15, 2001 8:33 pm

Armin wrote:
David S. Alessio wrote:

A few notes on compiling for Tkinter support:

Thanks for your hints. Tcl/Tk works only stable without thread and
dll suport ... so it must be
statically linked to python. It's a pitty because it increases the
size of python.
I enabled thread support and have TCL/Tk linked dynamically
(_tkinter.so).
I have yet to see any instability with Tk. Do you have any example
crash scenarios?

-david

Armin

Re: Porting of Python 2.1.1 to QNX6.1 solved ...

Post by Armin » Wed Oct 17, 2001 10:38 am

David Alessio wrote:
Armin wrote:

David S. Alessio wrote:


A few notes on compiling for Tkinter support:


Thanks for your hints. Tcl/Tk works only stable without thread and
dll suport ... so it must be
statically linked to python. It's a pitty because it increases the
size of python.


I enabled thread support and have TCL/Tk linked dynamically
(_tkinter.so).
I have yet to see any instability with Tk. Do you have any example
crash scenarios?
There is an advice in the TCL/TK readme files not to use threads.

If you like some suprises ... build a dll and threaded version of
TCL/TK and run the test script :)

Armin

-david

Post Reply

Return to “qdn.public.qnxrtp.porting”