Search Postgresql Archives

Re: OS X 10.11.3, psql, bus error 10, 9.5.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Ruprecht <chris@xxxxxxxxxxx> writes:
> 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 ;).

Oh well.

Personally I'd not have messed with the contents of /usr/lib; you risk
breaking programs that expect that to be platform-standard.  (In theory
current libpq should be upward-compatible with a couple releases back;
but that assumes you built with the same options as Apple did, which is
a rather large assumption, especially in view of the following.)

> 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'

Hmm, dunno about those CFLAGS/LDFLAGS settings.  When I use those,
I get bus errors too.  [ experiments... ]  Apparently -fno-common
is the culprit.  I don't know what that does, and the clang man
page isn't terribly helpful:

       -fcommon
           This flag specifies that variables without initializers get common
           linkage.  It can be disabled with -fno-common.

That's confusing because it implies that -fno-common is the default,
which it evidently is not.  But anyway, my diagnosis is that you're
breaking something about the linker's behavior with that switch.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux