List:General Discussion« Previous MessageNext Message »
From:OpenMacNews Date:May 27 2004 9:03pm
Subject:MySQL not finidng/using NON-system OpenSSL
View as plain text  
hi all,

i'm building MySQL-4.0.20 from source on OSX 10.3.3

fwiw, my build env includes:
        gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1640)
        autoconf --verautomake (GNU automake) 1.8.2
        autoconf (GNU Autoconf) 2.59
        ltmain.sh (GNU libtool) 1.5.6 (1.1220.2.94 2004/04/10 16:27:27)

i've installed a NON-SYSTEM openssl (OpenSSL 0.9.7d 17 Mar 2004) /usr/local/ssl.  this
causes some headaches which, from what i've seen on the boards, are previously known, but,
AFAIK, NOT fixed.

i'm trying to get MySQL to build with/use *my* install of OpenSSL, i.e. the one in
/usr/local/ssl.

in order to get it to work, I'm having to make the following 'tweaks'/workarounds ...

first, in order to get the build to find MY ssl install, I tried the "usual" ENV settings:

        unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND LC_ALL LANG
LINGUAS ;\
        setenv LDFLAGS "-L/usr/local/ssl/lib -lssl -lcrypto -L/sw/lib -lreadline" ;\
        setenv CPPFLAGS "-I/usr/local/ssl/include -I/sw/include"

with a "configure" of:

./configure \
--prefix=/usr/local/mysql \
--localstatedir=/var/mysql \
--enable-shared --enable-static \
--enable-large-files \
--disable-maintainer-mode \
--enable-thread-safe-client \
--enable-assembler \
--with-pthread \
--with-mysqld-user=mysql \
--with-libwrap \
--with-vio \
--with-openssl \
--with-openssl-includes=/usr/local/ssl/include \
--with-openssl-libs=/usr/local/ssl/lib \
--with-isam \
--with-innodb \
--without-berkeley-db \
--without-docs \
--without-debug \
--without-bench

unfortunately, that does not seem to work ... the build keeps finding the /usr/lib system
install first.

after a little digging, I  find in "/usr/ports/mysql-4.0.20/configure:34077"

       ...
       for d in /usr/ssl/include /usr/local/ssl/include /usr/include \
       ...

on a whim, I set the following symlinks:

        ln -s /usr/local/ssl/include /usr/ssl/include
        ln -s /usr/local/ssl/lib /usr/ssl/lib

and, now (!) the build uses MY /usr/local/ssl openssl install.

after getting a little further in MAKE, it fails, complaining about 'gcc, -o, -S, and
multiple connections'.

some more digging on the web, and I track down the problem to a bug (?) in
"libmysql_r/Makefile.in". the fix is:

=============================================
(EDITOR) libmysql_r/Makefile.in
        INCLUDES =  -I$(srcdir)/../include -I../include \
---                     -I$(srcdir)/.. -I$(top_srcdir) -I.. $(openssl_includes)
+++                     -I$(srcdir)/.. -I$(top_srcdir) -I.. -I$(openssl_includes)
=============================================

NOTE: since i'm building the thread-safe client, its using the libmysql_r dir; i presume
that libmysql/Makefile doesw (may?) have similar issues ...


with the changes above, now

        unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND LC_ALL LANG
LINGUAS ;\
        setenv LDFLAGS "-L/usr/local/ssl/lib -lssl -lcrypto -L/sw/lib -lreadline" ;\
        setenv CPPFLAGS "-I/usr/local/ssl/include -I/sw/include"

        glibtoolize --force --copy
        aclocal -I bdb/dist/aclocal -I innobase -I libmysql
        autoconf

        ./configure \
        --prefix=/usr/local/mysql \
        --localstatedir=/var/mysql \
        <snip>
        --without-debug \
        --without-bench

        make
        make install


is successful.  This seems to be wrapped up in the ID'ing/finding/verification of openssl
libs ... but I don't know where to START hunting for the origination point of the probel
to structure a bug fix ...

i'm seeing libssl/libcrypto issues in a subsequent mysqlcc build that MAY be related to
this ... but I can't tell (yet!).

thoughts/suggestions?

richard



Thread
MySQL not finidng/using NON-system OpenSSLOpenMacNews27 May
  • MySQL not finidng openssl/opensslv.hCraig Harding4 Jun
    • Re: MySQL not finidng openssl/opensslv.hCraig Harding9 Jun
      • AW: MySQL not finidng openssl/opensslv.hOliver Neumann [New Identity AG]9 Jun