Preparing sqlite, dl and tkinter for Python installation (no admin rights)

James Jong ribonucleico at gmail.com
Thu Apr 18 12:24:42 EDT 2013


Thanks Jason. I have pinpointed the location of the error to a very
specific gcc line. I am reproducing the error below (very easy to read):

I run:

==================================================================
export CPPFLAGS='-I/opt/sqlite-3.7.16.2/include -I/opt/tk8.6.0/include
 -I/opt/tcl8.6.0/include/'

export LDFLAGS='-L/opt/sqlite-3.7.16.2/lib -L/opt/tk8.6.0/lib/
 -L/opt/tcl8.6.0/lib/  ./configure --prefix=/path_to_python-2.7.4
--enable-shared
==================================================================

and then I run make and I got  the following:

==================================================================
....
building '_tkinter' extension

gcc -pthread -fPIC -fno-strict-aliasing
-g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DWITH_APPINIT=1
-I/usr/X11/include -I. -IInclude -I./Include
-I/opt/sqlite/sqlite-3.7.16.2/include -I/opt/tk8.6.0/include
-I/opt/tcl8.6.0/include -I/usr/local/include
-I/opt/python/src/Python-2.7.4/Include -I/opt/python/src/Python-2.7.4 -c
/opt/python/src/Python-2.7.4/Modules/_tkinter.c -o
build/temp.linux-x86_64-2.7/opt/python/src/Python-2.7.4/Modules/_tkinter.o

gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3
-Wall -Wstrict-prototypes -DWITH_APPINIT=1 -I/usr/X11/include -I. -IInclude
-I./Include -I/opt/sqlite/sqlite-3.7.16.2/include -I/opt/tk8.6.0/include
-I/opt/tcl8.6.0/include -I/usr/local/include
-I/opt/python/src/Python-2.7.4/Include -I/opt/python/src/Python-2.7.4 -c
/opt/python/src/Python-2.7.4/Modules/tkappinit.c -o
build/temp.linux-x86_64-2.7/opt/python/src/Python-2.7.4/Modules/tkappinit.o

gcc -pthread -shared -L/opt/sqlite/sqlite-3.7.16.2/lib
-L/opt/tk8.6.0/lib/ -L/opt/tcl8.6.0/lib/ -L/opt/sqlite/sqlite-3.7.16.2/lib
-L/opt/tk8.6.0/lib/ -L/opt/tcl8.6.0/lib/ -I. -IInclude -I./Include
-I/opt/sqlite/sqlite-3.7.16.2/include -I/opt/tk8.6.0/include
-I/opt/tcl8.6.0/include
build/temp.linux-x86_64-2.7/opt/python/src/Python-2.7.4/Modules/_tkinter.o
build/temp.linux-x86_64-2.7/opt/python/src/Python-2.7.4/Modules/tkappinit.o
-L/usr/X11/lib -L/opt/sqlite/sqlite-3.7.16.2/lib -L/opt/tk8.6.0/lib/
-L/opt/tcl8.6.0/lib/ -L/usr/local/lib -L. -ltk8.6 -ltcl8.6 -lX11
-lpython2.7 -o build/lib.linux-x86_64-2.7/_tkinter.so

*** WARNING: renaming "_tkinter" since importing it failed: libtk8.6.so:
cannot open shared object file: No such file or directory
...
==================================================================

The odd thing is that I can see `libtk8.6.so` under /opt/tcl8.6.0/lib,  as
I specified with `LDFLAGS`:

==================================================================
cd /opt/tcl8.6.0/lib
ls
.
../
pkgconfig
tk8.6
libtkstub8.6.a
tkConfig.sh
libtk8.6.so
==================================================================

The file libtk8.6.so  has 1.5M and is definitely there.

So why did that compilation fail?

James



On Thu, Apr 18, 2013 at 11:05 AM, Jason Swails <jason.swails at gmail.com>wrote:

>
>
>
> On Thu, Apr 18, 2013 at 10:37 AM, James Jong <ribonucleico at gmail.com>wrote:
>
>> Thanks so much Chris. This is part of a super computer and I am afraid I
>> don't have access to a machine with sudo permissions and similar
>> architecture & OS.
>>
>> Is there any way to active higher level of verbosity during the build
>> process to identify what is failing? Or anything specifically I should
>> watch for?
>>
>
> Most supercomputers I'm familiar with have some variant of Linux running
> (e.g., SUSE or Red Hat are quite common).  Some of these machines only have
> barebone kernels on the compute nodes, though, and have a fully-fledged
> Linux OS only on the login nodes... This info is typically on the website
> for that supercomputer (if it has one), or any other available
> documentation.
>
> That said, there are other options available that are probably less of a
> hassle for you:
>
> 1) Skip tkinter unless you _know_ you really need it.  Do you plan on
> doing X-forwarding when you log in?  Can you run the GUI app on your local
> machine before uploading the files you need for computation?  Running GUIs
> locally rather than over the network is typically much faster, anyway.
>
> 2) Submit a ticket to the supercomputer staff requesting that they install
> the software you need.  There may be other 'gotchas' associated with
> installing certain software on supercomputers that the staff would know
> best.
>
> Good luck,
> Jason
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130418/2607c64d/attachment.html>


More information about the Python-list mailing list