pg.ddx.io  pgsql-testers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
[Postgresql alpha3] Configure fails with --libxml on OpenBSD
3+ messages / 2 participants
[nested] [flat]

* [Postgresql alpha3] Configure fails with --libxml on OpenBSD
@ 2009-12-30 11:07  postgresql@raveland.org
  0 siblings, 1 reply; 3+ messages in thread

From: postgresql@raveland.org @ 2009-12-30 11:07 UTC (permalink / raw)
  To: pgsql-testers

Hi,

I'm testing postgresql 8.5 alpha3 on OpenBSD (-current , amd64 and macppc).
The port uses the option --libxml.

With this option, I have the following error:

[...]
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... no
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... no
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for pthread-config... no
checking for the pthreads library -lpthreadGC2... no
checking for pthread.h... (cached) yes
checking for strerror_r... (cached) yes
[...]
checking thread safety of required library functions... no
configure: error: thread test program failed
This platform is not thread-safe.  Check the file 'config.log' or compile
and run src/test/thread/thread_test for the exact reason.
Use --disable-thread-safety to disable thread safety.



*OpenBSD must use -pthread.*

The config.log shows me these lines:

configure:20889: checking whether pthreads work with -pthread
configure:20984: cc -o conftest -O2 -pipe -Wall -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing  -pthread  -I/usr/local/include/libxml2 -I/usr/local/include  -I/usr/local/include -I/usr/include/kerberosV  -L/usr/local/lib -L/usr/local/lib  -L/usr/local/lib conftest.c   -lxml2 -lssl -lcrypto -lcom_err -lssl -lcrypto -lz -lreadline -ltermcap -lm  >&5
conftest.c: In function `main':
conftest.c:154: warning: `th' might be used uninitialized in this function
/usr/local/lib/libxml2.so.11.0: warning: strcpy() is almost always misused, please use strlcpy()
/usr/local/lib/libxml2.so.11.0: warning: strcat() is almost always misused, please use strlcat()
configure:20991: $? = 0
configure:21037: result: no
[...]
configure:20941: checking for the pthreads library -lpthread
configure:20984: cc -o conftest -O2 -pipe -Wall -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing    -I/usr/local/include/libxml2 -I/usr/local/include  -I/usr/local/include -I/usr/include/kerberosV  -L/usr/local/lib -L/usr/local/lib  -L/usr/local/lib conftest.c -lpthread  -lxml2 -lssl -lcrypto -lcom_err -lssl -lcrypto -lz -lreadline -ltermcap -lm  >&5
conftest.c: In function `main':
conftest.c:154: warning: `th' might be used uninitialized in this function
/usr/local/lib/libxml2.so.11.0: warning: strcpy() is almost always misused, please use strlcpy()
/usr/local/lib/libxml2.so.11.0: warning: strcat() is almost always misused, please use strlcat()
configure:20991: $? = 0
configure:21037: result: no
[..]
configure:28181: checking thread safety of required library functions
configure:28214: cc -o conftest -O2 -pipe -Wall -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing  -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -DIN_CONFIGURE  -I/usr/local/include/libxml2 -I/usr/local/include  -I/usr/local/include -I/usr/include/kerberosV  -L/usr/local/lib -L/usr/local/lib  -L/usr/local/lib conftest.c -lxml2 -lssl -lcrypto -lcom_err -lssl -lcrypto -lz -lreadline -ltermcap -lm   >&5
/tmp//ccZIUQ7g.o(.text+0x56): In function `main':
: warning: strcpy() is almost always misused, please use strlcpy()
/usr/local/lib/libxml2.so.11.0: warning: strcat() is almost always misused, please use strlcat()
/tmp//ccZIUQ7g.o(.text+0xa4): In function `main':
: undefined reference to `pthread_mutex_lock'
/tmp//ccZIUQ7g.o(.text+0xb7): In function `main':
: undefined reference to `pthread_create'
/tmp//ccZIUQ7g.o(.text+0xca): In function `main':
: undefined reference to `pthread_create'
/tmp//ccZIUQ7g.o(.text+0x10b): In function `main':
: undefined reference to `pthread_mutex_unlock'
/tmp//ccZIUQ7g.o(.text+0x117): In function `main':
: undefined reference to `pthread_join'
/tmp//ccZIUQ7g.o(.text+0x123): In function `main':
: undefined reference to `pthread_join'
/tmp//ccZIUQ7g.o(.text+0x232): In function `func_call_1':
: undefined reference to `pthread_mutex_lock'
/tmp//ccZIUQ7g.o(.text+0x2e7): In function `func_call_2':
: undefined reference to `pthread_mutex_lock'
/tmp//ccZIUQ7g.o(.text+0x240): In function `func_call_1':
: undefined reference to `pthread_mutex_unlock'
/tmp//ccZIUQ7g.o(.text+0x2f5): In function `func_call_2':
: undefined reference to `pthread_mutex_unlock'
collect2: ld returned 1 exit status
configure:28218: $? = 1
configure: program exited with status 1




When I remove the option --libxml in the port, everything is ok.

checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... yes
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for the pthreads library -lpthreadGC2... no
checking for pthread.h... (cached) yes
checking for strerror_r... (cached) yes 

Please note that both -pthread and -lpthread are on yes now.

And the config.log:

configure:20889: checking whether pthreads work with -pthread
configure:20984: cc -o conftest -O2 -pipe -Wall -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing  -pthread   -I/usr/local/include -I/usr/include/kerberosV   -L/usr/local/lib conftest.c   -lssl -lcrypto -lcom_err -lssl -lcrypto -lz -lreadline -ltermcap -lm  >&5
conftest.c: In function `main':
conftest.c:152: warning: `th' might be used uninitialized in this function
configure:20991: $? = 0
configure:21037: result: yes
[...]
configure:20941: checking for the pthreads library -lpthread
configure:20984: cc -o conftest -O2 -pipe -Wall -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing  -pthread    -I/usr/local/include -I/usr/include/kerberosV   -L/usr/local/lib conftest.c -lpthread    -lssl -lcrypto -lcom_err -lssl -lcrypto -lz -lreadline -ltermcap -lm  >&5
conftest.c: In function `main':
conftest.c:152: warning: `th' might be used uninitialized in this function
configure:20991: $? = 0
configure:21037: result: yes
[...]
configure:28181: checking thread safety of required library functions
configure:28214: cc -o conftest -O2 -pipe -Wall -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing  -pthread  -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -DIN_CONFIGURE   -I/usr/local/include -I/usr/include/kerberosV   -L/usr/local/lib conftest.c -lssl -lcrypto -lcom_err -lssl -lcrypto -lz -lreadline -ltermcap -lm   -lpthread    >&5
/tmp//ccAUpoIA.o(.text+0x56): In function `main':
: warning: strcpy() is almost always misused, please use strlcpy()
configure:28218: $? = 0
configure:28224: ./conftest
Your errno is thread-safe.
Your system has sterror_r();  it does not need strerror().
Your system has getpwuid_r();  it does not need getpwuid().
Your system has getaddrinfo();  it does not need gethostbyname()
  or gethostbyname_r().

