List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:March 16 1999 8:09pm
Subject:Compiling MySql 3.22.19b on SCO 5.0.4
View as plain text  
Hi!

The main reason for this problem is that our SCO computer here at TcX
got a hardware problem a while ago and I haven't been able to test the 
latest releases with this.


>>>>> "Gerald" == Gerald Clark <gerald_clark@stripped>
> writes:

Gerald> I have compiled and run MySql 3.21.31 with gcc 2.7-95q4 and FSU-threads
Gerald> 3.5 with no problems.

Gerald> I am attempting to upgrade to 3.22.19b and experience compiling 
Gerald> problems with threads.

<cut>

Gerald> gcc -belf -DDEFAULT_BASEDIR=\"/usr/local/mysql\" -DHAVE_CONFIG_H -I./../include
> -I../include -I..  -O6   -belf -DDBUG_OFF -c my_pthread.c
Gerald> my_pthread.c: In function `my_pthread_mutex_init':
Gerald> my_pthread.c:374: `pthread_mutexattr_default' undeclared (first use this
> function)
Gerald> my_pthread.c:374: (Each undeclared identifier is reported only once
Gerald> my_pthread.c:374: for each function it appears in.)
Gerald> my_pthread.c:376: incompatible type for argument 2 of `pthread_mutex_init'
Gerald> my_pthread.c: In function `my_pthread_cond_init':
Gerald> my_pthread.c:384: `pthread_condattr_default' undeclared (first use this
> function)
Gerald> my_pthread.c:386: incompatible type for argument 2 of `pthread_cond_init'
Gerald> make[2]: *** [my_pthread.o] Error 1
Gerald> make[2]: Leaving directory `/usr/src/express/mysql-3.22.19b/mysys'
Gerald> make[1]: *** [all-recursive] Error 1
Gerald> make[1]: Leaving directory `/usr/src/express/mysql-3.22.19b'
Gerald> make: *** [all-recursive-am] Error 2

<cut>

#define HAVE_NONPOSIX_PTHREAD_MUTEX_INIT 1

<cut>

The fix is to remove the above define from config.h

Could you post directly to me the code in config.log that checks for
pthread_mutex_init.  For some reason, the following code in configure
doesn't work on your SCO machine:

-----------------

  # Check definition of pthread_mutex_init
  echo $ac_n "checking "args to pthread_mutex_init"""... $ac_c" 1>&6
echo "configure:6618: checking "args to pthread_mutex_init"" >&5
if eval "test \"`echo '$''{'mysql_cv_mutex_init_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6623 "configure"
#include "confdefs.h"
#ifndef SCO
#define _REENTRANT
#endif
#define _POSIX_PTHREAD_SEMANTICS
#include <pthread.h>
int main() {

  pthread_mutexattr_t attr;
  pthread_mutex_t mp;
  pthread_mutex_init(&mp,&attr);
; return 0; }
EOF
if { (eval echo configure:6637: \"$ac_compile\") 1>&5; (eval $ac_compile)
2>&5;
}; then
  rm -rf conftest*
  mysql_cv_mutex_init_args=POSIX
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  mysql_cv_mutex_init_args=other
fi
rm -f conftest*
fi

echo "$ac_t""$mysql_cv_mutex_init_args" 1>&6
  if test "$mysql_cv_mutex_init_args" = "other"
  then
    cat >> confdefs.h <<\EOF
#define HAVE_NONPOSIX_PTHREAD_MUTEX_INIT 1
EOF
 
-------------

Regards,
Monty
Thread
Compiling MySql 3.22.19b on SCO 5.0.4Gerald Clark16 Mar
  • Compiling MySql 3.22.19b on SCO 5.0.4Michael Widenius16 Mar