./configure --prefix=X means not finding readline.h during build?

Asked by Andrew Ettinger on 2009-05-01

Hey gang,

After running `./configure --prefix=X` on Mac 10.5, it looks like `make` can't find readline.h? (I can ./configure && make just fine without --prefix, which I thought was odd...). Here's a snip of what `make` regurgitates:

...
 mv -f $depbase.Tpo $depbase.Po
depbase=`echo client/readline.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
 /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -I. -isystem ./gnulib -isystem ./gnulib -Wall -Wextra -Werror -Wno-cast-align -pedantic -Wundef -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-redundant-decls -Wno-long-long -Wno-strict-aliasing -Wshadow -O3 -std=gnu++98 -ggdb3 -MT client/readline.o -MD -MP -MF $depbase.Tpo -c -o client/readline.o client/readline.cc &&\
 mv -f $depbase.Tpo $depbase.Po
/bin/sh ./libtool --tag=CXX --mode=link /usr/bin/g++-4.2 -Wall -Wextra -Werror -Wno-cast-align -pedantic -Wundef -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-redundant-decls -Wno-long-long -Wno-strict-aliasing -Wshadow -O3 -std=gnu++98 -ggdb3 -o client/drizzle client/drizzle.o client/readline.o mysys/libmysys.la mystrings/libmystrings.la -ldrizzle -lintl -Wl,-framework -Wl,CoreFoundation -lz client/libgetpassword.la -lreadline -lm
/usr/bin/g++-4.2 -Wall -Wextra -Werror -Wno-cast-align -pedantic -Wundef -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-redundant-decls -Wno-long-long -Wno-strict-aliasing -Wshadow -O3 -std=gnu++98 -ggdb3 -o client/drizzle client/drizzle.o client/readline.o -Wl,-framework -Wl,CoreFoundation -Wl,-bind_at_load mysys/.libs/libmysys.a mystrings/.libs/libmystrings.a /usr/local/lib/libdrizzle.dylib /usr/local/lib/libintl.dylib /usr/lib/libiconv.dylib -lc -lz client/.libs/libgetpassword.a -lreadline -lm
Undefined symbols:
  "_rl_completion_matches", referenced from:
      mysql_completion(char const*, int, int)in drizzle.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [client/drizzle] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

BTW, config.h thinks I have it:

/* Define if you have a readline compatible library */
#define HAVE_LIBREADLINE 1
...
/* Define to 1 if you have the <readline.h> header file. */
/* #undef HAVE_READLINE_H */

/* Define if your readline library has \`add_history' */
#define HAVE_READLINE_HISTORY 1

/* Define to 1 if you have the <readline/history.h> header file. */
#define HAVE_READLINE_HISTORY_H 1

/* Define to 1 if you have the <readline/readline.h> header file. */
#define HAVE_READLINE_READLINE_H 1

I can post additional information, obviously... hoping it's something bone headedly easy / seen before....

Cheers,
Andrew

Question information

Language:
English Edit question
Status:
Solved
For:
Drizzle Edit question
Assignee:
No assignee Edit question
Solved by:
Andrew Ettinger
Solved:
2009-05-02
Last query:
2009-05-02
Last reply:
2009-05-01
Monty Taylor (mordred) said : #1

--prefix also adds that location into the libs search path, which means if you have a readline installed there it might get used instead. Did you do a make clean after changing the prefix?

Andrew Ettinger <email address hidden> wrote:

>New question #69530 on Drizzle:
>https://answers.launchpad.net/drizzle/+question/69530
>
>Hey gang,
>
>After running `./configure --prefix=X` on Mac 10.5, it looks like `make` can't find readline.h? (I can ./configure && make just fine without --prefix, which I thought was odd...). Here's a snip of what `make` regurgitates:
>
>...
> mv -f $depbase.Tpo $depbase.Po
>depbase=`echo client/readline.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -I. -isystem ./gnulib -isystem ./gnulib -Wall -Wextra -Werror -Wno-cast-align -pedantic -Wundef -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-redundant-decls -Wno-long-long -Wno-strict-aliasing -Wshadow -O3 -std=gnu++98 -ggdb3 -MT client/readline.o -MD -MP -MF $depbase.Tpo -c -o client/readline.o client/readline.cc &&\
> mv -f $depbase.Tpo $depbase.Po
>/bin/sh ./libtool --tag=CXX --mode=link /usr/bin/g++-4.2 -Wall -Wextra -Werror -Wno-cast-align -pedantic -Wundef -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-redundant-decls -Wno-long-long -Wno-strict-aliasing -Wshadow -O3 -std=gnu++98 -ggdb3 -o client/drizzle client/drizzle.o client/readline.o mysys/libmysys.la mystrings/libmystrings.la -ldrizzle -lintl -Wl,-framework -Wl,CoreFoundation -lz client/libgetpassword.la -lreadline -lm
>/usr/bin/g++-4.2 -Wall -Wextra -Werror -Wno-cast-align -pedantic -Wundef -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-redundant-decls -Wno-long-long -Wno-strict-aliasing -Wshadow -O3 -std=gnu++98 -ggdb3 -o client/drizzle client/drizzle.o client/readline.o -Wl,-framework -Wl,CoreFoundation -Wl,-bind_at_load mysys/.libs/libmysys.a mystrings/.libs/libmystrings.a /usr/local/lib/libdrizzle.dylib /usr/local/lib/libintl.dylib /usr/lib/libiconv.dylib -lc -lz client/.libs/libgetpassword.a -lreadline -lm
>Undefined symbols:
> "_rl_completion_matches", referenced from:
> mysql_completion(char const*, int, int)in drizzle.o
>ld: symbol(s) not found
>collect2: ld returned 1 exit status
>make[2]: *** [client/drizzle] Error 1
>make[1]: *** [all-recursive] Error 1
>make: *** [all] Error 2
>
>BTW, config.h thinks I have it:
>
>/* Define if you have a readline compatible library */
>#define HAVE_LIBREADLINE 1
>...
>/* Define to 1 if you have the <readline.h> header file. */
>/* #undef HAVE_READLINE_H */
>
>/* Define if your readline library has \`add_history' */
>#define HAVE_READLINE_HISTORY 1
>
>/* Define to 1 if you have the <readline/history.h> header file. */
>#define HAVE_READLINE_HISTORY_H 1
>
>/* Define to 1 if you have the <readline/readline.h> header file. */
>#define HAVE_READLINE_READLINE_H 1
>
>I can post additional information, obviously... hoping it's something bone headedly easy / seen before....
>
>Cheers,
>Andrew
>
>--
>You received this question notification because you are a member of
>Drizzle-developers, which is an answer contact for Drizzle.
>

Thanks for the followup Monty.

There's nothing in --prefix=/Users/ettinger/Work/drizzle/build, it was just an arbitrary place to chuck compiles. `make clean` doesn't seem to solve it.

This issue doesn't seem like it's that big of a deal if it isn't stopping other people. It's probably something to do with my include pathing for all the stuff on this laptop (and I can still build into the default prefix for development, so I'll live dangerously for the moment until I can figure it out).

~ Andrew