Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Issue #37

Closed
BTEndres opened this issue Jan 28, 2015 · 4 comments
Closed

Installation Issue #37

BTEndres opened this issue Jan 28, 2015 · 4 comments

Comments

@BTEndres
Copy link

Hello!

I'm trying to setup pgmemcache for use with my Postgres 9.2 database, and am having an issue. Specifically, when I attempt to MAKE the file from source (grabbed from here, so most recent files), I get the following error...

$ make
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/include/et -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fpic -DUSE_LIBMEMCACHED -I. -I. -I/usr/include/server -I/usr/include/internal -I/usr/include/et -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include  -c -o pgmemcache.o pgmemcache.c
pgmemcache.c: In function ‘_PG_init’:
pgmemcache.c:71: warning: passing argument 8 of ‘DefineCustomStringVariable’ from incompatible pointer type
/usr/include/utils/guc.h:225: note: expected ‘GucStringAssignHook’ but argument is of type ‘void (*)(const char *, void *)’
pgmemcache.c:84: warning: passing argument 8 of ‘DefineCustomStringVariable’ from incompatible pointer type
/usr/include/utils/guc.h:225: note: expected ‘GucStringAssignHook’ but argument is of type ‘void (*)(const char *, void *)’
pgmemcache.c: In function ‘pgmemcache_xact_callback’:
pgmemcache.c:165: error: ‘XACT_EVENT_PRE_COMMIT’ undeclared (first use in this function)
pgmemcache.c:165: error: (Each undeclared identifier is reported only once
pgmemcache.c:165: error: for each function it appears in.)
pgmemcache.c: In function ‘memcache_get_multi’:
pgmemcache.c:622: warning: passing argument 1 of ‘get_arg_cstring’ makes pointer from integer without a cast
pgmemcache.c:393: note: expected ‘struct text *’ but argument is of type ‘Datum’
pgmemcache.c:622: warning: assignment discards qualifiers from pointer target type
make: *** [pgmemcache.o] Error 1

I'm guessing there's something wrong with where my pg_config is pointed or something similar, and I'm looking into it. Putting it here on the off chance that it's actually something off with the code and/or someone has some suggestions on what to do that I'm not thinking of.

If there's any information on my end that would help you help me pinpoint the issue, just ask.

Thanks!

@Ormod
Copy link
Member

Ormod commented Jan 28, 2015

You might want to paste your pg_config to the case. The function signature it's complaining about got changed in 9.1 and pgmemcache has:

DefineCustomStringVariable("pgmemcache.default_servers",
"Comma-separated list of memcached servers to connect to.",
"Specified as a comma-separated list of host:port (port is optional).",
&globals.default_servers,
NULL,
PGC_USERSET,
GUC_LIST_INPUT,
#if defined(PG_VERSION_NUM) && (PG_VERSION_NUM >= 90100)
NULL,
#endif
assign_default_servers_guc,
NULL);

the 8th argument in 9.1+ is GucStringCheckHook and the compiler seems to think it is GucStringAssignHook (which is the bit after the ifdef, on versions before 9.1). Anyway looks like a version conflict.

@Ormod
Copy link
Member

Ormod commented Jan 28, 2015

Hmm, the other bit about XACT_EVENT_PRE_COMMIT looks like a regression on pre-9.3. (9.2 doesn't define it at all) @saaros want to take a look at that?

saaros added a commit to saaros/pgmemcache that referenced this issue Jan 28, 2015
@saaros
Copy link
Member

saaros commented Jan 28, 2015

Yeah - the requirement for XACT_EVENT_PRE_COMMIT was added unconditionally in commit 2.2.0-10-g3acdf73. Fixed that in f5c1824. Thanks!

The other issues about GUC function arguments are not pgmemcache bugs; you're trying to compile pgmemcache using unsupported PostgreSQL version's headers. Check your pg_config --version

@saaros saaros closed this as completed Jan 28, 2015
@BTEndres
Copy link
Author

All right. Thanks much guys, and apologies on not responding with anything (it was the middle of the night over here when all the conversation was going on).

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants