[New-bugs-announce] [issue4472] Is shared lib building broken on trunk?

Skip Montanaro report at bugs.python.org
Sun Nov 30 17:37:55 CET 2008

New submission from Skip Montanaro <skip at pobox.com>:

I have tried several different combinations of configure args on my Mac in
the past couple days in a so far fruitless attempt to generate a
libpython.2.7.dylib file.  All it will ever generate is a .a file.  I've
come to the conclusion that building a shared Python library is broken, at
least on Macs.  I only even noticed this because I wanted to bundle up a
trivial little Python script as a Mac app build.  py2app requires a dylib
file to generate the app bundle (to include?).

I build in separate build directories so I can have normal, debug and
framework builds.  Here's the configure command from my framework build:

    ../configure --prefix=/Users/skip/local --enable-shared \
        '--enable-framework=/Users/skip/Applications' \
        'CPPFLAGS=-I/Users/skip/local/include -I/opt/local/include' \
        'LDFLAGS=-L/Users/skip/local/lib -L/opt/local/lib'

I've tried taking out the --prefix and/or --enable-shared flags thinking
maybe the --enable-framework flag was sufficient.  I've tried making the
sharedinstall target.  I never see anything like -fPIC or -fpic in the gcc
command line args.  In fact, I don't see "dylib" or "pic" mentioned in the
Makefile at all.

I gave up building in a subdirectory then whittled the configure command
down to this:

    ./configure --prefix=/Users/skip/local --enable-shared \

make clean.  make.  Still no libpython.2.7.dylib file.


messages: 76642
nosy: skip.montanaro
severity: normal
status: open
title: Is shared lib building broken on trunk?

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list