[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#455285: FTBFS with GCC 4.3: missing #includes

Package: netcdf
Version: 3.6.1-1
Usertags: ftbfs-gcc-4.3

Your package fails to build with GCC 4.3.  Version 4.3 has not been
released yet but I'm building with a snapshot in order to find errors
and give people an advance warning.  In GCC 4.3, the C++ header
dependencies have been cleaned up.  The advantage of this is that
programs will compile faster.  The downside is that you actually
need to directly #include everything you use (but you really should
do this anyway, otherwise your program won't work with any compiler
other than GCC).  There's some more information about this at

You can reproduce this problem with gcc-snapshot from unstable.  Note
that Red Hat, Novell and Ubuntu have done some work getting packages
to build with GCC 4.3 so there might be patches floating around
somewhere.  I suggest you talk to your upstream.

> Automatic build of netcdf_3.6.1-1 on em64t by sbuild/amd64 0.53
> netcdf.cpp:587: warning: suggest explicit braces to avoid ambiguous 'else'
> c++ -c -O2 -Wall -Wno-switch -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -I../libsrc -I. -I..  -Df2cFortran -DNDEBUG -D_REENTRANT ncvalues.cpp
> ncvalues.cpp: In member function 'virtual char* NcValues_ncbyte::as_string(long int) const':
> ncvalues.cpp:236: error: 'strncpy' was not declared in this scope
> ncvalues.cpp: In member function 'virtual char* NcValues_char::as_string(long int) const':
> ncvalues.cpp:244: error: 'strncpy' was not declared in this scope
> make[3]: *** [ncvalues.o] Error 1

Martin Michlmayr

Reply to: