Hi all,

Just had a funstrating 2 hour session getting fluxus to build on Debian Wheezy (currently Testing).

With the attached patches, Fluxus compiles and installs ok like this:

$ scons \
    RacketPrefix=/usr \
    Prefix=${HOME}/opt \
    STATIC_MODULES=1 \
    ADDONS=0
$ scons \
    RacketPrefix=/usr \
    Prefix=${HOME}/opt \
    STATIC_MODULES=1 \
    ADDONS=0 \
    install

and even seems to work (though there are some openal issues I started to try to figure out then gave up as both -audio and -openal modules define a same-named symbol 'Audio' with different types):

$ fluxus
Welcome to fluxus.
Type (help) for info.

I attached the (self-test #t) log too, in case it is useful.

Hopefully at least some of these patches can make their way into the master branch soon in some form or another:

0001/0002/0003 are for getting a static build not to fail miserably
0005/0006 are needed for static builds to run, but are a bit hacky
0004/0007 cancel each other out, so ignore them

Thanks,


Claude
>From 3986afc90afae4f53dc62f6f9735d6a4ebee7eaf Mon Sep 17 00:00:00 2001
From: Claude Heiland-Allen <[email protected]>
Date: Mon, 4 Jun 2012 18:06:52 +0100
Subject: [PATCH 1/7] use subprocess instead of popen

---
 SConstruct |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/SConstruct b/SConstruct
index a4a09c8..95f07db 100644
--- a/SConstruct
+++ b/SConstruct
@@ -306,15 +306,15 @@ if not GetOption('clean'):
 	if static_modules:
 		# in static mode, we want to embed all of plt we need
 		# using popen as it's crossplatform 
-		raco_status = os.popen("raco ctool --c-mods src/base.c \
-			++lib racket/base  \
-			++lib racket/base/lang/reader  \
-			++lib xml/xml \
-			++lib compiler \
-			++lib mzscheme \
-			++lib mzlib/string \
-			++lib setup   \
-			++lib config").close()
+		raco_status = subprocess.call(['raco', 'ctool', '--c-mods', 'src/base.c',
+			'++lib', 'racket/base',
+			'++lib', 'racket/base/lang/reader',
+			'++lib', 'xml/xml',
+			'++lib', 'compiler',
+			'++lib', 'mzscheme',
+			'++lib', 'mzlib/string',
+			'++lib', 'setup',
+			'++lib', 'config'])
 	else:
 		raco_status = subprocess.call(['raco', 'ctool', '--c-mods', 'src/base.c', '++lib', 'racket/base'])
 
-- 
1.7.10

>From bb6b6c79f57b222c9fd5a3815889e0a650fa3ec4 Mon Sep 17 00:00:00 2001
From: Claude Heiland-Allen <[email protected]>
Date: Mon, 4 Jun 2012 18:09:14 +0100
Subject: [PATCH 2/7] replace mzscheme3m with racket3m

---
 SConstruct |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/SConstruct b/SConstruct
index 95f07db..0d77a0c 100644
--- a/SConstruct
+++ b/SConstruct
@@ -366,7 +366,7 @@ if not GetOption('clean') and static_modules:
 	
 		# now go through the rest of the libs, removing them from 
 		# the environment at the same time
-		for i in " GLEW GLU glut asound m fftw3 mzscheme3m png tiff \
+		for i in " GLEW GLU glut asound m fftw3 racket3m png tiff \
 					jpeg freetype lo z ".split():
 			app_env['LIBS'].remove(i)
 			linkcom+="-l"+i+" "
@@ -378,9 +378,9 @@ if not GetOption('clean') and static_modules:
 		if env['PLATFORM'] == 'win32':
 			app_env['LIBS'].remove('libmzsch3m_6ncc9s')
 		else:
-			app_env['LIBS'].remove('mzscheme3m')
+			app_env['LIBS'].remove('racket3m')
 
-		app_env.Append(LINKCOM = ' -Wl,-Bstatic -lmzscheme3m -Wl,-Bdynamic')
+		app_env.Append(LINKCOM = ' -Wl,-Bstatic -lracket3m -Wl,-Bdynamic')
 		
 		# have to add the libs needed by the fluxus modules here
 		app_env.Append(LIBS = ["fluxus"])
-- 
1.7.10

>From ec283f02b8b5ea4fc68705695bfe4fb30b68ec95 Mon Sep 17 00:00:00 2001
From: Claude Heiland-Allen <[email protected]>
Date: Mon, 4 Jun 2012 18:10:01 +0100
Subject: [PATCH 3/7] static racket3m needs libffi

---
 SConstruct |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SConstruct b/SConstruct
index 0d77a0c..b50cbd2 100644
--- a/SConstruct
+++ b/SConstruct
@@ -380,7 +380,7 @@ if not GetOption('clean') and static_modules:
 		else:
 			app_env['LIBS'].remove('racket3m')
 
-		app_env.Append(LINKCOM = ' -Wl,-Bstatic -lracket3m -Wl,-Bdynamic')
+		app_env.Append(LINKCOM = ' -Wl,-Bstatic -lracket3m -Wl,-Bdynamic -lffi')
 		
 		# have to add the libs needed by the fluxus modules here
 		app_env.Append(LIBS = ["fluxus"])
-- 
1.7.10

>From b7755da5832a5d55cc59223884da4b6c12e0de80 Mon Sep 17 00:00:00 2001
From: Claude Heiland-Allen <[email protected]>
Date: Mon, 4 Jun 2012 18:13:57 +0100
Subject: [PATCH 4/7] add openal to static modules

---
 SConstruct |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/SConstruct b/SConstruct
index b50cbd2..61d7160 100644
--- a/SConstruct
+++ b/SConstruct
@@ -345,11 +345,13 @@ if not GetOption('clean') and static_modules:
 	app_env.Append(LIBPATH = ["modules/fluxus-osc/"])
 	app_env.Append(LIBPATH = ["modules/fluxus-audio/"])
 	app_env.Append(LIBPATH = ["modules/fluxus-midi/"])
+	app_env.Append(LIBPATH = ["modules/fluxus-openal/"])
 	app_env.Append(LIBPATH = ["libfluxus/"])
 	app_env.Append(LIBS = ["fluxus-engine_ss"])
 	app_env.Append(LIBS = ["fluxus-osc_ss"])
 	app_env.Append(LIBS = ["fluxus-audio_ss"])
 	app_env.Append(LIBS = ["fluxus-midi_ss"])
+	app_env.Append(LIBS = ["fluxus-openal_ss"])
 	
 	if static_everything:
 		# this is all a bit fragile, due to the need to put all the 
-- 
1.7.10

>From 911b5e8317eb09bfdd0ee4541ecac47ff4f5dfd1 Mon Sep 17 00:00:00 2001
From: Claude Heiland-Allen <[email protected]>
Date: Mon, 4 Jun 2012 18:38:32 +0100
Subject: [PATCH 5/7] no openal in static version

---
 modules/scheme/scratchpad.ss |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/scheme/scratchpad.ss b/modules/scheme/scratchpad.ss
index 395abb0..14f282c 100644
--- a/modules/scheme/scratchpad.ss
+++ b/modules/scheme/scratchpad.ss
@@ -382,7 +382,7 @@
      (stereo-render)))
   (tick-physics)
   (update-audio)
-  (oa-update)
+;  (oa-update)
   (update-input)
   (display (fluxus-error-log)))
 
-- 
1.7.10

>From aa0aa99d990b69a64ef44a24b235ba1456b6e2c2 Mon Sep 17 00:00:00 2001
From: Claude Heiland-Allen <[email protected]>
Date: Mon, 4 Jun 2012 18:40:24 +0100
Subject: [PATCH 6/7] different 'require's for static

---
 modules/scheme/fluxus-modules.ss |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/scheme/fluxus-modules.ss b/modules/scheme/fluxus-modules.ss
index cbaa204..332c859 100644
--- a/modules/scheme/fluxus-modules.ss
+++ b/modules/scheme/fluxus-modules.ss
@@ -5,7 +5,7 @@
 ; for the moment, comment the top require/provide out and uncomment the 
 ; lower when installing a static build of the fluxus modules
 
-(require (rename-in "fluxus-engine.ss"
+#;(require (rename-in "fluxus-engine.ss"
 					(shader-set! shader-list-set!))
          "fluxus-audio.ss"
          "fluxus-osc.ss"
@@ -13,7 +13,7 @@
 		 "fluxus-openal.ss"
 )
 		 	 
-(provide 
+#;(provide
  (all-from-out "fluxus-engine.ss")
  (all-from-out "fluxus-audio.ss")
  (all-from-out "fluxus-osc.ss")
@@ -21,13 +21,13 @@
  (all-from-out "fluxus-openal.ss")
 )
 
-#;(require (rename-in 'fluxus-engine
+(require (rename-in 'fluxus-engine
 					(shader-set! shader-list-set!))
          'fluxus-audio
          'fluxus-osc
          'fluxus-midi)
 		 	 
-#;(provide 
+(provide
  (all-from-out 'fluxus-engine)
  (all-from-out 'fluxus-audio)
  (all-from-out 'fluxus-osc)
-- 
1.7.10

>From efa08159972825e6bfd423b2726169259f0ff3b9 Mon Sep 17 00:00:00 2001
From: Claude Heiland-Allen <[email protected]>
Date: Mon, 4 Jun 2012 19:02:24 +0100
Subject: [PATCH 7/7] Revert "add openal to static modules"

This reverts commit b7755da5832a5d55cc59223884da4b6c12e0de80.
---
 SConstruct |    2 --
 1 file changed, 2 deletions(-)

diff --git a/SConstruct b/SConstruct
index 61d7160..b50cbd2 100644
--- a/SConstruct
+++ b/SConstruct
@@ -345,13 +345,11 @@ if not GetOption('clean') and static_modules:
 	app_env.Append(LIBPATH = ["modules/fluxus-osc/"])
 	app_env.Append(LIBPATH = ["modules/fluxus-audio/"])
 	app_env.Append(LIBPATH = ["modules/fluxus-midi/"])
-	app_env.Append(LIBPATH = ["modules/fluxus-openal/"])
 	app_env.Append(LIBPATH = ["libfluxus/"])
 	app_env.Append(LIBS = ["fluxus-engine_ss"])
 	app_env.Append(LIBS = ["fluxus-osc_ss"])
 	app_env.Append(LIBS = ["fluxus-audio_ss"])
 	app_env.Append(LIBS = ["fluxus-midi_ss"])
-	app_env.Append(LIBS = ["fluxus-openal_ss"])
 	
 	if static_everything:
 		# this is all a bit fragile, due to the need to put all the 
-- 
1.7.10

Attachment: log.txt.gz
Description: application/gzip

Reply via email to