OpenBSD 2.5 Notes

On OpenBSD 2.5, you can compile MySQL with native threads with the following options:

CFLAGS=-pthread CXXFLAGS=-pthread ./configure --with-mit-threads=no

Download this Manual
User Comments
  Posted by Kelly Martin on January 6, 2006
The 3.8 binary works fine until you try to compile/install PHP 4 or 5 with MySQL support, whereby the PHP package will give the following error related to mysql during make:

*** Warning: linker path does not have real file for library -lmysqlclient.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libmysqlclient and none of the candidates passed a file format test
*** using a file magic. Last file checked: /usr/local/mysql/lib/libmysqlclient.a

*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module libphp4. Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.

Since I do not know what the above means, the only solution I have found to use MySQL and PHP together is to compile MySQL by hand using the following settings:

CFLAGS="-O3 -mpentiumpro" CXX=gcc CXXFLAGS="-O3 \
-felide-constructors -fno-exceptions -fno-rtti"

./configure --prefix=/usr/local/mysql --enable-assembler \

  Posted by Diego Arimany on February 1, 2007
Success installing from source "mysql-5.2.0-falcon-alpha" on an OpenBSD 3.9.

After several attempts at `./configure' and `make' I did manage to install what I think is a lean-stable MySQL. These are the command lines used (NO need to say that you must sudo)

CFLAGS=-pthread CXXFLAGS=-pthread
--prefix=/usr/local/mysql \
--enable-assembler \
--enable-local-infile \
--with-mysqld-ldflags=-all-static \
--with-client-ldflags=-all-static \
--with-extra-charsets=complex \
--with-libwrap \
--with-named-z-libs \
--with-debug \
--with-plugins=innobase,myisam,myisammrg,csv,heap \
--without-plugin-falcon \
--without-plugin-ndbcluster \
--without-plugin-partition \
--without-plugin-daemon_example \
--without-plugin-ftexample \
--without-plugin-archive \
--without-plugin-blackhole \
--without-plugin-example \
--without-plugin-federated \

1.- The plugins CSV and HEAP seem to be mandatory.
2.- I could not compile it `--with-ssl', got a yassl error; but didn't try editing the `configure' file. There's a comment on seccion 2.4.14 of the v5.0 documentation.

Sign Up Login You must be logged in to post a comment.