Bug #69081 Missing declaration in chared.c (ED_UNASSIGNED)
Submitted: 26 Apr 2013 9:11 Modified: 26 Apr 2013 12:54
Reporter: Kiryl Kovaliov Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.5.31 OS:Linux
Assigned to: CPU Architecture:Any

[26 Apr 2013 9:11] Kiryl Kovaliov
Description:
Error during installation mySql server from sources

[  0%] Built target INFO_BIN
[  0%] Built target INFO_SRC
[  0%] Built target abi_check
[  0%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/chared.c.o
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c: In function 'ch_init':
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c:421: error: 'ED_UNASSIGNED' undeclared (first use in this function)
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c:421: error: (Each undeclared identifier is reported only once
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c:421: error: for each function it appears in.)
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c: In function 'ch_reset':
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c:476: error: 'ED_UNASSIGNED' undeclared (first use in this function)
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c: In function 'ch_end':
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c:597: error: 'ED_UNASSIGNED' undeclared (first use in this function)
make[2]: *** [cmd-line-utils/libedit/CMakeFiles/edit.dir/chared.c.o] Error 1
make[1]: *** [cmd-line-utils/libedit/CMakeFiles/edit.dir/all] Error 2
make: *** [all] Error 2

How to repeat:
run "make install" from sources on linux system
[26 Apr 2013 12:54] MySQL Verification Team
Thank you for the bug report. I couldn't repeat on OpenSuse 12.3.

[100%] Building CXX object sql/CMakeFiles/sql.dir/sql_reload.cc.o
[100%] Building CXX object sql/CMakeFiles/sql.dir/sql_yacc.cc.o
[100%] Building CXX object sql/CMakeFiles/sql.dir/sql_builtin.cc.o
Linking CXX static library libsql.a
[100%] Built target sql
Scanning dependencies of target mysqld
[100%] Building CXX object sql/CMakeFiles/mysqld.dir/main.cc.o
Linking CXX executable mysqld
[100%] Built target mysqld
Scanning dependencies of target udf_example
[100%] Building C object sql/CMakeFiles/udf_example.dir/udf_example.c.o
Linking C shared module udf_example.so
[100%] Built target udf_example
Scanning dependencies of target my_safe_process
[100%] Building CXX object mysql-test/lib/My/SafeProcess/CMakeFiles/my_safe_process.dir/safe_process.cc.o
Linking CXX executable my_safe_process
[100%] Built target my_safe_process
miguel@tikal:~/tmp/mysql-5.5.31> sql/mysqld --version
sql/mysqld  Ver 5.5.31 for Linux on x86_64 (Source distribution)
miguel@tikal:~/tmp/mysql-5.5.31>
[20 Jan 2014 9:36] Muhammad Waqas
I had similar error. I was using different folder for throwing CMAKE build files. From where I used to run "make".

"mysql-5.6.15" source folder "MySQL Build" folder where I did throw make files and intended to build binaries.

I had a space in that folder name. Removing the space did the trick. Though I see there is no spaces in your path but still make sure you are using no folder with "space". Having space in build folder also gives errors when your try to build MySQL from source on Windows.
[5 May 2014 6:38] Marko Mäkelä
I repeated this bug on mysql-5.7.4 after updating my development system. Initially the compilation failed because I had forgotten to install some library (libncurses5-dev, if I remember correctly). Installing the missing library and removing CMakeCache.txt did not help.

In the end, I had to remove the following auto-generated files:

cmd-line-utils/libedit/common.h
cmd-line-utils/libedit/fcns.h
cmd-line-utils/libedit/fcns.c

After this, the compilation worked.

The problem was that common.h was empty, and as a result, fcns.* did not define or declare any symbols that start with ED_.