Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - MySQL client package looks for curses library: (8 Items)
   
MySQL client package looks for curses library  
I get an error in the MySQL 5 client looking for the curses library.

I have built and installed the ncurses libraries.  I tried creating links to these libraries named curses (droping the 
'n').  Still not luck.

Anyone have any ideas on how to avoid this error?

Thanx
Tim
Re: MySQL client package looks for curses library  
Normally MySQL should work with ncurses without using symlinks.

Can you post some more information, e.g. the messages from the build process? Especially the part where the configure 
script (suppose that MySQL is using configure) is looking for the ncurses location.

Re: MySQL client package looks for curses library  
my configure finds the curses headers:

$ cd databases/mysql5-client
$ bmake package
...
=> Full dependency pkg_install-info-[0-9]*: found pkg_install-info-4.5nb3
=> Full dependency perl>=5.0: found perl-5.8.8nb6
=> Full dependency openssl>=0.9.7inb1: found openssl-0.9.7inb4
=> Full dependency zlib>=1.2.3: found zlib-1.2.3
=> Full dependency readline>=5.0: found readline-5.2
===> Overriding tools for mysql-client-5.0.51nb1
===> Extracting for mysql-client-5.0.51nb1
===> Patching for mysql-client-5.0.51nb1
...
checking for sys/stream.h... no
checking for sys/mman.h... (cached) yes
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking termcap.h usability... yes
checking termcap.h presence... yes
checking for termcap.h... yes
checking for termio.h... (cached) no
...
checking for OpenSSL... yes
checking for yaSSL... no
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


Next step to fix it would be to read the section in the configure file where the above message is executed ...

Hope it helps.



RE: MySQL client package looks for curses library  
Here is the relevant output