Your platform is thread-safe.
configure:28228: $? = 0
configure:28230: result: yes


I don't understand why the detection of both -pthread and -lpthread fails with --libxml (may 
the messages about strcpy/strcat be the cause) ?

Regards,




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [Postgresql alpha3] Configure fails with --libxml on OpenBSD
@ 2009-12-30 16:34  Greg Smith <greg@2ndquadrant.com>
  parent: postgresql@raveland.org
  0 siblings, 1 reply; 3+ messages in thread

From: Greg Smith @ 2009-12-30 16:34 UTC (permalink / raw)
  To: postgresql@raveland.org; +Cc: pgsql-testers

postgresql@raveland.org wrote:
> I don't understand why the detection of both -pthread and -lpthread fails with --libxml (may 
> the messages about strcpy/strcat be the cause) ?
>   
Those warning are just that:  warnings, nothing related to your problem.

My first guess is that you're using a libxml from before thread safety 
was introduced, or have a version that wasn't compiled to support it:

http://xmlsoft.org/threads.html

There was a recent change to PostgreSQL that switched the default to 
turning on thread safety for clients when you build.  You can easily 
turn it back off again with passing --disable-thread-safety if you just 
don't have an installed libxml that is thread-safe.

-- 
Greg Smith    2ndQuadrant   Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com  www.2ndQuadrant.com




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [Postgresql alpha3] Configure fails with --libxml on OpenBSD
@ 2009-12-30 16:58  postgresql@raveland.org
  parent: Greg Smith <greg@2ndquadrant.com>
  0 siblings, 0 replies; 3+ messages in thread

From: postgresql@raveland.org @ 2009-12-30 16:58 UTC (permalink / raw)
  To: Greg Smith <greg@2ndquadrant.com>; +Cc: postgresql@raveland.org; pgsql-testers

On Wed, Dec 30, 2009 at 11:34:17AM -0500, Greg Smith wrote:
> postgresql@raveland.org wrote:
> >I don't understand why the detection of both -pthread and
> >-lpthread fails with --libxml (may the messages about
> >strcpy/strcat be the cause) ?
> Those warning are just that:  warnings, nothing related to your problem.
> 
> My first guess is that you're using a libxml from before thread
> safety was introduced, or have a version that wasn't compiled to
> support it:
> 
> http://xmlsoft.org/threads.html
> 
> There was a recent change to PostgreSQL that switched the default to
> turning on thread safety for clients when you build.  You can easily
> turn it back off again with passing --disable-thread-safety if you
> just don't have an installed libxml that is thread-safe.
> 

Hi Greg,

Thanks for your answer. 
You're right: the libxml (on OpenBSD) is build without the threads support.
I already use --disable-thread-safety but I was curious about the error 
with libxml.

Regards,



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2009-12-30 16:58 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-12-30 11:07 [Postgresql alpha3] Configure fails with --libxml on OpenBSD postgresql@raveland.org
2009-12-30 16:34 ` Greg Smith <greg@2ndquadrant.com>
2009-12-30 16:58   ` postgresql@raveland.org

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox