Comments (11)
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
Something about the way the extconf.rb combines the compilation flags from Ruby and Postgres isn't working, it would appear. It's causing trouble on other platforms as well, so I'm thinking I'll remove it and release 0.10.1 with a simpler extconf.
from ruby-pg.
Original comment by Don Morrison (Bitbucket: elskwid, GitHub: elskwid).
Hi Michael,
Thanks for the update. Ping me when you'd like me to give this a shot.
Don
from ruby-pg.
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
I've been trying without success to get PostgreSQL 8.4 installed on OpenSolaris so I can test this myself (I'm fairly clueless about Solaris administration), but I'll give up for now and just ask that you try out the prerelease of 0.10.1 I just pushed to rubygems.org:
gem install pg --pre -v 0.10.1pre209
Once we get this resolved, would you mind lending me your advice on adding an OpenSolaris environment to my bevvy of VirtualBox testing machines? I try to install and run the specs on as many environments as possible, and this is one I don't yet have.
Thanks for your help!
from ruby-pg.
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
A bit more detail...
The relevant portion of the mkmf.log is this:
have_library: checking for PQconnectdb() in -lpq... -------------------- no
"gcc -o conftest -I. -I/usr/local/rubies/ruby-1.8.7-p302/lib/ruby/1.8/i386-solaris2.11 \
-I. -D_FILE_OFFSET_BITS=64 -I/usr/postgres/8.3/include -g -O2 -xO3 -xarch=386 \
-xchip=pentium -xspace -Xa -xildoff -xc99=all -xc99=none -xCC conftest.c -L. \
-L/usr/local/rubies/ruby-1.8.7-p302/lib -Wl,-R/usr/local/rubies/ruby-1.8.7-p302/lib -L. \
-L/usr/postgres/8.3/lib -lruby-static -lpq -lpthread -lrt -ldl -lcrypt -lm -lc"
>>> gcc: unrecognized option `-Xa'
gcc: language CC not recognized
ld: fatal: file conftest.c: unknown file type
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: #include <libpq-fe.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { void ((*volatile p)()); p = (void ((*)()))PQconnectdb; return 0; }
/* end */
"gcc -o conftest -I. -I/usr/local/rubies/ruby-1.8.7-p302/lib/ruby/1.8/i386-solaris2.11 -I. \
-D_FILE_OFFSET_BITS=64 -I/usr/postgres/8.3/include -g -O2 -xO3 -xarch=386 -xchip=pentium \
-xspace -Xa -xildoff -xc99=all -xc99=none -xCC conftest.c -L. \
-L/usr/local/rubies/ruby-1.8.7-p302/lib -Wl,-R/usr/local/rubies/ruby-1.8.7-p302/lib -L. \
-L/usr/postgres/8.3/lib -lruby-static -lpq -lpthread -lrt -ldl -lcrypt -lm -lc"
>>> gcc: unrecognized option `-Xa'
gcc: language CC not recognized
ld: fatal: file conftest.c: unknown file type
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: #include <libpq-fe.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { PQconnectdb(); return 0; }
/* end */
The two lines with the '>>>' are the clues.
The two strategies for compiling the test program are both apparently giving the compiler flags it doesn't understand. With version 0.10.0, I introduced a change to the extconf that added the compiler flags specified by pg_config
to those used to compile 'pg', but that caused more problems than it solved, so I backed that change out for 0.10.1.
I'm guessing that the problem under OpenSolaris is that PostgreSQL is built using a different compiler than Ruby is, resulting in the unrecognized options.
from ruby-pg.
Original comment by Don Morrison (Bitbucket: elskwid, GitHub: elskwid).
Hey Michael,
Thanks so much for looking at this. I will try out the gem in the next couple of days. As for helping with OpenSolaris install, I'm actually quite new to it. I'll need to have a coworker help me, then I can help you. :-)
I will give you an update as soon as I can.
Thanks again!
from ruby-pg.
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
No problem. I've been talking to a former co-worker of mine who's a Solaris admin, and he's been trying out the newer gems for me. We haven't been able to duplicate your results, but I at least verified that the newest gem installs okay in his environment.
from ruby-pg.
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
I wanted to push out 0.10.1 to fix a few other problems, but hopefully this will resolve any issues under Solaris as well.
from ruby-pg.
Original comment by Don Morrison (Bitbucket: elskwid, GitHub: elskwid).
Michael,
Been a crazy couple of weeks. I can confirm that 0.10.1 is able to install and function on our OpenSolaris install.
Thank you so much for all your help on this!
Don
from ruby-pg.
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
Yay! Glad it helped. :)
from ruby-pg.
Original comment by Anonymous.
Hi,
This didn't work on Mac OS X 10.6.6 with latest XCode. I get the same failure as described above.
Thanks
Babu
from ruby-pg.
Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).
Are you sure it's not more like #57?
99% of the time, when someone reports a problem installing the library under OSX, it's because they're installing 'pg' with a universal Ruby binary compiled against a non-universal PostgreSQL. See the instructions in [[https://bitbucket.org/ged/ruby-pg/src/8ab3dd3c757b/README.OS_X|README.OS_X]] for how to resolve this.
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.