Making all in client
gmake[2]: Entering directory
`/pkgsrc/databases/mysql5-client/work/mysql-5.0.51/client'
cd .. && /usr/pkg/bin/gmake  am--refresh
gmake[3]: Entering directory
`/pkgsrc/databases/mysql5-client/work/mysql-5.0.51'
/bin/sh ./config.status --recheck
gmake[3]: Leaving directory
`/pkgsrc/databases/mysql5-client/work/mysql-5.0.51'
/bin/sh ../libtool --preserve-dup-deps --tag=CXX --mode=link c++
-DDBUG_OFF -O2 -DUSE_OLD_FUNCTIONS -I/usr/pkg/include -I/usr/include
-fno-implicit-templates -fno-exceptions -fno-rtti
-Wl,-R/usr/pkg/lib/mysql -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib
-Wl,-R/usr/lib  -o mysql  mysql.o readline.o sql_string.o
completion_hash.o ../cmd-line-utils/readline/libreadline.a -lcurses
-ltermcap ../libmysql/libmysqlclient.la  -lsocket -lm  -L/usr/pkg/lib
-lssl -lcrypto -L/usr/pkg/lib -lz 
c++ -DDBUG_OFF -O2 -DUSE_OLD_FUNCTIONS
-I/pkgsrc/databases/mysql5-client/work/.buildlink/include
-fno-implicit-templates -fno-exceptions -fno-rtti
-Wl,-R/usr/pkg/lib/mysql -Wl,-R/usr/pkg/lib -o .libs/mysql mysql.o
readline.o sql_string.o completion_hash.o
-L/pkgsrc/databases/mysql5-client/work/.buildlink/lib
../cmd-line-utils/readline/libreadline.a -lcurses -ltermcap
../libmysql/.libs/libmysqlclient.so -lsocket -lm -lssl -lcrypto
/pkgsrc/databases/mysql5-client/work/.buildlink/lib/libz.so  -Wl,--rpath
-Wl,/usr/pkg/lib/mysql -Wl,--rpath
-Wl,/pkgsrc/databases/mysql5-client/work/.buildlink/lib
/usr/qnx632/host/qnx6/x86/usr/bin/i386-pc-nto-qnx6.3.0-ld: cannot find
-lcurses
cc: /usr/qnx632/host/qnx6/x86/usr/bini386-pc-nto-qnx6.3.0-ld error 1
gmake[2]: *** [mysql] Error 1
gmake[2]: Leaving directory
`/pkgsrc/databases/mysql5-client/work/mysql-5.0.51/client'
gmake[1]: 888 [all-recursive] Error 1
gmake[1]: Leaving directory
`/pkgsrc/databases/mysql5-client/work/mysql-5.0.51'
gmake: *** [all] Error 2
*** Error code 2

Thanx
Tim

-----Original Message-----
From: Christian Leutloff [mailto:christian.leutloff@xoxind.de] 
Sent: Wednesday, June 25, 2008 6:26 AM
To: general-pkgsrc
Subject: Re: MySQL client package looks for curses library

my configure finds the curses headers:

$ cd databases/mysql5-client
$ bmake package
...
=> Full dependency pkg_install-info-[0-9]*: found
pkg_install-info-4.5nb3
=> Full dependency perl>=5.0: found perl-5.8.8nb6
=> Full dependency openssl>=0.9.7inb1: found openssl-0.9.7inb4
=> Full dependency zlib>=1.2.3: found zlib-1.2.3
=> Full dependency readline>=5.0: found readline-5.2
===> Overriding tools for mysql-client-5.0.51nb1
===> Extracting for mysql-client-5.0.51nb1
===> Patching for mysql-client-5.0.51nb1
...
checking for sys/stream.h... no
checking for sys/mman.h... (cached) yes
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking termcap.h usability... yes
checking termcap.h presence... yes
checking for termcap.h... yes
checking for termio.h... (cached) no
...
checking for OpenSSL... yes
checking for yaSSL... no
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


Next step to fix it would be to read the section in the configure file
where the above message is executed ...

Hope it helps.





_______________________________________________
General
http://community.qnx.com/sf/go/post9665
Re: RE: MySQL client package looks for curses library  
> Here is the relevant output
> 
> Making all in client
> gmake[2]: Entering directory
> `/pkgsrc/databases/mysql5-client/work/mysql-5.0.51/client'
> cd .. && /usr/pkg/bin/gmake  am--refresh
> gmake[3]: Entering directory
> `/pkgsrc/databases/mysql5-client/work/mysql-5.0.51'
> /bin/sh ./config.status --recheck
> gmake[3]: Leaving directory
> `/pkgsrc/databases/mysql5-client/work/mysql-5.0.51'
> /bin/sh ../libtool --preserve-dup-deps --tag=CXX --mode=link c++
> -DDBUG_OFF -O2 -DUSE_OLD_FUNCTIONS -I/usr/pkg/include -I/usr/include
> -fno-implicit-templates -fno-exceptions -fno-rtti
> -Wl,-R/usr/pkg/lib/mysql -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib
> -Wl,-R/usr/lib  -o mysql  mysql.o readline.o sql_string.o
> completion_hash.o ../cmd-line-utils/readline/libreadline.a -lcurses
> -ltermcap ../libmysql/libmysqlclient.la  -lsocket -lm  -L/usr/pkg/lib
> -lssl -lcrypto -L/usr/pkg/lib -lz 
> c++ -DDBUG_OFF -O2 -DUSE_OLD_FUNCTIONS
> -I/pkgsrc/databases/mysql5-client/work/.buildlink/include
> -fno-implicit-templates -fno-exceptions -fno-rtti
> -Wl,-R/usr/pkg/lib/mysql -Wl,-R/usr/pkg/lib -o .libs/mysql mysql.o
> readline.o sql_string.o completion_hash.o
> -L/pkgsrc/databases/mysql5-client/work/.buildlink/lib
> ../cmd-line-utils/readline/libreadline.a -lcurses -ltermcap
> ../libmysql/.libs/libmysqlclient.so -lsocket -lm -lssl -lcrypto
> /pkgsrc/databases/mysql5-client/work/.buildlink/lib/libz.so  -Wl,--rpath
> -Wl,/usr/pkg/lib/mysql -Wl,--rpath
> -Wl,/pkgsrc/databases/mysql5-client/work/.buildlink/lib
> /usr/qnx632/host/qnx6/x86/usr/bin/i386-pc-nto-qnx6.3.0-ld: cannot find
> -lcurses
> cc: /usr/qnx632/host/qnx6/x86/usr/bini386-pc-nto-qnx6.3.0-ld error 1
> gmake[2]: *** [mysql] Error 1
> gmake[2]: Leaving directory
> `/pkgsrc/databases/mysql5-client/work/mysql-5.0.51/client'
> gmake[1]: 888 [all-recursive] Error 1
> gmake[1]: Leaving directory
> `/pkgsrc/databases/mysql5-client/work/mysql-5.0.51'
> gmake: *** [all] Error 2
> *** Error code 2

