libprotobuf remains not found
Trying to build drizzle on a Solaris 10 sparse root zone.
I've build protobuf in the zone (/opt/local) and the global zone (/usr/local).
I've tried setting LDFLAGS, LD_LIBRARY_PATH. I've tried using the configure switches to point to the location(s) of libprotobuf. Nothing works, libprotobuf remains not found.
./configure --prefix=
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Drizzle Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Monty Taylor
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
I'm going to guess one of two things: bad libprotobuf version (need at least 2.0.2) or wrong 32/64-bittedness.
If you look in config.log and search down for libprotobuf, you should see where it tries to do its test program. Hopefully there's an error message right there. Let me know what it says...
Revision history for this message
|
#2 |
I compiled protobuf from the latest source tarball, which should be 2.0.3. I tried both the gzipped and bzipped versions just in case. Here's the part in the log about libprotobuf. I can't really see where the error is, there's a bunch of warnings, but the ultimate error seems to be `::mktime' has not been declared.
..snip..
configure:29444: checking for libprotobuf
configure:29477: g++ -o conftest -I/opt/csw/include -I/opt/
conftest.cpp:52:1: warning: "_XOPEN_SOURCE" redefined
<built-in>:83:1: warning: this is the location of the previous definition
In file included from /usr/include/
/usr/include/
In file included from /usr/sfw/
/usr/sfw/
configure:29483: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "drizzle"
| #define PACKAGE_TARNAME "drizzle"
| #define PACKAGE_VERSION "7.0.0"
| #define PACKAGE_STRING "drizzle 7.0.0"
| #define PACKAGE_BUGREPORT "http://
| #define PACKAGE "drizzle"
| #define VERSION "7.0.0"
| #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_
| #define _TANDEM_SOURCE 1
| #define STDCXX_98_HEADERS
| #define HAVE_GETOPT_H 1
| #define HAVE_GETOPT_
| #define HAVE_DECL_GETENV 1
| #define HAVE_UNISTD_H 1
| #define HAVE_TIME_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_ALARM 1
| #define restrict __restrict
| #define HAVE_INCLUDE_NEXT 1
| #define __GETOPT_PREFIX rpl_
| #define mktime rpl_mktime
| #define DRIZZLE_
| #define DRIZZLE_VERSION_ID 70000
| #define _BACKWARD_
| #define HAVE_CHARSET_
| #define USE_MB 1
| #define USE_MB_IDENT 1
| #define HAVE_CHARSET_
| #define USE_MB 1
| #define USE_MB_IDENT 1
| #define DRIZZLE_
| #define DRIZZLE_
| #define SYSTEM_TYPE "pc-solaris2.10"
| #define MACHINE_TYPE "x86_64"
| #define TARGET_OS_SOLARIS 1
| #define _FILE_OFFSET_BITS 64
| #define _GNU_SOURCE 1
| #define _XOPEN_SOURCE 600
| #define __C99FEATURES__ 1
| #define __STDC_
| #define __STDC_
| #define CSTDINT_H <stdint.h>
| #define __STDC_LIMIT_MACROS 1
| #define CINTTYPES_H <inttypes.h>
| #define NEED_ISINF 1
| #define NEED_ISNAN 1
| #define NEED_ISFINITE 1
| #define CMATH_H <math.h>
| /* end confdefs.h. */
| #include <google/
| #if GOOGLE_
| # error Your version of Protobuf is too old
| #endif
|
| int
| main ()
| {
| google:
| ;
| return 0;
| }
configure:29518: result: no
configure:29546: error: protobuf is required for Drizzle
Revision history for this message
|
#3 |
Aha! Thanks! It all makes sense now.
gcc 3.4.3 isn't supported - it's too old.
On Solaris, we're requiring Sun Studio... at least until a recent GCC is
(generally) available. If you have both on your machine, you might have
to do:
./configure CC=/opt/
or something similar. Also, you'll need to build protobuf with SunStudio
as well, as there are C++ linking things involved.
Thanks for pointing it out though, I need a configure check that tells
you this plainly.
Tim Mori wrote:
> Question #62524 on Drizzle changed:
> https:/
>
> Status: Needs information => Open
>
> Tim Mori gave more information on the question:
> I compiled protobuf from the latest source tarball, which should be
> 2.0.3. I tried both the gzipped and bzipped versions just in case.
> Here's the part in the log about libprotobuf. I can't really see where
> the error is, there's a bunch of warnings, but the ultimate error seems
> to be `::mktime' has not been declared.
>
> ..snip..
>
> configure:29444: checking for libprotobuf
> configure:29477: g++ -o conftest -I/opt/csw/include -I/opt/
> conftest.cpp:52:1: warning: "_XOPEN_SOURCE" redefined
> <built-in>:83:1: warning: this is the location of the previous definition
> In file included from /usr/include/
> from /usr/include/
> from /usr/sfw/
> from /usr/sfw/
> from /usr/sfw/
> from /opt/local/
> from conftest.cpp:64:
> /usr/include/
> In file included from /usr/sfw/
> from /usr/sfw/
> from /usr/sfw/
> from /usr/sfw/
> from /usr/sfw/
> from /usr/sfw/
> from /opt/local/
> from conftest.cpp:64:
> /usr/sfw/
> configure:29483: $? = 1
> configure: failed program was:
> | /* confdefs.h. */
> | #define PACKAGE_NAME "drizzle"
> | #define PACKAGE_TARNAME "drizzle"
> | #define PACKAGE_VERSION "7.0.0"
> | #define PACKAGE_STRING "drizzle 7.0.0"
> | #define PACKAGE_BUGREPORT "http://
> | #define PACKAGE "drizzle"
> | #define VERSION "7.0.0"
> | #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_
> | #define _TANDEM_SOURCE 1
> | #define STDCXX_98_HEADERS
> | #define HAVE_GETOPT_H 1
> | #define HAVE_GETOPT_
> | #define HAVE_DECL_GETENV 1
> | #define HAVE_UNISTD_H 1
> | #define HAVE_TIME_H 1
> | #define HAVE_SYS_TIME_H 1
> | #define HAVE_ALARM 1
> | #define restrict __restrict
> | #define HAVE_INCLUDE_NEXT 1
> | #define __GETOPT_PREFIX rpl_
> | #define mktime rpl_mktime
> | #define DRIZZLE_
> | #define DRIZZLE_VERSION_ID 70000
> | #define _BACKWARD_
> | #define HAVE_CHARSET_
> | #define USE_MB 1
> | #define USE_MB_IDENT 1
> | #define HAVE_CHARSET_
> | #define USE_MB 1
> | #define USE_MB_IDENT 1
> | #define DRIZZLE_
> | #define DRIZZLE_
> | #define SYSTEM_TYPE "pc-solaris2.10"
> | #define MACHINE_TYPE "x86_64"
> | #define TARGET_OS_SOLARIS 1
> | #define _FILE_OFFSET_BITS 64
> | #define _GNU_SOURCE 1
> | #define _XOPEN_SOURCE 600
> | #define __C99FEATURES__ 1
> | #define __STDC_
> | #define __STDC_
> | #define CSTDINT_H <stdint.h>
> | #define __STDC_LIMIT_MACROS 1
> | #define CINTTYPES_H <inttypes.h>
> | #define NEED_ISINF 1
> | #define NEED_ISNAN 1
> | #define NEED_ISFINITE 1
> | #define CMATH_H <math.h>
> | /* end confdefs.h. */
> | #include <google/
> | #if GOOGLE_
> | # error Your version of Protobuf is too old
> | #endif
> |
> | int
> | main ()
> | {
> | google:
> | ;
> | return 0;
> | }
> configure:29518: result: no
> configure:29546: error: protobuf is required for Drizzle
>
Revision history for this message
|
#5 |
Thanks Monty Taylor, that solved my question.
Revision history for this message
|
#6 |
Greetings.
I'm hoping to jump on this thread since I'm having the same issue. I'm getting the following error when I try to build:
...
checking for libprotobuf... no
configure: error: libprotobuf is required for drizzle. On Debian this can be found in libprotobuf-dev. On RedHat this can be found in protobuf-devel.
When I look at my config.log, I see the this error:
configure:27205: checking for libprotobuf
configure:27234: /usr/bin/g++-4.2 -o conftest -D_THREAD_SAFE -std=gnu++98 -L/usr/local/lib conftest
.cpp -lprotobuf >&5
conftest.cpp:74:40: error: google/
conftest.cpp: In function 'int main()':
conftest.cpp:78: error: 'google' has not been declared
conftest.cpp:78: error: 'file' was not declared in this scope
configure:27241: $? = 1
I have downloaded tand installed protobuf-2.1.0 but for some reason it still cannot seem to find it. Would anyone be able to help point me in the right direction with this issue?
Revision history for this message
|
#7 |
Just to add some more detail, I'm trying to build this on my mac which is running OS X 10.5.7.
Revision history for this message
|
#8 |
Carlos wrote:
> Question #62524 on Drizzle changed:
> https:/
>
> Carlos posted a new comment:
> Just to add some more detail, I'm trying to build this on my mac which
> is running OS X 10.5.7.
>
It looks to me like you perhaps have install protobuf in a non-standard
location? Where did make install put protobuf when you installed it?
If this is the case, you'll need to tell configure where protobuf is,
via the configure option --with-
ensure that protoc can be found in your path.
Monty
Revision history for this message
|
#9 |
It looks like my libraries are installed in /usr/local/lib and protoc is installed in /usr/local/
Making install in .
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
Making install in srcmake install-am
test -z "/usr/local/lib" || .././install-sh -c -d "/usr/local/lib"
/bin/sh ../libtool --mode=install /usr/bin/install -c 'libprotobuf.la' '/usr/local/
libtool: install: /usr/bin/install -c .libs/libprotob
libtool: install: (cd /usr/local/lib && { ln -s -f libprotobuf.4.dylib libprotobuf.dylib || { rm -f libprotobuf.dylib && ln -s libprotobuf.4.dylib libprotobuf.dylib; }; })
libtool: install: /usr/bin/install -c .libs/libprotob
libtool: install: /usr/bin/install -c .libs/libprotobuf.a /usr/local/
libtool: install: chmod 644 /usr/local/
libtool: install: ranlib /usr/local/
ranlib: file: /usr/local/
ranlib: file: /usr/local/
ranlib: file: /usr/local/
ranlib: file: /usr/local/
-------
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
during execution
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
-------
/bin/sh ../libtool --mode=install /usr/bin/install -c 'libprotoc.la' '/usr/local/
libtool: install: /usr/bin/install -c .libs/libprotoc
libtool: install: (cd /usr/local/lib && { ln -s -f libprotoc.4.dylib libprotoc.dylib || { rm -f libprotoc.dylib && ln -s libprotoc.4.dylib libprotoc.dylib; }; })
libtool: install: /usr/bin/install -c .libs/libprotoc.lai /usr/local/
libtool: install: /usr/bin/install -c .libs/libprotoc.a /usr/local/
libtool: install: chmod 644 /usr/local/
libtool: install: ranlib /usr/local/
-------
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
during execution
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
-------
test -z "/usr/local/bin" || .././install-sh -c -d "/usr/local/bin"
/bin/sh ../libtool --mode=install /usr/bin/install -c 'protoc' '/usr/local/
libtool: install: /usr/bin/install -c .libs/protoc /usr/local/
test -z "/usr/local/
/bin/sh /Users/
test -z "/usr/local/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
/bin/sh /Users/
Revision history for this message
|
#10 |
Carlos wrote:
> Question #62524 on Drizzle changed:
> https:/
So, you want to do:
PATH=/usr/
(all on one line)
Monty
> Carlos posted a new comment:
> It looks like my libraries are installed in /usr/local/lib and protoc is
> installed in /usr/local/
> protobuf was installed. Here is the output from make install:
>
> Making install in .
> make[2]: Nothing to be done for `install-exec-am'.
> make[2]: Nothing to be done for `install-data-am'.
> Making install in srcmake install-am
> test -z "/usr/local/lib" || .././install-sh -c -d "/usr/local/lib"
> /bin/sh ../libtool --mode=install /usr/bin/install -c 'libprotobuf.la' '/usr/local/
> libtool: install: /usr/bin/install -c .libs/libprotob
> libtool: install: (cd /usr/local/lib && { ln -s -f libprotobuf.4.dylib libprotobuf.dylib || { rm -f libprotobuf.dylib && ln -s libprotobuf.4.dylib libprotobuf.dylib; }; })
> libtool: install: /usr/bin/install -c .libs/libprotob
> libtool: install: /usr/bin/install -c .libs/libprotobuf.a /usr/local/
> libtool: install: chmod 644 /usr/local/
> libtool: install: ranlib /usr/local/
> ranlib: file: /usr/local/
> ranlib: file: /usr/local/
> ranlib: file: /usr/local/
> ranlib: file: /usr/local/
> -------
> Libraries have been installed in:
> /usr/local/lib
>
> If you ever happen to want to link against installed libraries
> in a given directory, LIBDIR, you must either use libtool, and
> specify the full pathname of the library, or use the `-LLIBDIR'
> flag during linking and do at least one of the following:
> - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
> during execution
>
> See any operating system documentation about shared libraries for
> more information, such as the ld(1) and ld.so(8) manual pages.
> -------
> /bin/sh ../libtool --mode=install /usr/bin/install -c 'libprotoc.la' '/usr/local/
> libtool: install: /usr/bin/install -c .libs/libprotoc
> libtool: install: (cd /usr/local/lib && { ln -s -f libprotoc.4.dylib libprotoc.dylib || { rm -f libprotoc.dylib && ln -s libprotoc.4.dylib libprotoc.dylib; }; })
> libtool: install: /usr/bin/install -c .libs/libprotoc.lai /usr/local/
> libtool: install: /usr/bin/install -c .libs/libprotoc.a /usr/local/
> libtool: install: chmod 644 /usr/local/
> libtool: install: ranlib /usr/local/
> -------
> Libraries have been installed in:
> /usr/local/lib
>
> If you ever happen to want to link against installed libraries
> in a given directory, LIBDIR, you must either use libtool, and
> specify the full pathname of the library, or use the `-LLIBDIR'
> flag during linking and do at least one of the following:
> - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
> during execution
>
> See any operating system documentation about shared libraries for
> more information, such as the ld(1) and ld.so(8) manual pages.
> -------
> test -z "/usr/local/bin" || .././install-sh -c -d "/usr/local/bin"
> /bin/sh ../libtool --mode=install /usr/bin/install -c 'protoc' '/usr/local/
> libtool: install: /usr/bin/install -c .libs/protoc /usr/local/
> test -z "/usr/local/
> /bin/sh /Users/
> test -z "/usr/local/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
> /bin/sh /Users/
>
Revision history for this message
|
#11 |
Thanks Monty. That solved it. I had other small problems with missing libraries like libdrizzle and libpcre but I was able to install them and get everything up and running successfully.
-Carlos
Revision history for this message
|
#12 |
Monthy, i think tou are not right, because i had the same problem and your method do not help me (