Bug 61353 - configure check failed for Berkeley DB even passing include dirs and lib dirs to configure
Summary: configure check failed for Berkeley DB even passing include dirs and lib dirs...
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-17 11:33 UTC by Francesco Dandrea
Modified: 2003-08-08 19:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Dandrea 2003-07-17 11:33:28 UTC
Version:           CVS 12/07/2003 (or 07/12/2003 in US format i think) (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.2 
OS:          Linux

I installed Berkeley DB version 4.1.25 (compiled from source) in the direcroty /home/sviluppo/BerkeleyDB. I set PATH to /home/sviluppo/BerkeleyDB/bin:$PATH and
LD_LIBRARY_PATH to /home/sviluppo/BerkeleyDB/lib
Then i run configure to build Kdevelop CVS. The berkeley DB was non found. At this point I run configure using the option to add the right include and lib dirs (/home/sviluppo/BerkeleyDB/include and /home/sviluppo/BerkeleyDB/lib).
The check failed again. At this point I edited the configure script, to modify the check ,adding USER_INCLUDE and the other variable to the compile options (sorry, I don't have here the script, and I donn't remember).
At this point all worked fine.
When I compile the include dir was always added, but the lib dir was missing in the makefile of lib/catalog (if I remember right) giving a compile error
Comment 1 Harald Fernengel 2003-07-17 11:59:06 UTC
please provide the relevant parts of config.log (should be near the bottom, the call to the 
compiler and the resulting error message). 
Comment 2 Francesco Dandrea 2003-07-18 10:21:08 UTC
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.53.  Invocation command line was

  $ ./configure --prefix=/home/sviluppo/kdeHead
--with-extra-includes=/home/sviluppo/berkleyDB/include
--with-extra-libs=/home/sviluppo/berkleyDB/lib


.......body of config.log removed ............


configure:32935: rm -rf SunWS_cache; g++ -o conftest -Wnon-virtual-dtor
-Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wwrite-strings -ansi
-D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts
-O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new
-fno-common  -ldb  -I/home/sviluppo/kdeHead/include -I/home/sviluppo/qt/include
-I.  -I/home/sviluppo/berkleyDB/include  -DQT_THREAD_SUPPORT  -D_REENTRANT 
conftest.cc  1>&5
conftest.cc: In function `int main()':
conftest.cc:19: warning: `DB*db' might be used uninitialized in this function
/usr//bin/ld: cannot find -ldb
collect2: ld returned 1 exit status
configure:32938: $? = 1
configure: failed program was:
/* #line 32907 "configure" */
#include "confdefs.h"

        #include <db.h>

#ifdef F77_DUMMY_MAIN
#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{

        #if DB_VERSION_MAJOR < 3
           choke me
        #else
           DB *db;
           db->open( db, 0, 0, NULL, DB_BTREE, DB_CREATE, 0644 );
        #endif

  ;
  return 0;
}
configure:32970: error: no - please install Berkeley DB >= 3

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_bdb=no
ac_cv_build=i686-pc-linux-gnu
ac_cv_build_alias=i686-pc-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=
ac_cv_func__NSGetEnviron=no
ac_cv_func_connect=yes
ac_cv_func_inet_ntoa=yes
ac_cv_func_remove=yes
ac_cv_func_shmat=yes
ac_cv_func_snprintf=yes
ac_cv_func_vsnprintf=yes
ac_cv_have_dlfcn=yes
ac_cv_have_kde='have_kde=yes     ac_kde_includes=/home/sviluppo/kdeHead/include
ac_kde_libraries=/home/sviluppo/kdeHead/lib'
ac_cv_have_qt='have_qt=yes     ac_qt_includes=/home/sviluppo/qt/include
ac_qt_libraries=/home/sviluppo/qt/lib'
ac_cv_header_CoreAudio_CoreAudio_h=no
ac_cv_header_crt_externs_h=no
ac_cv_header_dlfcn_h=yes
ac_cv_header_inttypes_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_unistd_h=yes
ac_cv_host=i686-pc-linux-gnu
ac_cv_host_alias=i686-pc-linux-gnu
ac_cv_lib_ICE_IceConnectionNumber=yes
ac_cv_lib_compat_main=no
ac_cv_lib_crypt_crypt=yes
ac_cv_lib_dl_dlopen=yes
ac_cv_lib_dld_shl_unload=no
ac_cv_lib_dnet_dnet_ntoa=no
ac_cv_lib_dnet_stub_dnet_ntoa=no
ac_cv_lib_fl_yywrap=yes
ac_cv_lib_jpeg_6b=no
ac_cv_lib_jpeg_normal=-ljpeg
ac_cv_lib_png='-lpng -lz -lm'
ac_cv_lib_poll_poll=no
ac_cv_lib_pthread_pthread_create=yes
ac_cv_lib_ucb_killpg=no
ac_cv_lib_util_main=yes
ac_cv_lib_z=-lz
ac_cv_objext=o
ac_cv_path_GMSGFMT=/usr//bin/msgfmt
ac_cv_path_MSGFMT=/usr//bin/msgfmt
ac_cv_path_XGETTEXT=/usr//bin/xgettext
ac_cv_path_install='/usr//bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_CPP='gcc -E'
ac_cv_prog_CXXCPP='g++ -E'
ac_cv_prog_LEX=flex
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_ac_ct_RANLIB=ranlib
ac_cv_prog_ac_ct_STRIP=strip
ac_cv_prog_cc_g=yes
ac_cv_prog_cxx_g=yes
ac_cv_prog_lex_root=lex.yy
ac_cv_prog_lex_yytext_pointer=yes
ac_cv_prog_make_make_set=yes
ac_cv_qt31_setup=yes
ac_cv_qt_setup=yes
ac_cv_sizeof_char_p=4
ac_cv_sizeof_int=4
ac_cv_sizeof_long=4
ac_cv_sizeof_size_t=4
ac_cv_sizeof_unsigned_long=4
ac_cv_socklen_t=socklen_t
ac_cv_target=i686-pc-linux-gnu
ac_cv_target_alias=i686-pc-linux-gnu
ac_cv_type_char_p=yes
ac_cv_type_int=yes
ac_cv_type_long=yes
ac_cv_type_size_t=yes
ac_cv_type_unsigned_long=yes
am_cv_CC_dependencies_compiler_type=gcc3
am_cv_CXX_dependencies_compiler_type=gcc3
kde_cv_all_paths='kde_have_all_paths="yes" 
kde_htmldir="\${prefix}/share/doc/HTML" 	kde_appsdir="\${prefix}/share/applnk" 
kde_icondir="\${prefix}/share/icons" 	kde_sounddir="\${prefix}/share/sounds" 
kde_datadir="\${prefix}/share/apps" 	kde_locale="\${prefix}/share/locale" 
kde_cgidir="\${exec_prefix}/cgi-bin" 	kde_confdir="\${prefix}/share/config" 
kde_mimedir="\${prefix}/share/mimelnk" 
kde_toolbardir="\${prefix}/share/toolbar" 
kde_wallpaperdir="\${prefix}/share/wallpapers" 
kde_templatesdir="\${prefix}/share/templates" 
kde_bindir="\${exec_prefix}/bin" 	kde_servicesdir="\${prefix}/share/services" 
kde_servicetypesdir="\${prefix}/share/servicetypes" 
kde_moduledir="\${libdir}/kde3" 	kde_styledir="\${libdir}/kde3/plugins/styles" 
kde_widgetdir="/home/sviluppo/kdeHead/lib/kde3/plugins/designer" 
xdg_appsdir="\${datadir}/applications" 
xdg_directorydir="\${datadir}/desktop-directories" 	kde_result=defaults'
kde_cv_func_strlcat=no
kde_cv_func_strlcpy=no
kde_cv_have_libXext=yes
kde_cv_have_x='have_x=yes          kde_x_includes=. kde_x_libraries=/usr/X11R6/lib'
kde_cv_path=/home/sviluppo/kdeHead/bin/meinproc
kde_cv_path_artsc_config=/home/sviluppo/kdeHead/bin/artsc-config
kde_cv_path_dcopidl=/home/sviluppo/kdeHead/bin/dcopidl
kde_cv_path_dcopidl2cpp=/home/sviluppo/kdeHead/bin/dcopidl2cpp
kde_cv_path_kde_config=/home/sviluppo/kdeHead/bin/kde-config
kde_cv_path_mcopidl=/home/sviluppo/kdeHead/bin/mcopidl
kde_cv_path_meinproc=/home/sviluppo/kdeHead/bin/meinproc
kde_cv_path_moc=/home/sviluppo/qt/bin/moc
kde_cv_path_uic=/home/sviluppo/qt/bin/uic
kde_cv_prog_cxx_O0=yes
kde_cv_prog_cxx_Wmissing_format_attribute=yes
kde_cv_prog_cxx_Wno_long_long=yes
kde_cv_prog_cxx_Wnon_virtual_dtor=yes
kde_cv_prog_cxx_Wundef=yes
kde_cv_prog_cxx_fexceptions=yes
kde_cv_prog_cxx_fno_check_new=yes
kde_cv_prog_cxx_fno_common=yes
kde_cv_prog_cxx_fno_exceptions=yes
kde_cv_prog_uic_L=yes
kde_cv_prog_uic_nounload=yes
kde_cv_proto_strlcat='yes - in libkdefakes'
kde_cv_proto_strlcpy='yes - in libkdefakes'
kde_cv_pythondir=/usr/local
kde_cv_qt_direct=no
kde_cv_qt_jpeg=no
kde_cv_uic_plugins=yes
lt_cv_deplibs_check_method=pass_all
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file='/lib/libc.so.6 /lib/libc-2.2.5.so'
lt_cv_ld_reload_flag=-r
lt_cv_objdir=.libs
lt_cv_path_LD=/usr//bin/ld
lt_cv_path_NM='/usr//bin/nm -B'
lt_cv_path_SED=/bin/sed
lt_cv_prog_compiler_c_o=yes
lt_cv_prog_compiler_c_o_CXX=yes
lt_cv_prog_compiler_c_o_GCJ=no
lt_cv_prog_compiler_rtti_exceptions=no
lt_cv_prog_gnu_ld=yes
lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ 
]\([ABCDGISTW][ABCDGISTW]*\)[ 	][ 	]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3
\3/p'\'''
lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\) $/ 
{\"\1\", (lt_ptr) 0},/p'\'' -e '\''s/^[BCDEGRST] \([^ ]*\) \([^ ]*\)$/  {"\2",
(lt_ptr) \&\2},/p'\'''
lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^. .* \(.*\)$/extern int
\1;/p'\'''
lt_cv_sys_max_cmd_len=32768
lt_lt_cv_prog_compiler_c_o='"yes"'
lt_lt_cv_prog_compiler_c_o_CXX='"yes"'
lt_lt_cv_prog_compiler_c_o_GCJ='"no"'
lt_lt_cv_sys_global_symbol_pipe='"sed -n -e '\''s/^.*[ 
]\\([ABCDGISTW][ABCDGISTW]*\\)[ 	][ 	]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1
\\2\\3 \\3/p'\''"'
lt_lt_cv_sys_global_symbol_to_c_name_address='"sed -n -e '\''s/^: \\([^ ]*\\)
\$/  {\\\"\\1\\\", (lt_ptr) 0},/p'\'' -e '\''s/^[BCDEGRST] \\([^ ]*\\) \\([^
]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'\''"'
lt_lt_cv_sys_global_symbol_to_cdecl='"sed -n -e '\''s/^. .* \\(.*\\)\$/extern
int \\1;/p'\''"'

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE "gideon_kdevelop"
#define VERSION "3.0.0a5"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#define KDELIBSUFF ""
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_DLFCN_H 1
#define HAVE_CRYPT 1
#define ksize_t socklen_t
#define HAVE_SYS_TYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_RES_INIT 1
#define HAVE_RES_INIT 1
#define SIZEOF_INT 4
#define SIZEOF_LONG 4
#define SIZEOF_CHAR_P 4
#define SIZEOF_SIZE_T 4
#define SIZEOF_UNSIGNED_LONG 4
#define HAVE_VSNPRINTF 1
#define HAVE_SNPRINTF 1
#define HAVE_LIBZ 1
#define HAVE_LIBPNG 1
#define HAVE_LIBJPEG 1
#define HAVE_LIBPTHREAD 1
#define YYTEXT_POINTER 1

