Bug #5667 compilation error: undefined reference to `strvis'
Submitted: 20 Sep 2004 14:47 Modified: 8 Jan 2005 0:47
Reporter: Steffen Reinecke Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.0.1 alpha OS:Linux (Linux 2.4.20 - i586-suse-linux)
Assigned to: CPU Architecture:Any

[20 Sep 2004 14:47] Steffen Reinecke
Description:
Hello,

# ./configure --without-server
# make

produces the following error while compiling. I hope it's repeatable 
for you, becauze the same source was working without problems on another very similar system enviroment.

../cmd-line-utils/libedit/liblibedit.a(history.o)(.text+0x75f): In function `history':
: undefined reference to `strvis'
../cmd-line-utils/libedit/liblibedit.a(history.o)(.text+0x862): In function `history':
: undefined reference to `strunvis'
collect2: ld returned 1 exit status
make[2]: *** [mysql] Error 1
make[2]: Leaving directory `/usr/local/src/mysql-5.0.1-alpha/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/mysql-5.0.1-alpha'
make: *** [all] Error 2

PS: I will keep the installation dir, if you have any questions ...

Best Regards,

Steffen

How to repeat:
# ./configure --without-server
# make
[2 Nov 2004 5:15] Matthew Lord
Hi,

Thanks for your bug report!  I was unable to verify this on my machine by just doing ./configure 
--without-server && make on a RH 9 (Linux booty 2.4.21 #12 SMP Thu Aug 14 00:49:40 EDT 
2003 i686 i686 i386 GNU/Linux) box.

Can you provide any details about the steps you took and your SuSe installation?

Does the same thing happen if you do make distclean && make ?

Best Regards
[2 Nov 2004 19:46] Jason Sydes
Hi!  I'm getting the same problem on my Debian (Woody) Linux 2.2.20 box (pentium II if you can 
believe it) while attempting to compile 4.1.7.  I'll be trying it out on a new machine in a few 
minutes.  Here's the error:

gcc -O3 -DDBUG_OFF -O2 -mcpu=pentiumpro -felide-constructors -fno-implicit-templates -fno-
exceptions -fno-rtti -rdynamic -o mysql mysql.o readline.o sql_string.o completion_hash.o -static  
../cmd-line-utils/libedit/libedit.a -lncurses ../libmysql/.libs/libmysqlclient.a -lcrypt -lnsl -lm -lz
../cmd-line-utils/libedit/libedit.a(history.o): In function `history_load':
history.o(.text+0x8e7): undefined reference to `strunvis'
../cmd-line-utils/libedit/libedit.a(history.o): In function `history_save':
history.o(.text+0xa84): undefined reference to `strvis'
collect2: ld returned 1 exit status
make[3]: *** [mysql] Error 1
make[3]: Leaving directory `/usr/local/home/jason/src/ndn-mysql4.1/ndn-mysql4-4.1.7/client'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/home/jason/src/ndn-mysql4.1/ndn-mysql4-4.1.7'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/home/jason/src/ndn-mysql4.1/ndn-mysql4-4.1.7'
make: *** [build-stamp] Error 2
jason@gaia:~/src/ndn-mysql4.1/ndn-mysql4-4.1.7$ 

additionally, when i ran configure, here's what I got:
checking for strunvis... no
checking for strvis... no

Thanks!
Jason
[2 Nov 2004 21:46] Jason Sydes
Might be a kernel thing.
I tried it on a newer machine, and it worked just fine.
(2.4.26 kernel, Debian Woody)
[3 Nov 2004 14:51] Steffen Reinecke
Hello,

./configure --without-server > out_configure.txt

i have redirected stdout to a file. While configure runs, i get the following error to my command line:

which: no orbit-config in (/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/usr/lib/java/jre/bin)

you can view the configure output here:
http://www.devnote.de/out_configure.txt

(www.devnote.de is not the same machine)

hope it helps a bit,

Steffen
[3 Nov 2004 14:57] Steffen Reinecke
ohh, i fogot to tell you ... the make error after configuring is still the same as posted:

../cmd-line-utils/libedit/liblibedit.a(history.o)(.text+0x75f): In function `history':
: undefined reference to `strvis'
../cmd-line-utils/libedit/liblibedit.a(history.o)(.text+0x862): In function `history':
: undefined reference to `strunvis'
collect2: ld returned 1 exit status
make[2]: *** [mysql] Error 1
make[2]: Leaving directory `/usr/local/src/mysql-5.0.1-alpha/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/mysql-5.0.1-alpha'
make: *** [all] Error 2
[5 Nov 2004 23:19] Matthew Lord
Hi Stephen,

Unfortunately we do not have a similar environment and can't repeat the problem.  I can
only recommend using our static x86 linux builds or you can also use the MySQL-client
RPM with the rpm2apt utility.

Best Regards
[6 Nov 2004 15:03] Sergei Golubchik
What is in the config.log file ?
Can you attach it to the bugreport ?
([Files] tab)
[26 Nov 2004 7:38] Ady Deac
I have deleted /usr/include/vis.h and everything worked ok.

Have phun!

PS: it is safer to rename it to smth else... :P maybe you'll need it later...
[27 Nov 2004 0:29] Matthew Lord
OK, you can touch /usr/include/vis.h then do a ./configure --with-libedit --without-server && 
make to see the problem.

I do not have vis.h installed on any of my machines but I do see how this problem is 
occurring.  Apparently some distributions install a vis.h file for whatever reason and it is
significantly different than the NetBSD based one that libedit uses for the library build.

If you have no vis.h installed then the build goes fine.  The build also goes fine for pre 5.0 
releases as we included the vis.h header in the libedit/np subdir and used that.

For those of you affected by this problem, please build using --with-readline.  The readline library 
is better than libedit anyhow.

I verified this on a RH 9 box (2.4.21 #12 SMP Thu Aug 14 00:49:40 EDT 2003 i686 i686 i386 
GNU/Linux)

gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --
enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-
__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
[27 Nov 2004 3:23] Steffen Reinecke
Hello,

sorry for not answering the last messages. My new installed thunderbird
was running the junk mail controls automatically with many false positives.

Thank you Ady Deac and Matthew Lord, the way you've described was working for me too.

SOLVED :-)
[8 Jan 2005 0:47] MySQL Verification Team
Solved according your last post.
Thank you for the update.