Re: APr Utils and PostgreSQL

2017-04-07 Thread Tom Browder
On Fri, Apr 7, 2017 at 10:36 Nick Kew  wrote:

>
> On Fri, 2017-04-07 at 08:28 -0500, Tom Browder wrote:
> > I am trying to get the pqsql lib built and cannot get the config
> > option correct.  The help says:
>
> OK, I read your mail (as I do most mail) on Debian, and I have
> their standard -dev package installed via aptitude.
> So I tested a new build, and a simple --with-pgsql worked for me:
> after make, I have the driver.  If it had not worked, that would
> be a bug, and we'd want to know about it!
>
> Since you're asking on the httpd list, is it possible you're
> mixing httpd/apr/apu builds, and not actually reconfiguring apu
> when you specify your options?


Thats possible, Nick, and the presence of the old libs probably didn't
help.  And I may also have used a munged config script during all my
changes.

Now that my server is up and running (with sqlite directives now working),
I will try rebuilding (but not installing) with apr and apr-util just to
ensure it works.

Thanks.

>
-Tom


Re: APr Utils and PostgreSQL

2017-04-07 Thread Tom Browder
On Fri, Apr 7, 2017 at 11:47 AM, Yann Ylavic  wrote:
> On Fri, Apr 7, 2017 at 6:28 PM, Tom Browder  wrote:
>>
>> Well, I already had libpq-dev installed and nothing changed: no lib fpr 
>> pgsql.
>
> I'd try --with-pgsql=/usr on debian.


Thanks, Yann, but I have a successful build now without the
apr/apr-util. I have an old system and had to blow away some old local
apr/apr-util builds and I think all is well now.

Thanks for the help all.

Best regards,

-Tom


Re: APr Utils and PostgreSQL

2017-04-07 Thread Yann Ylavic
On Fri, Apr 7, 2017 at 6:28 PM, Tom Browder  wrote:
>
> Well, I already had libpq-dev installed and nothing changed: no lib fpr pgsql.

I'd try --with-pgsql=/usr on debian.


Re: APr Utils and PostgreSQL

2017-04-07 Thread Tom Browder
On Fri, Apr 7, 2017 at 11:28 AM, Tom Browder  wrote:
...

Okay, I'm NOT going to use local build of apr and apr-util.  But while
I'm looking at my standard config, what is your advice on using (or
not):

  --with=distcache

-Tom


Re: APr Utils and PostgreSQL

2017-04-07 Thread Reindl Harald



Am 07.04.2017 um 18:14 schrieb Yann Ylavic:

On Fri, Apr 7, 2017 at 6:06 PM, Reindl Harald  wrote:


main question: why in the world are you building from source?
https://packages.debian.org/jessie/libaprutil1-dbd-pgsql


It happens sometimes on a dev@ list ;)


well, but that's the httpd-devel list and he talks about build apr which 
didn't change it's version for years :-)


Re: APr Utils and PostgreSQL

2017-04-07 Thread Yann Ylavic
On Fri, Apr 7, 2017 at 6:06 PM, Reindl Harald  wrote:
>
> main question: why in the world are you building from source?
> https://packages.debian.org/jessie/libaprutil1-dbd-pgsql

It happens sometimes on a dev@ list ;)


Re: APr Utils and PostgreSQL

2017-04-07 Thread Reindl Harald



Am 07.04.2017 um 18:10 schrieb Tom Browder:

On Fri, Apr 7, 2017 at 11:06 AM, Reindl Harald  wrote:

main question: why in the world are you building from source?
https://packages.debian.org/jessie/libaprutil1-dbd-pgsql


Because I want to be running the latest httpd (and use pgsql and
splite3), and I didn't know of the package you mentioned:

   libaprutil1-dbd-pgsql


well, i am a Redhat user and just typed "debian apr pgsql" into google
debian and many other distributions have subpackages
though the package naming of debian is weird

