Lists: | pgsql-generalpgsql-hackers |
---|
From: | reiner peterke <zedaardv(at)drizzle(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | unable to build postgres-9.4 in os x 10.9 with python |
Date: | 2014-05-30 16:49:02 |
Message-ID: | D4136124-CA0D-43E2-B734-667787747E60@drizzle.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
Hi,
has anyone else had this issue and does any one know the solution?
Since upgrading my mac from os x 10.8 to 10.9, i can no long build postgres with '--with-python’.
i get the following error.
ld: framework not found Python
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [plpython2.so] Error 1
make[2]: *** [all-plpython-recurse] Error 2
make[1]: *** [all-pl-recurse] Error 2
make: *** [all-src-recurse] Error 2
my full configure command is
configure '--prefix=/usr/local/postgres/9.4' '--with-perl' '--with-python' '--with-libxml' '-with-openssl' '--with-includes=/opt/local/include/' '--with-libraries=/opt/local/lib'
any help would be appreciated.
reiner
From: | Asif Naeem <anaeem(dot)it(at)gmail(dot)com> |
---|---|
To: | reiner peterke <zedaardv(at)drizzle(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: unable to build postgres-9.4 in os x 10.9 with python |
Date: | 2014-05-30 17:25:54 |
Message-ID: | CAEB4t-MoxM1r98rbLV3qJX4zRLNPj8KpiX=Yn1D54HBnzK8DCQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
Hi Reiner,
Latest PG 9.4 source code seems building fine with --with-python option on
my OS X 10.9.3 box i.e.
pc1dotnetpk:inst asif$ find . | grep -i python
> ./lib/plpython2.so
> ./share/extension/plpython2u--1.0.sql
> ./share/extension/plpython2u--unpackaged--1.0.sql
> ./share/extension/plpython2u.control
> ./share/extension/plpythonu--1.0.sql
> ./share/extension/plpythonu--unpackaged--1.0.sql
> ./share/extension/plpythonu.control
> pc1dotnetpk:inst asif$ uname -a
> Darwin pc1dotnetpk.local 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17
> 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
Can you please share config.log and complete make log with failure ?.
Regards,
Muhammad Asif Naeem
On Fri, May 30, 2014 at 9:49 PM, reiner peterke <zedaardv(at)drizzle(dot)com>
wrote:
> Hi,
>
> has anyone else had this issue and does any one know the solution?
>
> Since upgrading my mac from os x 10.8 to 10.9, i can no long build
> postgres with '--with-python’.
>
> i get the following error.
>
> ld: framework not found Python
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make[3]: *** [plpython2.so] Error 1
> make[2]: *** [all-plpython-recurse] Error 2
> make[1]: *** [all-pl-recurse] Error 2
> make: *** [all-src-recurse] Error 2
>
> my full configure command is
>
> configure '--prefix=/usr/local/postgres/9.4' '--with-perl' '--with-python'
> '--with-libxml' '-with-openssl' '--with-includes=/opt/local/include/'
> '--with-libraries=/opt/local/lib'
>
> any help would be appreciated.
>
> reiner
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
From: | Edoardo Panfili <edoardo(at)aspix(dot)it> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: unable to build postgres-9.4 in os x 10.9 with python |
Date: | 2014-05-30 17:56:09 |
Message-ID: | 5388C639.6060105@aspix.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
Il 30/05/14 18:49, reiner peterke ha scritto:
> Hi,
>
> has anyone else had this issue and does any one know the solution?
>
> Since upgrading my mac from os x 10.8 to 10.9, i can no long build postgres with '--with-python’.
>
> i get the following error.
>
> ld: framework not found Python
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> make[3]: *** [plpython2.so] Error 1
> make[2]: *** [all-plpython-recurse] Error 2
> make[1]: *** [all-pl-recurse] Error 2
> make: *** [all-src-recurse] Error 2
>
> my full configure command is
>
> configure '--prefix=/usr/local/postgres/9.4' '--with-perl' '--with-python' '--with-libxml' '-with-openssl' '--with-includes=/opt/local/include/' '--with-libraries=/opt/local/lib'
I did I try with 9.4beta1 and --with-python using OS X 10.9.3
./configure --with-python
all goes well, have you installed the command line tools?
xcode-select --install
I did it to compile uuid (with no success) and postgis (with success).
Edoardo
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Asif Naeem <anaeem(dot)it(at)gmail(dot)com> |
Cc: | reiner peterke <zedaardv(at)drizzle(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [GENERAL] unable to build postgres-9.4 in os x 10.9 with python |
Date: | 2014-05-30 18:52:48 |
Message-ID: | 7540.1401475968@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
Asif Naeem <anaeem(dot)it(at)gmail(dot)com> writes:
> On Fri, May 30, 2014 at 9:49 PM, reiner peterke <zedaardv(at)drizzle(dot)com>
> wrote:
>> Since upgrading my mac from os x 10.8 to 10.9, i can no long build
>> postgres with '--with-python.
> Latest PG 9.4 source code seems building fine with --with-python option on
> my OS X 10.9.3 box i.e.
[ please don't top-post in PG mailing lists ]
I can reproduce the failure as described, not only in 9.4 but the back
branches too; I would've noticed sooner except I don't build plpython
routinely.
It looks to me like Apple broke something in the build toolchain.
If you add -v as suggested, what you see is
$ make PROFILE="-v"
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -v -bundle -multiply_defined suppress -o plpython2.so plpy_cursorobject.o plpy_elog.o plpy_exec.o plpy_main.o plpy_planobject.o plpy_plpymodule.o plpy_procedure.o plpy_resultobject.o plpy_spi.o plpy_subxactobject.o plpy_typeio.o plpy_util.o -L../../../src/port -L../../../src/common -Wl,-dead_strip_dylibs -v -F/System/Library/Frameworks -framework Python -bundle_loader ../../../src/backend/postgres
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.2.0
Thread model: posix
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -dynamic -arch x86_64 -bundle -bundle_loader ../../../src/backend/postgres -macosx_version_min 10.9.0 -multiply_defined suppress -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -o plpython2.so -L../../../src/port -L../../../src/common plpy_cursorobject.o plpy_elog.o plpy_exec.o plpy_main.o plpy_planobject.o plpy_plpymodule.o plpy_procedure.o plpy_resultobject.o plpy_spi.o plpy_subxactobject.o plpy_typeio.o plpy_util.o -dead_strip_dylibs -framework Python -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/lib/darwin/libclang_rt.osx.a -F/System/Library/Frameworks
ld: framework not found Python
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [plpython2.so] Error 1
The problem is that that -syslibroot option modifies where to look for
frameworks; "man ld" quoth
-syslibroot rootdir
Prepend rootdir to all search paths when searching for
libraries or frameworks.
If you do the ld call by hand without the -syslibroot option, it works.
AFAICS it could never have worked with such an option, so I'm thinking
this is some new misbehavior in the latest version of Xcode.
regards, tom lane
From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Asif Naeem <anaeem(dot)it(at)gmail(dot)com> |
Cc: | reiner peterke <zedaardv(at)drizzle(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [GENERAL] unable to build postgres-9.4 in os x 10.9 with python |
Date: | 2014-05-30 18:59:11 |
Message-ID: | 5388D4FF.9010205@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
On 05/30/2014 11:52 AM, Tom Lane wrote:
> Asif Naeem <anaeem(dot)it(at)gmail(dot)com> writes:
>> On Fri, May 30, 2014 at 9:49 PM, reiner peterke <zedaardv(at)drizzle(dot)com>
>> wrote:
>>> Since upgrading my mac from os x 10.8 to 10.9, i can no long build
>>> postgres with '--with-python’.
>
>> Latest PG 9.4 source code seems building fine with --with-python option on
>> my OS X 10.9.3 box i.e.
>
> [ please don't top-post in PG mailing lists ]
>
> I can reproduce the failure as described, not only in 9.4 but the back
> branches too; I would've noticed sooner except I don't build plpython
> routinely.
>
> It looks to me like Apple broke something in the build toolchain.
> If you add -v as suggested, what you see is
> If you do the ld call by hand without the -syslibroot option, it works.
> AFAICS it could never have worked with such an option, so I'm thinking
> this is some new misbehavior in the latest version of Xcode.
There is and the SO thread that goes into detail on this is here:
The Apple document referenced in above is:
https://developer.apple.com/library/ios/technotes/tn2328/_index.html
>
> regards, tom lane
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | Asif Naeem <anaeem(dot)it(at)gmail(dot)com>, reiner peterke <zedaardv(at)drizzle(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] unable to build postgres-9.4 in os x 10.9 with python |
Date: | 2014-05-30 20:31:57 |
Message-ID: | 9364.1401481917@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> writes:
> On 05/30/2014 11:52 AM, Tom Lane wrote:
>> If you do the ld call by hand without the -syslibroot option, it works.
>> AFAICS it could never have worked with such an option, so I'm thinking
>> this is some new misbehavior in the latest version of Xcode.
> There is and the SO thread that goes into detail on this is here:
> http://stackoverflow.com/questions/19555395/python-framework-is-missing-from-os-x-10-9-sdk-why-also-workaround
> The Apple document referenced in above is:
> https://developer.apple.com/library/ios/technotes/tn2328/_index.html
Fun. So after all these years of catering to Apple's preferred weirdness
in this regard, they reverse course and tell us to do it like everywhere
else.
I experimented with just diking out the python_framework case in
configure, and that *almost* works; but for some reason distutils doesn't
admit to having a shared library, so you also have to override that test.
The attached patch fixes this and also removes a long-obsolete comment
claiming that we don't work with Python < 2.5 on OSX (see prairiedog
for evidence to the contrary).
I've tested this successfully on my 10.9.3 laptop as well as on dromedary
and prairiedog, so I'm thinking we should patch not only HEAD but all the
back branches. Any objections?
regards, tom lane
PS: why aren't any of the buildfarm members using 10.9 building
--with-python? We should have known about this months ago, ISTM.
Attachment | Content-Type | Size |
---|---|---|
link-plpython-normally-on-osx.patch | text/x-diff | 4.4 KB |
From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Asif Naeem <anaeem(dot)it(at)gmail(dot)com>, reiner peterke <zedaardv(at)drizzle(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] unable to build postgres-9.4 in os x 10.9 with python |
Date: | 2014-05-30 23:44:09 |
Message-ID: | 538917C9.20600@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
On 05/30/2014 01:31 PM, Tom Lane wrote:
> Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> writes:
>> On 05/30/2014 11:52 AM, Tom Lane wrote:
>>> If you do the ld call by hand without the -syslibroot option, it works.
>>> AFAICS it could never have worked with such an option, so I'm thinking
>>> this is some new misbehavior in the latest version of Xcode.
>
>> There is and the SO thread that goes into detail on this is here:
>> http://stackoverflow.com/questions/19555395/python-framework-is-missing-from-os-x-10-9-sdk-why-also-workaround
>> The Apple document referenced in above is:
>> https://developer.apple.com/library/ios/technotes/tn2328/_index.html
>
> Fun. So after all these years of catering to Apple's preferred weirdness
> in this regard, they reverse course and tell us to do it like everywhere
> else.
Mavericks, the gift that keeps giving:)
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From: | reiner peterke <zedaardv(at)drizzle(dot)com> |
---|---|
To: | Edoardo Panfili <edoardo(at)aspix(dot)it> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: unable to build postgres-9.4 in os x 10.9 with python |
Date: | 2014-05-31 08:01:29 |
Message-ID: | 12E8AC82-E344-4E44-8D6C-2D494316DF21@drizzle.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
Hi all,
Thanks for all the responses.
It looks like Edoardo was on the right track,
I hadn’t upgraded the Command Line Developer Tools.
after downloading them from apple and installing them, i was able to build postgres with '--with-python'
reiner
On 30 maj 2014, at 19:56, Edoardo Panfili <edoardo(at)aspix(dot)it> wrote:
> Il 30/05/14 18:49, reiner peterke ha scritto:
>> Hi,
>>
>> has anyone else had this issue and does any one know the solution?
>>
>> Since upgrading my mac from os x 10.8 to 10.9, i can no long build postgres with '--with-python’.
>>
>> i get the following error.
>>
>> ld: framework not found Python
>> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>> make[3]: *** [plpython2.so] Error 1
>> make[2]: *** [all-plpython-recurse] Error 2
>> make[1]: *** [all-pl-recurse] Error 2
>> make: *** [all-src-recurse] Error 2
>>
>> my full configure command is
>>
>> configure '--prefix=/usr/local/postgres/9.4' '--with-perl' '--with-python' '--with-libxml' '-with-openssl' '--with-includes=/opt/local/include/' '--with-libraries=/opt/local/lib'
> I did I try with 9.4beta1 and --with-python using OS X 10.9.3
>
> ./configure --with-python
>
> all goes well, have you installed the command line tools?
>
> xcode-select --install
>
> I did it to compile uuid (with no success) and postgis (with success).
>
> Edoardo