Comments (9)
I have some questions:
- How did you install PostgreSQL?
- Can you try to see if PostgreSQL compiles & installs from source code? You can get 9.3.4 from http://www.postgresql.org/ftp/source/v9.3.4/
- If compiling & installing PostgreSQL was successful, does cstore_fdw compile with it?
One of my guesses is that if you used a package manager to install PostgreSQL, then it may have set some environmental variables and flags before compiling PostgreSQL, and so pg_config may contain configurations that don't work as it is.
If installing & compiling everything from source works, then this may give us some clues about how to solve the original problem.
from cstore_fdw.
Thanks for reporting this. We will look into this and follow up.
from cstore_fdw.
What version of OS X are you using? Can you give us more specifics about your installation?
from cstore_fdw.
I'm using OS X 10.9.2 (Mavericks)
I did everything as described at the bottom of the initial page (https://github.com/citusdata/cstore_fdw).
- install protobuf-c with macports via:
sudo port install protobuf-c
- I added the path to my pg_config file to my PATH variable by changing the /etc/paths file using vi. But my pg_config file is NOT located at /usr/local/pgsql/bin/, it is located at /Library/PostgreSQL/9.3/bin/
- I changed into the directory were I saved the source code for the cstore (for me it's at documents) and I executed make.
Then I get the above error.
I guess it is, because all the libraries it is looking for is located in /usr/local/bin AND /opt/local/bin AND also /opt/local/include.
Do I have to place the source code into a special directory in my mac? Because I guess copying all the needed files from the just mentioned 3 folders should not be a satisfying solution.
Is this enough information for a start?
from cstore_fdw.
If you're new to the Mac and have no other reason to use MacPorts, I'd suggest trying Homebrew. It doesn't require sudo
for normal operation and installs packages to /usr/local
, which is already in the default paths used for compilation and linking.
Since MacPorts installs stuff to /opt/local
, I'm going to guess that your problem is twofold: the compiler can't find the protobuf-c
headers and the linker won't be able to find the protobuf libraries. I don't know what that sysroot
jargon is about, so hopefully it's just a warning.
pg_config
is actually an executable. You can run it yourself to see what it produces. The Makefile
invokes it using pg_config --pgxs
, which prints out a bunch of configuration information about your PostgreSQL install. So as long as your path includes the right pg_config
(i.e. the one in the install of PostgreSQL you care about) then it should work.
For the MacPorts issue, it might be easiest in your case to just modify the Makefile
. You'll want to modify these two lines to look like the following:
PG_CPPFLAGS = --std=c99 -I/opt/local/include
SHLIB_LINK = -L/opt/local/lib -lprotobuf-c
If that doesn't work, please paste the entire output from running make
.
from cstore_fdw.
With only changing the two lines in the makefile. I still got the same error.
So I completely uninstalled MacPorts and Installed Homebrew. I also cleaned up all directories as suggested by brew doctor.
Then I ran:
brew install protobuf-c
with this result:
==> Installing protobuf-c dependency: protobuf
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/protobuf-2.
######################################################################## 100,0%
==> Pouring protobuf-2.5.0.mavericks.bottle.tar.gz
==> Caveats
Editor support and examples have been installed to:
/usr/local/Cellar/protobuf/2.5.0/share/doc/protobuf
==> Summary
🍺 /usr/local/Cellar/protobuf/2.5.0: 75 files, 6,2M
==> Installing protobuf-c
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/protobuf-c-
######################################################################## 100,0%
==> Pouring protobuf-c-0.15.mavericks.bottle.tar.gz
🍺 /usr/local/Cellar/protobuf-c/0.15: 12 files, 360K
Then I ran:
PATH=/Library/PostgreSQL/9.3/bin/:$PATH make
With this result:
protoc-c --c_out=. cstore.proto
gcc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.5 -headerpad_max_install_names -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv --std=c99 -I. -I. -I/Library/PostgreSQL/9.3/include/postgresql/server -I/Library/PostgreSQL/9.3/include/postgresql/internal -I/opt/local/20140109/include/libxml2 -I/usr/local/include/libxml2 -I/usr/local/include -c -o cstore.pb-c.o cstore.pb-c.c
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk'
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk'
clang: warning: argument unused during compilation: '-headerpad_max_install_names'
In file included from cstore.pb-c.c:8:
In file included from ./cstore.pb-c.h:6:
/usr/local/include/google/protobuf-c/protobuf-c.h:22:10: fatal error:
'assert.h' file not found
#include <assert.h>
^
1 error generated.
make: *** [cstore.pb-c.o] Error 1
So I still get the same error. Am I getting something wrong?
from cstore_fdw.
Yes, this solved all the problems. I uninstalled PostgreSQL, because I truly installed it before using a package manager. Now I compiled and installed PostgreSQL from source code and both, PostgreSQL and cstore_fdw, compiled successfully.
I will start trying them out to give some feedback, if now everything works fine.
Thanks for the great support.
from cstore_fdw.
Just for the sake of completeness: The example on the main page is running as described.
from cstore_fdw.
Great to hear!
from cstore_fdw.
Related Issues (20)
- select count(1) from table where datecolum = '2020-02-01' slow HOT 4
- Missing dependencies in makefile targets
- Cant ./configure in CentOS 07
- How to make use of parallelization with cstore_fdw? HOT 2
- Tests not running on Travis, and missing CircleCI configs
- Support for Heroku Postgres / Citus Data addon? HOT 1
- Is cstore_fdw still supported by developers? HOT 3
- segfault during copy into foreign table HOT 2
- hll build error against v13 HOT 5
- Does cstore_fdw Support Parallel COPY into the Same Table?
- Integer overflow in cstore_clean_table_resources()
- How to insert load / into cstore foreign tables in order HOT 1
- Impact of number of partitions on cstore tables
- Skip indexes are not in use HOT 2
- make installcheck failed, "ERROR: could not open file ... for writing: Permission denied" HOT 1
- Support for PostgreSQL15 HOT 1
- v1.7.0 download files does not support PostgreSQL 13 HOT 1
- 目录不存在
- Unable to upgrade from cstore_fdw to citus
- pg14 is support?
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 cstore_fdw.