why are you using gmake and not bmake!? (but that will not be the problem)

How have you overcome configure problem?

In the file
pkgsrc/databases/mysql5-client/work/mysql-5.0.51/config.log
the used configure command is noted:

 $ ./configure --with-openssl=/usr/pkg --localstatedir=/var/mysql --with-named-z-libs=z --without-libwrap --with-name
d-curses-libs=-lcurses -ltermcap --without-readline --without-libedit --disable-dependency-tracking --without-debug --
without-bench --with-low-memory --with-zlib-dir=/usr/pkg --with-vio --with-charset=latin1 --with-extra-charsets=all --
enable-assembler --without-extra-tools --without-server --enable-thread-safe-client --prefix=/usr/pkg --host=i386-pc-n
to-qnx6.3.2 --infodir=/usr/pkg/info --mandir=/usr/pkg/man

This is IMHO the cause of your problem because -lcurses is explicitly mentioned. The fix would be to change the call to 
configure to NOT use -lcurses but instead use -lncurses . 


You may change this in Makefile.common. Here is the patch:


$ svn diff
Index: Makefile.common
===================================================================
--- Makefile.common     (revision 79)
+++ Makefile.common     (working copy)
@@ -35,7 +35,12 @@
 CONFIGURE_ARGS+=       --localstatedir=${MYSQL_DATADIR:Q}
 CONFIGURE_ARGS+=       --with-named-z-libs=z
 CONFIGURE_ARGS+=       --without-libwrap
+.if ${OPSYS} == "QNX"
+# QNX provides libnurses instead of libcurses
+CONFIGURE_ARGS+=       --with-named-curses-libs="-lncurses -ltermcap"
+.else
 CONFIGURE_ARGS+=       --with-named-curses-libs="-lcurses -ltermcap"
+.endif

 .if ${OPSYS} == "IRIX"
 CFLAGS+=               -DIRIX5 -DNEEDS_BSTRING_H


Can you please try the patch? If it works I apply it to the svn repository.

Bye
Christian




RE: RE: MySQL client package looks for curses library  
Yes, that appears to solve the curses problem.

There is still the problem that readline is not built.  You have to run
bmake in the readline directory and then restart bmake in the parent.
Also in the mysql5-server package readline is not even configured so
there is no Makefile at all.

Thanx
Tim

-----Original Message-----
From: Christian Leutloff [mailto:christian.leutloff@xoxind.de] 
Sent: Thursday, June 26, 2008 8:20 AM
To: general-pkgsrc
Subject: Re: RE: MySQL client package looks for curses library

