diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2018-12-25 21:39:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-25 21:39:01 +0100 |
commit | 0c9845b38b99672e793dd35ac8cc8b2c0c2ce848 (patch) | |
tree | 9ade761d89200755f29a17385542729e17e198b1 /build | |
parent | a47a6dd6543d7804ca249ac66f9ab5f44abfdd7e (diff) | |
parent | e8c138fddd186e40cf4f17b2ff0b40a725a47a34 (diff) |
Merge pull request #1926 from ninomp/ubuntubuildfix
Fix build on Ubuntu caused by incorrect order of libraries
Diffstat (limited to 'build')
-rw-r--r-- | build/features.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/build/features.py b/build/features.py index b60b5ba06a..68469f0ffe 100644 --- a/build/features.py +++ b/build/features.py @@ -355,14 +355,18 @@ class Vamp(Feature): # If there is no system vamp-hostsdk is installed or if the version # of the installed vamp-hostsdk is less than the bundled version, # then we'll directly link the bundled vamp-hostsdk - if not conf.CheckLib('vamp-hostsdk') or not conf.CheckForPKG('vamp-plugin-sdk', '2.7.1'): + # Note: We're adding vamp-hostsdk to LIBS in sources(), so + # don't add it now in order to prevent duplication. + if not conf.CheckLib('vamp-hostsdk', autoadd=False) or not conf.CheckForPKG('vamp-plugin-sdk', '2.7.1'): self.INTERNAL_LINK = True build.env.Append(CPPPATH=['#' + self.INTERNAL_VAMP_PATH]) # Needed on Linux at least. Maybe needed elsewhere? if build.platform_is_linux: # Optionally link libdl Required for some distros. - conf.CheckLib(['dl', 'libdl']) + # Note: We can't add dl to LIBS here because it needs to be added after vamp-hostsdk. + # See: https://bugs.launchpad.net/mixxx/+bug/1804411 + conf.CheckLib(['dl', 'libdl'], autoadd=False) # FFTW3 support have_fftw3_h = conf.CheckHeader('fftw3.h') @@ -383,7 +387,13 @@ class Vamp(Feature): env.SConscript(env.File('SConscript', vamp_dir)) build.env.Append(LIBPATH=self.INTERNAL_VAMP_PATH) - build.env.Append(LIBS=['vamp-hostsdk']) + + # Add this here unconditionally because we're not adding it in configure(). + build.env.Append(LIBS=['vamp-hostsdk']) + + # Ubuntu requires dl to be specified after vamp-hostsdk. + if build.platform_is_linux: + build.env.Append(LIBS=['dl']) return ['src/analyzer/vamp/vampanalyzer.cpp', 'src/analyzer/vamp/vamppluginadapter.cpp', |