Giter VIP home page Giter VIP logo

Comments (7)

avanov avatar avanov commented on September 18, 2024

Same result with Ubuntu 12.04 and Postgres 9.2 distribution from PGDG (http://wiki.postgresql.org/wiki/Apt).

$ PATH="/usr/lib/postgresql/9.2/bin:$PATH" make
protoc-c --c_out=. cstore.proto
gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -pie -I/usr/include/mit-krb5 -DLINUX_OOM_ADJ=0 -fno-omit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic --std=c99 -I. -I./ -I/usr/include/postgresql/9.2/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.5  -c -o cstore.pb-c.o cstore.pb-c.c
gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -pie -I/usr/include/mit-krb5 -DLINUX_OOM_ADJ=0 -fno-omit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -fpic --std=c99 -I. -I./ -I/usr/include/postgresql/9.2/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/tcl8.5  -c -o cstore_fdw.o cstore_fdw.c
cstore_fdw.c:23:33: fatal error: access/htup_details.h: No such file or directory
compilation terminated.
make: *** [cstore_fdw.o] Error 1

from cstore_fdw.

pykello avatar pykello commented on September 18, 2024

Thanks for reporting this. I'll look into see if we can check this in Makefile. I'll make a note of this in the README file.

from cstore_fdw.

jasonmp85 avatar jasonmp85 commented on September 18, 2024

The MAJORVERSION and VERSION variables are set in the PGXS Makefile so they can be used to do this kind of checking. plv8js uses them to define targets differently based on the PostgreSQL version (they even populate MAJORVERSION if it's absent because older PostgreSQL versions lack it).

That said I can't figure out how to fail fast using them. Ideally we'd use findstring to detect if the current PostgreSQL version is unsupported and then error immediately.

from cstore_fdw.

pykello avatar pykello commented on September 18, 2024

Thanks Jason.

I was thinking we have two options:

  • Check for 9.3 or later,
  • Check for 9.3 or 9.4.

I thought we shouldn't exclude 9.4 from supported version because the extension compiles with PostgreSQL 9.4dev, and people have tried using it with 9.4dev.

Inspired by the link Jason gave, for the first option, we can do:

ifndef MAJORVERSION
    MAJORVERSION := $(basename $(VERSION))
endif

PG93_OR_LATER := $(shell expr $(value MAJORVERSION) \>= 9.3)
ifeq ($(PG93_OR_LATER), 0)
    $(error PostgreSQL 9.3 or later is required to compile this extension)
endif

For the 2nd option, we can do:

ifndef MAJORVERSION
    MAJORVERSION := $(basename $(VERSION))
endif

ifeq (,$(findstring $(MAJORVERSION), 9.3 9.4))
    $(error PostgreSQL 9.3 or 9.4 is required to compile this extension)
endif

Because we don't know if this will compile with later versions of PostgreSQL, so I prefer the 2nd option. Any thoughts?

from cstore_fdw.

jasonmp85 avatar jasonmp85 commented on September 18, 2024

@pykello — I tried something similar to the second quite a few times. Maybe I'm doing something wrong, but I couldn't get that conditional to trigger unless it was part of a target. The only target that made sense to me was to add it as a prereq of all but that just made it run at the end of the all target (i.e. after all compilation). Tell me if you hit the same issue (my Make-fu isn't very strong).

from cstore_fdw.

pykello avatar pykello commented on September 18, 2024

@jasonmp85 this worked for me in Fedora 16's GNU Make 3.82 and OS X's GNU Make 3.81. I am also not strong at Make, what I did was try adding those lines to right after include $(PGXS) in the Makefile.

Can you try it to see if it works in your setup?

from cstore_fdw.

pykello avatar pykello commented on September 18, 2024

The "ifeq (...) $(error ...) endif" works in GNU Make 3.78+. Although, PostgreSQL 9.1+ require GNU Make 3.80+. GNU Make 3.78 was released in 1999 and 3.80 was released in 2002.

Also added a note to the README file which mentions that cstore_fdw supports only PostgreSQL 9.3 and 9.4.

Tested this with different GNU Make versions and PostgreSQL 8.4+.

Pushed the changes.

from cstore_fdw.

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.