percona5.1 compile error on centos5.7

Bug #924599 reported by hch on 2012-02-01
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to

Bug Description

(cd .libs && rm -f && ln -s ../
if gcc -DDEFAULT_CHARSET_HOME="\"/opt/percona51\"" -DMYSQL_DATADIR="\"/opt/percona51/var\"" -DDEFAULT_HOME_ENV=MYSQL_HOME -DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX -DDEFAULT_SYSCONFDIR="\"/opt/percona51/etc\"" -DSHAREDIR="\"/opt/percona51/share/mysql\"" -DDONT_USE_RAID -DMYSQL_CLIENT -I. -I. -I../include -I../include -I../include -g -O2 -DUNIV_LINUX -DUNIV_LINUX -MT conf_to_src.o -MD -MP -MF ".deps/conf_to_src.Tpo" -c -o conf_to_src.o conf_to_src.c; \
        then mv -f ".deps/conf_to_src.Tpo" ".deps/conf_to_src.Po"; else rm -f ".deps/conf_to_src.Tpo"; exit 1; fi
/bin/sh ../libtool --preserve-dup-deps --tag=CC --mode=link gcc -g -O2 -DUNIV_LINUX -DUNIV_LINUX -rdynamic -o conf_to_src -static conf_to_src.o -lrt -lpthread -lcrypt -lnsl -lm -lpthread -lz
gcc -g -O2 -DUNIV_LINUX -DUNIV_LINUX -rdynamic -o conf_to_src conf_to_src.o -lrt -lpthread -lcrypt -lnsl -lm -lpthread -lz
make[2]: Leaving directory `/root/package/Percona-Server-5.1.60/libmysql_r'
make[1]: Leaving directory `/root/package/Percona-Server-5.1.60/libmysql_r'
Making all in client
make[1]: Entering directory `/root/package/Percona-Server-5.1.60/client'
make all-am
make[2]: Entering directory `/root/package/Percona-Server-5.1.60/client'
if g++ -DMYSQL_CLIENT_NO_THREADS -DDEFAULT_MYSQL_HOME="\"/opt/percona51\"" -DMYSQL_DATADIR="\"/opt/percona51/var\"" -I. -I. -I../include -I../include -I../include -I../regex -g -O2 -fno-implicit-templates -fno-exceptions -fno-rtti -MT mysql.o -MD -MP -MF ".deps/mysql.Tpo" -c -o mysql.o; \
        then mv -f ".deps/mysql.Tpo" ".deps/mysql.Po"; else rm -f ".deps/mysql.Tpo"; exit 1; fi error: expected constructor, destructor, or type conversion before ‘*’ token In function ‘int not_in_history(const char*)’: error: ‘HIST_ENTRY’ was not declared in this scope error: ‘oldhist’ was not declared in this scope error: ‘history_get’ was not declared in this scope In function ‘void initialize_readline(char*)’: error: invalid conversion from ‘char** (*)()’ to ‘char** (*)(const char*, int, int)’ error: invalid conversion from ‘int (*)(const char*, int)’ to ‘char* (*)(const char*, int)’ error: invalid conversion from ‘int (*)()’ to ‘int (*)(int, int)’ error: initializing argument 2 of ‘int rl_add_defun(const char*, int (*)(int, int), int)’ In function ‘char** new_mysql_completion(const char*, int, int)’: error: ‘completion_matches’ was not declared in this scope
make[2]: *** [mysql.o] Error 1
make[2]: Leaving directory `/root/package/Percona-Server-5.1.60/client'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/package/Percona-Server-5.1.60/client'
make: *** [all-recursive] Error 1

configure command is
 ./configure --prefix=/opt/percona51

platform info
Linux SN-HP 2.6.18-274.17.1.el5 #1 SMP Tue Jan 10 17:25:58 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

hch (justlooks) wrote :

and the version is

Please try the following configure options: --without-readline, --without-libedit, --without-readline --without-libedit. Please try each of these on clean build directories.

hch (justlooks) wrote :

i tried ,but still problem
./configure --prefix=/opt/percona51 --without-readline && make
./configure --prefix=/opt/percona51 --without-libedit && make
./configure --prefix=/opt/percona51 --without-readline --without-libedit && make

checking whether pthread_t can be used by Solaris libc atomic functions... no
checking for pthread_t... yes
checking size of pthread_t... 8
checking for x86 PAUSE instruction... yes
checking libedit variant of rl_completion_entry_function... no
checking defined rl_compentry_func_t and rl_completion_func_t... no
checking HIST_ENTRY is declared in readline/readline.h...
configure: error: Could not find system readline or libedit libraries
              Use --with-readline or --with-libedit to use the bundled
              versions of libedit or readline

hch (justlooks) wrote :

and i have readline, libedit installed

libedit.x86_64 2.11-2.20080712cvs.el5 installed
readline.i386 5.1-3.el5 installed
readline.x86_64 5.1-3.el5 installed

hch (justlooks) wrote :

i use './configure --prefix=/opt/percona51 --with-readline && make'
now the error info changed

g++ -g -O2 -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o .libs/mysql mysql.o readline.o sql_string.o completion_hash.o ../cmd-line-utils/readline/libreadline.a -lncursesw -lpthread ../libmysql/.libs/ -lcrypt -lnsl -lm -lz -lrt -Wl,--rpath -Wl,/opt/percona51/lib/mysql
../libmysql/.libs/ undefined reference to `yaSSL_load_error_strings'
../libmysql/.libs/ undefined reference to `yaSSL_get_peer_certificate'
../libmysql/.libs/ undefined reference to `yaSSL_CTX_set_tmp_dh'
../libmysql/.libs/ undefined reference to `yaSSL_shutdown'
../libmysql/.libs/ undefined reference to `yaSSL_CTX_set_session_id_context'

Please try --without-ssl configure option. If you need SSL support for your binaries then you'll have to find which of the --with-yasl --with-openssl and their --without counterparts will work for you.

Stewart Smith (stewart) on 2012-02-07
Changed in percona-server:
importance: Undecided → Low

I had recently built Percona-Server-5.1.65-rel14.0 (latest from lp:percona-server-5.1) successfully on FC14 with command like the one suggested by make + non-default path:

./configure --with-plugins=partition,archive,blackhole,csv,example,federated,innodb_plugin --without-embedded-server --with-pic --with-extra-charsets=complex --with-ssl --enable-assembler --enable-local-infile --enable-thread-safe-client --enable-profiling --with-readline --prefix=/home/openxs/dbs/p5.1

(will try on CentOS 6.3 with only --prefix later). Can you, please, check if 5.1.65 still has build problems with configure options similar to above in your environment?

Changed in percona-server:
status: New → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for Percona Server because there has been no activity for 60 days.]

Changed in percona-server:
status: Incomplete → Expired

Percona now uses JIRA for bug reports so this bug report is migrated to:

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers