View Issue Details

IDProjectCategoryView StatusLast Update
0002180ardourbugspublic2009-10-20 09:30
Reporterjwrdegoede Assigned Topaul  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version2.1 
Summary0002180: PATCH: Several SConstruct changes
DescriptionHi,

First let me introduce myself, I'm a Linux enthusiast / developer mainly active writing kernel drivers and doing Fedora development. Within Fedora I'm one of the (co)maintainers of our ardour package.

Up until now we've been using the versions of gtkmm, etc. included with ardour, we've been doing this because the strong advise not to use SYSLIB=1 in various documents.

However we've received a bug report from an ardour developer here:
https://bugzilla.redhat.com/show_bug.cgi?id=339391

Saying that we've been misreading this, combining this with the fact that the included libs do not compile with gcc-4.3, which is our default compiler now, has let to me deciding to switch to using system libs.

When switching to systemlibs a bug in SConstruct was discovered even when switching to systemlibs the included version of soundtouch will still get build, as it gets unconditionally added to timefx_subdirs. Additionally when not using vst and when fftw is available and thus using rubberband, soundtouch isn't needed at all. The attach patch fixes this.

Besides this the attached patch contains 2 more changes, both of which probably need to be done in a better way then in the patch:
1) It allows specifying the LIBDIR rather then determining it by the set
   TARGET_CPU, this is more convenient for package-building as its how
   ./configure does it so we have macros for the libdir. This is needed as there
   are more archs then just x86_64 which use lib64, powerpc64 for example.

2) It removes the unconditional prepending of your default optflags, because we
   for example never ever want to be using -fomit-frame-pointer.
Additional Informationp.s.

Ignore the 2.1 version in both the patch and this report, the patch has been updated to apply to 2.4, and the 2.1 version in this report is because mantis doesn't yet seem to know about any newer versions.
TagsNo tags attached.

Activities

2008-04-07 13:58

 

