Bug with "redundant" readline -I options

Bug with "redundant" readline -I options

am 17.01.2003 16:48:17 von Victor Vagin

Hello Paul, Sergei,

> A while back a change was made to the Makefile.am files to remove
> some "redundant" includes. As a result, the build in the readline
> directory fails on some systems now:
>
> Making all in readline
> make[2]: Entering directory `/home/paul/mysql-4.1/readline'
> gcc -DUNDEF_THREADS_HACK -DHAVE_CONFIG_H -DNO_KILL_INTR -I../include -O3 -DDBUG_OFF -c readline.c
> readline.c:26:22: config.h: No such file or directory
> In file included from readline.c:54:
> rldefs.h:30:22: config.h: No such file or directory
> make[2]: *** [readline.o] Error 1
> make[2]: Leaving directory `/home/paul/mysql-4.1/readline'
>
>
> config.h is in the top source directory, but there is no -I.. option
> on the compile line. That's what happens on my RedHat 7.0 system.
>
> On Mac OS X, the build succeeds, because when the Makefile.in file gets
> generated, it includes this line:
>
> DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
>
> Not sure where that comes from, it doesn't get put into Makefile.in
> on my RedHat box.
>
> Anyway, the build in the readline directory needs -I.. to come from
> somewhere. This patch to Makefile.am fixes the problem, although
> I'm not sure it's the best thing to do:
>
> --- Makefile.am.orig Thu Jan 16 10:04:04 2003
> +++ Makefile.am Thu Jan 16 11:44:03 2003
> @@ -2,7 +2,7 @@
> # Makefile for the GNU readline library.
> # Copyright (C) 1994,1996,1997 Free Software Foundation, Inc.
>
> -INCLUDES = -I$(top_srcdir)/include
> +INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)
>
> noinst_LIBRARIES = libreadline.a
>
>
> How-To-Repeat: Try building 4.1 on RedHat 7.0.
>
> Err, just tried it on RedHat 7.3, too. Same problem occurs.

Patch pushed.

Sergei, if you have reasons for removing of this options, please, explain
it more detailed.

--
Best regards,
Victor mailto:vva@udm.ru


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13513@lists.mysql.com
To unsubscribe, e-mail

Re: Bug with "redundant" readline -I options

am 17.01.2003 19:08:53 von Paul DuBois

Sergei, Victor -- thanks for your help. readline compiles fine now on
RedHat with the change.

However, I've found another problem, now that readline compiles. :-)

In the client directory, mysql.cc doesn't compile correctly. It includes
, but since -I.. no longer is on the compile line,
the command finds /usr/include/readline/readline.h, which is older than
the one in the MySQL source tree. The older one doesn't define
RL_READLINE_VERSION, and I get an unresolved symbol error at link time.

Adding -I.. to the command allows the compiler to find the correct include
file. Here's the patch to client/Makefile.am:

--- Makefile.am.orig Wed Dec 11 18:18:15 2002
+++ Makefile.am Fri Jan 17 11:40:22 2003
@@ -17,7 +17,7 @@
# This file is public domain and comes with NO WARRANTY of any kind

#AUTOMAKE_OPTIONS = nostdinc
-INCLUDES = -I$(top_srcdir)/include $(openssl_includes)
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir) $(openssl_includes)
LIBS = @CLIENT_LIBS@
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la
bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \

I'll cc: this to bugs@ so that it appears on the list.
Is this message enough for you to address the problem, or do you need
more information?


filter fodder:
How-To-Repeat:


On Fri, Jan 17, 2003 at 06:16:20PM +0100, Sergei Golubchik wrote:
> Date: Fri, 17 Jan 2003 18:16:20 +0100
> From: Sergei Golubchik
> To: Victor Vagin
> Cc: Paul DuBois
> Subject: Re: Bug with 'redundant' readline -I options
> User-Agent: Mutt/1.5.1i
>
> Hi!
>
> On Jan 17, Victor Vagin wrote:
> > Hello Paul, Sergei,
> >
> > > A while back a change was made to the Makefile.am files to remove
> > > some "redundant" includes. As a result, the build in the readline
> > > directory fails on some systems now:
> > >
> > > Making all in readline
> > > make[2]: Entering directory `/home/paul/mysql-4.1/readline'
> > > gcc -DUNDEF_THREADS_HACK -DHAVE_CONFIG_H -DNO_KILL_INTR -I../include -O3 -DDBUG_OFF -c readline.c
> > > readline.c:26:22: config.h: No such file or directory
> > > In file included from readline.c:54:
> > > rldefs.h:30:22: config.h: No such file or directory
> > > make[2]: *** [readline.o] Error 1
> > > make[2]: Leaving directory `/home/paul/mysql-4.1/readline'
> > >
> > > config.h is in the top source directory, but there is no -I.. option
> > > on the compile line. That's what happens on my RedHat 7.0 system.
> > >
> > > On Mac OS X, the build succeeds, because when the Makefile.in file gets
> > > generated, it includes this line:
> > >
> > > DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
> >
> > Patch pushed.
> >
> > Sergei, if you have reasons for removing of this options, please, explain
> > it more detailed.
>
> No particular reasons.
> I was trying to get FreeBSD's system readline to work after you upgraded
> readline in mysql tree, so I was playing with makefiles.
>
> As I saw -I. -I.. were appearing three-four times in every gcc command
> line, as called by make, I tried to remove duplicates.
> Obviously, one -I.. was duplicated on BSD (including Mac OS X), but not
> on RedHat :(
>
> Regards,
> Sergei
>
> --
> MySQL Development Team
> __ ___ ___ ____ __
> / |/ /_ __/ __/ __ \/ / Sergei Golubchik
> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/
> /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany
> <___/

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13516@lists.mysql.com
To unsubscribe, e-mail