This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Missing notice on environment setting LD_LIBRARY_PATH
Type: Stage:
Components: Documentation Versions: Python 2.5
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: ahatzis, loewis
Priority: normal Keywords:

Created on 2006-10-12 09:42 by ahatzis, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg30213 - (view) Author: Anastasios Hatzis (ahatzis) Date: 2006-10-12 09:42
Probably it would be a good idea to provide Linux noobs
like me a short notice in the README that
LD_LIBRARY_PATH needs to be set. It was time-consuming
to find out what caused problems with my installation
although the build process went fine.

I don't know if this is really only necessary if Python
is built from source with the "--enable-shared" option.
If yes, a short notice in this paragraph would be fine:

<snip>
Building a shared libpython
---------------------------

Starting with Python 2.3, the majority of the
interpreter can be built
into a shared library, which can then be used by the
interpreter
executable, and by applications embedding Python. To
enable this feature,
configure with --enable-shared.

If you enable this feature, the same object files will
be used to create
a static library.  In particular, the static library
will contain object
files using position-independent code (PIC) on
platforms where PIC flags
are needed for the shared library.
</snip>

Otherwise, if the setting is necessary whether
"--enable-shared" is turned on or off, a good place
would be right after the "make install" explanations.

Again, this is a Linux rookie issue. But if I want to
install the most recent Python version I can't take any
ready-to-use RPM, so I have to build from sources and
will run into these problems the first time.
msg30214 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-10-14 20:13
Logged In: YES 
user_id=21627

Yes, setting LD_LIBRARY_PATH may be necessary only when
compiling with --enable-shared. However, it is not mandatory
in this case:
1. if you put the target directory into /etc/ld.so.conf, and
run ldconfig, setting LD_LIBRARY_PATH is not necessary.
2. if you set LD_RUN_PATH during compilation, setting
LD_LIBRARY_PATH is not necessary during run-time.

All of this "standard" Unix know-how; it is better explained
in a Linux book than in the Python README.

Indeed, setting LD_LIBRARY_PATH is bad practice, so the
README should not recommend it.

My recommendation is to not build with --enable-shared at
all. I doubt it has any advantages in your case, but has
disadvantages (as you found).

Closing this as "won't fix".
History
Date User Action Args
2022-04-11 14:56:20adminsetgithub: 44116
2006-10-12 09:42:19ahatziscreate