From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079341819500.tru64-unix-managers.marc@archive.invalid> From: Ian 'Ivo' Veach Date: Mon, 13 Mar 2000 19:50:38 +0000 To: tru64-unix-managers Subject: SUMMARY: problems compiling MySQL under 4.0D X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079341819500 Problem: Problems compiling MySQL 3.22.x on a 4.0D box Solution: I used Ann Cantelow's suggestion first, and it seems to work just dandy (thanks, Ann!): Get newest version on GNU make and use the following: env CC="cc -pthread" CFLAGS="-I./include -DDONT_USE_THR_ALARM" CXX=gcc \ CXXFLAGS="-O3 -DDONT_USE_THR_ALARM" ./configure --with-low-memory \ --with-named-thread-libs="-lpthread -lmach -lexc" The _complete_ combo of options seemed to get the job done. Douglas also reported success. Both responses are included below. Thanks much to: Ann Cantelow Douglas C. Stephens I love this list, ________________________________________________________________________ Ian 'Ivo' Veach, ivo@nevada.edu UCCSN System Computing Services http://www.nevada.edu/~ivo postmaster/webmaster/sysadmin ________________________________________________________________________ ======================================================================== ORIGINAL PROBLEM ======================================================================== Sorry this is not strictly a tru64 question, but has anyone been successful in compiling MySQL 3.22.32 under DU 4.0D? I've been having a heck of a time doing so, both with Digital/Compaq's cc (5.6-084) and with gcc (2.8.1 and 2.95.2). Nothing from the MySQL mailing lists has been helpful in completing this task. I overcame the parsing error with /usr/include/c_asm.h, and now it is giving me issues with threads. I don't know if this is related to DEC threads or not (I suspect not, but don't know whether pthread_condattr_default or pthread_mutexattr_default are supposed to be declared in MySQL source or DEC source), but I'm not having the problems on other platforms: my_pthread.c: In function `my_pthread_mutex_init': my_pthread.c:381: `pthread_mutexattr_default' undeclared (first use in this function) my_pthread.c:381: (Each undeclared identifier is reported only once my_pthread.c:381: for each function it appears in.) my_pthread.c: In function `my_pthread_cond_init': my_pthread.c:391: `pthread_condattr_default' undeclared (first use in this function) *** Exit 1 Stop. I've tried various compile flags mentioned by MySQL lists, but nothing has resulted in success. A DEC success story or pointers would be helpful! Thanks! ======================================================================== RESPONSE ======================================================================== Hi. I have had success with 3.22.30 [sic]. It's working great for us and very stable. Those thread errors look familiar. I got those, I believe, on a path I ended up not taking. This config string did it for me, with cc for CC and gcc for CXX: ----------- env CC="cc -pthread" CFLAGS="-I./include -DDONT_USE_THR_ALARM" CXX=gcc \ CXXFLAGS="-O3 -DDONT_USE_THR_ALARM" ./configure --with-low-memory \ --with-named-thread-libs="-lpthread -lmach -lexc" ----------- You may not need the DONT_USE_THR_ALARM or --with-low-memory. Those were things I had added when I was struggling with it and grasping at every bit of information in the manual I could find. Note that -lc is not in the --with-named-thread-libs argument. This took me forever to find! The manual has it there, but you get errors with it when gcc gets confused and forgets functions like _exit and _fflush that are in it. lc is already included by default so you don't need it in that list of thread libs. Here's the second big problem I struggled with: I compiled it first under gcc version 2.8.1. The compile went fine, but the server was very unstable, crashing frequently. When I upgraded to gcc version 2.95.2 and recompiled mysql, that problem was fixed. Our mysql up time now matches the machine up time and it never complains. We have a light load with occasional moderate surges. Also, I saw in the mysql mailing list just this morning that there was posted the location of a 3.23 beta version binary for us. Let me know if you'd like to know where that is, and I'll look it up. I kept the post. Good luck!! I believe I know what you're going through! I hope this helps. ======================================================================== RESPONSE ======================================================================== Hi. I just remembered that there was a brief problem with gcc 2.95.2. If you run into a notification of a compiler bug, look in the manual. It's covered there. Their solution works fine. It consists of going down to the sql directory and compiling one program by hand with a different -O optimization flag, then backing up and restarting the make. ======================================================================== RESPONSE ======================================================================== I was able to get MySql 3.22.30 to compile and run in the following environment. Note that I had no compile-time errors, though there were a plethora of the usual warnings, and that I need to make no changes to shipped source to fix any errors. OS Revision: ----------- Digital UNIX V4.0E (Rev. 1091); Fri Jun 18 15:48:28 CDT 1999 Patchlevel: ---------- duv40eas00001-19990202 Digital Software Packages: ------------------------- CXLLIBA435 DEC C++ Class Archive Libraries CXLSHRDA435 DEC C++ Class Shared Libraries CXXBASE620 Compaq C++ Version 6.2 for Tru64 UNIX Systems CXXHTML620 Compaq C++ HTML documentation CXXLIB620 Compaq C++ Run-Time Library (libcxx) for UNIX V4.0F and earlier CXXOLD620 Compaq C++ V5.7 (-oldcxx) compiler OSFCMPLRS435 Compiler Back End (Software Development) OSFLIBA435 Static Libraries (Software Development) OSFPGMR435 Standard Programmer Commands (Software development) OSFSDE435 Software Development Tools and Utilities(Software development) Third-party Software Packages: ----------------------------- security/tcp_wrappers_7.6 gnu/patch-2.5 gnu/flex-2.5.4a gnu/gdbm-1.7.3 gnu/bison-1.25 gnu/tar-1.12 gnu/make-3.77 perl/perl-5.005_03 Configure wrapper script: ------------------------ #!/bin/sh # PATH="/usr/local/bin:/usr/bin:/usr/bin/X11:/sbin:/usr/sbin:." export PATH CC="cc -pthread" CFLAGS="-O4 -ansi_alias -ansi_args -fast -inline speed -speculate all -arch host" CXX="cxx -pthread" CXXFLAGS="-O4 -ansi_alias -ansi_args -fast -inline speed -speculate all -arch host" export CC CFLAGS CXX CXXFLAGS exec ./configure \ --prefix=/usr/local/mysql \ --with-low-memory \ --enable-large-files \ --with-mysqld-ldflags=-all-static \ --disable-shared \ --with-libwrap \ --with-mysqld-user=daemon \ --with-named-thread-libs="-lmach -lexc -lc" Make wrapper script: ------------------- #!/bin/sh # PATH="/usr/local/bin:/usr/bin:/usr/bin/X11:/sbin:/usr/sbin:." export PATH exec make ======================================================================== cheers and thanks, ________________________________________________________________________ Ian 'Ivo' Veach, ivo@nevada.edu UCCSN System Computing Services http://www.nevada.edu/~ivo postmaster/webmaster/sysadmin ________________________________________________________________________