Issue 521 - Problems building with threads on OpenBSD
Summary: Problems building with threads on OpenBSD
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-04-27 18:48 UTC by adam.reece@cgi.ca
Modified: 2014-08-01 21:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description adam.reece@cgi.ca 2000-04-27 18:48:35 UTC
Full_Name: Adam Reece
Version: OpenLDAP 1.2.9+
OS: OpenBSD 2.6
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (207.164.204.5)


I have been trying to build a thread-enabled OpenLDAP 1.2.9 or 1.2.10 on a
simple OpenBSD 2.6 system following the instructions in the OpenBSD Faq-O-Matic.
The configure script seems to run fine, but problems first begin to surface when
I run "make depend". There are several (50 or more) lines that give the
following warnings:


/usr/include/pthread.h:352: warning: #warning "included <pthread.h> without
-pthread compiler option"
In file included from ../../include/ldap_pvt_thread.h:24,
                 from ../slapd/slap.h:24,
                 from ch_malloc.c:24:


However, they are only warnings. When I try to do a make, the build fails when
trying to build libldbm with the following error:


  Entering subdirectory libldbm
gcc -g -O2 -I../../include -I../../include   -DHAVE_CONFIG_H   -c ldbm.c
In file included from ../../include/ldap_pvt_thread.h:24,
                 from ldbm.c:22:
