Giter VIP home page Giter VIP logo

Comments (11)

ged avatar ged commented on August 22, 2024

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.

ged avatar ged commented on August 22, 2024

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.

ged avatar ged commented on August 22, 2024

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.

ged avatar ged commented on August 22, 2024

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.

ged avatar ged commented on August 22, 2024

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.

ged avatar ged commented on August 22, 2024

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.

ged avatar ged commented on August 22, 2024

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.

ged avatar ged commented on August 22, 2024

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.

ged avatar ged commented on August 22, 2024

Original comment by Michael Granger (Bitbucket: ged, GitHub: ged).


Yay! Glad it helped. :)

from ruby-pg.

ged avatar ged commented on August 22, 2024

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.

ged avatar ged commented on August 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.