apr-util-1.5.4-5.fc26.x86_64.rpm (info) (download)
apr-util-devel-1.5.4-5.fc26.x86_64.rpm (info) (download)
apr-util-freetds-1.5.4-5.fc26.x86_64.rpm (info) (download)
apr-util-ldap-1.5.4-5.fc26.x86_64.rpm (info) (download)
apr-util-mysql-1.5.4-5.fc26.x86_64.rpm (info) (download)
apr-util-nss-1.5.4-5.fc26.x86_64.rpm (info) (download)
apr-util-odbc-1.5.4-5.fc26.x86_64.rpm (info) (download)
apr-util-openssl-1.5.4-5.fc26.x86_64.rpm (info) (download)
apr-util-pgsql-1.5.4-5.fc26.x86_64.rpm (info) (download)
apr-util-sqlite-1.5.4-5.fc26.x86_64.rpm (info) (download)
apr-util-debuginfo-1.5.4-5.fc26.x86_64.rpm (info) (download)


Re: APr Utils and PostgreSQL

2017-04-07 Thread Tom Browder
On Fri, Apr 7, 2017 at 11:06 AM, Reindl Harald  wrote:
>
>
> Am 07.04.2017 um 17:53 schrieb Tom Browder:
>>
>> On Fri, Apr 7, 2017 at 10:11 AM, Reindl Harald 
>> wrote:
>>>
>>>
>>>
>>> Am 07.04.2017 um 17:06 schrieb Tom Browder:


 On Fri, Apr 7, 2017 at 09:53 Jordan Gigov > wrote:

  The =DIR parameter is optional. If you have the libpq-dev package
  installed, it should find it automatically.

 I do have the dev package installed, but it didn't find it.  In the
 interim, would creating a pkg-config pc file and pointing DIR at it
 work?
>>>
>>>
>>>
>>> http://www.catb.org/esr/faqs/smart-questions.html#beprecise
>>>
>>> why don't you tell in your first post relevant informations?
>>>
>>> * exact os version
>>> * installed packages
>>> * complete ./configure line
>>> * complete output of ./configure
>>
>>
>> Okay.
>>
>>> "I do have the dev package installed" 4 posts later - seriously?
>>
>>
>> Well, mea culpa, but I didn't think of it since it's so basic, sorry.
>
>
> yes, that's all basic, hnce it works everywhere but in your case
>
>> Packages  with postgresql in their name:
>>
>> $ aptitude search postgres | grep ^i
>> i A postgresql-client-common- manager for multiple PostgreSQL
>> client ver
>> i A postgresql-common   - PostgreSQL database-cluster manager
>> i A postgresql-server-dev-9.4   - development files for PostgreSQL 9.4
>> serve
>> i   postgresql-server-dev-all   - extension build tool for multiple
>> PostgreS
>
>
> looks good, i guess debian has a weird naming sicne it's the client
> libraries you link against
>
>>https://gist.github.com/tbrowder/451e0f735bd281dde6694f189b8f6d61
>
>
> https://gist.github.com/tbrowder/451e0f735bd281dde6694f189b8f6d61
>
> don't show any errors and postgresql is stattet with yes
> so what is your *problem*
> hecking postgresql/libpq-fe.h usability... yes
> checking postgresql/libpq-fe.h presence... yes
> checking for postgresql/libpq-fe.h... yes
>
> main question: why in the world are you building from source?
> https://packages.debian.org/jessie/libaprutil1-dbd-pgsql

Because I want to be running the latest httpd (and use pgsql and
splite3), and I didn't know of the package you mentioned:

  libaprutil1-dbd-pgsql

Thanks.

-Tom


Re: APr Utils and PostgreSQL

2017-04-07 Thread Tom Browder
On Fri, Apr 7, 2017 at 11:02 AM, Yann Ylavic  wrote:
> On Fri, Apr 7, 2017 at 5:53 PM, Tom Browder  wrote:
>>
>> Packages  with postgresql in their name:
>>
>> $ aptitude search postgres | grep ^i
>> i A postgresql-client-common- manager for multiple PostgreSQL client 
>> ver
>> i A postgresql-common   - PostgreSQL database-cluster manager
>> i A postgresql-server-dev-9.4   - development files for PostgreSQL 9.4 
>> serve
>> i   postgresql-server-dev-all   - extension build tool for multiple 
>> PostgreS
>
> I think you only need libpq-dev (the pgsql library).

Ah, I'll bet that's the key, Yann--thanks so much--I'll report back
momentarily.!

Best regards,

-Tom