/usr/include/pthread.h:352: warning: #warning "included <pthread.h> without
-pth
read compiler option"
In file included from ldbm.c:22:
../../include/ldap_pvt_thread.h:31: syntax error before `ldap_pvt_thread_t'
../../include/ldap_pvt_thread.h:31: warning: data definition has no type or
stor
age class
../../include/ldap_pvt_thread.h:32: syntax error before
`ldap_pvt_thread_mutex_t
'
../../include/ldap_pvt_thread.h:32: warning: data definition has no type or
stor
age class
../../include/ldap_pvt_thread.h:33: syntax error before
`ldap_pvt_thread_cond_t'
../../include/ldap_pvt_thread.h:33: warning: data definition has no type or
stor
age class
../../include/ldap_pvt_thread.h:188: syntax error before `*'
../../include/ldap_pvt_thread.h:190: `ldap_pvt_thread_create' declared as
functi
on returning a function
../../include/ldap_pvt_thread.h:191: syntax error before `void'
../../include/ldap_pvt_thread.h:197: syntax error before `thread'
../../include/ldap_pvt_thread.h:200: syntax error before `thread'
../../include/ldap_pvt_thread.h:206: syntax error before `*'
../../include/ldap_pvt_thread.h:209: syntax error before `*'
../../include/ldap_pvt_thread.h:212: syntax error before `*'
../../include/ldap_pvt_thread.h:216: syntax error before `*'
../../include/ldap_pvt_thread.h:220: syntax error before `*'
../../include/ldap_pvt_thread.h:223: syntax error before `*'
../../include/ldap_pvt_thread.h:226: syntax error before `*'
../../include/ldap_pvt_thread.h:229: syntax error before `*'
../../include/ldap_pvt_thread.h:232: syntax error before `*'
../../include/ldap_pvt_thread.h:235: syntax error before
`ldap_pvt_thread_mutex_
t'
ldbm.c:54: syntax error before `ldbm_big_mutex'
ldbm.c:54: warning: data definition has no type or storage class
*** Error code 1

Stop in /root/openldap-1.2.9/libraries/libldbm.
*** Error code 1

Stop in /root/openldap-1.2.9/libraries.
*** Error code 1

Stop in /root/openldap-1.2.9.

I can provide my copy of ldap_pvt_thread.h if you would like, but it seems to be
a bit big to do it here. My current work-around is to build without threads.
Comment 1 adam.reece@cgi.ca 2000-05-02 19:31:04 UTC
I'm hoping this message reaches someone because after fighting with OpenLDAP
for the past two weeks I have finally narrowed down to issues that have been
bugging me.

The first involves ITS#521 - Problems building with threads on OpenBSD. I
was following the instructions on the OpenLDAP Faq-O-Matic (OpenLDAP
Faq-O-Matic -> OpenLDAP Software FAQ -> Installation -> Platform Hints ->
OpenBSD), and that apparently was my problem. The simple solution to build
OpenLDAP on OpenBSD with threads is:

1.) Ignore the instructions in the Faq-O-Matic for OpenBSD
2.) Set the CPPFLAGS environment variable to '-pthread'
	# export CPPFLAGS=-pthread
3.) Run the configure script with the '--with-threads' option.
	# ./configure --with-threads

While building slapd and the others, it will result in compiler messages
with '-pthread' in there twice, but there are no warning messages related to
threads and compiles and links fine.

On a final note, the reason I was trying to build with threads was because I
was having performance issues on the Pentium-75 I'm using to host it, and
the repsonses from slapd to other machines were taking far too long. I was
hoping that building with threads would clear up the issue. However, it
turned out that the test machines I was using had IP addresses assigned by
DHCP (which I also knew), but the IP addresses weren't in the DNS. My
performance issue turned out to be a long-timeout waiting for the DNS to
respond that it didn't have those IP addresses in it. I simply put the names
and addresses in the host file for each appropriate machine, and volia!
Instant performance improvement.

> -----Original Message-----
> From: openldap-its@OpenLDAP.org [mailto:openldap-its@OpenLDAP.org]
> Sent: Thursday, April 27, 2000 14:49
> To: adam.reece@cgi.ca
> Subject: Re: Problems building with threads on OpenBSD (ITS#521)
>
>
>
> *** THIS IS AN AUTOMATICALLY GENERATED REPLY ***
>
> Thanks for your report to openldap-its@OpenLDAP.org.  Your report
> has been placed into our Issue Tracking System and has been assigned
> the tracking number ITS#521.
>
> One of support engineers will look at your report in due course.
> Note that this may take some time because our support engineers
> are volunteers.  They only work on OpenLDAP when they have spare
> time.
>
> You may follow the progress of this message by loading the following
> URL in a web browser:
>
>     http://www.OpenLDAP.org/its/index.cgi?findid=521
>
> Please remember to retain your issue tracking number (ITS#521)
> on any further messages you send to us regarding this message.  If
> you don't then you'll just waste our time and yours because we
> won't be able to properly track the message.
>
> In our experience many people ask questions that have been asked
> before.  We recommend that you review our online FAQ
>
> 	http://www.OpenLDAP.org/faq/
>
> and search archives of our many mailing lists (such as openldap-software
> and openldap-bugs).
>
> 	http://www.OpenLDAP.org/lists/#archives
>
> --------------
> Copyright 1999 The OpenLDAP Foundation, All Rights Reserved.
>
>
>

Comment 2 Kurt Zeilenga 2000-05-03 04:28:47 UTC
changed notes
changed state Open to Closed
Comment 3 Kurt Zeilenga 2000-05-03 08:19:52 UTC
You are encouraged to update the FAQ with additional answers.
The FAQ is interactive.

At 07:31 PM 5/2/00 GMT, adam.reece@cgi.ca wrote:
>I'm hoping this message reaches someone because after fighting with OpenLDAP
>for the past two weeks I have finally narrowed down to issues that have been
>bugging me.
>
>The first involves ITS#521 - Problems building with threads on OpenBSD. I
>was following the instructions on the OpenLDAP Faq-O-Matic (OpenLDAP
>Faq-O-Matic -> OpenLDAP Software FAQ -> Installation -> Platform Hints ->
>OpenBSD), and that apparently was my problem. The simple solution to build
>OpenLDAP on OpenBSD with threads is:
>
>1.) Ignore the instructions in the Faq-O-Matic for OpenBSD
>2.) Set the CPPFLAGS environment variable to '-pthread'
>	# export CPPFLAGS=-pthread
>3.) Run the configure script with the '--with-threads' option.
>	# ./configure --with-threads
>
>While building slapd and the others, it will result in compiler messages
>with '-pthread' in there twice, but there are no warning messages related to
>threads and compiles and links fine.
>
>On a final note, the reason I was trying to build with threads was because I
>was having performance issues on the Pentium-75 I'm using to host it, and
>the repsonses from slapd to other machines were taking far too long. I was
>hoping that building with threads would clear up the issue. However, it
>turned out that the test machines I was using had IP addresses assigned by
>DHCP (which I also knew), but the IP addresses weren't in the DNS. My
>performance issue turned out to be a long-timeout waiting for the DNS to
>respond that it didn't have those IP addresses in it. I simply put the names
>and addresses in the host file for each appropriate machine, and volia!
>Instant performance improvement.
>
>> -----Original Message-----
>> From: openldap-its@OpenLDAP.org [mailto:openldap-its@OpenLDAP.org]
>> Sent: Thursday, April 27, 2000 14:49
>> To: adam.reece@cgi.ca
>> Subject: Re: Problems building with threads on OpenBSD (ITS#521)
>>
>>
>>
>> *** THIS IS AN AUTOMATICALLY GENERATED REPLY ***
>>
>> Thanks for your report to openldap-its@OpenLDAP.org.  Your report
>> has been placed into our Issue Tracking System and has been assigned
>> the tracking number ITS#521.
>>
>> One of support engineers will look at your report in due course.
>> Note that this may take some time because our support engineers
>> are volunteers.  They only work on OpenLDAP when they have spare
>> time.
>>
>> You may follow the progress of this message by loading the following
>> URL in a web browser:
>>
>>     http://www.OpenLDAP.org/its/index.cgi?findid=521
>>
>> Please remember to retain your issue tracking number (ITS#521)
>> on any further messages you send to us regarding this message.  If
>> you don't then you'll just waste our time and yours because we
>> won't be able to properly track the message.
>>
>> In our experience many people ask questions that have been asked
>> before.  We recommend that you review our online FAQ
>>
>> 	http://www.OpenLDAP.org/faq/
>>
>> and search archives of our many mailing lists (such as openldap-software
>> and openldap-bugs).
>>
>> 	http://www.OpenLDAP.org/lists/#archives
>>
>> --------------
>> Copyright 1999 The OpenLDAP Foundation, All Rights Reserved.
>>
>>
>>
>
>
>
>
Comment 4 OpenLDAP project 2014-08-01 21:06:10 UTC
User should update FAQ with new information