ardour-2.1-SConstruct.patch (3,012 bytes)   
diff -up ardour-2.4/SConstruct.orig ardour-2.4/SConstruct
--- ardour-2.4/SConstruct.orig	2008-03-31 23:53:54.000000000 +0200
+++ ardour-2.4/SConstruct	2008-04-07 10:05:55.000000000 +0200
@@ -45,6 +45,7 @@ opts.AddOptions(
     BoolOption('LIBLO', 'Compile with support for liblo library', 1),
     BoolOption('NLS', 'Set to turn on i18n support', 1),
     PathOption('PREFIX', 'Set the install "prefix"', '/usr/local'),
+    ('LIBDIR', 'Set librarydir (lib/lib64)', 'lib'),
     BoolOption('SURFACES', 'Build support for control surfaces', 1),
     BoolOption('SYSLIBS', 'USE AT YOUR OWN RISK: CANCELS ALL SUPPORT FROM ARDOUR AUTHORS: Use existing system versions of various libraries instead of internal ones', 0),
     BoolOption('UNIVERSAL', 'Compile as universal binary.  Requires that external libraries are already universal.', 0),
@@ -735,13 +736,6 @@ if env['FPU_OPTIMIZATION']:
             print "\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)"
 # end optimization section
 
-# handle x86/x86_64 libdir properly
-
-if env['DIST_TARGET'] == 'x86_64':
-    env['LIBDIR']='lib64'
-else:
-    env['LIBDIR']='lib'
-
 #
 # a single way to test if we're on OS X
 #
@@ -767,18 +761,6 @@ env.Append(CONFIG_ARCH=config[config_arc
 if env['ARCH'] != '':
     opt_flags = env['ARCH'].split()
 
-#
-# prepend boiler plate optimization flags
-#
-
-opt_flags[:0] = [
-    "-O3",
-    "-fomit-frame-pointer",
-    "-ffast-math",
-    "-fstrength-reduce",
-    "-pipe"
-    ]
-
 if env['DEBUG'] == 1:
     env.Append(CCFLAGS=" ".join (debug_flags))
     env.Append(LINKFLAGS=" ".join (debug_flags))
@@ -1031,10 +1031,12 @@ if env['SYSLIBS']:
 #    libraries['libglademm'].ParseConfig ('pkg-config --cflags --libs libglademm-2.4')
 
 #    libraries['flowcanvas'] = LibraryInfo(LIBS='flowcanvas', LIBPATH='#/libs/flowcanvas', CPPPATH='#libs/flowcanvas')
+
     libraries['soundtouch'] = LibraryInfo()
-    #libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs soundtouch-1.0')
-    # Comment the previous line and uncomment this for Debian:
-    libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs libSoundTouch')
+    if env['VST'] or not env['RUBBERBAND']:
+        #libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs soundtouch-1.0')
+        # Comment the previous line and uncomment this for Debian:
+        libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs libSoundTouch')
 
     libraries['appleutility'] = LibraryInfo(LIBS='libappleutility',
                                             LIBPATH='#libs/appleutility',
@@ -1177,7 +1177,11 @@ else:
 # timestretch libraries
 #
 
-timefx_subdirs = ['libs/soundtouch']
+if not env['SYSLIBS'] and (env['VST'] or not env['RUBBERBAND']):
+  timefx_subdirs = ['libs/soundtouch']
+else:
+  timefx_subdirs = [ ]
+
 if env['RUBBERBAND']:
     timefx_subdirs += ['libs/rubberband']
 
ardour-2.1-SConstruct.patch (3,012 bytes)   

paul

2008-04-17 06:14

administrator   ~0004870

The LIBDIR part of this patch is OK.

Removing the optflags is totally wrong IMHO - you need to provide more justification for me to even consider this.

SoundTouch is still built and will be returning to Ardour in the future. It has benefits over Rubberband for certain operations on some kinds of material. That part of the patch is thus rejected.

I will be committing fixes for 4.3 compilation in the next few minutes.

Feel free to comment and/or resubmit the patch.

jwrdegoede

2008-04-17 06:59

reporter   ~0004875

About optflags. Distributions (and AFAIK allmost all distributions) always want to build with their own distro specific optflags, this includes thinks like enabling fortify_source and stacksmashing protection, and also almost always includes building with -g and without -fomit-frame-pointer. Yes, almost all distro's build binaries with debuginfo in the binaries, and for this to be usefull, -fomit-frame-pointer must not be used. What happens after building is that the debuginfo gets stripped from the binaries, but instead of throwing it away, it gets stored separately, and an end user can install it separately and this way we can get usefull backtraces from a user machine without the user having to recompile stuff.

I agree that part of my patch is not pretty, would it be acceptable to add an option to disable the oprflags prepending conditionally?

About soundtouch, I initially started working on the soundtouch part of the patch because currently the soundtouch libs subdir gets added unconditionally to timefx_subdirs, while it should be only be added when SYSLIB == 0, so at a minimum the following should be applied:

--- ardour-2.4/SConstruct.orig 2008-03-31 23:53:54.000000000 +0200
+++ ardour-2.4/SConstruct 2008-04-07 10:05:55.000000000 +0200
@@ -1177,7 +1177,11 @@ else:
 # timestretch libraries
 #
 
-timefx_subdirs = ['libs/soundtouch']
+if not env['SYSLIBS']:
+ timefx_subdirs = ['libs/soundtouch']
+else:
+ timefx_subdirs = [ ]
+
 if env['RUBBERBAND']:
     timefx_subdirs += ['libs/rubberband']
 
---

The rest of the soundtouch changes are to:
1) Also not make it build the buildin version of soundtouch when its not needed
   even though not using syslibs (I don't care much about this change).
2) Stop it from doing this:
libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs libSoundTouch')

When libraries['soundtouch'] will never be used as for 'pkg-config --cflags --libs libSoundTouch' to work, soundtouch-devel must be installed, and it doesn't make sense requiring something to be installed to build ardour even if that something will not be used in anyway.

jwrdegoede

2008-04-17 07:00

reporter   ~0004876

p.s.

Currently ardour seems to unconditinally use its own version of rubberband, are there any special reasons (like with libsndfile) not to use a system version instead?

paul

2008-04-18 02:15

administrator   ~0004878

it is my policy that any and all C++ libraries used by ardour be included in our source tree, and that the default build should use "private" copies of these libraries.

if you are asking if its OK to add rubberband to the libraries covered by the SYSLIBS compile time option, then yes to that.

jwrdegoede

2008-04-24 13:33

reporter   ~0004898

> if you are asking if its OK to add rubberband to the libraries covered by the SYSLIBS compile time option, then yes to that.

Yes, that is what I was asking, could rubberband please be added to the libraries covered by the SYSLIBS compile time option?

I wanted to write a patch for this myself, hence the long silence, but I just don't have the time for that atm.

2008-04-26 08:34

 

0001-Check-for-that-required-dependencies-fftw3-and-fftw3.patch (1,792 bytes)   
From d496f9c43bd97ec915a748505e745780b89dfba2 Mon Sep 17 00:00:00 2001
From: Tim Mayberry <mojofunk@gmail.com>
Date: Tue, 15 Apr 2008 12:08:50 +1000
Subject: [PATCH] Check for that required dependencies fftw3 and fftw3f with the rest of the required deps

This means printing out useful error message rather than a KeyError

The version of fftw3 required is set to 3.1 which was released on 26th Jan 2006
---
 SConstruct |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/SConstruct b/SConstruct
index 157c387..48f3a99 100644
--- a/SConstruct
+++ b/SConstruct
@@ -450,7 +450,9 @@ deps = \
 	'raptor'               : '1.4.2',
 	'lrdf'                 : '0.4.0',
 	'jack'                 : '0.101.1',
-	'libgnomecanvas-2.0'   : '2.0'
+	'libgnomecanvas-2.0'   : '2.0',
+	'fftw3'                : '3.1',
+	'fftw3f'               : '3.1'
 }
 
 def DependenciesRequiredMessage():
@@ -513,17 +515,11 @@ libraries['raptor'].ParseConfig('pkg-config --cflags --libs raptor')
 libraries['samplerate'] = LibraryInfo()
 libraries['samplerate'].ParseConfig('pkg-config --cflags --libs samplerate')
 
-conf = env.Configure (custom_tests = { 'CheckPKGExists' : CheckPKGExists } )
+libraries['fftw3f'] = LibraryInfo()
+libraries['fftw3f'].ParseConfig('pkg-config --cflags --libs fftw3f')
 
-if conf.CheckPKGExists ('fftw3f'):
-    libraries['fftw3f'] = LibraryInfo()
-    libraries['fftw3f'].ParseConfig('pkg-config --cflags --libs fftw3f')
-
-if conf.CheckPKGExists ('fftw3'):
-    libraries['fftw3'] = LibraryInfo()
-    libraries['fftw3'].ParseConfig('pkg-config --cflags --libs fftw3')
-
-env = conf.Finish ()
+libraries['fftw3'] = LibraryInfo()
+libraries['fftw3'].ParseConfig('pkg-config --cflags --libs fftw3')
 
 if env['FFT_ANALYSIS']:
         #
-- 
1.5.4.1

2008-04-26 08:34

 

0002-Don-t-check-for-fftw3-header-when-building-with-FFT_.patch (1,133 bytes)   
From eb4b11c780ec76f2e420c6823a52d4754d759a96 Mon Sep 17 00:00:00 2001
From: Tim Mayberry <mojofunk@gmail.com>
Date: Tue, 15 Apr 2008 12:48:51 +1000
Subject: [PATCH] Don't check for fftw3 header when building with FFT_ANALYSIS as fftw3 library is required by default

---
 SConstruct |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/SConstruct b/SConstruct
index 48f3a99..dc56f48 100644
--- a/SConstruct
+++ b/SConstruct
@@ -521,18 +521,6 @@ libraries['fftw3f'].ParseConfig('pkg-config --cflags --libs fftw3f')
 libraries['fftw3'] = LibraryInfo()
 libraries['fftw3'].ParseConfig('pkg-config --cflags --libs fftw3')
 
-if env['FFT_ANALYSIS']:
-        #
-        # Check for fftw3 header as well as the library
-        #
-
-        conf = Configure(libraries['fftw3'])
-
-        if conf.CheckHeader ('fftw3.h') == False:
-            print ('Ardour cannot be compiled without the FFTW3 headers, which do not seem to be installed')
-            sys.exit (1)            
-        conf.Finish()
-
 if env['FREESOUND']:
         #
         # Check for curl header as well as the library
-- 
1.5.4.1

2008-04-26 08:35

 

0003-Use-CheckPKGVersion-instead-of-CheckPKGExists-to-che.patch (973 bytes)   
From f369fe2e20bb1e443f0f8fd0faf5eddc5ed79ef6 Mon Sep 17 00:00:00 2001
From: Tim Mayberry <mojofunk@gmail.com>
Date: Tue, 15 Apr 2008 13:35:07 +1000
Subject: [PATCH] Use CheckPKGVersion instead of CheckPKGExists to check for slv2 version

---
 SConstruct |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/SConstruct b/SConstruct
index dc56f48..a1ac79b 100644
--- a/SConstruct
+++ b/SConstruct
@@ -540,9 +540,9 @@ else:
 	print 'FREESOUND support is not enabled.  Build with \'scons FREESOUND=1\' to enable.'
 
 if env['LV2']:
-	conf = env.Configure(custom_tests = { 'CheckPKGExists' : CheckPKGExists })
+	conf = env.Configure(custom_tests = { 'CheckPKGVersion' : CheckPKGVersion })
 	
-	if conf.CheckPKGExists ('\"slv2 >= 0.6.0\"'):
+	if conf.CheckPKGVersion ('slv2', '0.6.0'):
 		libraries['slv2'] = LibraryInfo()
 		libraries['slv2'].ParseConfig('pkg-config --cflags --libs slv2')
                 env.Append (CCFLAGS="-DHAVE_LV2")
-- 
1.5.4.1

2008-04-26 08:35

 

0004-Remove-unused-utility-function-in-SConstruct.patch (870 bytes)   
From 6f38c4259e97a5c8ce2c0e5219ec511483ba91ba Mon Sep 17 00:00:00 2001
From: Tim Mayberry <mojofunk@gmail.com>
Date: Tue, 15 Apr 2008 14:56:41 +1000
Subject: [PATCH] Remove unused utility function in SConstruct

---
 SConstruct |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/SConstruct b/SConstruct
index a1ac79b..a67d7dc 100644
--- a/SConstruct
+++ b/SConstruct
@@ -471,12 +471,6 @@ def CheckPKGVersion(context, name, version):
     context.Result( ret )
     return ret
 
-def CheckPKGExists(context, name):
-    context.Message ('Checking for %s...' % name)
-    ret = context.TryAction('pkg-config --exists %s' % name)[0]
-    context.Result (ret)
-    return ret
-
 conf = Configure(env, custom_tests = { 'CheckPKGConfig' : CheckPKGConfig,
                                        'CheckPKGVersion' : CheckPKGVersion })
 
-- 
1.5.4.1

2008-04-26 08:35

 

0005-Use-CheckPKGVersion-to-check-for-libcurl-version-sup.patch (1,406 bytes)   
From 10e8c9f53d6c801ea131bc154f69de6838d9deff Mon Sep 17 00:00:00 2001
From: Tim Mayberry <mojofunk@gmail.com>
Date: Tue, 15 Apr 2008 16:14:08 +1000
Subject: [PATCH] Use CheckPKGVersion to check for libcurl version supported by mootcher when building with FREESOUND=1

---
 SConstruct |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/SConstruct b/SConstruct
index a67d7dc..9287e8f 100644
--- a/SConstruct
+++ b/SConstruct
@@ -516,19 +516,15 @@ libraries['fftw3'] = LibraryInfo()
 libraries['fftw3'].ParseConfig('pkg-config --cflags --libs fftw3')
 
 if env['FREESOUND']:
-        #
-        # Check for curl header as well as the library
-        #
-
 	libraries['curl'] = LibraryInfo()
-
-	conf = Configure(libraries['curl'])
-
-	if conf.CheckHeader ('curl/curl.h') == False:
-		print ('Ardour cannot be compiled without the curl headers, which do not seem to be installed')
-		sys.exit (1)            
-	else:
+	conf = env.Configure(custom_tests = { 'CheckPKGVersion' : CheckPKGVersion })
+	
+	if conf.CheckPKGVersion ('libcurl', '7.14'):
 		libraries['curl'].ParseConfig('pkg-config --cflags --libs libcurl')
+	else:
+		print ('The FREESOUND option requires libcurl and development files to be installed')
+		sys.exit (1)            
+
 	conf.Finish()
 else:
 	print 'FREESOUND support is not enabled.  Build with \'scons FREESOUND=1\' to enable.'
-- 
1.5.4.1

2008-04-26 08:35

 

0006-Remove-duplication-in-lists-containing-build-directo.patch (3,225 bytes)   
From 87afb54c43580a590d8fed3ebfa1eee76ded8986 Mon Sep 17 00:00:00 2001
From: Tim Mayberry <mojofunk@gmail.com>
Date: Fri, 25 Apr 2008 12:58:55 +1000
Subject: [PATCH] Remove duplication in lists containing build directories

---
 SConstruct |   83 +++++++++++++++++++++--------------------------------------
 1 files changed, 30 insertions(+), 53 deletions(-)

diff --git a/SConstruct b/SConstruct
index 9287e8f..a5eb82d 100644
--- a/SConstruct
+++ b/SConstruct
@@ -978,6 +978,34 @@ else:
 
 env = conf.Finish()
 
+coredirs = [
+	'templates'
+	]
+
+subdirs = [
+	'libs/libsndfile',
+	'libs/pbd',
+	'libs/midi++2',
+	'libs/ardour',
+# these are unconditionally included but have
+# tests internally to avoid compilation etc
+# if VST is not set
+	'libs/fst',
+	'vst',
+# this is unconditionally included but has
+# tests internally to avoid compilation etc
+# if COREAUDIO is not set
+	'libs/appleutility',
+        'libs/vamp-sdk',
+        'libs/vamp-plugins'
+	]
+
+gtk_subdirs = [
+	'libs/gtkmm2ext',
+	'gtk2_ardour',
+	'libs/clearlooks'
+	]
+
 if env['SYSLIBS']:
 
     syslibdeps = \
@@ -1035,35 +1063,6 @@ if env['SYSLIBS']:
     libraries['appleutility'] = LibraryInfo(LIBS='libappleutility',
                                             LIBPATH='#libs/appleutility',
                                             CPPPATH='#libs/appleutility')
-    
-    coredirs = [
-        'templates'
-    ]
-    
-    subdirs = [
-        'libs/libsndfile',
-        'libs/pbd',
-        'libs/midi++2',
-        'libs/ardour',
-        'libs/vamp-sdk',
-        'libs/vamp-plugins/',
-    # these are unconditionally included but have
-    # tests internally to avoid compilation etc
-    # if VST is not set
-        'libs/fst',
-        'vst',
-    # this is unconditionally included but has
-    # tests internally to avoid compilation etc
-    # if COREAUDIO is not set
-        'libs/appleutility'
-        ]
-    
-    gtk_subdirs = [
-#        'libs/flowcanvas',
-        'libs/gtkmm2ext',
-        'gtk2_ardour',
-        'libs/clearlooks'
-        ]
 
 else:
     libraries['sigc2'] = LibraryInfo(LIBS='sigc++2',
@@ -1101,39 +1100,17 @@ else:
                                             LIBPATH='#libs/appleutility',
                                             CPPPATH='#libs/appleutility')
 
-    coredirs = [
-        'templates'
-    ]
-    
-    subdirs = [
+    subdirs += [
         'libs/sigc++2',
-        'libs/libsndfile',
-        'libs/pbd',
-        'libs/midi++2',
-        'libs/ardour',
-        'libs/vamp-sdk',
-        'libs/vamp-plugins/',
-    # these are unconditionally included but have
-    # tests internally to avoid compilation etc
-    # if VST is not set
-        'libs/fst',
-        'vst',
-    # this is unconditionally included but has
-    # tests internally to avoid compilation etc
-    # if COREAUDIO is not set
-        'libs/appleutility'
         ]
     
-    gtk_subdirs = [
+    gtk_subdirs += [
         'libs/glibmm2',
         'libs/gtkmm2/pango',
         'libs/gtkmm2/atk',
         'libs/gtkmm2/gdk',
         'libs/gtkmm2/gtk',
         'libs/libgnomecanvasmm',
-        'libs/gtkmm2ext',
-        'gtk2_ardour',
-        'libs/clearlooks'
         ]
 
 #
-- 
1.5.4.1

2008-04-26 08:36

 

0007-Remove-unused-code-from-SConstruct-relating-to-libgl.patch (1,737 bytes)   
From cac26b47c9925c0bb16d922811d3b64d998059b8 Mon Sep 17 00:00:00 2001
From: Tim Mayberry <mojofunk@gmail.com>
Date: Fri, 25 Apr 2008 18:24:15 +1000
Subject: [PATCH] Remove unused code from SConstruct relating to libglademm

---
 SConstruct |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/SConstruct b/SConstruct
index a5eb82d..8901a1d 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1051,10 +1051,6 @@ if env['SYSLIBS']:
                                     LIBPATH='#libs/libsndfile',
                                     CPPPATH=['#libs/libsndfile/src'])
 
-#    libraries['libglademm'] = LibraryInfo()
-#    libraries['libglademm'].ParseConfig ('pkg-config --cflags --libs libglademm-2.4')
-
-#    libraries['flowcanvas'] = LibraryInfo(LIBS='flowcanvas', LIBPATH='#/libs/flowcanvas', CPPPATH='#libs/flowcanvas')
     libraries['soundtouch'] = LibraryInfo()
     #libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs soundtouch-1.0')
     # Comment the previous line and uncomment this for Debian:
@@ -1093,9 +1089,6 @@ else:
     libraries['sndfile-ardour'] = LibraryInfo(LIBS='libsndfile-ardour',
                                     LIBPATH='#libs/libsndfile',
                                     CPPPATH=['#libs/libsndfile', '#libs/libsndfile/src'])
-#    libraries['libglademm'] = LibraryInfo(LIBS='libglademm',
-#                                          LIBPATH='#libs/libglademm',
-#                                          CPPPATH='#libs/libglademm')
     libraries['appleutility'] = LibraryInfo(LIBS='libappleutility',
                                             LIBPATH='#libs/appleutility',
                                             CPPPATH='#libs/appleutility')
-- 
1.5.4.1

2008-04-26 08:36

 

0008-Remove-duplicate-definitions-in-SConstruct.patch (2,678 bytes)   
From 2730b446937b0037ae76937738e9159323b27be5 Mon Sep 17 00:00:00 2001
From: Tim Mayberry <mojofunk@gmail.com>
Date: Fri, 25 Apr 2008 18:30:12 +1000
Subject: [PATCH] Remove duplicate definitions in SConstruct

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

diff --git a/SConstruct b/SConstruct
index 8901a1d..42d1c32 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1006,6 +1006,15 @@ gtk_subdirs = [
 	'libs/clearlooks'
 	]
 
+# cannot use system one for the time being
+libraries['sndfile-ardour'] = LibraryInfo(LIBS='libsndfile-ardour',
+		LIBPATH='#libs/libsndfile',
+		CPPPATH=['#libs/libsndfile/src'])
+
+libraries['appleutility'] = LibraryInfo(LIBS='libappleutility',
+		LIBPATH='#libs/appleutility',
+		CPPPATH='#libs/appleutility')
+
 if env['SYSLIBS']:
 
     syslibdeps = \
@@ -1043,23 +1052,11 @@ if env['SYSLIBS']:
     libraries['libgnomecanvasmm'] = LibraryInfo()
     libraries['libgnomecanvasmm'].ParseConfig ('pkg-config --cflags --libs libgnomecanvasmm-2.6')
 
-#
-# cannot use system one for the time being
-#
-    
-    libraries['sndfile-ardour'] = LibraryInfo(LIBS='libsndfile-ardour',
-                                    LIBPATH='#libs/libsndfile',
-                                    CPPPATH=['#libs/libsndfile/src'])
-
     libraries['soundtouch'] = LibraryInfo()
     #libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs soundtouch-1.0')
     # Comment the previous line and uncomment this for Debian:
     libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs libSoundTouch')
 
-    libraries['appleutility'] = LibraryInfo(LIBS='libappleutility',
-                                            LIBPATH='#libs/appleutility',
-                                            CPPPATH='#libs/appleutility')
-
 else:
     libraries['sigc2'] = LibraryInfo(LIBS='sigc++2',
                                     LIBPATH='#libs/sigc++2',
@@ -1086,12 +1083,6 @@ else:
     libraries['soundtouch'] = LibraryInfo(LIBS='soundtouch',
                                           LIBPATH='#libs/soundtouch',
                                           CPPPATH=['#libs', '#libs/soundtouch'])
-    libraries['sndfile-ardour'] = LibraryInfo(LIBS='libsndfile-ardour',
-                                    LIBPATH='#libs/libsndfile',
-                                    CPPPATH=['#libs/libsndfile', '#libs/libsndfile/src'])
-    libraries['appleutility'] = LibraryInfo(LIBS='libappleutility',
-                                            LIBPATH='#libs/appleutility',
-                                            CPPPATH='#libs/appleutility')
 
     subdirs += [
         'libs/sigc++2',
-- 
1.5.4.1

2008-04-26 08:37

 

0009-Add-RUBBERBAND-SCons-option-and-enable-it-by-default.patch (2,499 bytes)   
From 841568bfa71cf1f593f62d393ae5a60da3317f8e Mon Sep 17 00:00:00 2001
From: Tim Mayberry <mojofunk@gmail.com>
Date: Fri, 25 Apr 2008 22:17:27 +1000
Subject: [PATCH] Add RUBBERBAND SCons option and enable it by default as fftw is a required dependency

---
 SConstruct |   27 ++++++---------------------
 1 files changed, 6 insertions(+), 21 deletions(-)

diff --git a/SConstruct b/SConstruct
index 42d1c32..782a0b6 100644
--- a/SConstruct
+++ b/SConstruct
@@ -49,6 +49,7 @@ opts.AddOptions(
     BoolOption('LIBLO', 'Compile with support for liblo library', 1),
     BoolOption('NLS', 'Set to turn on i18n support', 1),
     PathOption('PREFIX', 'Set the install "prefix"', '/usr/local'),
+    BoolOption('RUBBERBAND', 'Use Rubberband library for time stretching functionality', 1),
     BoolOption('SURFACES', 'Build support for control surfaces', 1),
     BoolOption('SYSLIBS', 'USE AT YOUR OWN RISK: CANCELS ALL SUPPORT FROM ARDOUR AUTHORS: Use existing system versions of various libraries instead of internal ones', 0),
     BoolOption('UNIVERSAL', 'Compile as universal binary.  Requires that external libraries are already universal.', 0),
@@ -818,27 +819,11 @@ libraries['vamphost'] = LibraryInfo (LIBS='vamphostsdk',
                                  LIBPATH='#libs/vamp-sdk',
                                  CPPPATH='#libs/vamp-sdk')
 
-env['RUBBERBAND'] = False
-
-conf = Configure (env)
-
-if conf.CheckHeader ('fftw3.h'):
-    env['RUBBERBAND'] = True
-    libraries['rubberband'] = LibraryInfo (LIBS='rubberband',
-                                           LIBPATH='#libs/rubberband',
-                                           CPPPATH='#libs/rubberband',
-                                           CCFLAGS='-DUSE_RUBBERBAND')
-else:
-    print ""
-    print "-------------------------------------------------------------------------"
-    print "You do not have the FFTW single-precision development package installed."
-    print "This prevents Ardour from using the Rubberband library for timestretching"
-    print "and pitchshifting. It will fall back on SoundTouch for timestretch, and "
-    print "pitchshifting will not be available."
-    print "-------------------------------------------------------------------------"
-    print ""
-
-conf.Finish()
+if env['RUBBERBAND']:
+	libraries['rubberband'] = LibraryInfo (LIBS='rubberband',
+			LIBPATH='#libs/rubberband',
+			CPPPATH='#libs/rubberband',
+			CCFLAGS='-DUSE_RUBBERBAND')
 
 #
 # Check for libusb
-- 
1.5.4.1

2008-04-26 08:37

 

0010-Use-system-versions-of-the-vamp-and-rubberband-libra.patch (4,863 bytes)   
From c5a33b59182f115072745e1201899fd09ccfd1aa Mon Sep 17 00:00:00 2001
From: Tim Mayberry <mojofunk@gmail.com>
Date: Sat, 26 Apr 2008 16:06:08 +1000
Subject: [PATCH] Use system versions of the vamp and rubberband libraries when SYSLIBS=1

---
 SConstruct |   68 ++++++++++++++++++++++++++++++-----------------------------
 1 files changed, 35 insertions(+), 33 deletions(-)

diff --git a/SConstruct b/SConstruct
index 782a0b6..6c04ffb 100644
--- a/SConstruct
+++ b/SConstruct
@@ -807,24 +807,6 @@ def prep_libcheck(topenv, libinfo):
 
 prep_libcheck(env, env)
 
-
-#
-# these are part of the Ardour source tree because they are C++
-# 
-
-libraries['vamp'] = LibraryInfo (LIBS='vampsdk',
-                                 LIBPATH='#libs/vamp-sdk',
-                                 CPPPATH='#libs/vamp-sdk')
-libraries['vamphost'] = LibraryInfo (LIBS='vamphostsdk',
-                                 LIBPATH='#libs/vamp-sdk',
-                                 CPPPATH='#libs/vamp-sdk')
-
-if env['RUBBERBAND']:
-	libraries['rubberband'] = LibraryInfo (LIBS='rubberband',
-			LIBPATH='#libs/rubberband',
-			CPPPATH='#libs/rubberband',
-			CCFLAGS='-DUSE_RUBBERBAND')
-
 #
 # Check for libusb
 
@@ -981,7 +963,6 @@ subdirs = [
 # tests internally to avoid compilation etc
 # if COREAUDIO is not set
 	'libs/appleutility',
-        'libs/vamp-sdk',
         'libs/vamp-plugins'
 	]
 
@@ -1000,13 +981,20 @@ libraries['appleutility'] = LibraryInfo(LIBS='libappleutility',
 		LIBPATH='#libs/appleutility',
 		CPPPATH='#libs/appleutility')
 
+if env['RUBBERBAND']:
+        env.Append(CCFLAGS="-DUSE_RUBBERBAND")
+
 if env['SYSLIBS']:
 
     syslibdeps = \
     {
         'sigc++-2.0'           : '2.0',
         'gtkmm-2.4'            : '2.8',
-        'libgnomecanvasmm-2.6' : '2.12.0'
+        'libgnomecanvasmm-2.6' : '2.12.0',
+        'libSoundTouch'        : '1.2.1',
+        'vamp-sdk'             : '1.1',
+        'vamp-hostsdk'         : '1.1',
+        'rubberband'           : '1.0'
     }
 
     conf = Configure(env, custom_tests = { 'CheckPKGConfig' : CheckPKGConfig,
@@ -1036,11 +1024,16 @@ if env['SYSLIBS']:
     libraries['pangomm'].ParseConfig ('pkg-config --cflags --libs pangomm-1.4')
     libraries['libgnomecanvasmm'] = LibraryInfo()
     libraries['libgnomecanvasmm'].ParseConfig ('pkg-config --cflags --libs libgnomecanvasmm-2.6')
-
     libraries['soundtouch'] = LibraryInfo()
-    #libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs soundtouch-1.0')
-    # Comment the previous line and uncomment this for Debian:
     libraries['soundtouch'].ParseConfig ('pkg-config --cflags --libs libSoundTouch')
+    libraries['vamp'] = LibraryInfo()
+    libraries['vamp'].ParseConfig ('pkg-config --cflags --libs vamp-sdk')
+    libraries['vamphost'] = LibraryInfo()
+    libraries['vamphost'].ParseConfig ('pkg-config --cflags --libs vamp-hostsdk')
+
+    if env['RUBBERBAND']:
+        libraries['rubberband'] = LibraryInfo()
+        libraries['rubberband'].ParseConfig ('pkg-config --cflags --libs rubberband')
 
 else:
     libraries['sigc2'] = LibraryInfo(LIBS='sigc++2',
@@ -1069,8 +1062,25 @@ else:
                                           LIBPATH='#libs/soundtouch',
                                           CPPPATH=['#libs', '#libs/soundtouch'])
 
+    libraries['vamp'] = LibraryInfo (LIBS='vampsdk',
+                    LIBPATH='#libs/vamp-sdk',
+                    CPPPATH='#libs/vamp-sdk')
+
+    libraries['vamphost'] = LibraryInfo (LIBS='vamphostsdk',
+                    LIBPATH='#libs/vamp-sdk',
+                    CPPPATH='#libs/vamp-sdk')
+
+    if env['RUBBERBAND']:
+        libraries['rubberband'] = LibraryInfo (LIBS='rubberband',
+                        LIBPATH='#libs/rubberband',
+                        CPPPATH='#libs/rubberband')
+        subdirs += ['libs/rubberband']
+
+
     subdirs += [
         'libs/sigc++2',
+        'libs/soundtouch',
+        'libs/vamp-sdk'
         ]
     
     gtk_subdirs += [
@@ -1079,7 +1089,7 @@ else:
         'libs/gtkmm2/atk',
         'libs/gtkmm2/gdk',
         'libs/gtkmm2/gtk',
-        'libs/libgnomecanvasmm',
+        'libs/libgnomecanvasmm'
         ]
 
 #
@@ -1115,14 +1125,6 @@ else:
     env['POWERMATE'] = 0
     env['TRANZPORT'] = 0
 
-#
-# timestretch libraries
-#
-
-timefx_subdirs = ['libs/soundtouch']
-if env['RUBBERBAND']:
-    timefx_subdirs += ['libs/rubberband']
-
 opts.Save('scache.conf', env)
 Help(opts.GenerateHelpText(env))
 
@@ -1281,7 +1283,7 @@ env.AddPostAction (srcdist, Action ('rm -rf ' + str (File (env['DISTTREE']))))
 for subdir in coredirs:
     SConscript (subdir + '/SConscript')
 
-for sublistdir in [ subdirs, timefx_subdirs, gtk_subdirs, surface_subdirs ]:
+for sublistdir in [ subdirs, gtk_subdirs, surface_subdirs ]:
     for subdir in sublistdir:
         SConscript (subdir + '/SConscript')
 
-- 
1.5.4.1

2008-04-26 08:37

 

0011-Add-LIBDIR-scons-option-for-manually-specifying-the.patch (1,395 bytes)   
From 33ce20f05ba8864711fc58717be1898d139dd1d9 Mon Sep 17 00:00:00 2001
From: Tim Mayberry <mojofunk@gmail.com>
Date: Sat, 26 Apr 2008 16:53:36 +1000
Subject: [PATCH] Add LIBDIR scons option for manually specifying the library directory name

---
 SConstruct |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/SConstruct b/SConstruct
index 6c04ffb..87dcaf2 100644
--- a/SConstruct
+++ b/SConstruct
@@ -31,6 +31,7 @@ subst_dict = { }
 opts = Options('scache.conf')
 opts.AddOptions(
     ('ARCH', 'Set architecture-specific compilation flags by hand (all flags as 1 argument)',''),
+    ('LIBDIR', 'Set the name of the directory to be used when installing libraries',''),
     ('WINDOWS_KEY', 'Set X Modifier (Mod1,Mod2,Mod3,Mod4,Mod5) for "Windows" key', 'Mod4'),
     BoolOption('AUDIOUNITS', 'Compile with Apple\'s AudioUnit library. (experimental)', 0),
     BoolOption('COREAUDIO', 'Compile with Apple\'s CoreAudio library', 0),
@@ -715,11 +716,11 @@ if env['FPU_OPTIMIZATION']:
 # end optimization section
 
 # handle x86/x86_64 libdir properly
-
-if env['DIST_TARGET'] == 'x86_64':
-    env['LIBDIR']='lib64'
-else:
-    env['LIBDIR']='lib'
+if not env['LIBDIR']:
+        if env['DIST_TARGET'] == 'x86_64':
+                env['LIBDIR']='lib64'
+        else:
+                env['LIBDIR']='lib'
 
 #
 # a single way to test if we're on OS X
-- 
1.5.4.1

2008-04-26 08:38

 

0012-Override-all-default-compiler-optimization-flags-if.patch (942 bytes)   
From 3f3ccff777c5ee4ada10853bb92e71406f66c29a Mon Sep 17 00:00:00 2001
From: Tim Mayberry <mojofunk@gmail.com>
Date: Sat, 26 Apr 2008 17:47:18 +1000
Subject: [PATCH] Override all default compiler optimization flags if ARCH option is set

---
 SConstruct |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/SConstruct b/SConstruct
index 87dcaf2..37d8512 100644
--- a/SConstruct
+++ b/SConstruct
@@ -739,14 +739,6 @@ else:
 #
 env.Append(CONFIG_ARCH=config[config_arch])
 
-
-#
-# ARCH="..." overrides all
-#
-
-if env['ARCH'] != '':
-    opt_flags = env['ARCH'].split()
-
 #
 # prepend boiler plate optimization flags
 #
@@ -759,6 +751,13 @@ opt_flags[:0] = [
     "-pipe"
     ]
 
+#
+# ARCH="..." overrides all
+#
+
+if env['ARCH']:
+    opt_flags = env['ARCH'].split()
+
 if env['DEBUG'] == 1:
     env.Append(CCFLAGS=" ".join (debug_flags))
     env.Append(LINKFLAGS=" ".join (debug_flags))
-- 
1.5.4.1

timbyr

2008-04-26 08:48

developer   ~0004905

I've attached a series of patches against 2.0-ongoing@3290 that should hopefully address all the issues that were brought up. The first few patches are small unrelated cleanups that were in the local branch that I was working in that might aswell get review.

Paul if these are ok to push just let me know.

I also noticed that using the system version of the soundtouch library on Fedora for time stretching doesn't work properly.

jwrdegoede

2008-04-26 09:01

reporter   ~0004906

The patch series posted by timbyr addresses all my concerns, thanks!

paul

2008-04-26 12:50

administrator   ~0004907

Tim, I agree with all except 0009, which has implications for the specifics of 0010 as well. rubberband is not a compile-time selectable choice, and is not intended to become so. if there is any code relating to it that treats it as such, its that which should be changed.

timbyr

2008-04-27 00:54

developer   ~0004908

Paul, I added the scons options because currently using rubberband for time stretching is conditional on whether the fftw headers are installed. As the build has required fftw for several months rubberband will always be enabled and the check is superfluous.

It is my understanding that using rubberband for time stretching *is* a compile time selection and that all code relating to time stretching treats it as such by using the USE_RUBBERBAND conditional. If it is your intention to change this so that both implementations are built and the user selects between using rubberband or soundtouch for time stretching then I agree that it sounds like a good idea but not something I intended to address with these patches.

Issue History

Date Modified Username Field Change
2008-04-07 13:58 jwrdegoede New Issue
2008-04-07 13:58 jwrdegoede File Added: ardour-2.1-SConstruct.patch
2008-04-17 06:14 paul Note Added: 0004870
2008-04-17 06:59 jwrdegoede Note Added: 0004875
2008-04-17 07:00 jwrdegoede Note Added: 0004876
2008-04-18 02:15 paul Note Added: 0004878
2008-04-24 13:33 jwrdegoede Note Added: 0004898
2008-04-26 08:34 timbyr File Added: 0001-Check-for-that-required-dependencies-fftw3-and-fftw3.patch
2008-04-26 08:34 timbyr File Added: 0002-Don-t-check-for-fftw3-header-when-building-with-FFT_.patch
2008-04-26 08:35 timbyr File Added: 0003-Use-CheckPKGVersion-instead-of-CheckPKGExists-to-che.patch
2008-04-26 08:35 timbyr File Added: 0004-Remove-unused-utility-function-in-SConstruct.patch
2008-04-26 08:35 timbyr File Added: 0005-Use-CheckPKGVersion-to-check-for-libcurl-version-sup.patch
2008-04-26 08:35 timbyr File Added: 0006-Remove-duplication-in-lists-containing-build-directo.patch
2008-04-26 08:36 timbyr File Added: 0007-Remove-unused-code-from-SConstruct-relating-to-libgl.patch
2008-04-26 08:36 timbyr File Added: 0008-Remove-duplicate-definitions-in-SConstruct.patch
2008-04-26 08:37 timbyr File Added: 0009-Add-RUBBERBAND-SCons-option-and-enable-it-by-default.patch
2008-04-26 08:37 timbyr File Added: 0010-Use-system-versions-of-the-vamp-and-rubberband-libra.patch
2008-04-26 08:37 timbyr File Added: 0011-Add-LIBDIR-scons-option-for-manually-specifying-the.patch
2008-04-26 08:38 timbyr File Added: 0012-Override-all-default-compiler-optimization-flags-if.patch
2008-04-26 08:48 timbyr Note Added: 0004905
2008-04-26 09:01 jwrdegoede Note Added: 0004906
2008-04-26 12:50 paul Note Added: 0004907
2008-04-27 00:54 timbyr Note Added: 0004908
2009-10-20 09:30 cth103 Status new => assigned
2009-10-20 09:30 cth103 Assigned To => paul