Contributed by jose on from the help! dept.
"I haven't been able to get mysql running on my openBSD box for a couple months. I have Apache, PHP, and Tomcat all running fine, but for some reason i run into many road blocks. I got it finally installed but it wouldn't run properly and i decided the tricks i did to get it installed probably broke it."
"So i wanted to start with a clean slate and ask the OpenBSD community for help. So i am going to start with the very first problem and hope the group can work through everything with me. I am using the ports tree and I went to usr/ports/databases/mysql and ran make clean and then make. I get this error:Anyone care to offer up some help in debugging ports and packages problems? Please, something beyond the "STFA" type of response ...===> mysql-client-3.23.42 depends on: pthread.14 - pthread.14 missing... ===> Verifying install for pthread.14 in devel/pth ===> Returning to build of mysql-client-3.23.42 ===> mysql-client-3.23.42 depends on: pthread.14 - pthread.14 missing... pthread.14 missing...Any ideas, suggestions, or help? If anyone could take a couple hours to work with me over the net to get this set up i would be forever greatful."
(Comments are closed)
By Ian McWilliam () ianm@cit.uws.edu.au on mailto:ianm@cit.uws.edu.au
What release are you trying this on?
===> Checking files for mysql-client-3.23.49
`/usr/ports/distfiles/mysql-3.23.49.tar.gz' is up to date.
>> Checksum OK for mysql-3.23.49.tar.gz. (sha1)
===> Extracting for mysql-client-3.23.49
===> Patching for mysql-client-3.23.49
===> Configuring for mysql-client-3.23.49
creating cache ./config.cache
checking host system type... i386-unknown-openbsd3.1
checking target system type... i386-unknown-openbsd3.1
checking build system type...
i386-unknown-openbsd3.1
.....
A package seems to build fine.
===> Building package for mysql-server-3.23.49
Creating package /usr/ports/packages/i386/All/mysql-server-3.23.49.tgz
Using SrcDir value of /usr/ports/databases/mysql/w-mysql-3.23.49/fake-i386/usr/local
Creating gzip'd tar ball in '/usr/ports/packages/i386/All/mysql-server-3.23.49.tgz'
===> Building package for mysql-tests-3.23.49
Creating package /usr/ports/packages/i386/All/mysql-tests-3.23.49.tgz
Using SrcDir value of /usr/ports/databases/mysql/w-mysql-3.23.49/fake-i386/usr/local
Creating gzip'd tar ball in '/usr/ports/packages/i386/All/mysql-tests-3.23.49.tgz'
By Jim () on
I really shouldn't start db wars though. I just like to advocate for a real database.
By Ben Goren () ben@trumpetpower.com on http://www.trumpetpower.com/
I've never had one lick of trouble with MySQL on OpenBSD. I've been using it since OpenBSD 2.8 at least. Just a week or two ago, I put it on a -STABLE system built the day before.
Is there any particular reason you're not trying to install the package? I think earlier I installed it from the ports tree, but that was before I knew better.
I definitely agree with Mr. McWilliam: what version OpenBSD? What version ports tree? How have they been updated? Are you running anything that didn't come from the ports tree...?
In short, there's something very peculiar about your problem. Personally, I'd try to install the package on a freshly installed system and start from there....
Good luck,
b&
By Dan Mayer () danmanmayer@hotmail.com on http://www.wastedbrains.com
WARNING: The host 'bandddesigns' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL deamon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
/usr/libexec/ld.so: mysqld: libpthread.so.14.20: No such file or directory
Installation of grant tables failed!
Examine the logs in /var/mysql for more information.
Thanks for the help so far, i am fairly new to openBSD and it is just a hobby for me so i am afraid I am not all that good with it yet.
By W () on
./configure --prefix=/usr/local/mysql
make
make install
And don't forget ldconfig.
By Warthog () warthog@yonderway.com on mailto:warthog@yonderway.com
By Warthog () warthog@yonderway.com on http://yonderway.com/images/suns/
---
We have now compiled MySQL 4.0.3 on it and it 'almost works'.
When running 'make test' this dies when we test the encode/decode
functions in MySQL.
This function is in sql/sql_crypt.cc and looks as follows:
void SQL_CRYPT::decode(char *str,uint length)
{
for (uint i=0; i
shift^=(uint) (rnd(&rand)*255.0);
uint idx= (uint) ((unsigned char) str[0] ^ shift);
*str = decode_buff[idx];
shift^= (uint) (uchar) *str++;
}
}
I debugged this for some hours by putting printf() statements in the
code and concluded the following:
Sometimes, when length is about 100000, the expression '(uint)
(rnd(&rand)*255.0)' generates 'a not expected value'. When this
happens, the next generated value is again what is expected.
This should never happen as the rnd() function is initialized to a
known value in advance and should always generate the same random
number sequence.
The only explanations I can come up with this are:
- Gcc doesn't generate thread safe floating point code in this case.
- There is a bug in how floating point registers are stored/handled by the
operating system during a thread switch.
I have the assembler output from the decode() function you would like
to take a look at this.
By Aaron () on
It sounds like you have installed MySQL from the pre-built OpenBSD package. That's great, and here is the one step that gets way too many people: you also need to install the pth-*.tgz package as well and make sure to setup shlibs in /etc/rc.conf to include the mysql libraries and the pthread libraries.
If you install the mysql package using pkg_add -v it will mention the pth package as well as the ldconfig additions required.
If you decide to install mysql using the ports system it will build and install pthreads as required without intervention. I have not installed mysql myself that way, but I would think that you will still need to get ldconfig to add the proper libs.
Good luck in your efforts.
By Dan Mayer () danmanmayer@hotmail.com on http://www.wastedbrains.com
Thanks,
Dan Mayer