[opensuse-packaging] Configure issue with new package

Hi, I am trying to build a new package that requires boost, thus I've added BuildRequires: boost-devel >= 1.35 to my spec file. Upon build I get the following error: checking boost/shared_ptr.hpp usability... no checking boost/shared_ptr.hpp presence... no checking for boost/shared_ptr.hpp... no configure: error: Missing required header files. But, -> ls /var/tmp/build-root/usr/include/boost/shared_p* /var/tmp/build-root/usr/include/boost/shared_ptr.hpp The configure script snippet that looks for the header looks as follows: for ac_header in boost/shared_ptr.hpp uuid/uuid.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 There's no option in the configure script for me to set the location of the boots headers, at least AFAICT. Any ideas on how to fix this? home:rjschwei:eucalyptus/apache-qpid-cpp I've not yet uploaded the spec file since it is still WIP. Help is much appreciated. Thanks, Robert -- Robert Schweikert MAY THE SOURCE BE WITH YOU Software Engineer Consultant LINUX rschweikert@novell.com 781-464-8147 Novell Making IT Work As One -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

Hello, On Wed, 20 Oct 2010, Robert Schweikert wrote:
I am trying to build a new package that requires boost, thus I've added
BuildRequires: boost-devel >= 1.35
to my spec file. Upon build I get the following error:
checking boost/shared_ptr.hpp usability... no checking boost/shared_ptr.hpp presence... no checking for boost/shared_ptr.hpp... no configure: error: Missing required header files.
But,
-> ls /var/tmp/build-root/usr/include/boost/shared_p* /var/tmp/build-root/usr/include/boost/shared_ptr.hpp
Have you checked permissions, esp. of the boost/ directory? [..]
There's no option in the configure script for me to set the location of the boots headers, at least AFAICT.
Includes can be set via CPPFLAGS or CFLAGS (depending on the Makefiles), e.g.: export CPPFLAGS="-I/usr/include/foo $CPPFLAGS" %configure See: ==== ~/osc/tmp/qpidc-0.6 (0)$ ./configure --help [..] CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> [..] ==== But in this case, that's irrelevant, as /usr/include is a standard include (unless gcc/g++ are called with -no-stdinc), and the header is included with a relative path, i.e. with the implicit -I/usr/include, the header boost/shared_ptr.hpp should be found. Another helpful thing is using 'CPPFLAGS="-v -Wp,-H $CPPFLAGS".
Any ideas on how to fix this?
Have a look at the config.log of that configure. Without it (the lines with the error and at least the lines to the last sucessful test), it's hard to say what's amiss. What I've relatively often have seen when such configure tests fail "incorrectly" is that some previous test sets a compiler flag (option or e.g. some linking flag) on which the compiler fails _only_ in the following tests where something is compiled. In this case it seems (on first glance) that the tests for clock_gettime and clock_settime (linking) are candidates, but those only seem to set matching HAVE_... defines. Without a config.log ... HTH, -dnh, not at a system with boost, so unable to test himself -- Die kennt man ja: Harte Schale, weicher Keks. -- Lars Braesicke -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On 10/20/2010 08:06 PM, David Haller wrote:
Hello,
On Wed, 20 Oct 2010, Robert Schweikert wrote:
I am trying to build a new package that requires boost, thus I've added
BuildRequires: boost-devel >= 1.35
to my spec file. Upon build I get the following error:
checking boost/shared_ptr.hpp usability... no checking boost/shared_ptr.hpp presence... no checking for boost/shared_ptr.hpp... no configure: error: Missing required header files.
But,
-> ls /var/tmp/build-root/usr/include/boost/shared_p* /var/tmp/build-root/usr/include/boost/shared_ptr.hpp
Have you checked permissions, esp. of the boost/ directory?
[..]
There's no option in the configure script for me to set the location of the boots headers, at least AFAICT.
Includes can be set via CPPFLAGS or CFLAGS (depending on the Makefiles), e.g.:
export CPPFLAGS="-I/usr/include/foo $CPPFLAGS" %configure
See: ==== ~/osc/tmp/qpidc-0.6 (0)$ ./configure --help [..] CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> [..] ====
But in this case, that's irrelevant, as /usr/include is a standard include (unless gcc/g++ are called with -no-stdinc), and the header is included with a relative path, i.e. with the implicit -I/usr/include, the header boost/shared_ptr.hpp should be found.
Another helpful thing is using 'CPPFLAGS="-v -Wp,-H $CPPFLAGS".
Any ideas on how to fix this?
Have a look at the config.log of that configure. Without it (the lines with the error and at least the lines to the last sucessful test), it's hard to say what's amiss.
Thanks that did the trick in pointing me in the right direction. I forgot to pull in gcc-c++ and the configure log actually showed an error fro the missing C++ compiler. Strange it doesn't exit at that point oh well. Thanks, Robert
What I've relatively often have seen when such configure tests fail "incorrectly" is that some previous test sets a compiler flag (option or e.g. some linking flag) on which the compiler fails _only_ in the following tests where something is compiled.
In this case it seems (on first glance) that the tests for clock_gettime and clock_settime (linking) are candidates, but those only seem to set matching HAVE_... defines. Without a config.log ...
HTH, -dnh, not at a system with boost, so unable to test himself
-- Robert Schweikert MAY THE SOURCE BE WITH YOU Software Engineer Consultant LINUX rschweikert@novell.com 781-464-8147 Novell Making IT Work As One -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On Wed, 20 Oct 2010 19:13:52 -0400, Robert Schweikert <rschweikert@novell.com> wrote:
The configure script snippet that looks for the header looks as follows:
Don't look at configure itself, look at at its source configure.ac or configure.in. There you'll find AC_CHECK_HEADERS([boost/shared_ptr.hpp uuid/uuid.h],, AC_MSG_ERROR([Missing required header files.])) And if you check for AC_CHECK_HEADERS in 'info autoconf' you'll find that it is written correctly. I've just run 'autoreconf -fi' and then started configure and it ran without hickup on 11.3. HTH Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (3)
-
David Haller
-
Philipp Thomas
-
Robert Schweikert