win32 port



   Hi!

After hearing for the third time from some musician: "oh well, if BEAST
would run under windows, I could look at it, but since it doesn't, I
can't", today I decided to check out how much work porting might be.

After installing cygwin with all the stuff that BEAST needs and building
my own:

-rw-r--r--   1 Stefan Kein 3039294 Dec 21 18:52 guile-1.6.7.tar.gz
-rw-r--r--   1 Stefan Kein  282691 Nov 18  2003 libogg-1.1.tar.gz
-rw-r--r--   1 Stefan Kein 1218076 Nov 18  2003 libvorbis-1.0.1.tar.gz

I got to see the first error messages from beast-0.6.4 (release tarball)
itself. I saw the following problems:

1) We don't use pkg-config to find the location of libogg/libvorbis;
   this fails under my win32-build, as the -L/usr/local/lib is missing.
   I manually hacked the flags in (the right solution is probably to
   call pkg-config) and proceeded.

2) There were some minor glitches in libsfi, since some stuff (like
   PRIO_PROCESS) isn't available on cygwin, which I fixed by adding
   some #ifdefs.

3) I get link errors in anything that links against libsfi:
   [...]
   testsfi.o(.text+0x5f84):/home/Stefan/src/beast-0.6.4/sfi/testsfi.c:949: undefined reference to `_sfi_ring_reorder'
   testsfi.o(.text+0x5f92):/home/Stefan/src/beast-0.6.4/sfi/testsfi.c:952: undefined reference to `_sfi_pointer_cmp'
   testsfi.o(.text+0x5fa2):/home/Stefan/src/beast-0.6.4/sfi/testsfi.c:952: undefined reference to `_sfi_ring_equals'
   [...]
   I don't exactly know what to do about that, though. I tried adding an
   sfi.def file containing EXPORTS and then the symbols, but somehow
   that didn't work. Maybe I overlooked something.

I attached a patch with the changes I needed to make so far (to get the
sfi/ directory compiled until it displays the link errors).

Maybe this is also the time to reconsider whether the port "should" be
done. Here are some reasons for and against the port.

For the port:
 * we get the possibility for more feedback from users, including those
   that don't want to or can't leave windows (yet)
 * a larger community could mean more resources for development, in the
   long run
 * a windows version could mean some interoperability with other
   programs that musicians commonly use, such as CuBase, which may make
   it easier to try out BEAST for the first time

Against the port:
 * porting means additional work, which means that some of the
   development manpower that could otherwise be spent on improving BEAST
   for Linux goes into porting
 * the current approach of porting BEAST (cygwin) will require running
   an X server, which is extremely unintuitive for Windows users
 * if we were to offer BEAST on Windows, we could reduce the attraction
   Linux has for musicians, and thus the attraction to switch to a
   completely free system
 * a port will probably be not as solid as the native version (as it
   will be largely untested), which could leave a bad impression of
   BEAST behind

As currently more feedback from musicians seems to me as something very
desirable for the development process, my personal preference is to try
porting and to stop if it becomes too much work.

   Cu... Stefan
-- 
Stefan Westerfeld, Hamburg/Germany, http://space.twc.de/~stefan
--- configure.in	2004-12-18 00:05:02.000000000 +0100
+++ ../../beast-0.6.4/configure.in	2005-01-03 23:22:29.218750000 +0100
@@ -175,18 +175,18 @@
 
     dnl --- Ogg/Vorbis check ---
     OV_LIBS=
-    ov_tests=0
-    AC_CHECK_LIB(vorbisfile, ogg_stream_reset_serialno,
-	[AC_CHECK_HEADER(ogg/ogg.h, ov_tests=`expr $ov_tests + 1`)]
-	[AC_CHECK_HEADER(vorbis/vorbisfile.h, ov_tests=`expr $ov_tests + 1`)]
-	[AC_CHECK_HEADER(vorbis/vorbisenc.h, ov_tests=`expr $ov_tests + 1`)]
-	,
-	ov_tests=0, -lvorbisenc -lvorbis -logg)
-    if test $ov_tests = 3 ; then
-	OV_LIBS="-lvorbisfile -lvorbisenc -lvorbis -logg"
-    else
-	AC_MSG_WARN([failed to detect Ogg/Vorbis library (>=1.0) or headers])
-    fi
+    dnl ov_tests=0
+    dnl AC_CHECK_LIB(vorbisfile, ogg_stream_reset_serialno,
+	dnl [AC_CHECK_HEADER(ogg/ogg.h, ov_tests=`expr $ov_tests + 1`)]
+	dnl [AC_CHECK_HEADER(vorbis/vorbisfile.h, ov_tests=`expr $ov_tests + 1`)]
+	dnl [AC_CHECK_HEADER(vorbis/vorbisenc.h, ov_tests=`expr $ov_tests + 1`)]
+	dnl ,
+	dnl ov_tests=0, -lvorbisenc -lvorbis -logg)
+    dnl if test $ov_tests = 3 ; then
+	OV_LIBS="-L/usr/local/lib -lvorbisfile -lvorbisenc -lvorbis -logg"
+    dnl else
+	dnl AC_MSG_WARN([failed to detect Ogg/Vorbis library (>=1.0) or headers])
+    dnl fi
     
     dnl --- libmad MPEG decoder check ---
     dnl libmad doesn't come with a mad.pc file (just its debian package)
--- sfi/sficomwire.c	2004-05-03 20:01:13.000000000 +0200
+++ ../../beast-0.6.4/sfi/sficomwire.c	2005-01-04 00:04:55.656250000 +0100
@@ -943,7 +943,9 @@
   if (cdata->keepexec2)
     unset_cloexec (cdata->keepexec2);
   /* drop scheduling priorities if we have any */
+#ifndef __CYGWIN32__
   setpriority (PRIO_PROCESS, getpid(), 0);
+#endif
 }
 
 gchar*
--- sfi/sficonfig.h	2004-12-12 19:30:00.000000000 +0100
+++ ../../beast-0.6.4/sfi/sficonfig.h	2005-01-04 00:03:32.781250000 +0100
@@ -1,7 +1,7 @@
 /* Generated data from ../config.status (by make sficonfig.h) */
 
-#define SFI_SIZEOF_PTH_MUTEX_T         (24)
-#define SFI_SIZEOF_PTH_COND_T          (48)
+#define SFI_SIZEOF_PTH_MUTEX_T         (4)
+#define SFI_SIZEOF_PTH_COND_T          (4)
 #define SFI_HAVE_MUTEXATTR_SETTYPE     (1 && \
                                         SFI_SIZEOF_PTH_MUTEX_T && \
                                         SFI_SIZEOF_PTH_COND_T)
--- sfi/sfithreads.c	2004-10-13 19:01:35.000000000 +0200
+++ ../../beast-0.6.4/sfi/sfithreads.c	2005-01-04 00:07:25.187500000 +0100
@@ -230,7 +230,11 @@
       self->ac.cstime = timeval_usecs (&res.ru_stime);
       self->info.cutime = MAX (self->ac.cutime - utime, 0) * dfact;
       self->info.cstime = MAX (self->ac.cstime - stime, 0) * dfact;
+#ifndef __CYGWIN32__
       self->info.priority = getpriority (PRIO_PROCESS, self->tid);
+#else
+      self->info.priority = 0;
+#endif
       thread_info_from_stat_L (self, dfact);
       self->accounting--;
     }
--- sfi/sfitime.c	2004-11-15 20:09:51.000000000 +0100
+++ ../../beast-0.6.4/sfi/sfitime.c	2005-01-04 00:06:36.359375000 +0100
@@ -74,7 +74,11 @@
      */
     struct tm tmdata;
     localtime_r (&t, &tmdata);
+#ifdef __CYGWIN32__
+    gmt_diff = 0;
+#else
     gmt_diff = -tmdata.tm_gmtoff;
+#endif
   }
 #endif
 


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