Garnome 2.10.0.1 on Solaris 8, part 1 (long)
- From: Joachim Feise <jfeise ics uci edu>
- To: garnome-list <garnome-list gnome org>
- Subject: Garnome 2.10.0.1 on Solaris 8, part 1 (long)
- Date: Fri, 01 Apr 2005 13:08:31 -0800
Ok, as promised, here is my report on what I needed to do to get Garnome
compiled on Solaris 8. Some of this may be specific to my setup, so your mileage
may vary.
I split this up in two posts, since it gets pretty large.
I added -DUSE_SOLARIS to my CFLAGS/CXXFLAGS. There is another define within gcc
for Solaris (sun), but originally I was too lazy to look that up, and later I
decided to stick with my original define.
I found that some programs use 'sun' as a variable, and that results in weird
compilation errors, so I changed the variable whenever I encountered this.
I have also not verified that all programs work, I am happy to just have the
basic stuff running.
-Joe
[========== Prerequisites ==========]
==> A recent GNU toolchain
I am using gcc 3.4.3, binutils 2.14, coreutils 5.2.1
==> Install OpenSP and openjade, from http://openjade.sourceforge.net/
==> OpenSP gave me lots of compile errors, which I fixed this way:
In OpenSP-1.5.1/config.h:
Add #include "types.h" and #include "constant.h" at the end of the file
Guard with #ifdef -DUSE_CXX
Add -DUSE_CXX to CXXFLAGS in Makefile
==> Install libexif, from http://sourceforge.net/projects/libexif/
==> Install pilot-link 0.11.x from
http://www.pilot-link.org/source/pilot-link-0.11.8.tar.bz2
NOTE: pilot-link-0.12.x has conflicts with gnome-pilot
==> Install libnbcompat, available from NetBSD (use Google)
==> Install OpenLDAP, from http://www.openldap.org/, for desktop/ximian-connector
==> Install Kerberos 5 or Heimdal, for desktop/ximian-connector
==> Perl >= 5.8, XML::Parser module is required
==> Python >= 2.3
Note: geektoys/revelation need pycrypto
==> Java useful, but not required
==> gpg, gpgme and gpg-error required for fifth-toe/seahorse
==> In rpm2cpio, the Sun cpio doesn't like --extract. Install the GNU cpio or
apply this patch:
<<<<<<<<<<<<<<<<<<<<<<<<<
--- gar.lib.mk.orig Fri Mar 25 10:30:17 2005
+++ gar.lib.mk Sat Mar 26 13:46:25 2005
@@ -172,7 +172,7 @@
else \
RPM2CPIO=$(GARDIR)/rpm2cpio; \
fi; \
- $$RPM2CPIO $(subst rpm-bin-extract-,$(DOWNLOADDIR)/,$@) | cpio
--extract "*.tar.gz"; \
+ $$RPM2CPIO $(subst rpm-bin-extract-,$(DOWNLOADDIR)/,$@) | cpio
-i "*.tar.gz"; \
gzip -dc $(GARNAME)-$(GARVERSION).tar.gz | tar xf - -C
$(EXTRACTDIR); \
rm *.tar.gz
@if test -z $?; then $(MAKECOOKIE); fi
>>>>>>>>>>>>>>>>>>>>>>>>>
[========== Bootstrap ==========]
==> Install bootstrap/pkgconfig
==> Install bootstrap/docbook-xml
==> Install bootstrap/docbook-xsl
==> Install bootstrap/fontconfig
==> Install bootstrap/xfg
==> Install bootstrap/firefox
In bootstrap/firefox/work/main.d/mozilla/gfx/src/gtk/nsFontMetricsPango.cpp
Add #include <strings.h>
==> Install bootstrap/howl
In bootstrap/howl/Makefile
Change cp parameters to -prf or use GNU cp
==> Install bootstrap/dbus
==> Note: bootstrap/hal does not compile
==> Install bootstrap/libtool
==> Install pwlib and openh323 for geektoys/gnomemeeting
[========== Platform ==========]
==> In platform/libxslt/work/main.d/libxslt-1.1.13/tests/plugins
Add #include <libxml/xmlexports.h> before #include <xsltinternals.h>
[========== Desktop ==========]
==> Remove desktop/gnome-volume-manager, since it needs bootstrap/hal and
therefore doesn''t compile
==> Remove desktop/gnome-nettool
It doesn't compile
==> Remove desktop/gnome-system-monitor
It doesn't compile
==> Remove desktop/gnome-system-tools
It doesn't compile
==> Remove desktop/libgnomesu
It doesn't compile
==> In desktop/gtkhtml/work/main.d/gtkhtml-3.6.1/po/Makefile
Add mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
==> in desktop/gnome-panel/work/main.d/gnome-panel-2.10.0/gnome-panel
Apply patch:
<<<<<<<<<<<<<<<<<<<<<<<<<
--- panel-run-dialog.c.orig Mon Mar 7 06:15:16 2005
+++ panel-run-dialog.c Mon Mar 21 15:18:19 2005
@@ -1123,9 +1123,13 @@
suffix = NULL;
/* don't use g_file_test at first so we don't stat() */
+#ifdef USE_SOLARIS
+ if (g_file_test (file, G_FILE_TEST_IS_DIR))
+#else
if (dent->d_type == DT_DIR ||
(dent->d_type == DT_LNK &&
g_file_test (file, G_FILE_TEST_IS_DIR)))
+#endif
suffix = "/";
g_free (file);
>>>>>>>>>>>>>>>>>>>>>>>>>
==> in desktop/libxklavier/work/main.d/libxklavier-2.0/tests
Apply patch:
<<<<<<<<<<<<<<<<<<<<<<<<<
--- test_config.c.orig Thu Dec 9 13:46:51 2004
+++ test_config.c Mon Mar 21 15:51:58 2005
@@ -1,7 +1,9 @@
#include <config.h>
#include <stdio.h>
#include <unistd.h>
+#ifndef USE_SOLARIS
#include <getopt.h>
+#endif
#include <stdlib.h>
#include <string.h>
#include <X11/Xlib.h>
--- test_monitor.c.orig Wed Nov 24 16:34:17 2004
+++ test_monitor.c Mon Mar 21 16:04:54 2005
@@ -1,7 +1,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#ifndef USE_SOLARIS
#include <getopt.h>
+#endif
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/XKBlib.h>
>>>>>>>>>>>>>>>>>>>>>>>>>
==> In desktop/libxklavier/work/main.d/libxklavier-2.0/tests/Makefile
Remove -Werror
==> In desktop/libwnck/
Add LDFLAGS in Makefile, LDFLAGS="-Wl,--export-dynamic"
(see http://mail.gnome.org/archives/garnome-list/2005-March/msg00167.html)
==> In office/gnome-spell/work/main.d/gnome-spell-1.0.6/po/Makefile
Add mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
==> In desktop/gstreamer/work/main.d/gstreamer-0.8.9/gst/gstxml.c
Add #include <libxml/xmlerror.h>
==> In desktop/bug-buddy/work/main.d/bug-buddy-2.10.0/src
Apply patch:
<<<<<<<<<<<<<<<<<<<<<<<<<
--- united-states-of-bug-buddy.c.orig Sun Nov 21 08:48:18 2004
+++ united-states-of-bug-buddy.c Tue Mar 22 06:57:02 2005
@@ -37,6 +37,10 @@
#include <sysexits.h>
#include <sys/wait.h>
+#ifndef SIGTERM
+#define SIGTERM 15 /* Termination (ANSI). */
+#endif
+
#if 0
static char *help_pages[] = {
"index.html",
>>>>>>>>>>>>>>>>>>>>>>>>>
==> desktop/epiphany needs mkdtemp function in libnbcompat.a
In desktop/epiphany/work/main.d/epiphany-1.6.0/config.h, set #define HAVE_MKDTEMP 1
The library that contains mkdtemp() is libnbcompat.a, from NetBSD (see Google,
also available as Solaris package.)
==> In
desktop/control-center/work/main.d/control-center-2.10.0/libgswitchit/Makefile
Remove -Werror
==> In desktop/control-center/work/main.d/control-center-2.10.0/libkbdraw/Makefile
Remove -Werror
==> desktop/control-center needs /usr/include/X11/extensions/XKBrules.h, which,
depending on the X installation, may not be around (e.g., on Solaris 8.)
If necessary, copy from another version, e.g., Solaris 9.
==> In desktop/libgtop/work/main.d/libgtop-2.10.0/lib:
Apply patch:
<<<<<<<<<<<<<<<<<<<<<<<<<
--- lib.c.orig Tue Mar 22 21:32:51 2005
+++ lib.c Tue Mar 22 21:39:18 2005
@@ -753,7 +753,7 @@
send_size, send_ptr,
sizeof (glibtop_proc_open_files), buf);
} else {
-#if (!GLIBTOP_SUID_PROC_OPEN_FILES)
+#if (!GLIBTOP_SUID_PROC_OPEN_FILES && !USE_SOLARIS)
retval = glibtop_get_proc_open_files_s (server, buf, pid);
#else
errno = ENOSYS;
>>>>>>>>>>>>>>>>>>>>>>>>>
==> In desktop/gnome-audio/work/main.d/gnome-audio-2.0.0/sounds
delete login.wav and logout.wav before make install
The install process tries to create symbolic links for these files, which fails
if they already exist
==> In desktop/natuilus-cd-burner/
A strange compile/link error: the get_device_max_read_speed and
get_device_max_write_speed function calls were not resolved. Moving the
functions in the code to before they were used solved that.
Apply patch:
<<<<<<<<<<<<<<<<<<<<<<<<<
--- nautilus-burn-drive.c.orig Tue Feb 22 16:34:17 2005
+++ nautilus-burn-drive.c Wed Mar 23 00:16:50 2005
@@ -105,6 +105,49 @@
}
#endif /* USE_HAL */
+#if !defined(__linux)
+static int
+get_device_max_read_speed (char *device)
+{
+ int fd;
+ int max_speed;
+ int read_speed, write_speed;
+
+ max_speed = -1;
+
+ if ((fd = open (device, O_RDWR | O_EXCL | O_NONBLOCK)) < 0
+ && (fd = open (device, O_RDONLY | O_EXCL | O_NONBLOCK)) < 0) {
+ return -1;
+ }
+
+ get_read_write_speed (fd, &read_speed, &write_speed);
+ close (fd);
+ max_speed = (int)floor (read_speed) / CD_ROM_SPEED;
+
+ return max_speed;
+}
+#endif
+
+static int
+get_device_max_write_speed (char *device)
+{
+ int fd;
+ int max_speed;
+ int read_speed, write_speed;
+
+ max_speed = -1;
+
+ if ((fd = open (device, O_RDWR | O_EXCL | O_NONBLOCK)) < 0
+ && (fd = open (device, O_RDONLY | O_EXCL | O_NONBLOCK)) < 0) {
+ return -1;
+ }
+
+ get_read_write_speed (fd, &read_speed, &write_speed);
+ close (fd);
+ max_speed = (int)floor (write_speed) / CD_ROM_SPEED;
+
+ return max_speed;
+}
/* Utility functions, be careful to have a match with what's use in the
* different bits of code */
@@ -1111,50 +1154,6 @@
}
}
return NULL;
-}
-
-#if !defined(__linux)
-static int
-get_device_max_read_speed (char *device)
-{
- int fd;
- int max_speed;
- int read_speed, write_speed;
-
- max_speed = -1;
-
- if ((fd = open (device, O_RDWR | O_EXCL | O_NONBLOCK)) < 0
- && (fd = open (device, O_RDONLY | O_EXCL | O_NONBLOCK)) < 0) {
- return -1;
- }
-
- get_read_write_speed (fd, &read_speed, &write_speed);
- close (fd);
- max_speed = (int)floor (read_speed) / CD_ROM_SPEED;
-
- return max_speed;
-}
-#endif
-
-static int
-get_device_max_write_speed (char *device)
-{
- int fd;
- int max_speed;
- int read_speed, write_speed;
-
- max_speed = -1;
-
- if ((fd = open (device, O_RDWR | O_EXCL | O_NONBLOCK)) < 0
- && (fd = open (device, O_RDONLY | O_EXCL | O_NONBLOCK)) < 0) {
- return -1;
- }
-
- get_read_write_speed (fd, &read_speed, &write_speed);
- close (fd);
- max_speed = (int)floor (write_speed) / CD_ROM_SPEED;
-
- return max_speed;
}
static char *
>>>>>>>>>>>>>>>>>>>>>>>>>
==> In desktop/gnome-applets/work/main.d/gnome-applets-2.10.0/gweather
The 'sun' variable issue I mentioned earlier.
Apply patch:
<<<<<<<<<<<<<<<<<<<<<<<<<
--- weather.c.orig Tue Mar 1 01:34:33 2005
+++ weather.c Wed Mar 23 00:46:09 2005
@@ -612,7 +612,7 @@
-static gboolean sun (time_t t, gdouble obsLat, gdouble obsLon,
+static gboolean get_sun (time_t t, gdouble obsLat, gdouble obsLon,
time_t *rise, time_t *set)
{
time_t gm_midn;
@@ -728,7 +728,7 @@
static gboolean calc_sun (WeatherInfo *info)
{
return info->location->latlon_valid
- && sun(info->update,
+ && get_sun(info->update,
info->location->latitude, info->location->longitude,
&info->sunrise, &info->sunset);
}
--- weather-metar.c.orig Wed Mar 23 01:07:52 2005
+++ weather-metar.c Wed Mar 23 01:08:15 2005
@@ -32,8 +32,16 @@
{
const time_t now = time(NULL);
struct tm tm;
+#ifdef USE_SOLARIS
+ struct tm local;
+ time_t gmtoff;
+ localtime_r(&now, &local);
gmtime_r (&now, &tm);
+ gmtoff = mktime(&local) - mktime(&tm);
+#else
+ gmtime_r (&now, &tm);
+#endif
/* If last reading took place just before midnight UTC on the first, adjust the
* date downward. This ASSUMES that the reading won't be more than 24 hrs
old! */
@@ -46,8 +54,12 @@
tm.tm_min = utcMin;
tm.tm_sec = 0;
+#ifdef USE_SOLARIS
+ return gmtoff + mktime(&tm);
+#else
/* mktime() assumes value is local, not UTC. Use tm_gmtoff to compensate */
return tm.tm_gmtoff + mktime(&tm);
+#endif
}
static void metar_tok_time (gchar *tokp, WeatherInfo *info)
>>>>>>>>>>>>>>>>>>>>>>>>>
==> In desktop/gnome-applets/work/main.d/gnome-applets-2.10.0/libgswitchit/Makefile
Remove -Werror
==> In desktop/gnome-media/work/main.d/gnome-media-2.10.0/gnome-cd
Apply patch:
<<<<<<<<<<<<<<<<<<<<<<<<<
--- gst-cdparanoia-cdrom.c.orig Mon Feb 7 09:39:31 2005
+++ gst-cdparanoia-cdrom.c Wed Mar 23 07:44:59 2005
@@ -27,11 +27,18 @@
#include <gst/gst.h>
#ifdef __linux__
#include <linux/cdrom.h>
-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ||
defined(USE_SOLARIS)
#include <sys/cdio.h>
#if defined(__FreeBSD__)
#include <sys/cdrio.h>
#endif
+#if defined(USE_SOLARIS)
+struct cdrom_msf0 {
+ unsigned char minute;
+ unsigned char second;
+ unsigned char frame;
+};
+#endif
#define CD_FRAMES 75
#define CD_MSF_OFFSET 150
#define CDROM_DATA_TRACK 0x04
@@ -1159,7 +1166,7 @@
return FALSE;
}
-#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) &&
!defined(USE_SOLARIS)
cd_status = ioctl (cdrom->fd, CDROM_DRIVE_STATUS, CDSL_CURRENT);
if (cd_status != -1) {
switch (cd_status) {
@@ -1363,6 +1370,8 @@
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
if (ioctl (cdrom->fd, CDIOCCLOSE) < 0) {
+#elif defined(USE_SOLARIS)
+ {
#else
if (ioctl (cdrom->fd, CDROMCLOSETRAY) < 0) {
#endif
@@ -1453,6 +1462,8 @@
if (ioctl (fd, CDIOCCAPABILITY, 0) < 0) {
#elif defined(__NetBSD__) || defined(__OpenBSD__)
if (ioctl (fd, CDIOCGETVOL, 0) < 0) {
+#elif defined(USE_SOLARIS)
+ if (ioctl (fd, CDROMGDRVSPEED, 0) < 0) {
#else
if (ioctl (fd, CDROM_GET_CAPABILITY, 0) < 0) {
#endif
>>>>>>>>>>>>>>>>>>>>>>>>>
==> in desktop/gnome-media/work/main.d/gnome-media-2.10.0/gst-mixer/src
Apply patch:
<<<<<<<<<<<<<<<<<<<<<<<<<
--- main.c.orig Tue Jan 25 02:14:20 2005
+++ main.c Wed Mar 23 07:53:29 2005
@@ -23,7 +23,9 @@
#include "config.h"
#endif
+#ifndef USE_SOLARIS
#include <getopt.h>
+#endif
#include <glib.h>
#include <gnome.h>
#include <gst/gst.h>
>>>>>>>>>>>>>>>>>>>>>>>>>
==> in desktop/vino/work/main.d/vino-2.10.0/server/libvncserver/rfb
Apply patch:
<<<<<<<<<<<<<<<<<<<<<<<<<
--- rfbproto.h.orig Wed Mar 23 16:25:41 2005
+++ rfbproto.h Wed Mar 23 16:25:53 2005
@@ -60,7 +60,11 @@
#include <rfb/rfbint.h>
#else
#include <config.h>
+#ifdef USE_SOLARIS
+#include <sys/types.h>
+#else
#include <stdint.h>
+#endif
#endif
#endif
#include <rfb/keysym.h>
>>>>>>>>>>>>>>>>>>>>>>>>>
==> in desktop/yelp/work/main.d/yelp-2.9.3/src
Apply patch:
<<<<<<<<<<<<<<<<<<<<<<<<<
--- yelp-toc-pager.c.orig Mon Jan 3 08:53:20 2005
+++ yelp-toc-pager.c Wed Mar 23 17:40:02 2005
@@ -422,7 +422,7 @@
process_read_scrollkeeper (YelpTocPager *pager)
{
gchar *content_list;
- gchar *stderr;
+ gchar *stderr_;
gchar *lang;
gchar *command;
static xmlSAXHandler sk_sax_handler = { 0, };
@@ -435,7 +435,7 @@
command = g_strconcat("scrollkeeper-get-content-list ", lang, NULL);
- if (g_spawn_command_line_sync (command, &content_list, &stderr, NULL, NULL)) {
+ if (g_spawn_command_line_sync (command, &content_list, &stderr_, NULL, NULL)) {
if (!sk_sax_handler.startElement) {
sk_sax_handler.startElement = sk_startElement;
sk_sax_handler.endElement = sk_endElement;
@@ -447,7 +447,7 @@
}
g_free (content_list);
- g_free (stderr);
+ g_free (stderr_);
g_free (command);
return FALSE;
}
>>>>>>>>>>>>>>>>>>>>>>>>>
==> in desktop/totem/work/main.d/totem-1.0/src
Apply patch:
<<<<<<<<<<<<<<<<<<<<<<<<<
--- totem-disc.c.orig Wed Mar 23 15:20:12 2005
+++ totem-disc.c Wed Mar 23 18:39:24 2005
@@ -34,7 +34,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
+#ifdef USE_SOLARIS
+#include <sys/mntent.h>
+#else
#include <mntent.h>
+#endif
#include <string.h>
#include <sys/ioctl.h>
@@ -44,7 +48,9 @@
#include <glib/gi18n.h>
#include <libgnomevfs/gnome-vfs.h>
+#ifndef USE_SOLARIS
#include <linux/cdrom.h>
+#endif
#include "totem-disc.h"
@@ -230,11 +236,13 @@
{
int drive, err;
+#ifndef USE_SOLARIS
/* not a medium? */
if (cache->is_media == FALSE) {
cache->cap = CDC_DVD;
return TRUE;
}
+#endif
/* already open? */
if (cache->fd > 0)
@@ -243,6 +251,11 @@
/* try to open the CD before creating anything */
if ((cache->fd = open (cache->device, O_RDONLY)) < 0) {
err = errno;
+#ifdef USE_SOLARIS
+ g_set_error (error, 0, 0,
+ _("Failed to open device %s for reading: %s"),
+ cache->device, g_strerror (err));
+#else
if (err == ENOMEDIUM) {
g_set_error (error, 0, 0,
_("Please check that a disc is present in the drive."));
@@ -251,9 +264,11 @@
_("Failed to open device %s for reading: %s"),
cache->device, g_strerror (err));
}
+#endif
return FALSE;
}
+#ifndef USE_SOLARIS
/* get capabilities */
if ((cache->cap = ioctl (cache->fd, CDROM_GET_CAPABILITY, NULL)) < 0) {
close (cache->fd);
@@ -296,6 +311,7 @@
drive, drive_s);
return FALSE;
}
+#endif
return TRUE;
}
@@ -375,6 +391,7 @@
if (!cd_cache_open_device (cache, error))
return MEDIA_TYPE_ERROR;
+#ifndef USE_SOLARIS
if ((disc = ioctl (cache->fd, CDROM_DISC_STATUS, NULL)) < 0) {
g_set_error (error, 0, 0,
_("Error getting %s disc status: %s"),
@@ -410,6 +427,7 @@
disc, disc_s);
return MEDIA_TYPE_ERROR;
}
+#endif
return type;
}
@@ -487,8 +505,10 @@
/* open disc, check capabilities and open mount */
if (!cd_cache_open_device (cache, error))
return MEDIA_TYPE_ERROR;
+#ifndef USE_SOLARIS
if (!(cache->cap & CDC_DVD))
return MEDIA_TYPE_DATA;
+#endif
if (!cd_cache_open_mountpoint (cache, error))
return MEDIA_TYPE_ERROR;
if (cd_cache_file_exists (cache, "VIDEO_TS", "VIDEO_TS.IFO"))
>>>>>>>>>>>>>>>>>>>>>>>>>
==> in desktop/sound-juicer/work/main.d/sound-juicer-2.10.0/src
Apply patch:
<<<<<<<<<<<<<<<<<<<<<<<<<
--- sj-util.c.orig Wed Feb 16 02:25:10 2005
+++ sj-util.c Wed Mar 23 20:23:32 2005
@@ -28,6 +28,9 @@
#include <glib/gstrfuncs.h>
#include <glib/gi18n.h>
#include <nautilus-burn-drive.h>
+#ifdef USE_SOLARIS
+#include <sys/cdio.h>
+#endif
#include "sj-error.h"
#include "sj-util.h"
@@ -158,15 +161,21 @@
return FALSE;
}
+#ifndef USE_SOLARIS
status = ioctl (fd, CDROM_DRIVE_STATUS, CDSL_CURRENT);
if (status < 0) {
close (fd);
return FALSE;
}
+#endif
close (fd);
+#ifdef USE_SOLARIS
+ return TRUE;
+#else
return status == CDS_TRAY_OPEN;
+#endif
}
gboolean is_audio_cd (const char *device)
@@ -197,15 +206,21 @@
return FALSE;
}
+#ifndef USE_SOLARIS
status = ioctl (fd, CDROM_DISC_STATUS, CDSL_CURRENT);
if (status < 0) {
close (fd);
return FALSE;
}
+#endif
close (fd);
+#ifdef USE_SOLARIS
+ return TRUE;
+#else
return status == CDS_AUDIO;
+#endif
}
/* Pass NULL to use g_free */
>>>>>>>>>>>>>>>>>>>>>>>>>
[========== Bindings ==========]
nothing to fix or patch
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]