python / cpython

The Python programming language
https://www.python.org
Other
62.16k stars 29.88k forks source link

Build Python 2.3.3 or 4 on RedHat Enterprise fails #40339

Closed e9d15def-f70a-44ca-b367-05ca61ceb40a closed 20 years ago

e9d15def-f70a-44ca-b367-05ca61ceb40a commented 20 years ago
BPO 965991
Files
  • Setup: Setup used for 2nd set of tests (custom tcl/tk)
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields: ```python assignee = None closed_at = created_at = labels = ['build'] title = 'Build Python 2.3.3 or 4 on RedHat Enterprise fails' updated_at = user = 'https://bugs.python.org/reowen' ``` bugs.python.org fields: ```python activity = actor = 'anthonybaxter' assignee = 'none' closed = True closed_date = None closer = None components = ['Build'] creation = creator = 'reowen' dependencies = [] files = ['1293'] hgrepos = [] issue_num = 965991 keywords = [] message_count = 3.0 messages = ['21009', '21010', '21011'] nosy_count = 2.0 nosy_names = ['anthonybaxter', 'reowen'] pr_nums = [] priority = 'normal' resolution = 'rejected' stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue965991' versions = [] ```

    e9d15def-f70a-44ca-b367-05ca61ceb40a commented 20 years ago

    We recently upgraded from RH 9 to RH Enterprise 3. In detail: cat /etc/issue Red Hat Enterprise Linux WS release 3 (Taroon Update 2) cat /proc/version Linux version 2.4.21-15.EL (bhcompile@daffy.perf.redhat.com) (gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-34)) #1 Thu Apr 22 00:26:34 EDT 2004

    I then tried to build a Python 2.3.3 from source for installation in /net/python. ./configure --prefix=/net/python --enable-unicode=ucs4 make

    the result is a python with no Tkinter. Looking at the output of ./configure I see: checking for UCS-4 tcl... no

    The following all result in the same problem: Omitting --enable-unicode=ucs4 Using --enable-unicode=ucs2 All the same but with Python 2.3.4.

    So...I tried a 2nd class of tests (both with Python 2.3.3 and 2.3.4, same bad result each time):

    I built my own Tcl/Tk using --prefix=/net/python (which went fine). I then edited Modules/Setup so that Python uses that. This time the make fails with: Modules/posixmodule.c:5788: the use of tempnam' is dangerous, better usemkstemp' case $MAKEFLAGS in \ -s) CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py -q build;; \ *) CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-DNDEBUG -g -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py build;; \ esac ./python: error while loading shared libraries: libtk8.4.so: cannot open shared object file: No such file or directory make: *** [sharedmods] Error 127 [rowen@apollo Python-2.3.3]$ ls -l /net/python

    I have attached the Setup I used for that 2nd class of tests.

    e9d15def-f70a-44ca-b367-05ca61ceb40a commented 20 years ago

    Logged In: YES user_id=431773

    False alarm, more or less.

    Problem #1 was caused by an incomplete installation of RH Enterprise (missing tcl.h and tk.h, at least). Totally my problem, no argument.

    Problem #2 is a bit more subtle. When I setenv LD_LIBRARY_PATH /net/ python/lib then everything built correctly. However, I still am puzzled about two things:

    Maybe any unix maven would already know that, but I'm certainly not a unix maven and I can't be the only person struggling with things like this.

    1a90d5ba-e091-4ed6-a644-41c5568983da commented 20 years ago

    Logged In: YES user_id=29957

    The other approaches you could try:

    Add the appropriate directory to your /etc/ld.so.conf Add a -R/net/python/lib to the options to LD.

    Closing as not-a-bug, since you seemed to have fixed the problem. The problem sounds like you didn't have the tcl/tk -devel packages installed.