[Pkg-kde-extras] Bug#417359: FTBFS with GCC 4.3: missing #includes

Martin Michlmayr tbm at cyrius.com
Mon Apr 2 12:45:29 UTC 2007


Package: libsynaptics
Version: 0.14.6c-1
Usertags: ftbfs-gcc-4.3
Tags: patch

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).  Some background of this can be found at
http://gcc.gnu.org/PR28080

You can reproduce this problem with gcc-snapshot (20070326-1 or higher)
from unstable.

> Automatic build of libsynaptics_0.14.6c-1 on coconut0 by sbuild/ia64 0.49
...
>  g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libsynaptics\" -DVERSION=\"0.14.6c\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -g -Wall -O2 -c pad.cpp  -fPIC -DPIC -o .libs/pad.o
> pad.cpp: In member function 'bool Synaptics::Pad::hasSynClient()':
> pad.cpp:208: error: 'system' was not declared in this scope
> pad.cpp: In member function 'bool Synaptics::Pad::hasSynDaemon()':
> pad.cpp:217: error: 'system' was not declared in this scope
> make[1]: *** [pad.lo] Error 1

--- pad.cpp~	2007-04-02 12:38:12.000000000 +0000
+++ pad.cpp	2007-04-02 12:38:21.000000000 +0000
@@ -2,6 +2,7 @@
 #include "synparam.h"
 #include "pad.h"
 #include <pthread.h>
+#include <stdlib.h>
 #include <unistd.h>
 #include <sys/shm.h>
 

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




More information about the pkg-kde-extras mailing list