Title: ld: library not found for -lpython3.3m because of wrong LDFLAGS_PYTHON
Type: Stage: resolved
Components: Build, macOS Versions: Python 3.2, Python 3.3
Status: closed Resolution: duplicate
Dependencies: Superseder: OS X framework builds do not create ABI-suffixed libpython3.x
View: 14197
Assigned To: ned.deily Nosy List: Jerry.Jacobs, hynek, ned.deily, ronaldoussoren
Priority: normal Keywords:

Created on 2012-07-14 20:30 by Jerry.Jacobs, last changed 2012-07-24 11:00 by ned.deily. This issue is now closed.

Messages (2)
msg165469 - (view) Author: Jerry Jacobs (Jerry.Jacobs) Date: 2012-07-14 20:30
Dear all,

I'm using python in a application ( and want to ship it as a framework with a .app folder. 

I'm building python-3.3b1 from source to a .framework. It is correctly compiled and installed in the given directory. Only the python-3.3.pc is incorrect because it has not the name python-3.3m.pc and includes the following library entries: Libs: -L${libdir} -lpython3.3m

So this results in:
ld: library not found for -lpython3.3m
because of the deployment of the wrong .pc Libs directive:
127:CPPFLAGS_PYTHON = -I/Users/jerry/Sigrok/Python.framework/Versions/3.3/include/python3.3m -I/Users/jerry/Sigrok/Python.framework/Versions/3.3/include/python3.3m
159:LDFLAGS_PYTHON = -L/Users/jerry/Sigrok/Python.framework/Versions/3.3/lib/python3.3/config-3.3m -ldl -framework CoreFoundation -lpython3.3m -framework CoreFoundation Python.framework/Versions/3.3/Python
187:PYTHON3_CONFIG = python3.3m-config

Kind regards,
msg166276 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2012-07-24 11:00
Thanks for the report.  The python-3.3.pc file is correct.  It is a symlink to the python-3.3m.pc.  What isn't correct is that OS X framework builds were not creating the proper libpython3.3m.{dylib,a} symlinks for use with python3.x-config and with pkg-config (if installed).  The fixes applied for Issue14197 (for release in 3.2.4 and 3.3.0b2) correct that and ensure that python-3.x-conifg --ldflags returns a useful value.
Date User Action Args
2012-07-24 11:00:15ned.deilysetstatus: open -> closed

superseder: OS X framework builds do not create ABI-suffixed libpython3.x
components: + Build
versions: + Python 3.2
messages: + msg166276
type: compile error ->
resolution: duplicate
stage: resolved
2012-07-14 20:47:48ned.deilysetassignee: ronaldoussoren -> ned.deily
2012-07-14 20:31:24pitrousetnosy: + ned.deily, hynek
2012-07-14 20:30:30Jerry.Jacobscreate