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.

Title: Add FreeBSD* to for --enable-shared
Type: Stage:
Components: Build Versions: Python 2.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: hyeshik.chang Nosy List: hyeshik.chang, jiwon, jwpye, loewis
Priority: high Keywords: patch

Created on 2004-10-11 07:40 by jwpye, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
addfreebsd jwpye, 2004-10-11 07:40 patch
Messages (13)
msg47054 - (view) Author: James William Pye (jwpye) Date: 2004-10-11 07:40
Add FreeBSD to the same class as Linux, GNU, and NetBSD
so that the shared library will be built and installed
on FreeBSD systems when --enabled-shared is specified.

I didn't regenerate the configure script as I wasn't
sure what version of autoconf would be desired. I'll
leave that up to the committer, if accepted.
msg47055 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-10-19 20:25
Logged In: YES 

Looks good to me.
msg47056 - (view) Author: Jiwon Seo (jiwon) * Date: 2004-10-21 05:27
Logged In: YES 

Adding a patch that fixes configure (and Used 
autoconf2.59 as is specified in previous configure script.

Patch is at
msg47057 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2004-10-21 07:58
Logged In: YES 

FreeBSD port (their packaging system) already has
a scheme for shared library.

It would be good if Python's setting become simliar
to FreeBSD port's.
msg47058 - (view) Author: Jiwon Seo (jiwon) * Date: 2004-10-21 12:24
Logged In: YES 

Here's a patch conforming to FreeBSD port scheme. (I think)
However, for "ac_cv_pthread_system_supported" problem, I
think it's better patched in port system, isn't it?
msg47059 - (view) Author: James William Pye (jwpye) Date: 2004-10-21 13:49
Logged In: YES 

This might be a question for the port maintainer, but what's
the point of cutting the .0 off the SOVERSION? Having it
there hasn't caused any trouble for my CVS build(yet?)..
msg47060 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2004-10-21 15:07
Logged In: YES 

For jiwon's patch:

You don't need to post a patch to configure, only is enough.  For line 1347,1354, I think we
don't need to keep using not $CC but 'cc' as linker on
OpenBSD.  AFAIK, OpenBSD uses gcc as their compiler set and
there're no alternatives available.  So, it'll not need to
have a special case for OpenBSD.

And, ac_cv_pthread_system_supported stuff is to fix Python's
pthread scope behavior that is not appropriate on FreeBSD.
(In FreeBSD, system scope threads are very expensive than
process scope threads and the former has lots of limitations
on resource usages.)  I think it can go into Python src as a
ifdef'ed block, I will post a patch in a new bug item soon.

To jwpye:

FreeBSD's runtime linker system can't handle so versions
with dot(s).  You can link againt shared objects with dotted
so versions if you explicitly specified rpath on linking. 
But -lpython2.3.1.0 may not be found by ldconfig(1) nor ld
Hence, it tends to make KDE and/or GNOME applications using
python difficult to compile.
msg47061 - (view) Author: Jiwon Seo (jiwon) * Date: 2004-10-21 15:37
Logged In: YES 

Here's the patch reflection  your suggestion.
msg47062 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-10-21 18:31
Logged In: YES 

perky, I fail to understand your comment on versioning. It
appears to suggest that the patch attached to this report
does not work. However, if it doesn't work, I'm surprised
that jwpye suggested it in the first place.

Anyway, assigning the entire issue to you for resolution.
msg47063 - (view) Author: James William Pye (jwpye) Date: 2004-10-22 01:08
Logged In: YES 

I understand now:

flaw@void:~ % sudo ldconfig /usr/lib /usr/local/lib
/usr/X11R6/lib /usr/dev/lib
flaw@void:~ % ldconfig -r | grep 'python'
        342:-lpython2.3.1 => /usr/local/lib/

/usr/dev/lib has and

flaw@void:~ % cd /usr/dev/lib
flaw@void:/usr/dev/lib % sudo ln -s
flaw@void:/usr/dev/lib % sudo ln -sf
flaw@void:/usr/dev/lib % l
lrwxr-xr-x  1 root  wheel  - 17B Oct 21 18:01 ->
flaw@void:/usr/dev/lib % l
lrwxr-xr-x  1 root  wheel  - 19B Oct 21 18:01 ->
flaw@void:/usr/dev/lib % sudo ldconfig /usr/lib
/usr/local/lib /usr/X11R6/lib /usr/dev/lib
flaw@void:/usr/dev/lib % ldconfig -r | grep 'python'
        342:-lpython2.3.1 => /usr/local/lib/
        625:-lpython2.4.1 => /usr/dev/lib/

Although, it doesn't appear to be "fatal". A ld
-L/usr/dev/lib -lpython2.4 will work fine, either way.
msg47064 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2004-10-26 06:21
Logged In: YES 

Sorry for late reply, jwpye.

Whether ldconfig(1) can catch a shared library or not can be
not so important if all applications detect by trying
linkings with explicit path or -L option.  But, even FreeBSD
ports uses ldconfig(1) to track dependency and ports
prohibits installing shared libraries with dotted versions.
(you can define NO_FILTER_SHLIBS=yes to avoid the rule.)

In fact, FreeBSD developers are discussing internally about
allowing lib*.so.major.minor versions for base shared
libraries like libc. But Python tends to keep perfect ABI
compatibility within branches and shared library major
versions are virtually useless for Python. So, I think we
can use just ".1" in FreeBSD anyways.
msg47065 - (view) Author: James William Pye (jwpye) Date: 2004-10-26 07:03
Logged In: YES 

Okay. Thanks for handling and explaining this, perky, as it
is a rather important aspect that I had obviously missed.
msg47066 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2004-10-26 09:55
Logged In: YES 


Just checked it in: 1.473
configure 1.460
Misc/NEWS 1.1178
Date User Action Args
2022-04-11 14:56:07adminsetgithub: 41003
2004-10-11 07:40:40jwpyecreate