configure: exit 1
Comment 3 Harald Fernengel 2003-07-18 10:30:51 UTC
LD_LIBRARY_PATH is for runtime libraries only, during compile time you have to use 
--with-extra-libs=/path/to/lib to let the compiler know where it can find the libraries. Check 
that the compiler is called with "-I/path/to/include" and "-L/path/to/lib -ldb". 
Comment 4 Francesco Dandrea 2003-07-18 10:43:00 UTC
Well, as you see from the config.log I called configure with
--with-extra-libs=/home/sviluppo/berkleyDB/lib (and I'm sure that the path is
right, because editing configure by hand and adding the
-L/home/sviluppo/berkleyDB/lib parameter resolves all). As it appears in the
config.log the launch command was:

./configure --prefix=/home/sviluppo/kdeHead
--with-extra-includes=/home/sviluppo/berkleyDB/include
--with-extra-libs=/home/sviluppo/berkleyDB/lib 
Comment 5 Harald Fernengel 2003-07-18 10:52:04 UTC
Anyways, the "-L" command never made it to the compiler so it is an issue with the 
build-system, but not a KDevelop bug, please leave it resolved. 
 
I saw this problem with certain automake/autoconf versions which didn't pass compiler flgas 
correctly. I reproduced it with autoconf 2.57 and automake 1.7.2 and all worked fine. 
 
A workaround will be to "export CXXFLAGS="-L/path/to/lib" before configure. 
Comment 6 Matt Gibson 2003-08-08 19:19:23 UTC
I thought I'd add to this, in case any one else has been having the same 
problem as me.  I also had gideon configure fail on Berkeley DB because of 
missing -L/-I options.  In the end, it turned out to be because I was using the 
"konstruct" tool to build KDE/gideon, and the first thing that does is to 
overwrite CXXFLAGS with CFLAGS.  As soon as I chucked the correct -L and -I 
flags into CFLAGS instead of CXXFLAGS, it all configured fine.