[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Suggested changes for OSX port (ITS#1194)

At 04:20 PM 6/8/2001, jrusoff wrote:
>Thanks for writing back. You are right about the threads leaking if detach fails. Does the code follow the logic of the test script(create them undetached then detach after the thread completes) ?


>I guess I was hoping that the code created the threads detached, but if not, you are right, we'll have to build it unthreaded until we get a fixed version of pthreads.

We had portability problems with using pthread attributes in
the past.  Hopefully things are better now.  We'll see.

>The other change is to work around the way we build dynamic libs. These libs can't have common symbols, so adding that compiler flag keeps the compiler from generating them. If I don't add the flag, configure will bail when ld runs and hits these common symbols. The error looks like:
>ld: common symbols not allowed with MH_DYLIB output format
>util-int.lo definition of common _ldap_int_resolv_mutex (size 44)
>I'll see if I can get some info on when we might get a fix for the pthreads bug.
>On Friday, June 8, 2001, at 03:58 PM, Kurt D. Zeilenga wrote:
>>That change would defeat the purpose of the test.  The
>>purpose of the test is to ensure pthread_detach works.
>>If it doesn't, then one shouldn't build --with-threads
>>as threads will be leaked.
>>As far as the -fno-common issue, how does configure
>>fail when this is not set?
>>At 02:58 PM 6/8/2001, jrusoff@apple.com wrote:
>>>Full_Name: Jason Rusoff
>>>Version: 2.0.11
>>>OS: Mac OSX
>>>Submission from: (NULL) (
>>>I have made two changes to the build system to get OpenLDAP to build and run on
>>>Mac OSX. I'd like to give these back to openLDAP, but I'm not sure how best to
>>>add #IFDEFS or other tests to the build scripts to add these changes in  a clean
>>>manner. So here are the changes. I'd be happy to talk in emails about how I
>>>should add these to the scripts in a clean manner.
>>>In OpenLDAP.m4 at around line 689 I added:
>>>       if ( status == EINVAL)   <<<< new
>>>               status = 0;                       <<<<new
>>>#ifdef HAVE_LINUX_THREADS   <<<< existing
>>>       pthread_kill_other_threads_np(); <<< existing
>>>#endif                                                  <<<< existing
>>>This change works around a bug in the Darwin PThreads lib.  We will be fixing
>>>this pthreads bug, but for now, this allows the build to proceed properly.
>>>Also, in configure.in at about line 552 I added:
>>>This compiler flag is needed for Darwin's dynamic libs.
>>>With these two changes everything builds and runs. I'd be glad to talk in more
>>>detail about these changes if you would like. If there is anything else I can do
>>>to help get these into your main codebase, please let me know.
>>>Thanks much,
>>>Jason Rusoff