473,320 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to statically link Python with ncurses and readline?

Hi
I'm trying to build a Python package that I can use on different Linux
setups, for this purpose it would be nice to weld external dependencies
(libraries) into Python itself. So far I've succeeded in getting Tcl/Tk
statically linked in, with the help of Modules/Setup.local, but the
same procedure for ncurses and readline results in python being
dynamically linked with these two libraries?? That is, there are no
longer any readline.so or _curses.so in lib-dynload, but instead they
are added to Python's shared library dependencies. Any clue as to
what's going on here would be much appreciated.

Arve

Oct 25 '05 #1
5 3268
ar**********@gmail.com wrote:
That is, there are no longer any readline.so or _curses.so in lib-dynload,
but instead they are added to Python's shared library dependencies.
What is "they" in that sentence? readline.so and _curses.so? I very much
doubt that - more likely, libreadline.so and libncurses.so are in
the dependencies
Any clue as to what's going on here would be much appreciated.


Instead of linking with -lncurses, link explicitly with
/usr/lib/libncurses.a; or else using -static as a linker flag.

Regards,
Martin
Oct 25 '05 #2
Well, I implied that _curses.so and readline.so disappeared as one
would expect, dependencies on libncurses.so and libreadline.so instead
showing up in Python itself. It's very strange that this happens with
ncurses and readline, when both db and Tcl/Tk got linked in with no
fuss. Anyway, I built static-only (.a) versions of readline and
ncurses, which did the trick.

Arve

Oct 25 '05 #3
ar**********@gmail.com wrote:
Well, I implied that _curses.so and readline.so disappeared as one
would expect, dependencies on libncurses.so and libreadline.so instead
showing up in Python itself. It's very strange that this happens with
ncurses and readline, when both db and Tcl/Tk got linked in with no
fuss. Anyway, I built static-only (.a) versions of readline and
ncurses, which did the trick.


Ah, you didn't *have* static versions of readline and ncurses...
So how should it possibly have linked those libraries statically???

Regards,
Martin
Oct 25 '05 #4
What do you mean? A static-only build does somehow exclude that I had
static libraries before?

Oct 25 '05 #5
ar**********@gmail.com wrote:
What do you mean? A static-only build does somehow exclude that I had
static libraries before?


No, it doesn't. I misunderstood. It is quite unclear still what you had
been doing: e.g. did you have shared versions of db and Tcl or not?
Did you have linker scripts in place? What was your specific command
line you have used to link the entire interpreter?

In the absence of details, we have to take guesses on Usenet. Sometimes,
the guesses are right, and sometimes they are wrong.

Regards,
Martin
Oct 26 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Yuri Pimenov | last post by:
Hello, all. Im trying to build python 2.3.2 on openbsd 3.4. First of all, ./configure complains several times about unability to test sys/select.h, sys/lock.h files: .... checking ncurses.h...
1
by: spanov | last post by:
i've got problem installing python-2.3.5 from sources on FreeBSD 5.3 root@server# ./configure > conf_log configure: WARNING: curses.h: present but cannot be compiled configure: WARNING:...
9
by: David Bear | last post by:
I need python 2.3. I have freebsd 4.10-releng. when configuring python I received the following: ../configure --prefix=/home/webenv > config-results configure: WARNING: curses.h: present but...
3
by: skip | last post by:
I'm having no success building the curses module on Solaris 8 (yes, I know it's ancient - advancing the state-of-the-art is not yet an option) for Python 2.4. Sun provides an apparently ancient...
3
by: Ralph Butler | last post by:
Hi: I have searched the docs and google but have not totally figured out how to accomplish my task: On a linux box, I want to compile and link python so that it uses no shared libraries, but...
14
by: Fabrice DELENTE | last post by:
Hello. I'm trying to display french characters (è -- that's e grave -- or à -- agrave) in python 2.5, with the ncurses wrapper that comes it, and I can't. My locale is set correctly...
4
by: lnatz | last post by:
Hi, I am writing a shell and am using ncurses to recognize key commands like up_arrow(KEY_UP) and down_arrow(KEY_DOWN). In a unix/linux OS the up arrow would give you the last command you input. I...
25
by: lnatz | last post by:
Hi, I am writing a shell(project). I would like to use readline, ncurses and/or history to search history. I want to write a function that would recognize the KEY_UP and KEY_DOWN,and search the...
15
by: John Nagle | last post by:
I've been installing Python and its supporting packages on a dedicated server with Fedora Core 6 for about a day now. This is a standard dedicated rackmount server in a colocation facility,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.