[MacPorts] #21824: python26 framework broken
MacPorts
noreply at macports.org
Sun Oct 4 11:49:33 PDT 2009
#21824: python26 framework broken
--------------------------------+-------------------------------------------
Reporter: stromnov@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 1.8.1
Keywords: | Port: python26
--------------------------------+-------------------------------------------
python2.6 framework broken in macports
{{{man ld}}}
{{{
-framework name[,suffix]
This option tells the linker to search for
`name.framework/name' the framework search path. If the
optional suffix is specified the framework is first searched
for the name with the suffix and then
without (e.g. look for `name.framework/name_suffix' first, if
not there try `name.framework/name').
}}}
If we want to link with something like -framework Python, we need
${prefix}/Library/Framework/Python.framework/Python in ours paths
{{{
stromnov at stromnov:~$ ls -la
/System/Library/Frameworks/Python.framework/Python
lrwxr-xr-x 1 root wheel 23 Oct 2 23:59
/System/Library/Frameworks/Python.framework/Python ->
Versions/Current/Python
stromnov at stromnov:~$ ls -la
/opt/local/Library/Frameworks/Python.framework/Python
ls: /opt/local/Library/Frameworks/Python.framework/Python: No such file or
directory
}}}
{{{cat test.c}}}
{{{
#include <Python.h>
int main(const int argc, const char *argv[]) {
Py_Initialize();
Py_Finalize();
return 0;
}
}}}
Trying to compile with default paths turned off (-Z):
{{{
stromnov at stromnov:~$ gcc -Z -F/opt/local/Library/Frameworks
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
-framework Python test.c
ld: framework not found Python
collect2: ld returned 1 exit status
}}}
Explicitly create proper framework link:
{{{
stromnov at stromnov:~$ (cd /opt/local/Library/Frameworks/Python.framework/;
sudo ln -s Versions/2.6/Python Python)
}}}
Compiling:
{{{
stromnov at stromnov:~$ gcc -Z -F/opt/local/Library/Frameworks
-I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
-framework Python test.c
stromnov at stromnov:~$
}}}
--
Ticket URL: <http://trac.macports.org/ticket/21824>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list