Bug #1967 mysql-4.0.16: Failure to make on Solaris 7
Submitted: 27 Nov 2003 3:54 Modified: 27 Nov 2003 6:46
Reporter: Barry Byrne Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:mysql-4.0.16 OS:SunOS 5.7
Assigned to: CPU Architecture:Any

[27 Nov 2003 3:54] Barry Byrne
Description:
Using gcc (GCC) 3.3.2
First failure:
make[5]: Leaving directory `/export/home/mysql/mysql-4.0.16/sql'
./gen_lex_hash > lex_hash.h
ld.so.1: ./gen_lex_hash: fatal: libstdc++.so.5: open failed: No such file or directory
make[4]: *** [lex_hash.h] Error 137
make[4]: Leaving directory `/export/home/mysql/mysql-4.0.16/sql'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/export/home/mysql/mysql-4.0.16/sql'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/export/home/mysql/mysql-4.0.16/sql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/export/home/mysql/mysql-4.0.16'
make: *** [all] Error 2

Then I exported LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/sparcv9
and re-ran "make", but it then failed:

sql_lex.cc:85: error: `symbols' undeclared (first use this function)
sql_lex.cc:85: error: (Each undeclared identifier is reported only once for 
   each function it appears in.)
sql_lex.cc:87: error: `sql_functions' undeclared (first use this function)
sql_lex.cc: In function `int find_keyword(LEX*, unsigned int, bool)':
sql_lex.cc:171: error: `get_hash_symbol' undeclared (first use this function)
make[4]: *** [sql_lex.o] Error 1

How to repeat:
Set up a Solaris 7 system (SunOS 5.7)
Install gcc 3.3.2
download mysql-4.0.16
./configure --prefix=/usr/local/mysql
make
[27 Nov 2003 4:54] Barry Byrne
I tried "make clean" and then "make" again; it appears that make clean does not erase sql/lex_hash.h
[27 Nov 2003 5:48] Barry Byrne
#Workaround for this particular problem
export LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib/sparcv9"
make clean
rm sql/lex_hash.h
make
[27 Nov 2003 6:46] MySQL Verification Team
This is a consequence of the bad build.

STL library must never be linked in.

Try our 2.8 32-bit binary on 2.7. Those work for most of the users.
[27 Nov 2003 8:05] Barry Byrne
Thank you to Sinisa Milivojevic who replied 
>This is a consequence of the bad build.
> STL library must never be linked in.
I just followed the default instructions. How does that generate a "bad build"?

>Try our 2.8 32-bit binary on 2.7. Those work for most of the users.
I have tried it; It failed to find a library that I assumed was part of 2.8; sorry  can't remember the details.

However, the build from source was eventually successful with the workaround in my second comment.