Error compiling Mysql 4.0.12 on Solaris 2.8 with GNU sed

Error compiling Mysql 4.0.12 on Solaris 2.8 with GNU sed

am 16.04.2003 23:16:01 von Joel Corra

I received the following error when compiling MySQL 4.0.12 on Solaris 2.8
using the GNU version of sed:

checking "character sets"... configure: error: No number was found in
../sql/share/charsets/Index for the latin1 character set. This is a bug in
the MySQL distribution. Please report this message to
bugs@lists.mysql.com.

I didn't know the problem was the version of sed I was using, but I
tracked it down to that line of the configure file, and replaced
subpat='^'"${c}"'[ ][ ]*\([0-9][0-9]*\)[^0-9]*$'
sed -e "/$subpat/!d" -e 's//\1/' $index_file

with:
number=`cat $index_file | grep "${c} " | awk '{ print $2 }'

The GNU version of sed doesn't return any value with the given regexp. The
problem seemed to be with the space/tab character class, from what testing
I did before I just replaced the line with a grep/awk alternative.

It was after I had already compiled MySQL successfully with this altered
configure script that I found out I was using GNU sed and not Sun. I
didn't try re-compiling Mysql, but I tested using /usr/bin/sed
instead of just sed with those few lines of code and it seemed to fix the
problem, but would then be dependent on sed being located in /usr/bin.
Another alternative would be to take the gnu/bin directory out of my path,
but that's also where my gcc compiler is located.

Joel Corra
jcorra@eng.utoledo.edu
Engineering College Computing
The University of Toledo


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: Error compiling Mysql 4.0.12 on Solaris 2.8 with GNU sed

am 17.04.2003 12:39:43 von Sinisa Milivojevic

Joel Corra writes:
> I received the following error when compiling MySQL 4.0.12 on Solaris 2.8
> using the GNU version of sed:
>
> checking "character sets"... configure: error: No number was found in
> ./sql/share/charsets/Index for the latin1 character set. This is a bug in
> the MySQL distribution. Please report this message to
> bugs@lists.mysql.com.
>
> I didn't know the problem was the version of sed I was using, but I
> tracked it down to that line of the configure file, and replaced
> subpat='^'"${c}"'[ ][ ]*\([0-9][0-9]*\)[^0-9]*$'
> sed -e "/$subpat/!d" -e 's//\1/' $index_file
>
> with:
> number=`cat $index_file | grep "${c} " | awk '{ print $2 }'
>
> The GNU version of sed doesn't return any value with the given regexp. The
> problem seemed to be with the space/tab character class, from what testing
> I did before I just replaced the line with a grep/awk alternative.
>
> It was after I had already compiled MySQL successfully with this altered
> configure script that I found out I was using GNU sed and not Sun. I
> didn't try re-compiling Mysql, but I tested using /usr/bin/sed
> instead of just sed with those few lines of code and it seemed to fix the
> problem, but would then be dependent on sed being located in /usr/bin.
> Another alternative would be to take the gnu/bin directory out of my path,
> but that's also where my gcc compiler is located.
>
> Joel Corra
> jcorra@eng.utoledo.edu
> Engineering College Computing
> The University of Toledo

We also use GNU sed.

Check that your Index file is not corrupted. It should look like this:

# sql/share/charsets/Index
#
# This file lists all of the available character sets. Please keep this
# file sorted by character set number.


big5 1
czech 2
dec8 3
dos 4
german1 5
hp8 6
koi8_ru 7
latin1 8
latin2 9
swe7 10
usa7 11
ujis 12
sjis 13
cp1251 14
danish 15
hebrew 16
# The win1251 character set is deprecated. Please use cp1251 instead.
win1251 17
tis620 18
euc_kr 19
estonia 20
hungarian 21
koi8_ukr 22
win1251ukr 23
gb2312 24
greek 25
win1250 26
croat 27
gbk 28
cp1257 29
latin5 30
latin1_de 31


--

Regards,

--
For technical support contracts, go to https://order.mysql.com/?ref=msmi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org