Bug #30846 problem building mysql 5.0.45 from source on IA64
Submitted: 5 Sep 2007 23:01 Modified: 23 Sep 2007 12:14
Reporter: Don Cohen Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.0.45 OS:Linux
Assigned to: CPU Architecture:Any

[5 Sep 2007 23:01] Don Cohen
Description:
ending with ...
g++ -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -\
o .libs/mysql mysql.o readline.o sql_string.o completion_hash.o  ../cmd-line-uti\
ls/libedit/libedit.a -lncurses ../libmysql/.libs/libmysqlclient.so -lcrypt -lnsl\
 -lm -lz -Wl,--rpath -Wl,/home/dcohen/mysql/lib/mysql
collect2: ld terminated with signal 11 [Segmentation fault]
make[2]: *** [mysql] Error 1
make[2]: Leaving directory `/home/dcohen/mysql-5.0.45/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dcohen/mysql-5.0.45'
make: *** [all] Error 2

===
I've stored the entire transcript if that will help, inc. all output from configure as well as make.

How to repeat:
I imagine you need a machine like mine - not all that common.
[6 Sep 2007 4:07] Valeriy Kravchuk
Thank you for a problem report. Please, send the results of:

gcc --version
uname -a
free

Attach your confgure and build logs also.
[6 Sep 2007 4:25] Don Cohen
dcohen@saturn:~> gcc --version
gcc (GCC) 4.1.0 (SUSE Linux)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

dcohen@saturn:~> uname -a
Linux saturn 2.6.16.27-0.9-default #1 SMP Tue Feb 13 09:35:18 UTC 2007 ia64 ia6\
4 ia64 GNU/Linux
dcohen@saturn:~> free
             total       used       free     shared    buffers     cached
Mem:       3788320    3409664     378656          0          0    1770336
-/+ buffers/cache:    1639328    2148992
Swap:     16779856          0   16779856
dcohen@saturn:~>
[6 Sep 2007 5:16] Valeriy Kravchuk
Please, send the exact ./configure command you had used.
[6 Sep 2007 6:10] Don Cohen
> Please, send the exact ./configure command you had used.
That's included in the transcript I uploaded:
./configure --prefix=/home/dcohen/mysql
[6 Sep 2007 6:23] Valeriy Kravchuk
I do not see any files uploaded to this bug report. Please, check again.
[6 Sep 2007 15:29] Don Cohen
transcript of configure (inc preparation)

Attachment: configure-transcript (application/octet-stream, text), 47.22 KiB.

[6 Sep 2007 15:30] Don Cohen
transcript of make attempt

Attachment: make-transcript (application/octet-stream, text), 487.37 KiB.

[6 Sep 2007 15:31] Don Cohen
sorry, the original transcript was just > 500K
now split into two parts
[8 Sep 2007 18:53] Don Cohen
I'm just wondering, is anything happening with this bug?
Is there an estimate of when I should expect to hear something?
Do you have an IA64 machine on which to try a build?
I'd be more than happy to try a pre built binary.
Do you have any suggestions for what I can do to debug this?
[8 Sep 2007 21:41] Valeriy Kravchuk
We have a SLES9 IA64 box. But it has gcc 3.x.y, not 4.1.0. Can you try to build with older gcc version, 3.3.x or 3.4.x?
[9 Sep 2007 15:45] Don Cohen
Rather than trying to use an older gcc I sent to gcc bug list asking how to fix this version.  The reply was that the problem was in binutils.  I asked the binutils bug address and the first suggestion was to try the most recent version of binutils.  This seems to solve the problem.
I cannot install binutils as root, so I have to use -B in all the calls to gcc.
In order to continue the build I find that I have to edit all the Makefile's that have already been created.  If I want to try a clean build what should I pass in to .configure to add this argument?
[11 Sep 2007 5:18] Don Cohen
Now that I have it all compiled I do make install, and, trying to follow the directions in http://dev.mysql.com/doc/refman/5.0/en/quick-install.html, I do
  bin/mysql_install_db 
(I'm not running as root so no --user=mysql)
The result is
 [ERROR] /home/dcohen/mysql/libexec/mysqld: unknown variable 'ssl-ca=/usr/local/mysql/mysql-test/cacert.pem'
My only guess is that this came from /etc/my.cnf, which I do *NOT* want to use.
In fact I have created my own version of the initialization file.  
The documentation page for mysql_install_db seems not to mention anything that helps me with this.  After looking at the install db script for a while I try
 bin/mysql_install_db --defaults-file=/home/dcohen/mysql/my.cnf

and still get the same error.
I'm hoping someone there knows what this is all about and can tell me what to do about it.
[11 Sep 2007 7:06] Don Cohen
It was fooling me by removing the spaces around the =.
This was coming from my edited my.cnf.
http://dev.mysql.com/doc/refman/5.1/en/mysqld-option-tables.html seems to indicate that ssl-cert (for instance) is allowed in the initialization file but evidently this is not true.  Is that a bug?
[11 Sep 2007 7:52] Don Cohen
Now I find that I cannot reach the server.
There's already a server running on port 3306 so I have to run this one on another port.  I use 3307.  The log file shows me that it's listening there.  But when I try to do
/home/dcohen/mysql/bin/mysqladmin --user=root --port=3307 password ...
or for that matter, 
/home/dcohen/mysql/bin/mysql --user=root --port=3307
I get 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
In fact, I can see from the log file that these are being directed at the server on port 3306 !  So these commands are ignoring my port argument.
How can I reach this server.  What is its initial state anyway?  only user is root?  Allowed only from localhost and <machine name>?
[11 Sep 2007 21:09] Don Cohen
Ok, solved that one --protocol=tcp
I guess I should add all these details to your doc pages!
[12 Sep 2007 21:17] Don Cohen
One more problem - I found out why the ssl settings weren't working: the default configure doesn't build ssl !  Why not?  Your pre built binaries contain it (as I think they should).  I think it should even be enabled in the default configuration.  (I'm not proposing to disable non-encrypted communication.)

Anyhow, I consider this bug to now be solved.
I've added a few comments to the documentation.
Let me know if you'd like the results of my build for further distribution.

P.S. how about my other open bugs?
[23 Sep 2007 12:14] Valeriy Kravchuk
So, looks like this particular problem was not a result of a bug in MySQL's code.