> Here is the relevant output
> 
> Making all in client
> gmake[2]: Entering directory
> `/pkgsrc/databases/mysql5-client/work/mysql-5.0.51/client'
> cd .. && /usr/pkg/bin/gmake  am--refresh
> gmake[3]: Entering directory
> `/pkgsrc/databases/mysql5-client/work/mysql-5.0.51'
> /bin/sh ./config.status --recheck
> gmake[3]: Leaving directory
> `/pkgsrc/databases/mysql5-client/work/mysql-5.0.51'
> /bin/sh ../libtool --preserve-dup-deps --tag=CXX --mode=link c++
> -DDBUG_OFF -O2 -DUSE_OLD_FUNCTIONS -I/usr/pkg/include -I/usr/include
> -fno-implicit-templates -fno-exceptions -fno-rtti
> -Wl,-R/usr/pkg/lib/mysql -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib
> -Wl,-R/usr/lib  -o mysql  mysql.o readline.o sql_string.o
> completion_hash.o ../cmd-line-utils/readline/libreadline.a -lcurses
> -ltermcap ../libmysql/libmysqlclient.la  -lsocket -lm  -L/usr/pkg/lib
> -lssl -lcrypto -L/usr/pkg/lib -lz 
> c++ -DDBUG_OFF -O2 -DUSE_OLD_FUNCTIONS
> -I/pkgsrc/databases/mysql5-client/work/.buildlink/include
> -fno-implicit-templates -fno-exceptions -fno-rtti
> -Wl,-R/usr/pkg/lib/mysql -Wl,-R/usr/pkg/lib -o .libs/mysql mysql.o
> readline.o sql_string.o completion_hash.o
> -L/pkgsrc/databases/mysql5-client/work/.buildlink/lib
> ../cmd-line-utils/readline/libreadline.a -lcurses -ltermcap
> ../libmysql/.libs/libmysqlclient.so -lsocket -lm -lssl -lcrypto
> /pkgsrc/databases/mysql5-client/work/.buildlink/lib/libz.so
-Wl,--rpath
> -Wl,/usr/pkg/lib/mysql -Wl,--rpath
> -Wl,/pkgsrc/databases/mysql5-client/work/.buildlink/lib
> /usr/qnx632/host/qnx6/x86/usr/bin/i386-pc-nto-qnx6.3.0-ld: cannot find
> -lcurses
> cc: /usr/qnx632/host/qnx6/x86/usr/bini386-pc-nto-qnx6.3.0-ld error 1
> gmake[2]: *** [mysql] Error 1
> gmake[2]: Leaving directory
> `/pkgsrc/databases/mysql5-client/work/mysql-5.0.51/client'
> gmake[1]: 888 [all-recursive] Error 1
> gmake[1]: Leaving directory
> `/pkgsrc/databases/mysql5-client/work/mysql-5.0.51'
> gmake: *** [all] Error 2
> *** Error code 2

why are you using gmake and not bmake!? (but that will not be the
problem)

How have you overcome configure problem?

In the file
pkgsrc/databases/mysql5-client/work/mysql-5.0.51/config.log
the used configure command is noted:

 $ ./configure --with-openssl=/usr/pkg --localstatedir=/var/mysql
--with-named-z-libs=z --without-libwrap --with-name
d-curses-libs=-lcurses -ltermcap --without-readline --without-libedit
--disable-dependency-tracking --without-debug --
without-bench --with-low-memory --with-zlib-dir=/usr/pkg --with-vio
--with-charset=latin1 --with-extra-charsets=all --
enable-assembler --without-extra-tools --without-server
--enable-thread-safe-client --prefix=/usr/pkg --host=i386-pc-n
to-qnx6.3.2 --infodir=/usr/pkg/info --mandir=/usr/pkg/man

This is IMHO the cause of your problem because -lcurses is explicitly
mentioned. The fix would be to change the call to configure to NOT use
-lcurses but instead use -lncurses . 


You may change this in Makefile.common. Here is the patch:


$ svn diff
Index: Makefile.common
===================================================================
--- Makefile.common     (revision 79)
+++ Makefile.common     (working copy)
@@ -35,7 +35,12 @@
 CONFIGURE_ARGS+=       --localstatedir=${MYSQL_DATADIR:Q}
 CONFIGURE_ARGS+=      ...
View Full Message
Re: RE: RE: MySQL client package looks for curses library  
> Yes, that appears to solve the curses problem.

fine. Patch is commited.

 
> There is still the problem that readline is not built.  You have to run
> bmake in the readline directory and then restart bmake in the parent.
> Also in the mysql5-server package readline is not even configured so
> there is no Makefile at all.

The problem seems to be in the string.h from QNX. This program fails to compile because of duplicate definitions in 
string.h. IMHO it should not be possible to get the same function prototypes twice from the same include file. Perhaps 
you can find the root cause of the problem. A work around *may* be to include string.h in front of stdio.h another way 
may be to define something explicitly to avoid the duplicated prototypes.

| 		#include "stdio.h"
| 		#include "readline/readline.h"
| 
| int
| main ()
| {
| 
| 		HIST_ENTRY entry;
| 
|   ;
|   return 0;
| }


Here is the problem in my config.log:

configure:40170: checking HIST_ENTRY is declared in readline/readline.h
configure:40201: c++ -c  -DDBUG_OFF -O2 -DUSE_OLD_FUNCTIONS -I/usr/pkg/include -I/usr/include   -fno-implicit-templates 
-fno-exceptions -fno-rtti -Dunix -I/usr/pkg/include -I/usr/include conftest.cpp >&5
In file included from /usr/src/HEAD/pkgsrc/databases/mysql5-client/work/.buildlink/include/readline/chardefs.h:39,
                 from /usr/src/HEAD/pkgsrc/databases/mysql5-client/work/.buildlink/include/readline/keymaps.h:36,
                 from /usr/src/HEAD/pkgsrc/databases/mysql5-client/work/.buildlink/include/readline/readline.h:38,
                 from conftest.cpp:280:
/usr/qnx632/target/qnx6/usr/include/string.h: In function `void* 
   std::memchr(void*, int, unsigned int)':
