diff options
author | Guido van Rossum <guido@python.org> | 1996-11-13 15:06:24 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-11-13 15:06:24 (GMT) |
commit | caa83c4b9e5d8920cccf5f14a17ddcfa5a60e634 (patch) | |
tree | 6e94722f61f699a3965dffdcd5a0d5c01956ec1d /Misc | |
parent | 3508d60f99f91a81c0e903d8db16eb7fe69a8388 (diff) | |
download | cpython-caa83c4b9e5d8920cccf5f14a17ddcfa5a60e634.zip cpython-caa83c4b9e5d8920cccf5f14a17ddcfa5a60e634.tar.gz cpython-caa83c4b9e5d8920cccf5f14a17ddcfa5a60e634.tar.bz2 |
Added Q. about enabling *shared* on Linux.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/FAQ | 49 |
1 files changed, 29 insertions, 20 deletions
@@ -106,17 +106,18 @@ Here's an overview of the questions per chapter: 3.10. Q. Other trouble building Python on platform X. 3.11. Q. How to configure dynamic loading on Linux. 3.12. Q: I can't get shared modules to work on Linux 2.0 (Slackware96)? - 3.13. Q. How to use threads on Linux. - 3.14. Q. Errors when linking with a shared library containing C++ code. - 3.15. Q. I built with tkintermodule.c enabled but get "Tkinter not found". - 3.16. Q. I built with Tk 4.0 but Tkinter complains about the Tk version. - 3.17. Q. Link errors for Tcl/Tk symbols when linking with Tcl/Tk. - 3.18. Q. I configured and built Python for Tcl/Tk but "import Tkinter" + 3.13. Q: Trouble when making modules shared on Linux. + 3.14. Q. How to use threads on Linux. + 3.15. Q. Errors when linking with a shared library containing C++ code. + 3.16. Q. I built with tkintermodule.c enabled but get "Tkinter not found". + 3.17. Q. I built with Tk 4.0 but Tkinter complains about the Tk version. + 3.18. Q. Link errors for Tcl/Tk symbols when linking with Tcl/Tk. + 3.19. Q. I configured and built Python for Tcl/Tk but "import Tkinter" fails. - 3.19. Q. Tk doesn't work right on DEC Alpha. - 3.20. Q. Several common system calls are missing from the posix module. - 3.21. Q. ImportError: No module named string, on MS Windows. - 3.22. Q. Core dump on SGI when using the gl module. + 3.20. Q. Tk doesn't work right on DEC Alpha. + 3.21. Q. Several common system calls are missing from the posix module. + 3.22. Q. ImportError: No module named string, on MS Windows. + 3.23. Q. Core dump on SGI when using the gl module. 4. Programming in Python 4.1. Q. Is there a source code level debugger with breakpoints, step, @@ -789,7 +790,15 @@ so that the following links are setup: /lib/libdl.so -> /lib/libdl.so.1 /lib/libdl.so.1 -> /lib/libdl.so.1.7.14 -3.13. Q. How to use threads on Linux. +3.13. Q: Trouble when making modules shared on Linux. + +A. This happens when you have built Python for static linking and then +enable *shared* in the Setup file. Shared library code must be +compiled with "-fpic". If a .o file for the module already exist that +was compiled for static linking, you must remove it or do "make clean" +in the Modules directory. + +3.14. Q. How to use threads on Linux. A. [Greg Stein] I built myself a libpthreads.so from the libc.5.3.12 distribution (the binary distribution doesn't have pthreads in @@ -802,13 +811,13 @@ other thread packages. Prior libc versions didn't integrate well with threads, either, so I couldn't use them (e.g. sleep() blocked all threads :-( ). -3.14. Q. Errors when linking with a shared library containing C++ code. +3.15. Q. Errors when linking with a shared library containing C++ code. A. Link the main Python binary with C++. Change the definition of LINKCC in Modules/Makefile to be your C++ compiler. You may have to edit config.c slightly to make it compilable with C++. -3.15. Q. I built with tkintermodule.c enabled but get "Tkinter not found". +3.16. Q. I built with tkintermodule.c enabled but get "Tkinter not found". A. Tkinter.py (note: upper case T) lives in a subdirectory of Lib, Lib/tkinter. If you are using the default module search path, you @@ -816,7 +825,7 @@ probably didn't enable the line in the Modules/Setup file defining TKPATH; if you use the environment variable PYTHONPATH, you'll have to add the proper tkinter subdirectory. -3.16. Q. I built with Tk 4.0 but Tkinter complains about the Tk version. +3.17. Q. I built with Tk 4.0 but Tkinter complains about the Tk version. A. Several things could cause this. You most likely have a Tk 3.6 installation that wasn't completely eradicated by the Tk 4.0 @@ -827,7 +836,7 @@ have compiled Python with the old tk.h header file (yes, this actually compiles!); you may actually have linked with Tk 3.6 even though Tk 4.0 is also around. Similar for Tcl 7.4 vs. Tcl 7.3. -3.17. Q. Link errors for Tcl/Tk symbols when linking with Tcl/Tk. +3.18. Q. Link errors for Tcl/Tk symbols when linking with Tcl/Tk. Quite possibly, there's a version mismatch between the Tcl/Tk header files (tcl.h and tk.h) and the tck/tk libraries you are using (the @@ -838,13 +847,13 @@ Setup line for _tkinter in some Python distributions references 7.4/4.0 by default. Changing this to 7.5/4.1 should take care of this. -3.18. Q. I configured and built Python for Tcl/Tk but "import Tkinter" +3.19. Q. I configured and built Python for Tcl/Tk but "import Tkinter" fails. A. Most likely, you forgot to enable the line in Setup that says "TKPATH=:$(DESTLIB)/tkinter". -3.19. Q. Tk doesn't work right on DEC Alpha. +3.20. Q. Tk doesn't work right on DEC Alpha. A. You probably compiled either Tcl, Tk or Python with gcc. Don't. For this platform, which has 64-bit integers, gcc is known to generate @@ -856,7 +865,7 @@ far as we know, there are no problem with gcc on other platforms -- the instabilities seem to be restricted to the DEC Alpha.) See also question 3.6. -3.20. Q. Several common system calls are missing from the posix module. +3.21. Q. Several common system calls are missing from the posix module. A. Most likely, *all* test compilations run by the configure script are failing for some reason or another. Have a look in config.log to @@ -864,7 +873,7 @@ see what could be the reason. A common reason is specifying a directory to the --with-readline option that doesn't contain the libreadline.a file. -3.21. Q. ImportError: No module named string, on MS Windows. +3.22. Q. ImportError: No module named string, on MS Windows. A. Most likely, your PYTHONPATH environment variable should be set to something like: @@ -873,7 +882,7 @@ set PYTHONPATH=c:\python;c:\python\lib;c:\python\scripts (assuming Python was installed in c:\python) -3.22. Q. Core dump on SGI when using the gl module. +3.23. Q. Core dump on SGI when using the gl module. There are conflicts between entry points in the termcap and curses libraries and an entry point in the GL library. There's a hack of a |