Comments (4)
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
Actually the problem with the gem install is a bit further towards the top:
ld: warning: in /Developer/SDKs/MacOSX10.6.sdk/usr/local/lib/libpq.dylib,
file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols:
"_PQconnectdb", referenced from:
_t in ccxwIhEo.o
If you install an extension for an x86_64 Ruby, you need to link against a library that's of the same architecture. You can check the architecture like so:
$ rvm 1.9.2 ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]
I installed the PostgreSQL package you linked to, but it put my libpq in /usr/local/pgsql-9.0/lib, not /Developer/SDKs/MacOSX10.6.sdk/usr/local/lib/libpq.dylib, so I'm not sure why pg_config thinks that's what it should be linking against. Is the pg_config returned by which pg_config
/usr/local/pgsql-9.0/bin/pg_config? If not, I suspect you have another i386-only installation hanging around.
To be sure you're linking against the right stuff, try this:
rvm 1.9.2-head gem install pg -- \
--with-pg-config=/usr/local/pgsql-9.0/bin/pg_config
The tip install has the same architecture problem, and links against the same library under /Developer/SDKs.
from ruby-pg.
Original comment by Markus Wein (Bitbucket: nuclearsquid, ).
Yeah, /usr/local/pgsql
is actually a symlink to pgsql-9.0
:
$ which pg_config
/usr/local/pgsql/bin/pg_config
$ ls -l /usr/local/pgsql
lrwxr-xr-x 1 cypher wheel 9B Dec 7 16:41 /usr/local/pgsql@ -> pgsql-9.0
$ pg_config
BINDIR = /usr/local/pgsql-9.0/bin
DOCDIR = /usr/local/pgsql-9.0/share/doc
INCLUDEDIR = /usr/local/pgsql-9.0/include
PKGINCLUDEDIR = /usr/local/pgsql-9.0/include
INCLUDEDIR-SERVER = /usr/local/pgsql-9.0/include/server
LIBDIR = /usr/local/pgsql-9.0/lib
PKGLIBDIR = /usr/local/pgsql-9.0/lib
LOCALEDIR =
MANDIR = /usr/local/pgsql-9.0/man
SHAREDIR = /usr/local/pgsql-9.0/share
SYSCONFDIR = /usr/local/pgsql-9.0/etc
PGXS = /usr/local/pgsql-9.0/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--with-openssl' '--with-pam' '--with-krb5' '--with-gssapi' '--with-ldap' '--enable-thread-safety' '--with-bonjour' '--with-python' '--without-perl' '--enable-nls' '--with-libxml' 'CFLAGS=-Os -arch i386 -arch x86_64 -D_FILE_OFFSET_BITS=64' 'LD=gcc -arch i386 -arch x86_64 -nostdlib'
CC = gcc
CPPFLAGS = -I/usr/include/libxml2
CFLAGS = -Os -arch i386 -arch x86_64 -D_FILE_OFFSET_BITS=64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
CFLAGS_SL =
LDFLAGS = -arch i386 -arch x86_64
LDFLAGS_SL =
LIBS = -lintl -liconv -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lldap -lreadline -lz
VERSION = PostgreSQL 9.0.1
It turns out that /Developer/SDKs/MacOSX10.6.sdk/usr/local/lib
is actually a symlink to /usr/local/lib
, where, for some reason, I had an older version of libpq installed. Moving it to a backup directory solved my problem, and I was able to install the pg
gem just fine.
from ruby-pg.
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
Ah good news. Thanks for following up!
from ruby-pg.
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
Removing component: build-system (automated comment)
from ruby-pg.
Related Issues (20)
- Segmentation fault with ruby 2.7.8 and pg 1.5.3 HOT 10
- Segmentation fault HOT 28
- Sonoma: getaddrinfo segmentation fault HOT 2
- Segmentation fault in ruby:3.2.2-alpine3.18 docker image HOT 2
- Wrong binary conversion on x86 (32bit intel) arch causing test failures HOT 4
- Bad IAM Token against Amazon Aurora Postgres: Out of memory error HOT 2
- Attempting to execute a sql file with `\set ...` raises errors HOT 3
- conn.exec writing "INFO" statements to stderr instead of stdout HOT 2
- Segfault on ruby 3.2.2, pg 1.5.4 HOT 2
- Error ruby(39749,0x1e1f05300) malloc: double free for ptr 0x13c6bfa00 HOT 1
- Segmentation fault when connecting to RDS HOT 11
- Broken links in documentation HOT 3
- connection.reset don't check again DNS HOT 6
- Usage with ApacheAGE for Postgresql HOT 2
- Add BigDecimal to gemspec for Ruby 3.3/4 HOT 2
- Binary Windows gem no longer available for Ruby v3.3 since v1.5.6 HOT 2
- Test failure with modified `RUBY_PG_TEST_DIR` HOT 2
- Q: Is it possible to handle composite values like `row(123, 'str', true)` ? HOT 1
- Dereference of null in alloc_query_params HOT 1
- TypeError PG::TypeMap undefined method `key?' for nil if !type_map.key?(oid) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-pg.