/usr/qnx632/target/qnx6/usr/include/string.h:138: error: declaration of C 
   function `void* std::memchr(void*, int, unsigned int)' conflicts with
/usr/qnx632/target/qnx6/usr/include/string.h:62: error: previous declaration `
   const void* std::memchr(const void*, int, unsigned int)' here
/usr/qnx632/target/qnx6/usr/include/string.h: In function `void* 
   std::memchr(void*, int, unsigned int)':
/usr/qnx632/target/qnx6/usr/include/string.h:140: error: invalid conversion 
   from `const void*' to `void*'
/usr/qnx632/target/qnx6/usr/include/string.h: In function `char* 
   std::strchr(char*, int)':
/usr/qnx632/target/qnx6/usr/include/string.h:143: error: declaration of C 
   function `char* std::strchr(char*, int)' conflicts with
/usr/qnx632/target/qnx6/usr/include/string.h:63: error: previous declaration `
   const char* std::strchr(const char*, int)' here
/usr/qnx632/target/qnx6/usr/include/string.h: In function `char* 
   std::strchr(char*, int)':
/usr/qnx632/target/qnx6/usr/include/string.h:145: error: invalid conversion 
   from `const char*' to `char*'
/usr/qnx632/target/qnx6/usr/include/string.h: In function `char* 
   std::strpbrk(char*, const char*)':
/usr/qnx632/target/qnx6/usr/include/string.h:148: error: declaration of C 
   function `char* std::strpbrk(char*, const char*)' conflicts with
/usr/qnx632/target/qnx6/usr/include/string.h:64: error: previous declaration `
   const char* std::strpbrk(const char*, const char*)' here
/usr/qnx632/target/qnx6/usr/include/string.h: In function `char* 
   std::strpbrk(char*, const char*)':
/usr/qnx632/target/qnx6/usr/include/string.h:150: error: invalid conversion 
   from `const char*' to `char*'
/usr/qnx632/target/qnx6/usr/include/string.h: In function `char* 
   std::strrchr(char*, int)':
/usr/qnx632/target/qnx6/usr/include/string.h:153: error: declaration of C 
   function `char* std::strrchr(char*, int)' conflicts with
/usr/qnx632/target/qnx6/usr/include/string.h:65: error: previous declaration `
   const char* std::strrchr(const char*, int)' here
/usr/qnx632/target/qnx6/usr/include/string.h: In function `char* 
   std::strrchr(char*, int)':
/usr/qnx632/target/qnx6/usr/include/string.h:155: error: invalid conversion 
...
View Full Message
Re: RE: RE: MySQL client package looks for curses library  
Try the attached patch, see if it works.

(drop it into databases/mysql5-client/patches; and then do a "bmake makepatchsum", make sure you have pkgtools/pkgdiff 
installed)

The HIST_ENTRY is now defined in readline/history.h, so I think the test case no longer correct anymore. 

Also I include "string.h" before "readline/readline.h", to work around the compile error.
Attachment: Text patch-aa 1,016 bytes