Version: (using KDE KDE 3.3.0) Installed from: Gentoo Packages Compiler: gcc-3.3.4 Compiler built from Gentoo Portage tree (Gentoo version gcc-3.3.4-r1) OS: Linux kstars fails to build on linux/sparc due to a missing sys/io.h header. The file doesn't exist, so the functions inb and outb don't get pulled in. Compiler error is as follows; gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/usr/lib \" -DGTK_DATADIR=\"/usr/share\" -DGTK_DATA_PREFIX=\"/usr\" -DGTK_SYSCONFDIR=\"/e tc\" -DGTK_VERSION=\"2.4.7\" -DGTK_BINARY_VERSION=\"2.4.0\" -DGTK_HOST=\"sparc-u nknown-linux-gnu\" -DGTK_COMPILATION -I../gtk -I.. -I../gdk -I../gdk -I../gdk-pi xbuf -I../gdk-pixbuf -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGD K_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORT ED -DG_DISABLE_CAST_CHECKS -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/ include -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 - I/usr/include/freetype2/config -I/usr/include/atk-1.0 -DXTHREADS -D_REENTRANT -D XUSE_MTSAFE_API -I/usr/X11R6/include -mcpu=ultrasparc -mtune=ultrasparc -O2 -g - pipe -Wall -MT gtkmenu.lo -MD -MP -MF .deps/gtkmenu.Tpo -c gtkmenu.c -fPIC -DPI C -o .libs/gtkmenu.o port.h:39:22: sys/io.h: No such file or directory In file included from PPort.cpp:2: port.h: In member function `int port_t::read_data()': port.h:84: error: `inb' undeclared (first use this function) port.h:84: error: (Each undeclared identifier is reported only once for each function it appears in.) port.h: In member function `int port_t::read_status()': port.h:85: error: `inb' undeclared (first use this function) port.h: In member function `int port_t::read_control()': port.h:86: error: `inb' undeclared (first use this function) port.h: In member function `void port_t::write_data(int)': port.h:94: error: `outb' undeclared (first use this function) port.h: In member function `void port_t::write_control(int)': port.h:95: error: `outb' undeclared (first use this function) port.h: In member function `void port_t::setbit_control(int)': port.h:96: error: `outb' undeclared (first use this function) port.h: In member function `void port_t::clearbit_control(int)': port.h:97: error: `outb' undeclared (first use this function) make[5]: *** [PPort.lo] Error 1 make[5]: Leaving directory `/mnt/sda/portagetmp/portage/kdeedu-3.3.0/work/kdeedu-3.3.0/kstars/kstars/indi/webcam' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/mnt/sda/portagetmp/portage/kdeedu-3.3.0/work/kdeedu-3.3.0/kstars/kstars/indi' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/mnt/sda/portagetmp/portage/kdeedu-3.3.0/work/kdeedu-3.3.0/kstars/kstars' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/mnt/sda/portagetmp/portage/kdeedu-3.3.0/work/kdeedu-3.3.0/kstars' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/mnt/sda/portagetmp/portage/kdeedu-3.3.0/work/kdeedu-3.3.0' make: *** [all] Error 2 This was consistantly replicated by just trying to build the package, and expected behavior is to have the package build.
Created attachment 7292 [details] a WORKSFORME patch to make kstars compile This patch will make kstars compile successfully. Kstars seems to run OK after the compilation runs, but from what I gather, this code relates to telescopes that can be used with kstars, and I don't have the ability to test any of them. So while the patch WORKSFORME it may not be the right way to fix this problem.
CVS commit by harris: Fix compilation on PPC and Sun/Sparc (latter is bug #88100). Thanks to George Wright for pointing out the PPC error, and testing the fix. Backporting to 3_3_BRANCH. CCMAIL: 88100-done@bugs.kde.org CCMAIL: kstars-devel@kde.org CCMAIL: gwright@kde.org M +3 -3 port.cpp 1.4 M +3 -3 port.h 1.4 --- kdeedu/kstars/kstars/indi/webcam/port.cpp #1.3:1.4 @@ -39,5 +39,5 @@ #ifdef __linux__ - #if defined(arm) || defined(__hppa__) + #if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) #include <fcntl.h> #else @@ -75,5 +75,5 @@ port_t::port_t(int iport) { #ifdef LINUX -#if defined(arm) || defined(__hppa__) +#if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) if ((devport = open("/dev/port", O_RDWR)) < 0) { perror("open /dev/port"); @@ -119,5 +119,5 @@ port_t::~port_t(void) { #endif /* LOCKING */ #ifdef LINUX -#if defined(arm) || defined(__hppa__) +#if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) if (devport >= 0) close(devport); --- kdeedu/kstars/kstars/indi/webcam/port.h #1.3:1.4 @@ -36,5 +36,5 @@ #ifdef __linux__ - #if !defined(arm) && !defined(__hppa__) + #if !defined(arm) && !defined(__hppa__) && !defined(__sparc__) && !defined(__ppc__) && !defined(__powerpc__) #include <sys/io.h> #endif /* !arm */ @@ -56,5 +56,5 @@ #endif -#if defined(arm) || defined(__hppa__) +#if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) static char ports_temp; @@ -115,5 +115,5 @@ private: FILE *devio; #endif -#if defined(__linux__) && (defined(arm) || defined(__hppa__)) +#if defined(__linux__) && (defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__)) int devport; #endif
The same problem exists for the __s390__ and __s390x__ architectures.
Here is a diff to put on top of those two diffs: --- port.cpp.orig 2004-07-17 13:52:59.000000000 -0400 +++ port.cpp 2004-09-14 22:16:10.000000000 -0400 @@ -38,7 +38,7 @@ #endif /* LOCKING */ #ifdef __linux__ - #if defined(arm) || defined(__hppa__) + #if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || defined(__s390x__) #include <fcntl.h> #else #include <sys/io.h> @@ -74,7 +74,7 @@ #endif /* LOCKING */ #ifdef LINUX -#if defined(arm) || defined(__hppa__) +#if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || defined(__s390x__) if ((devport = open("/dev/port", O_RDWR)) < 0) { perror("open /dev/port"); return; @@ -118,7 +118,7 @@ unlock(port); #endif /* LOCKING */ #ifdef LINUX -#if defined(arm) || defined(__hppa__) +#if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || defined(__s390x__) if (devport >= 0) close(devport); #else --- port.h.orig 2004-07-17 13:52:59.000000000 -0400 +++ port.h 2004-09-14 22:19:03.000000000 -0400 @@ -35,7 +35,7 @@ #include <unistd.h> #ifdef __linux__ - #if !defined(arm) && !defined(__hppa__) + #if !defined(arm) && !defined(__hppa__) && !defined(__sparc__) && !defined(__ppc__) && !defined(__powerpc__) && !defined(__s390__) && !defined(__s390x__) #include <sys/io.h> #endif /* !arm */ #elif defined(QNX) @@ -55,7 +55,7 @@ #error Please define a platform in the Makefile #endif -#if defined(arm) || defined(__hppa__) +#if defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || defined(__s390x__) static char ports_temp; #ifdef inb @@ -114,7 +114,7 @@ #ifdef FREEBSD FILE *devio; #endif -#if defined(__linux__) && (defined(arm) || defined(__hppa__)) +#if defined(__linux__) && (defined(arm) || defined(__hppa__) || defined(__sparc__) || defined(__ppc__) || defined(__powerpc__) || defined(__s390__) || defined(__s390x__)) int devport; #endif };