Re: APr Utils and PostgreSQL

2017-04-07 Thread Reindl Harald



Am 07.04.2017 um 17:53 schrieb Tom Browder:

On Fri, Apr 7, 2017 at 10:11 AM, Reindl Harald  wrote:



Am 07.04.2017 um 17:06 schrieb Tom Browder:


On Fri, Apr 7, 2017 at 09:53 Jordan Gigov > wrote:

 The =DIR parameter is optional. If you have the libpq-dev package
 installed, it should find it automatically.

I do have the dev package installed, but it didn't find it.  In the
interim, would creating a pkg-config pc file and pointing DIR at it work?



http://www.catb.org/esr/faqs/smart-questions.html#beprecise

why don't you tell in your first post relevant informations?

* exact os version
* installed packages
* complete ./configure line
* complete output of ./configure


Okay.


"I do have the dev package installed" 4 posts later - seriously?


Well, mea culpa, but I didn't think of it since it's so basic, sorry.


yes, that's all basic, hnce it works everywhere but in your case


Packages  with postgresql in their name:

$ aptitude search postgres | grep ^i
i A postgresql-client-common- manager for multiple PostgreSQL client ver
i A postgresql-common   - PostgreSQL database-cluster manager
i A postgresql-server-dev-9.4   - development files for PostgreSQL 9.4 serve
i   postgresql-server-dev-all   - extension build tool for multiple PostgreS


looks good, i guess debian has a weird naming sicne it's the client 
libraries you link against



   https://gist.github.com/tbrowder/451e0f735bd281dde6694f189b8f6d61


https://gist.github.com/tbrowder/451e0f735bd281dde6694f189b8f6d61

don't show any errors and postgresql is stattet with yes
so what is your *problem*
hecking postgresql/libpq-fe.h usability... yes
checking postgresql/libpq-fe.h presence... yes
checking for postgresql/libpq-fe.h... yes

main question: why in the world are you building from source?
https://packages.debian.org/jessie/libaprutil1-dbd-pgsql


Re: APr Utils and PostgreSQL

2017-04-07 Thread Tom Browder
On Fri, Apr 7, 2017 at 10:53 AM, Tom Browder  wrote:
>>> I do have the dev package installed, but it didn't find it.  In the
>>> interim, would creating a pkg-config pc file and pointing DIR at it work?

I just rebuilt the package and don't see a *pgsql.so file, but I do see:

./srclib/apr-util-1.5.4/dbd/NWGNUdbdpgsql

whose contents are:

#
# Declare the sub-directories to be built here
#

SUBDIRS = \
$(EOLIST)

#
# Get the 'head' of the build environment.  This includes default targets and
# paths to tools
#

ifndef EnvironmentDefined
include $(APR_WORK)/build/NWGNUhead.inc
endif

#include $(APR)\build\NWGNUcustom.inc

#
# build this level's files

#
# Make sure all needed macro's are defined
#

# LINK_STATIC = 1

# for now defined here - should finally go into build/NWGNUenvironment.inc
PGSQL_INC = $(PGSQLSDK)/inc
PGSQL_IMP = libpq.imp
PGSQL_LIB = libpq.lib
PGSQL_NLM = libpq

#
# These directories will be at the beginning of the include list, followed by
# INCDIRS
#
XINCDIRS += \
$(APR)/include/arch/netware \
$(APR)/include \
$(APU)/include \
$(APU)/include/private \
$(APR) \
$(PGSQL_INC) \
$(EOLIST)

#
# These flags will come after CFLAGS
#
XCFLAGS += \
$(EOLIST)

#
# These defines will come after DEFINES
#
XDEFINES += \
-DAPU_DSO_MODULE_BUILD \
-DAPU_HAVE_PGSQL=1 \
-DHAVE_LIBPQ_FE_H \
$(EOLIST)

#
# These flags will be added to the link.opt file
#
XLFLAGS += \
$(EOLIST)

ifdef LINK_STATIC
XLFLAGS += \
-l $(PGSQLSDK)/lib \
$(EOLIST)
else
XLFLAGS += \
-l $(PGSQLSDK)/imp \
$(EOLIST)
endif

#
# These values will be appended to the correct variables based on the value of
# RELEASE
#
ifeq "$(RELEASE)" "debug"
XINCDIRS += \
$(EOLIST)

XCFLAGS += \
$(EOLIST)

XDEFINES += \
$(EOLIST)

XLFLAGS += \
$(EOLIST)
endif

ifeq "$(RELEASE)" "noopt"
XINCDIRS += \
$(EOLIST)

XCFLAGS += \
$(EOLIST)

XDEFINES += \
$(EOLIST)

XLFLAGS += \
$(EOLIST)
endif

ifeq "$(RELEASE)" "release"
XINCDIRS += \
$(EOLIST)

XCFLAGS += \
$(EOLIST)

XDEFINES += \
$(EOLIST)

XLFLAGS += \
$(EOLIST)
endif

#
# These are used by the link target if an NLM is being generated
# This is used by the link 'name' directive to name the nlm.  If left blank
# TARGET_nlm (see below) will be used.
#
NLM_NAME = dbdpgsql

#
# This is used by the link '-desc ' directive.
# If left blank, NLM_NAME will be used.
#
NLM_DESCRIPTION = Apache Portability Runtime Library $(VERSION_STR)
DBD PostgreSQL Driver Module

#
# This is used by the '-threadname' directive.  If left blank,
# NLM_NAME Thread will be used.
#
NLM_THREAD_NAME = dbdpgsql

#
# If this is specified, it will override VERSION value in
# $(AP_WORK)\build\NWGNUenvironment.inc
#
NLM_VERSION =

#
# If this is specified, it will override the default of 64K
#
NLM_STACK_SIZE = 8192


#
# If this is specified it will be used by the link '-entry' directive
#
NLM_ENTRY_SYM =

#
# If this is specified it will be used by the link '-exit' directive
#
NLM_EXIT_SYM =

#
# If this is specified it will be used by the link '-check' directive
#
NLM_CHECK_SYM =

#
# If these are specified it will be used by the link '-flags' directive
#
NLM_FLAGS =

#
# If this is specified it will be linked in with the XDCData option in the def
# file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
# by setting APACHE_UNIPROC in the environment
#
XDCDATA =

#
# If there is an NLM target, put it here
#
TARGET_nlm = \
$(OBJDIR)/$(NLM_NAME).nlm \
$(EOLIST)

#
# If there is an LIB target, put it here
#
TARGET_lib = \
$(EOLIST)

#
# These are the OBJ files needed to create the NLM target above.
# Paths must all use the '/' character
#
FILES_nlm_objs = \
$(OBJDIR)/apr_dbd_pgsql.o \
$(EOLIST)

#
# These are the LIB files needed to create the NLM target above.
# These will be added as a library command in the link.opt file.
#
FILES_nlm_libs = \
$(PRELUDE) \
$(EOLIST)

ifeq ($(LINK_STATIC),1)
FILES_nlm_libs += \
$(PGSQL_LIB) \
$(EOLIST)
endif

#
# These are the modules that the above NLM target depends on to load.
# These will be added as a module command in the link.opt file.
#
FILES_nlm_modules = \
aprlib \
libc \
$(EOLIST)

ifneq ($(LINK_STATIC),1)
FILES_nlm_modules += \
$(PGSQL_NLM) \
$(EOLIST)
endif

#
# If the nlm has a msg file, put it's path here
#
FILE_nlm_msg =

#
# If the nlm has a hlp file put it's path here
#
FILE_nlm_hlp =

#
# If this is specified, it will override $(NWOS)\copyright.txt.
#
FILE_nlm_copyright =

#
# Any additional imports go here
#
FILES_nlm_Ximports = \
@aprlib.imp \
@libc.imp \
$(EOLIST)

ifneq ($(LINK_STATIC),1)
FILES_nlm_Ximports += \
@$(PGSQL_IMP) \
$(EOLIST)
endif

#
# Any symbols exported to here
#
FILES_nlm_exports = \
apr_dbd_pgsql_driver \
$(EOLIST)

#
# These are the OBJ files needed to create the LIB target above.
# Paths must all use the '/' character
#
FILES_lib_objs = \
$(EOLIST)

#
# implement targets and dependancies (leave this section alone)
#

libs :: $(OBJDIR) $(TARGET_lib)

