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

Bug#504937: FTBFS with GCC 4.4: missing #include, conflicting declaration 'char*** argv'



Package: glashctl
Version: 0.4.2-4
User: debian-gcc@lists.debian.org
Usertags: ftbfs-gcc-4.4

Your package fails to build with the upcoming GCC 4.4.  Version 4.4
has not been released yet but I'm building with a snapshot in order
to find errors and give people an advance warning.

Problem 1) GCC 4.4 cleaned up some more C++ headers.  You always have
to #include headers directly and cannot rely for things to be included
indirectly.

Problem 2) conflicting declaration 'char*** argv'; I didn't
look at this one.

You can reproduce this problem with gcc-snapshot from unstable.

> Automatic build of glashctl_0.4.2-4 on em64t by sbuild/amd64 0.53
...
> jackwrapper.cpp:205: warning: no return statement in function returning non-void
> g++ -c -o lashserverinterface.o -fPIC -DPIC -g -O2 -g -O2 -g -Wall -O2 `pkg-config --cflags gtkmm-2.4 lash-1.0 jack`  lashserverinterface.cpp
> lashserverinterface.cpp: In constructor 'LASHServerInterface::LASHServerInterface(lash_args_t*, const std::string&, int)':
> lashserverinterface.cpp:39: error: 'strdup' was not declared in this scope
> make[1]: *** [lashserverinterface.o] Error 1
> make[1]: Leaving directory `/build/tbm/glashctl-0.4.2'

--- lashserverinterface.cpp~	2008-11-08 05:23:54.000000000 +0000
+++ lashserverinterface.cpp	2008-11-08 05:27:12.000000000 +0000
@@ -18,6 +18,7 @@
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 ****************************************************************************/
 
+#include <cstring>
 #include <iostream>
 #include <sstream>
 #include <unistd.h>
--- wmdockicon.cpp~	2008-11-08 05:32:25.000000000 +0000
+++ wmdockicon.cpp	2008-11-08 05:34:07.000000000 +0000
@@ -19,6 +19,7 @@
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 ****************************************************************************/
 
+#include <cstring>
 #include <iostream>
 
 #include <gtk/gtkmain.h>

but now we get:

lashwrapper.hpp:35: error: conflicting declaration 'char*** argv'
lashwrapper.hpp:35: error: 'argv' has a previous declaration as 'int* argv'
main.cpp: In function 'int main(int, char**)':
main.cpp:63: error: no matching function for call to 'LASHWrapper::LASHWrapper(int*, char***)'
lashwrapper.hpp:35: note: candidates are: LASHWrapper::LASHWrapper(int*)
lashwrapper.hpp:32: note:                 LASHWrapper::LASHWrapper(const LASHWrapper&)

-- 
Martin Michlmayr
http://www.cyrius.com/



Reply to: