CPPUNIT_CFLAGS aren't passed to the compiler

Bug #588957 reported by Tres Seaver
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subunit
Triaged
Medium
Unassigned

Bug Description

To reproduce, you need to be on a machine where 'check' and 'cppunit'
are installed in non-standard locations. In my case, they are installed
"above" the tree in '../parts':

 $ bzr co lp:subunit
 $ cd subunit
 $ autoreconf -vi
 ...
 $ CHECK_CFLAGS=-I../../parts/check/include/ \
   CHECK_LIBS=-L../../parts/check/libs \
   CPPUNIT_CFLAGS=-I../../parts/cppunit/include \
   CPPUNIT_LIBS=-L../../parts/cppunit/libs \
   ./configure --prefix=$(cd ../.. && pwd)/parts/subunit
 ...
 checking for CHECK... yes
 checking for CPPUNIT... yes
 configure: creating ./config.status
 config.status: creating libsubunit.pc
 config.status: creating libcppunit_subunit.pc
 config.status: creating Makefile
 config.status: creating perl/Makefile.PL
 config.status: creating config.h
 config.status: executing depfiles commands
 config.status: executing libtool commands
 $ make
 make all-am
 make[1]: Entering directory `/home/tseaver/projects/Zope/Z3/zope.testing/foo/subunit'
 depbase=`echo c/lib/child.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
     /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -Wall -Werror -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wno-variadic-macros -I./c/include -g -O2 -MT c/lib/child.lo -MD -MP -MF $depbase.Tpo -c -o c/lib/child.lo c/lib/child.c &&\
     mv -f $depbase.Tpo $depbase.Plo
 libtool: compile: gcc -DHAVE_CONFIG_H -I. -Wall -Werror -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wno-variadic-macros -I./c/include -g -O2 -MT c/lib/child.lo -MD -MP -MF c/lib/.deps/child.Tpo -c c/lib/child.c -fPIC -DPIC -o c/lib/.libs/child.o
 libtool: compile: gcc -DHAVE_CONFIG_H -I. -Wall -Werror -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wno-variadic-macros -I./c/include -g -O2 -MT c/lib/child.lo -MD -MP -MF c/lib/.deps/child.Tpo -c c/lib/child.c -o c/lib/child.o >/dev/null 2>&1
 /bin/bash ./libtool --tag=CC --mode=link gcc -Wall -Werror -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wno-variadic-macros -I./c/include -g -O2 -o libsubunit.la -rpath /home/tseaver/projects/Zope/Z3/zope.testing/parts/subunit/lib c/lib/child.lo
 libtool: link: gcc -shared c/lib/.libs/child.o -Wl,-soname -Wl,libsubunit.so.0 -o .libs/libsubunit.so.0.0.0
 libtool: link: (cd ".libs" && rm -f "libsubunit.so.0" && ln -s "libsubunit.so.0.0.0" "libsubunit.so.0")
 libtool: link: (cd ".libs" && rm -f "libsubunit.so" && ln -s "libsubunit.so.0.0.0" "libsubunit.so")
 libtool: link: ar cru .libs/libsubunit.a c/lib/child.o
 libtool: link: ranlib .libs/libsubunit.a
 libtool: link: ( cd ".libs" && rm -f "libsubunit.la" && ln -s "../libsubunit.la" "libsubunit.la" )
 depbase=`echo c++/SubunitTestProgressListener.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
     /bin/bash ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -Wall -Werror -Wextra -Wwrite-strings -Wno-variadic-macros -I./c/include -g -O2 -MT c++/SubunitTestProgressListener.lo -MD -MP -MF $depbase.Tpo -c -o c++/SubunitTestProgressListener.lo c++/SubunitTestProgressListener.cpp &&\
     mv -f $depbase.Tpo $depbase.Plo
 libtool: compile: g++ -DHAVE_CONFIG_H -I. -Wall -Werror -Wextra -Wwrite-strings -Wno-variadic-macros -I./c/include -g -O2 -MT c++/SubunitTestProgressListener.lo -MD -MP -MF c++/.deps/SubunitTestProgressListener.Tpo -c c++/SubunitTestProgressListener.cpp -fPIC -DPIC -o c++/.libs/SubunitTestProgressListener.o
 c++/SubunitTestProgressListener.cpp:16:31: error: cppunit/Exception.h: No such file or directory

Changed in subunit:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Robert Collins (lifeless) wrote :

Sorry for the spam, but before I manually start trying to reproduce this; is there any chance it's a libtool or other plumbing bug? Does it still happen?

Revision history for this message
Tres Seaver (tseaver) wrote :

I'm afraid that the sandbox where I tried that is long gone, and never checked in.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.