Giter Site home page Giter Site logo

Comments (13)

FlorianEndel avatar FlorianEndel commented on July 22, 2024

In CentOS 5 I had to set these environment variables prior to compiling:

export LIBPQ_DIR=/usr/pgsql-9.3/
export LIBRARY_PATH=/usr/pgsql-9.3/lib

from rpostgres.

esaostring avatar esaostring commented on July 22, 2024

Ok thanks. This seems to solve the compilation issue!

from rpostgres.

krlmlr avatar krlmlr commented on July 22, 2024

Closing for now, please feel free to reopen.

from rpostgres.

dckc avatar dckc commented on July 22, 2024

I'm using SLES 11, and I get the same symptoms.

I'm somewhat surprised that clues from pkg-config don't seem to be consulted.

> pkg-config libpq --cflags
-I/usr/include/pgsql 

I don't see how to reopen this issue. I'm not sure I understand the github issue workflow.

from rpostgres.

krlmlr avatar krlmlr commented on July 22, 2024

Thanks. I'll try to replicate this in CentOS. Which version will match SLES 11? (Or is there an easy way to run virtual or dockerized SLES 11?)

from rpostgres.

dckc avatar dckc commented on July 22, 2024

I hope to get the SLES details to you shortly...

Meanwhile, my solution was to put this in my ~/.R/Makevars:

PKG_CPPFLAGS=$(shell pkg-config libpq --cflags)
PKG_LIBS=$(shell pkg-config libpq --libs)

I expect you can use that to replace a lot of custom config stuff. I don't know if it'll work on OS X, but I'd expect it to work in just about all forms of linux.

from rpostgres.

mmuurr avatar mmuurr commented on July 22, 2024

Same issue on Amazon Linux.
PostgreSQL's header and library files are (by default) installed here:

/usr/include/pgsql/
/usr/lib64/pgsql/

... which are both just symlinks to the versioned installation directories.
I've patched my configure file in a fork, and am submitting a pull request now...

from rpostgres.

krlmlr avatar krlmlr commented on July 22, 2024

@dckc: Thanks for the hint on pkg-config. How portable/common is this? Would it be more robust to use pg_config?

@mmuurr: Would you mind implementing a more generic solution in #73?

from rpostgres.

dckc avatar dckc commented on July 22, 2024

pkg-config is everywhere, in my experience, though perhaps pg_config is to be found wherever the postgres headers are found

googlecounts:

  • pkg-config: About 540,000 results
  • pg_config: About 48,800 results

https://en.wikipedia.org/wiki/Pkg-config

from rpostgres.

mmuurr avatar mmuurr commented on July 22, 2024

I've updated the Amazon Linux solution to use pg_config when pkg-config fails (and it thus handles other Linux distros in the more general case).
Since it was a large change, I've closed #73 and would suggest referencing this thread against #81.

from rpostgres.

krlmlr avatar krlmlr commented on July 22, 2024

Closing, because #81 is merged now. (Thanks @mmuurr!) Please open a new issue if problems persist.

from rpostgres.

cchris26 avatar cchris26 commented on July 22, 2024

I could solve the problem in my CentOS 7 only by setting the folder of pg_config in PATH.
export PATH=$PATH:/usr/pgsql-9.6/bin

from rpostgres.

github-actions avatar github-actions commented on July 22, 2024

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

from rpostgres.

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.