nlms :: libs $(TARGET_nlm)

#
# Updated this target to create necessary 

Re: APr Utils and PostgreSQL

2017-04-07 Thread Yann Ylavic
On Fri, Apr 7, 2017 at 5:53 PM, Tom Browder  wrote:
>
> Packages  with postgresql in their name:
>
> $ aptitude search postgres | grep ^i
> i A postgresql-client-common- manager for multiple PostgreSQL client 
> ver
> i A postgresql-common   - PostgreSQL database-cluster manager
> i A postgresql-server-dev-9.4   - development files for PostgreSQL 9.4 
> serve
> i   postgresql-server-dev-all   - extension build tool for multiple 
> PostgreS

I think you only need libpq-dev (the pgsql library).

Regards,
Yann.


Re: APr Utils and PostgreSQL

2017-04-07 Thread Tom Browder
On Fri, Apr 7, 2017 at 10:11 AM, Reindl Harald  wrote:
>
>
> Am 07.04.2017 um 17:06 schrieb Tom Browder:
>>
>> On Fri, Apr 7, 2017 at 09:53 Jordan Gigov > > wrote:
>>
>> The =DIR parameter is optional. If you have the libpq-dev package
>> installed, it should find it automatically.
>>
>> I do have the dev package installed, but it didn't find it.  In the
>> interim, would creating a pkg-config pc file and pointing DIR at it work?
>
>
> http://www.catb.org/esr/faqs/smart-questions.html#beprecise
>
> why don't you tell in your first post relevant informations?
>
> * exact os version
> * installed packages
> * complete ./configure line
> * complete output of ./configure

Okay.

> "I do have the dev package installed" 4 posts later - seriously?

Well, mea culpa, but I didn't think of it since it's so basic, sorry.

Packages  with postgresql in their name:

$ aptitude search postgres | grep ^i
i A postgresql-client-common- manager for multiple PostgreSQL client ver
i A postgresql-common   - PostgreSQL database-cluster manager
i A postgresql-server-dev-9.4   - development files for PostgreSQL 9.4 serve
i   postgresql-server-dev-all   - extension build tool for multiple PostgreS

$ uname -a
Linux dedi2 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07)
x86_64 GNU/Linux

$ cat .apache-config.sh
SSLDIR=/opt/openssl
export LDFLAGS="-Wl,-rpath,${SSLDIR}/lib"
$SRCDIR/configure  \
--prefix=/usr/local/apache2\
\
--enable-ssl   \
--enable-ssl-staticlib-deps\
--enable-mods-static=ssl   \
--with-ssl=${SSLDIR}   \
\
--enable-mods-shared=reallyall \
--with-perl\
\
--with-included-apr\
--with-pgsql   \
--with-sqlite3 \
\
--with-python  \
--with-lua=/usr\
--enable-layout=Apache \
--with-pcre=/usr/local/bin/pcre-config \
--without-ldap \
--enable-session-crypto\
--enable-session \
--with-crypto\
--with-openssl=${SSLDIR}

See output of configure at github gist:

  https://gist.github.com/tbrowder/451e0f735bd281dde6694f189b8f6d61

-Tom


Re: APr Utils and PostgreSQL

2017-04-07 Thread Nick Kew

On Fri, 2017-04-07 at 08:28 -0500, Tom Browder wrote:
> I am trying to get the pqsql lib built and cannot get the config
> option correct.  The help says:

OK, I read your mail (as I do most mail) on Debian, and I have
their standard -dev package installed via aptitude.
So I tested a new build, and a simple --with-pgsql worked for me:
after make, I have the driver.  If it had not worked, that would
be a bug, and we'd want to know about it!

Since you're asking on the httpd list, is it possible you're
mixing httpd/apr/apu builds, and not actually reconfiguring apu
when you specify your options?

-- 
Nick Kew



Re: APr Utils and PostgreSQL

2017-04-07 Thread Reindl Harald



Am 07.04.2017 um 17:06 schrieb Tom Browder:
On Fri, Apr 7, 2017 at 09:53 Jordan Gigov > wrote:


The =DIR parameter is optional. If you have the libpq-dev package
installed, it should find it automatically.

I do have the dev package installed, but it didn't find it.  In the 
interim, would creating a pkg-config pc file and pointing DIR at it work?


