From: | Chris Ruprecht <chris(at)cdrbill(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | GENERAL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: OS X 10.11.3, psql, bus error 10, 9.5.1 |
Date: | 2016-03-12 21:33:01 |
Message-ID: | B822FB1F-6CA2-42F9-A5B0-1E540272AEC3@cdrbill.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Hello again,
no such luck (no easy fix). I turned SIP off and rebuilt PG 9.5.1, copied libpq.5.8.dylib to /usr/lib, bent the two sym links to the new library but I'm still getting "Bus error: 10". You owe somebody a nickel, Tom ;).
Larsaf:postgresql-9.5.1 root# cp src/interfaces/libpq/libpq.5.8.dylib /usr/lib
Larsaf:postgresql-9.5.1 root# cd /usr/lib
Larsaf:lib root# ls -l libpq*
-rwxr-xr-x 1 root wheel 147456 Dec 3 01:34 libpq.5.6.dylib
-rwxr-xr-x 1 root wheel 2295376 Mar 12 16:22 libpq.5.8.dylib
lrwxr-xr-x 1 root wheel 15 Dec 31 12:56 libpq.5.dylib -> libpq.5.6.dylib
lrwxr-xr-x 1 root wheel 15 Dec 31 12:56 libpq.dylib -> libpq.5.6.dylib
Larsaf:lib root# rm libpq.5.dylib
Larsaf:lib root# rm libpq.dylib
Larsaf:lib root# ln -s libpq.5.8.dylib libpq.5.dylib
Larsaf:lib root# ln -s libpq.5.8.dylib libpq.dylib
Larsaf:lib root# ls -l libpq*
-rwxr-xr-x 1 root wheel 147456 Dec 3 01:34 libpq.5.6.dylib
-rwxr-xr-x 1 root wheel 2295376 Mar 12 16:22 libpq.5.8.dylib
lrwxr-xr-x 1 root wheel 15 Mar 12 16:23 libpq.5.dylib -> libpq.5.8.dylib
lrwxr-xr-x 1 root wheel 15 Mar 12 16:23 libpq.dylib -> libpq.5.8.dylib
Larsaf:lib root# cd -
/Users/chris/Develop/source/postgresql-9.5.1
Larsaf:postgresql-9.5.1 root# src/bin/psql/psql
Bus error: 10
My configure script looks like this (and this works for building PG 9.4.4 on the same machine with SIP enabled):
export CC=cc
export CPP="cc -E"
export CXX=c++
export CXXFLAGS='-O3 -fno-common -arch x86_64'
export CFLAGS='-O3 -fno-common -arch x86_64 -I/usr/local/include'
export LDFLAGS='-O3 -fno-common -arch x86_64 -L/usr/local/lib'
./configure \
--prefix=/usr/local \
--enable-integer-datetimes \
--enable-thread-safety \
--with-perl \
--with-python \
--with-gssapi \
--with-openssl \
--with-pam \
--with-zlib \
--with-libxml \
--with-libxslt \
--with-uuid=e2fs \
--with-tcl \
--with-tclconfig=/usr/local/Cellar/tcl-tk/8.6.4/lib/ \
--with-perl \
--with-python
> On Mar 11, 2016, at 22:40, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Chris Ruprecht <chris(at)cdrbill(dot)com> writes:
>> today, I built PG 9.5.1 on my Mac. Everything went fine with the build, as usual but after installing everything, psql did nothing but give a 'bus error: 10'. Loading it into gdb gave me more details:
>
>> Program received signal SIGBUS, Bus error.
>> 0x000000010001be6c in refresh_utf8format ()
>
> I'd bet a nickel this is caused by El Capitan's "System Integrity
> Protection" deciding that your psql does not need the libpq version
> it asked for and should get linked to /usr/lib/libpq.dylib instead
> (which of course is several PG versions behind ...)
>
> SIP is potentially a good idea, but until they get the policies it
> enforces worked out, it's about where SELinux was ten years ago: the
> first thing you do is turn it off, if you want to get any work done.
> Right now it's an absolute disaster for anyone doing software
> development work.
>
> Here's what I have bookmarked about turning it off:
> http://www.howtogeek.com/230424/how-to-disable-system-integrity-protection-on-a-mac-and-why-you-shouldnt/
>
> If turning off SIP doesn't fix things, we'll need to look closer.
>
> regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2016-03-12 21:40:25 | Re: Q: extract database name from directory dump |
Previous Message | Karsten Hilbert | 2016-03-12 21:28:06 | Re: Q: extract database name from directory dump |
From | Date | Subject | |
---|---|---|---|
Next Message | Haribabu Kommi | 2016-03-12 21:42:54 | Re: pam auth - add rhost item |
Previous Message | Tom Lane | 2016-03-12 21:12:51 | Re: pl/pgSQL, get diagnostics and big data |