[rrd-users] dbi_initialize in -ldbi ... no problem

fabricioviana fa-h-2007 at hotmail.com
Sun Sep 2 21:17:30 CEST 2012


Hello. I´m trying to compile RRDTOOL with libdbi support in FreeBSD because I
want to use RRDTOOL with MySQL.

With a simple ./configure I get this:

Find 3rd-Party Libraries
checking dbi/dbi.h usability... no
checking dbi/dbi.h presence... no
checking for dbi/dbi.h... no

Then I tried:

./configure --libdir=/usr/local/lib and the response changed:

Find 3rd-Party Libraries
checking dbi/dbi.h usability... yes
checking dbi/dbi.h presence... yes
checking for dbi/dbi.h... yes
checking for dbi_initialize in -ldbi... no (Still No...)

My config.log look like this:


configure:22918: checking for dbi_initialize in -ldbi
configure:22953: gcc -o conftest -g -O2 -D_GNU_SOURCE -fno-strict-aliasing
-Wall -std=gnu99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align
-Wmissing
-prototypes -Wmissing-declarations -Wnested-externs -Winline
-Wold-style-definition -W  -fPIC -DPIC -I/usr/local/include -D_THREAD_SAFE 
conftest.c -ldbi  -l
m  >&5
conftest.c:104:1: warning: "TIME_T_IS_64BIT" redefined
conftest.c:102:1: warning: this is the location of the previous definition
conftest.c: In function 'main':
conftest.c:116: warning: old-style function definition
/usr/bin/ld: cannot find -ldbi
configure:22960: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "rrdtool"
| #define PACKAGE_TARNAME "rrdtool"
| #define PACKAGE_VERSION "1.4.7"
| #define PACKAGE_STRING "rrdtool 1.4.7"
| #define PACKAGE_BUGREPORT ""
| #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 __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define PACKAGE "rrdtool"
| #define VERSION "1.4.7"
| #define RRDGRAPH_YLEGEND_ANGLE 90.0
| #define HAVE_RRD_GRAPH /**/
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define STDC_HEADERS 1
| #define HAVE_DIRENT_H 1
| #define HAVE_LANGINFO_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_LIBGEN_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_IEEEFP_H 1
| #define HAVE_MATH_H 1
| #define HAVE_SYS_TIMES_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_FLOAT_H 1
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_ERRNO_H 1
| #define HAVE_STRING_H 1
| #define HAVE_CTYPE_H 1
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_LIBM 1
| #define HAVE_STRFTIME 1
| #define HAVE_VPRINTF 1
| #define HAVE_NL_LANGINFO 1
| #define HAVE_TZSET 1
| #define HAVE_ROUND 1
| #define HAVE_RINT 1
| #define HAVE_FSYNC 1
| #define HAVE_MBSTOWCS 1
| #define HAVE_OPENDIR 1
| #define HAVE_READDIR 1
| #define HAVE_CHDIR 1
| #define HAVE_CHROOT 1
| #define HAVE_GETUID 1
| #define HAVE_STRERROR 1
| #define HAVE_SNPRINTF 1
| #define HAVE_VSNPRINTF 1
| #define HAVE_VASPRINTF 1
| #define HAVE_ISNAN 1
| #define HAVE_MEMMOVE 1
| #define HAVE_STRCHR 1
| #define HAVE_MKTIME 1
| #define HAVE_GETRUSAGE 1
| #define HAVE_GETTIMEOFDAY 1
| #define HAVE_DECL_STRERROR_R 1
| #define HAVE_STRERROR_R 1
| #define HAVE_FSYNC 1
| #define HAVE_SOCKET 1
| #define HAVE_GETADDRINFO 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_GETPAGESIZE 1
| #define HAVE_MMAP 1
| #define HAVE_MMAP 1
| #define HAVE_MUNMAP 1
| #define HAVE_MSYNC 1
| #define HAVE_DECL_MADVISE 1
| #define HAVE_MADVISE 1
| #define HAVE_DECL_POSIX_FADVISE 0
| #define HAVE_ICONV 1
| #define ENABLE_NLS 1
| #define HAVE_GETTEXT 1
| #define HAVE_DCGETTEXT 1
| #define HAVE_FPCLASSIFY 1
| #define HAVE_ISINF 1
| #define HAVE_ISFINITE 1
| #define HAVE_TM_GMTOFF 1
| #define TM_GMTOFF tm_gmtoff
| #define HAVE_INT_OPTERR 1
| #define TIME_T_IS_32BIT /**/
| #define TIME_T_IS_64BIT /**/
| #define SIZEOF_TIME_T 8
| #define TIME_T_IS_64BIT 1
| /* end confdefs.h.  */
|
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char dbi_initialize ();
| int
| main ()
| {
| return dbi_initialize ();
|   ;
|   return 0;
| }

Because the line "/usr/bin/ld: cannot find -ldbi" I made a simple test:

I created a .c file with #include <stdio.h> and #include <dbi/dbi.h> and
compiled with:

gcc -I/usr/local/include -L/usr/local/lib -ldbi -o test1 test1.c

It Worked!!!!

So I think that I have this lib installed, but I can´t figure out how to
adjust ./configure script to use it.

Could someone please help me?

Best Regards
Viana





--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/dbi-initialize-in-ldbi-no-problem-tp7580421.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.



More information about the rrd-users mailing list