Bug #4462 libedit compile failure
Submitted: 8 Jul 2004 14:12 Modified: 24 Aug 2004 19:24
Reporter: Lenz Grimmer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:4.1 OS:FreeBSD (FreeBSD 4,7)
Assigned to: Victor Vagin CPU Architecture:Any

[8 Jul 2004 14:12] Lenz Grimmer
Description:
Compiling 4.1 on FreeBSD using libedit instead of libreadline reveals the following compile
error:

gcc -DUNDEF_THREADS_HACK -DHAVE_CONFIG_H -DNO_KILL_INTR -I. -I. -I../.. -I../../include -I./../.. -I..    -O3 -DDBUG_OFF -DHAVE_BROKEN_REALPATH   -DHAVE_BROKEN_REALPATH -c `test -f 'chared.c' || echo './'`chared.c
In file included from el.h:107,
                 from chared.c:47:
sig.h:65: syntax error before `*'
sig.h:65: `RETSIGTYPE' declared as function returning a function
sig.h:66: syntax error before `*'
sig.h:66: warning: data definition has no type or storage class
In file included from chared.c:47:
el.h:131: syntax error before `el_signal_t'

How to repeat:
Compile MySQL 4.1 with the configure option "--with-libedit" on FreeBSD 4.7
[24 Aug 2004 17:20] Victor Vagin
bk commit into 4.1 tree (vva:1.1964)

ChangeSet
  1.1964 04/08/24 20:41:41 vva@eagle.mysql.r18.ru +35 -0
  upgrade to libedit-2.6.7
  (fixed Bug #4462 libedit compile failure)
[24 Aug 2004 17:52] Sergey Kostyliov
Sorry, but you will resurrect #4696 by the change proposed. It's due to the fact that 
the libedit-2.6.7 is broken by itself (please see #4696 for further details.).
[24 Aug 2004 18:00] Sergey Kostyliov
Forgot to add. I am speaking about cmd-line-utils/libedit/history.c:history_save() 
 
-                       max_size = (len + 1023) & ~1023; 
... 
+                       max_size = (len + 1023) & 1023; 
 
part here.
[24 Aug 2004 18:08] Sergey Kostyliov
http://lists.mysql.com/internals/16261
[24 Aug 2004 18:54] Victor Vagin
Thank you
you are right
correction patch

bk commit - 4.1 tree (vva:1.1968) BUG#4696

ChangeSet
  1.1968 04/08/25 00:26:53 vva@eagle.mysql.r18.ru +1 -0
  resurrect fix for 
  Bug #4696     segfault in cmd-line-utils/libedit/history.c:history_save() 
  (bundled libedit)
[24 Aug 2004 19:24] Victor Vagin
The fix will be in the mysql-4.1.4