Re: Compiling C Extension Functions against PostgreSQL 12

Поиск
Список
Период
Сортировка
От TalGloz
Тема Re: Compiling C Extension Functions against PostgreSQL 12
Дата
Msg-id 1588496278270-0.post@n3.nabble.com
обсуждение исходный текст
Ответ на Re: Compiling C Extension Functions against PostgreSQL 12  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
Adrian Klaver-4 wrote
> On 5/2/20 4:03 PM, TalGloz wrote:
> 
> Did you?
> 
> In Makefile below I see:
> 
> #PG_LDFLAGS= -L$(INCLUDE_SEAL_LIB) -lseal -pthread
> # Seal linker flags
> SEAL_LDFLAGS = -L$(INCLUDE_SEAL_LIB) -lseal -pthread
> 
> -- 
> Adrian Klaver

> adrian.klaver@


It actually didn't change a thing but since they are the same I've removed
the "SEAL_LDFLAGS" and used "PG_LDFLAGS" instead.

The maigor breakthrough was changing "CXXFLAGS" to "PG_CXXFLAGS" this has
removed the error:

 seal_diff_cpp.cpp:2:10: fatal error: postgres.h: No such file or directory
      2 | #include <postgres.h>
        |          ^~~~~~~~~~~~ 

All the Makefile steps and their outputs get generated as should. My only
concern is regarding the last part below that comes after
"seal_mean_cxx_v2.so" was generated and copied to "/usr/pgsql-12/lib" and
generates all the errors regarding the seal library I've listed in previous
posts. I don't know what triggers it in my Makefile and it not supposed to
be executed.

/usr/lib64/ccache/clang -xc++ -Wno-ignored-attributes -fno-strict-aliasing
-fwrapv -O2  -I. -I./ -I/usr/pgsql-12/include/server
-I/usr/pgsql-12/include/internal  -D_GNU_SOURCE -I/usr/include/libxml2 
-I/us /include -flto=thin -emit-llvm -c -o seal_mean_cxx_v2.bc
seal_mean_cxx_v2.cpp

Maybe it is being triggered by the "pgxs.mk" because as of Postgres 12 it
has "with_llvm" parts e.g.:

ifeq ($(with_llvm), yes)
all: $(addsuffix .bc, $(MODULES)) $(patsubst %.o,%.bc, $(OBJS))
endif




--
Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html



В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Compiling C Extension Functions against PostgreSQL 12
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: Compiling C Extension Functions against PostgreSQL 12