http://www.catb.org/esr/faqs/smart-questions.html#beprecise

why don't you tell in your first post relevant informations?

* exact os version
* installed packages
* complete ./configure line
* complete output of ./configure

"I do have the dev package installed" 4 posts later - seriously?


Re: APr Utils and PostgreSQL

2017-04-07 Thread Yann Ylavic
On Fri, Apr 7, 2017 at 3:42 PM, Tom Browder  wrote:
> On Fri, Apr 7, 2017 at 08:28 Tom Browder  wrote:
>>
>> I am trying to get the pqsql lib built and cannot get the config
>> option correct.  The help says:
>>
>>   with-pgsql=DIR
>
>
> Uh,
>
>   --with-pgsql=DIR

The DIR I use when linking with a self built pgsql is like [DIR]/bin/pg_config.

Regards,
Yann.


Re: APr Utils and PostgreSQL

2017-04-07 Thread Tom Browder
On Fri, Apr 7, 2017 at 09:53 Jordan Gigov  wrote:

> The =DIR parameter is optional. If you have the libpq-dev package
> installed, it should find it automatically.


I do have the dev package installed, but it didn't find it.  In the
interim, would creating a pkg-config pc file and pointing DIR at it work?

-Tom


Re: APr Utils and PostgreSQL

2017-04-07 Thread Jordan Gigov
The =DIR parameter is optional. If you have the libpq-dev package
installed, it should find it automatically.

On 7 April 2017 at 16:28, Tom Browder  wrote:
> I am trying to get the pqsql lib built and cannot get the config
> option correct.  The help says:
>
>   with-pgsql=DIR
>
> What DIR, please?  Each package seems to have a different definition
> of DIR. I have these on my Deb 8 system:
>
>   /usr/include/postgresql
>   ...
>
>   /usr/include/postgresql/9.4 [and lots of subdirs]
>
>   /usr/lib/postgresql/9.4
>   /usr/lib/postgresql/9.4/bin
>   /usr/lib/postgresql/9.4/lib
>
>   /usr/share/postgresql-common/
>   ...
>
> There is no pkg-config postgresql.pc on the system, but I guess I
> could make one and use that for DIR.
>
> But what is expected?
>
> Thanks.
>
> Best regards,
>
> -Tom


Re: APr Utils and PostgreSQL

2017-04-07 Thread Reindl Harald



Am 07.04.2017 um 15:28 schrieb Tom Browder:

I am trying to get the pqsql lib built and cannot get the config
option correct.  The help says:

   with-pgsql=DIR

What DIR, please?  Each package seems to have a different definition
of DIR. I have these on my Deb 8 system


none when you are working with default environments, that's the same for 
every type of software and such options be it httpd, php or something else


you just need to install the dev-packages for compile and it will be 
found automatically (on redhat they are called -devel)


http://stackoverflow.com/questions/1157192/what-do-the-dev-packages-in-the-linux-package-repositories-actually-contain




Re: APr Utils and PostgreSQL

2017-04-07 Thread Tom Browder
On Fri, Apr 7, 2017 at 08:28 Tom Browder  wrote:

> I am trying to get the pqsql lib built and cannot get the config
> option correct.  The help says:
>
>   with-pgsql=DIR


Uh,

  --with-pgsql=DIR

BTW, I also used

  --with-sqlite3

and that dbd lib was built fine. I'm guessing that the pqsql numbering
system might be causing the problem: more specific info needed.

-Tom


APr Utils and PostgreSQL

2017-04-07 Thread Tom Browder
I am trying to get the pqsql lib built and cannot get the config
option correct.  The help says:

  with-pgsql=DIR

What DIR, please?  Each package seems to have a different definition
of DIR. I have these on my Deb 8 system:

  /usr/include/postgresql
  ...

  /usr/include/postgresql/9.4 [and lots of subdirs]

  /usr/lib/postgresql/9.4
  /usr/lib/postgresql/9.4/bin
  /usr/lib/postgresql/9.4/lib

  /usr/share/postgresql-common/
  ...

There is no pkg-config postgresql.pc on the system, but I guess I
could make one and use that for DIR.

But what is expected?

Thanks.

Best regards,

-Tom