Bug #44720 undefined references to `_DIAGASSERT' on RHEL4
Submitted: 7 May 2009 14:04 Modified: 11 Nov 2011 16:45
Reporter: bergwolf paine Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:5.1.33-5.1.34, 5.1.44 OS:Linux (RHEL4)
Assigned to: CPU Architecture:Any
Tags: _DIAGASSERT

[7 May 2009 14:04] bergwolf paine
Description:
On my RHEL4 server, I got undefined references to `_DIAGASSERT' when compiling mysql 5.1.33.

Error msg as follows:

/bin/sh ../libtool --preserve-dup-deps --tag=CXX   --mode=link g++  -O3    -fno-implicit-templates -fno-exceptions -fno-rtti  -rdynamic  -o mysql mysql.o readline.o sql_string.o completion_hash.o ../cmd-line-utils/libedit/libedit.a -lncurses -lpthread ../libmysql/libmysqlclient.la  -lcrypt -lnsl -lm   -lz 
g++ -O3 -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o .libs/mysql mysql.o readline.o sql_string.o completion_hash.o  ../cmd-line-utils/libedit/libedit.a -lncurses -lpthread ../libmysql/.libs/libmysqlclient.so -lcrypt -lnsl -lm -lz  -Wl,--rpath -Wl,/usr/local/lib/mysql
../cmd-line-utils/libedit/libedit.a(vis.o)(.text+0x217): In function `svis':
: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(vis.o)(.text+0x226): In function `svis':
: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(vis.o)(.text+0x363): In function `strsvis':
: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(vis.o)(.text+0x372): In function `strsvis':
: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(vis.o)(.text+0x381): In function `strsvis':
: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(vis.o)(.text+0x515): more undefined references to `_DIAGASSERT' follow
../cmd-line-utils/libedit/libedit.a(el.o)(.text+0x5b2): In function `el_source':
: undefined reference to `libedit_fgetln'
../cmd-line-utils/libedit/libedit.a(history.o)(.text+0x439): In function `history_def_add':
: undefined reference to `libedit_strlcpy'
../cmd-line-utils/libedit/libedit.a(history.o)(.text+0x446): In function `history_def_add':
: undefined reference to `libedit_strlcat'
../cmd-line-utils/libedit/libedit.a(history.o)(.text+0xa42): In function `history':
: undefined reference to `libedit_fgetln'
../cmd-line-utils/libedit/libedit.a(history.o)(.text+0xa9e): In function `history':
: undefined reference to `libedit_fgetln'
../cmd-line-utils/libedit/libedit.a(hist.o)(.text+0x133): In function `hist_get':
: undefined reference to `libedit_strlcpy'
../cmd-line-utils/libedit/libedit.a(unvis.o)(.text+0x1c): In function `unvis':
: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(unvis.o)(.text+0x2b): In function `unvis':
: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(unvis.o)(.text+0x2de): In function `strunvisx':
: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(unvis.o)(.text+0x2ed): In function `strunvisx':
: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(unvis.o)(.text+0x396): In function `strunvis':
: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(unvis.o)(.text+0x3a5): more undefined references to `_DIAGASSERT' follow
collect2: ld returned 1 exit status
make[2]: *** [mysql] Error 1

How to repeat:
./configure   --enable-local-infile  --with-charset=utf8 --with-big-tables  --with-plugins=max --with-extra-charsets=all

make
[7 May 2009 19:15] Sveta Smirnova
Thank you for the report.

But version 5.1.33 is a bit old. Additionally I can not repeat described behavior in my environment.

Please check with current version 5.1.34 and if problem still exists indicate which compiler do you use and its version.
[8 May 2009 1:23] bergwolf paine
Hello, the problem still exists with 5.1.34.

[mysql-5.1.34]$gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/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 --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)
[mysql-5.1.34]$uname -a
Linux localhost.localdomain 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux
[8 May 2009 1:26] bergwolf paine
BTW, I built mysql 5.0.51a on the same server without any problem.
[26 May 2009 8:00] Sveta Smirnova
Thank you for the feedback.

Please provide output of command `\s` from MySQL-5.0.51 client: I want to be sure it compiled with libedit.

Also, please, provide output of `grep -R DIAGASSERT /usr/include/` and `grep -R DIAGASSERT /usr/local/include/`
[28 May 2009 2:52] bergwolf paine
mysql> \s
--------------
mysql  Ver 14.12 Distrib 5.0.51a, for redhat-linux-gnu (i686) using readline 5.0

Connection id:          11712
Current database:
Current user:           gigi@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.0.51a-log MySQL Community Server (GPL)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    gbk
Db     characterset:    gbk
Client characterset:    gbk
Conn.  characterset:    gbk
UNIX socket:            /tmp/mysql.sock
Uptime:                 24 days 17 hours 47 min 37 sec

Threads: 1  Questions: 363820  Slow queries: 0  Opens: 146  Flush tables: 1  Open tables: 116  Queries per second avg: 0.170
--------------

`grep -R DIAGASSERT /usr/include/` and `grep -R DIAGASSERT /usr/local/include/`returns nothing
[28 May 2009 2:52] bergwolf paine
mysql> \s
--------------
mysql  Ver 14.12 Distrib 5.0.51a, for redhat-linux-gnu (i686) using readline 5.0

Connection id:          11712
Current database:
Current user:           gigi@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.0.51a-log MySQL Community Server (GPL)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    gbk
Db     characterset:    gbk
Client characterset:    gbk
Conn.  characterset:    gbk
UNIX socket:            /tmp/mysql.sock
Uptime:                 24 days 17 hours 47 min 37 sec

Threads: 1  Questions: 363820  Slow queries: 0  Opens: 146  Flush tables: 1  Open tables: 116  Queries per second avg: 0.170
--------------

`grep -R DIAGASSERT /usr/include/` and `grep -R DIAGASSERT /usr/local/include/`returns nothing
[25 Jun 2009 9:45] Sveta Smirnova
Thank you for the feedback.

DIAGASSERT is used in libedit and curses. Please indicate which version of curses do you have.
[27 Jun 2009 1:51] bergwolf paine
$rpm -qf /usr/lib/libcurses.so
ncurses-5.4-13
[28 Dec 2009 10:22] Sveta Smirnova
Thank you for the feedback.

We still can not repeat error. Please try with current version 5.1.41 and inform us if problem still exists.
[29 Jan 2010 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[11 Apr 2010 7:09] linfeng feiye
I also have this problem

I am using suse linux enterprise 10.2,and gcc4.1.2,and mysql 5.1.44

np/vis.c:334: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(vis.o): In function `strsvisx':
np/vis.c:296: undefined reference to `_DIAGASSERT'
np/vis.c:297: undefined reference to `_DIAGASSERT'
np/vis.c:298: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(vis.o): In function `strsvis':
np/vis.c:267: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(vis.o):np/vis.c:268: more undefined references to `_DIAGASSERT' follow
../cmd-line-utils/libedit/libedit.a(el.o): In function `el_source':
/softwareBAK/tools/mailserver/mysql/mysql-5.1.44/cmd-line-utils/libedit/el.c:513: undefined reference to `libedit_fgetln'
../cmd-line-utils/libedit/libedit.a(history.o): In function `history_def_add':
/softwareBAK/tools/mailserver/mysql/mysql-5.1.44/cmd-line-utils/libedit/history.c:361: undefined reference to `libedit_strlcpy'
/softwareBAK/tools/mailserver/mysql/mysql-5.1.44/cmd-line-utils/libedit/history.c:362: undefined reference to `libedit_strlcat'
../cmd-line-utils/libedit/libedit.a(history.o): In function `history_load':
/softwareBAK/tools/mailserver/mysql/mysql-5.1.44/cmd-line-utils/libedit/history.c:688: undefined reference to `libedit_fgetln'
/softwareBAK/tools/mailserver/mysql/mysql-5.1.44/cmd-line-utils/libedit/history.c:697: undefined reference to `libedit_fgetln'
../cmd-line-utils/libedit/libedit.a(hist.o): In function `hist_get':
/softwareBAK/tools/mailserver/mysql/mysql-5.1.44/cmd-line-utils/libedit/hist.c:130: undefined reference to `libedit_strlcpy'
../cmd-line-utils/libedit/libedit.a(unvis.o): In function `unvis':
np/unvis.c:84: undefined reference to `_DIAGASSERT'
np/unvis.c:85: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(unvis.o): In function `strunvisx':
np/unvis.c:277: undefined reference to `_DIAGASSERT'
np/unvis.c:278: undefined reference to `_DIAGASSERT'
[14 Jul 2010 9:07] Sveta Smirnova
Thank you for the feedback.

All reporters: please try to compile with option --with-libedit and inform us about results.
[14 Aug 2010 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[23 Jun 2011 2:46] abioy sun
still the same result using --with-libedit, version on 5.1.56 and 5.1.57.
[23 Jun 2011 2:50] abioy sun
KUbuntu 10.04 desktop, g++ 4.4.3, 

configure options
./configure --prefix=$HOME/local/mysql --with-libedit
./configure --prefix=$HOME/local/mysql
[11 Nov 2011 16:45] MySQL Verification Team
I couldn't repeat with source mysql-5.1.59.tar.gz.
[14 Jun 2012 10:40] John Henry
The same problem.
bedit.a -lncursesw -lpthread ../libmysql/.libs/libmysqlclient.so -lcrypt -lnsl -lm -lz -Wl,-rpath -Wl,/usr/local/lib/mysql
../cmd-line-utils/libedit/libedit.a(vis.o): In function `invis':
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/np/vis.c:473: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(vis.o): In function `istrsnvisx':
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/np/vis.c:417: undefined reference to `_DIAGASSERT'
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/np/vis.c:418: undefined reference to `_DIAGASSERT'
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/np/vis.c:419: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(vis.o): In function `istrsnvis':
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/np/vis.c:370: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(vis.o):/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/np/vis.c:371: more undefined references to `_DIAGASSERT' follow
../cmd-line-utils/libedit/libedit.a(el.o): In function `el_source':
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/el.c:554: undefined reference to `libedit_fgetln'
../cmd-line-utils/libedit/libedit.a(historyn.o): In function `history_load':
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/./history.c:747: undefined reference to `libedit_fgetln'
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/./history.c:756: undefined reference to `libedit_fgetln'
../cmd-line-utils/libedit/libedit.a(unvis.o): In function `unvis':
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/np/unvis.c:220: undefined reference to `_DIAGASSERT'
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/np/unvis.c:221: undefined reference to `_DIAGASSERT'
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/np/unvis.c:449: undefined reference to `__arraycount'
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/np/unvis.c:456: undefined reference to `__arraycount'
../cmd-line-utils/libedit/libedit.a(unvis.o): In function `strnunvisx':
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/np/unvis.c:501: undefined reference to `_DIAGASSERT'
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/np/unvis.c:502: undefined reference to `_DIAGASSERT'
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/np/unvis.c:529: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(wcsdup.o): In function `wcsdup':
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/np/wcsdup.c:32: undefined reference to `_DIAGASSERT'
../cmd-line-utils/libedit/libedit.a(history.o): In function `history_load':
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/history.c:747: undefined reference to `libedit_fgetln'
/home/testztz/qiaohl/mysql-5.1.63/cmd-line-utils/libedit/history.c:756: undefined reference to `libedit_fgetln'
collect2: ld returned 1 exit status
[15 Apr 2015 7:57] Ståle Deraas
Posted by developer:
 
Closed as RHEL4 is not a supported platform from MySQL 5.5 and onwards.