[SR-Users] Building db_postgres with PostgreSQL headers and libs in non-standard location

Alex Balashov abalashov at evaristesys.com
Thu Oct 29 17:15:16 CET 2020


This is what I have always done:

# export PATH=$PATH:/usr/pgsql-${MAJOR_VER}/bin
# cd src/modules/db_postgres
# make install

The `pg_config` utility in /usr/pgsql-${MAJOR_VER}/bin ensures that the 
proper header include path is supplied.

-- Alex

On 10/29/20 11:08 AM, Chaigneau, Nicolas wrote:
> Hello,
> 
> I’d like to build Kamailio module db_postgres, with the PostgreSQL 
> headers and libs in a non-standard location.
> 
> I’m trying to figure out how to do that, if it’s possible, without 
> having to edit db_postgres/Makefile.
> 
> I see in the Makefile that it’s trying to find the files relative to 
> $(LOCALBASE):
> 
>          # use standard know paths
> 
>          # libpq-fe.h locations
> 
>          DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/pgsql/include \
> 
>                  -I$(SYSBASE)/include/pgsql 
> -I$(SYSBASE)/include/postgresql \
> 
>                  -I$(SYSBASE)/include/postgresql/8.0
> 
>          LIBS +=-L$(LOCALBASE)/lib -L$(LOCALBASE)/pgsql/lib \
> 
>                  -L$(LOCALBASE)/lib/pgsql -lpq
> 
> However, LOCALBASE (which defaults to /usr/local) is used for many 
> things other than PostgreSQL, so changing that is not a great idea, I think…
> 
> Any idea ?
> 
> Regards,
> 
> Nicolas.
> 
> This message contains information that may be privileged or confidential 
> and is the property of the Capgemini Group. It is intended only for the 
> person to whom it is addressed. If you are not the intended recipient, 
> you are not authorized to read, print, retain, copy, disseminate, 
> distribute, or use this message or any part thereof. If you receive this 
> message in error, please notify the sender immediately and delete all 
> copies of this message.
> 
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> 

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/



More information about the sr-users mailing list