Bug#705601: libflac-dev conflicting with boost::shared_ptr
raphael
raphael at gfreedom.org
Fri Apr 19 09:57:28 UTC 2013
Hi,
> I have no idea, though, why the compiler does this. Maybe because the
> .c header is explicitely included. Changing <boost/assert.hpp> to
> include <cassert> instead of <assert.h>, as discussed in the code
> comment, should fix the issue as well. I have yet not tried this out,
> though. - Fabian
I tried to change #include <assert.h> to #include <cassert> but it
didn't work.
I use FLAC++ in project and FLAC++ requires FLAC. So I think it is very
necessary to add FLAC search directory path to gcc flags.
But, if i would use only FLAC I could add only #include <FLAC/decoder.h>
to source files, so additional search path would be not necessary.
GCC first looking for header files in user specified search paths.
raphael:~/programowanie/test/flac_bug $ g++ main.cpp `pkg-config
--cflags flac` --verbose
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.7/lto-wrapper
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5'
--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --enable-plugin --enable-objc-gc
--enable-targets=all --with-arch-32=i586 --with-tune=generic
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5)
COLLECT_GCC_OPTIONS='-I' '/usr/include/FLAC' '-v' '-shared-libgcc'
'-mtune=generic' '-march=i586'
/usr/lib/gcc/i486-linux-gnu/4.7/cc1plus -quiet -v -I /usr/include/FLAC
-imultiarch i386-linux-gnu -D_GNU_SOURCE main.cpp -quiet -dumpbase
main.cpp -mtune=generic -march=i586 -auxbase main -version -o
/tmp/cca6M8oU.s
GNU C++ (Debian 4.7.2-5) version 4.7.2 (i486-linux-gnu)
compiled by GNU C version 4.7.2, GMP version 5.0.5, MPFR version
3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include/i386-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/i486-linux-gnu/4.7/../../../../i486-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/FLAC
/usr/include/c++/4.7
/usr/include/c++/4.7/i486-linux-gnu
/usr/include/c++/4.7/backward
/usr/lib/gcc/i486-linux-gnu/4.7/include
/usr/local/include
/usr/lib/gcc/i486-linux-gnu/4.7/include-fixed
/usr/include/i386-linux-gnu
/usr/include
End of search list.
GNU C++ (Debian 4.7.2-5) version 4.7.2 (i486-linux-gnu)
compiled by GNU C version 4.7.2, GMP version 5.0.5, MPFR version
3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 62bfd556e00a93e3d7f66f6876d73826
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
from main.cpp:1:
/usr/include/boost/smart_ptr/shared_ptr.hpp: In instantiation of ‘T*
boost::shared_ptr<T>::operator->() const [with T = test]’:
main.cpp:10:3: required from here
/usr/include/boost/smart_ptr/shared_ptr.hpp:424:9: error: ‘assert’ was
not declared in this scope
Raphael
More information about the pkg-multimedia-maintainers
mailing list