MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:October 3 2000 4:29pm
Subject:Re: porting to Darwin/Mac OS X
View as plain text  

>>>>> "Chris" == Chris Meyer <cmeyer@stripped> writes:

Chris> Hi Monty,
>> Wht is the difference between the thread implementation in rhapsody
>> and darwin;  As you know, MySQL compiles and works on rhapsodi.

Chris> Darwin has a POSIX IEEE 1003.1c pthreads implementation. I don't know 
Chris> enough about the standard to know if Darwin complies 100% but 'POSIX 
Chris> IEEE 1003.1c' is documented in the headers... Again, I think 
Chris> pthread_kill is not included in that spec. What defines do I have to 
Chris> set in order to avoid the use of pthread_kill? I ran configure (after 
Chris> certain modifications to recognize 'darwin') and it noticed that 
Chris> pthread_kill was NOT available -- but when I did the 'make' 
Chris> pthread_kill was still being called. Is this a mistake?

For rhapsody we have the following in configure:

    if test "$ac_cv_prog_gcc" = "yes"
      CPPFLAGS="$CPPFLAGS -traditional-cpp "
      if test $with_named_curses = "no"

Adding the above defines to CFLAGS and CXXFLAGS should give you the
same behaveour in Darvin as in rhapsody

>> Doesn't mysqladmin shutdown work if you don't have any connected
>> clients?  I am quite sure this works on rhapsodi.

Chris> I never got this to work even in rhapsody -- but I don't think I ever 
Chris> tried the binary dist. I had built it myself...

I have access to one MacOS X machine with rhapsody;  I can verify this
when I get some time over..

Chris> Here's a list of the issues for building under Darwin. I also 
Chris> included my current patch file which gets things to build. You'll 
Chris> note that I'm NOT using the 'HAVE_CTHREADS_WRAPPER' like rhapsody. 

If you don't do that, you will get problems with pthread_kill ?

Chris> Instead I made a new section called 'HAVE_DARWIN_THREADS'. Hopefully 
Chris> this is just temporary until things get cleaned up. Anyway, the list:

Chris> 1 - 'darwin' needs to be added to config.guess and config.sub

Chris> 2 - A compiler option '-O6' is added to the build; this doesn't seem 
Chris> to be a standard gcc switch; only pgcc under linux uses it. This 
Chris> doesn't cause the build to fail, just a bunch of annoying warnings. I 
Chris> didn't make any changes w.r.t. this.


Chris> 3 - The check for 'ps' doesn't work because under Darwin when the 
Chris> shell executes a script the only thing that shows up in 'ps' is the 
Chris> shell, not the script. I posted some messages on the Darwin list to 
Chris> see if anyone has any solution to this. Otherwise someone more 
Chris> knowledgeable will have to special-case Darwin in configure to force 
Chris> the BSD style FIND_PROC.


Chris> 4 - Some compiler flags for building with Darwin's gcc. Mainly 
Chris> '-traditional-cpp' needs to be on to build correctly.


Chris> 5 - The whole pthread issue. See my first paragraph at the beginning 
Chris> of this message.

see above.

Chris> 6 - A minor change in sql/ which doesn't build under 
Chris> Darwin. Hopefully this can be merged into mysql right away.


Chris> Here's the patch file (don't apply this blindly since 
Chris> forces FIND_PROC to use BSD style if all other checks fail):


I have now applied this;  I did however add a test to only do
do your FIND_PROC patch on darwin.

porting to Darwin/Mac OS XChris Meyer1 Oct
  • porting to Darwin/Mac OS XMichael Widenius1 Oct
    • Re: porting to Darwin/Mac OS XChris Meyer2 Oct
      • Re: porting to Darwin/Mac OS XMichael Widenius3 Oct
        • Re: porting to Darwin/Mac OS XChris Meyer9 Oct
          • Re: porting to Darwin/Mac OS Xsinisa9 Oct
          • Re: porting to Darwin/Mac OS XMichael Widenius11 Oct
            • Re: porting to Darwin/Mac OS XNick Kledzik19 Oct
  • Re: porting to Darwin/Mac OS Xsasha11 Oct
Re: porting to Darwin/Mac OS XThimble Smith1 Oct