id summary reporter owner description type status priority milestone component version resolution keywords cc device_name 381 Change order of build system's jack detection lilrc jwoithe Greetings developers!\r\n\r\nThe build system currently checks the jack version by first trying to execute jackd and then, if jackd does not work, trying to find pkg-config files. To make ffado build properly in Gentoo the check using jackd must be avoided, since calling jackd from the build system causes the build to fail with a so called sandbox error (jackd tries to write outside the build directory). To avoid calling jackd a patch has been used. The problem is that whenever the source code of that part of the build system changes this patch have to be re-written.\r\n\r\nThus, I have written a patch that simply swaps the two checks, so that the pkg-config files are checked before jackd is called. This preserves the intent to not force users to have jack pkg-config files just to build ffado as well as it removes the need for additional downstream patching. Since the patch does not remove any functionality I believe it is alright to apply here (upstream).\r\n\r\nHere is the patch:\r\n{{{\r\nIndex: SConstruct\r\n===================================================================\r\n--- SConstruct_(revision 2574)\r\n+++ SConstruct_(working copy)\r\n@@ -250,21 +250,22 @@\r\n # Provide a way for users to compile newer libffado which will work \r\n # against older jack installations which will not accept the new API\r\n # version reported at runtime.\r\n- jackd_ver = CheckJackdVer()\r\n- if (jackd_ver != -1):\r\n- # If jackd is available, use the version number reported by it. This\r\n- # means users don't have to have jack development files present on\r\n- # their system for this to work.\r\n- have_jack = (jackd_ver >= VersionInt('0.0.0'))\r\n- good_jack1 = (jackd_ver < VersionInt('1.9.0')) and (jackd_ver >= VersionInt('0.121.4'))\r\n- good_jack2 = (jackd_ver >= VersionInt('1.9.9'))\r\n- else:\r\n- # Jackd is not runnable. Attempt to identify a version from\r\n- # pkgconfig on the off-chance jack details are available from there.\r\n- print "Will retry jack detection using pkg-config"\r\n- have_jack = conf.CheckPKG('jack >= 0.0.0')\r\n+ # The following code tries to determine the jack version using the\r\n+ # pkg-config files. If these are not found it tries to determine the\r\n+ # version using the jackd binary. The order of these checks is\r\n+ # relevant since checking pkg-config files before calling jackd\r\n+ # reduces the work for gentoo maintainers.\r\n+ have_jack = conf.CheckPKG('jack')\r\n+ if have_jack:\r\n good_jack1 = conf.CheckPKG('jack < 1.9.0') and conf.CheckPKG('jack >= 0.122.0')\r\n good_jack2 = conf.CheckPKG('jack >= 1.9.9')\r\n+ else:\r\n+ jackd_ver = CheckJackdVer()\r\n+ if (jackd_ver != -1):\r\n+ have_jack = (jackd_ver >= VersionInt('0.0.0'))\r\n+ good_jack1 = (jackd_ver < VersionInt('1.9.0')) and (jackd_ver >= VersionInt('0.121.4'))\r\n+ good_jack2 = (jackd_ver >= VersionInt('1.9.9'))\r\n+\r\n if env['ENABLE_SETBUFFERSIZE_API_VER'] == 'auto':\r\n if not(have_jack):\r\n print """\r\n}}}\r\n\r\nThanks in advance,[[BR]]\r\nKarl enhancement closed major generic FFADO SVN (trunk) fixed build system, patch