Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Tom Lane
"Janek Sendrowski" writes: > Is it possible to execute the code just like this? > I like to do that for Debugging. > I can't execute the .so files, of course and If I just do "gcc filename", I > have the issue with the includes. No, if it's a backend extension there's no way to execute it standa

Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Janek Sendrowski
Now it's working. My Makefile: OBJS = test.o MODULES = test DATA = test.c PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) Is it possible to execute the code just like this? I like to do that for Debugging. I can't execute the .so files, of course and If I just do "gcc

Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Tom Lane
I wrote: > "Janek Sendrowski" writes: >> Makefile: >> PROGRAM = test >> DATA = test.c > It looks like the problem is that there aren't any Postgres-specific -I > flags in the make command. After a bit of poking around in the pgxs code > I think the reason why not is that you're using the PROGRA

Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Tom Lane
"Janek Sendrowski" writes: > The file test.c just inlcudes: #include "postgres.h". > root@ubuntu:/usr/include/postgresql/9.3/server# gcc test.c > In file included from postgres.h:48:0, >                  from test.c:1: > utils/elog.h:69:28: fatal error: utils/errcodes.h: No such fi

Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Janek Sendrowski
The file test.c just inlcudes: #include "postgres.h". root@ubuntu:/usr/include/postgresql/9.3/server# gcc test.c In file included from postgres.h:48:0, from test.c:1: utils/elog.h:69:28: fatal error: utils/errcodes.h: No such file or directory compilation terminated. If elog.h fi

Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Tom Lane
"Janek Sendrowski" writes: > Now the link editor is working, but I still have one problem. > The files in /utils for example include there files with #include > "utils/filename" and it doesn't work, because the file which includes them is > already in the directory /utils. Could we see the exac

Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Janek Sendrowski
Hi, Thanks for your answer. Now the link editor is working, but I still have one problem. The files in /utils for example include there files with #include "utils/filename" and it doesn't work, because the file which includes them is already in the directory /utils. It's the same with all direct

Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Tom Lane
"Janek Sendrowski" writes: > The file test.c only includes the postgres.h (#include > "postgres.h"), but I get this error, when compiling: > /usr/bin/ld: cannot find -lxslt > /usr/bin/ld: cannot find -lxml2 > /usr/bin/ld: cannot find -lpam > /usr/bin/ld: cannot find -ledit > collect2: ld returne

[GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Janek Sendrowski
Hi,   My Makefile looks like this: PROGRAM = test DATA = ""> PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS)   The file test.c only includes the postgres.h (#include "postgres.h"), but I get this error, when compiling: /usr/bin/ld: cannot find -lxslt /usr/bin/ld