From f7d6db4b34d9ca1b22bd01fd8ee97b00d2092a53 Mon Sep 17 00:00:00 2001 From: Adrian Knoth Date: Fri, 10 Feb 2012 21:10:34 +0100 Subject: [PATCH] wscript: Fix internal waf error (missing features) waf complains about missing features in the builder, so let's add some. For the sake of completeness, here's an example error message: Traceback (most recent call last): File "/home/adi/jack2/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Runner.py", line 162, in start st=tsk.runnable_status() File "/home/adi/jack2/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Task.py", line 285, in runnable_status new_sig=self.signature() File "/home/adi/jack2/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Task.py", line 274, in signature self.sig_implicit_deps() File "/home/adi/jack2/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Task.py", line 372, in sig_implicit_deps (nodes,names)=self.scan() File "/home/adi/jack2/.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Tools/c_preproc.py", line 594, in scan raise Errors.WafError('%r is missing a feature such as "c", "cxx" or "includes": '%task.generator) WafError: bld(uselib_local='clientlib', posted=True, features=[], idx=28, uselib='RT SNDFILE', meths=['process_rule', 'process_source'], prec=defaultdict(, {}), includes=['../linux', '../posix', '../common/jack', '../common'], source=[/home/adi/jack2/example-clients/capture_client.c], mappings={}, path=/home/adi/jack2/example-clients, _name='jack_rec', target='jack_rec') in /home/adi/jack2/example-clients is missing a feature such as "c", "cxx" or "includes": --- common/wscript | 1 + example-clients/wscript | 5 +++++ linux/wscript | 1 + 3 files changed, 7 insertions(+) diff --git a/common/wscript b/common/wscript index 6db9bcc4..e220d704 100644 --- a/common/wscript +++ b/common/wscript @@ -16,6 +16,7 @@ def configure(conf): def create_jack_process_obj(bld, target, sources, uselib = None): process = bld.new_task_gen('cxx', 'shlib') + process.features += 'cxx' process.env['shlib_PATTERN'] = '%s.so' process.defines = ['HAVE_CONFIG_H','SERVER_SIDE'] if bld.env['IS_MACOSX']: diff --git a/example-clients/wscript b/example-clients/wscript index 40108173..3f15dcd9 100644 --- a/example-clients/wscript +++ b/example-clients/wscript @@ -111,6 +111,7 @@ def build(bld): if bld.env['BUILD_EXAMPLE_CLIENT_REC']: prog = bld.new_task_gen('cc', 'program') + prog.features += 'cc' prog.includes = os_incdir + ['../common/jack', '../common'] prog.source = 'capture_client.c' if bld.env['IS_MACOSX']: @@ -127,6 +128,7 @@ def build(bld): if bld.env['IS_LINUX'] or bld.env['IS_MACOSX']: prog = bld.new_task_gen('cc', 'program') + prog.features += 'cc' prog.includes = os_incdir + ['../common/jack', '../common'] prog.source = ['netsource.c', '../common/netjack_packet.c'] prog.env.append_value("CCFLAGS", "-DNO_JACK_ERROR") @@ -136,6 +138,7 @@ def build(bld): if bld.env['IS_LINUX'] and bld.env['BUILD_EXAMPLE_ALSA_IO']: prog = bld.new_task_gen('cc', 'program') + prog.features += 'cc' prog.includes = os_incdir + ['../common/jack', '../common'] prog.source = ['alsa_in.c', '../common/memops.c'] prog.env.append_value("CCFLAGS", "-DNO_JACK_ERROR") @@ -144,6 +147,7 @@ def build(bld): prog.target = 'alsa_in' prog = bld.new_task_gen('cc', 'program') + prog.features += 'cc' prog.includes = os_incdir + ['../common/jack', '../common'] prog.source = ['alsa_out.c', '../common/memops.c'] prog.env.append_value("CCFLAGS", "-DNO_JACK_ERROR") @@ -153,6 +157,7 @@ def build(bld): for example_lib, example_lib_source in list(example_libs.items()): lib = bld.new_task_gen('cc', 'shlib') + lib.features += 'cc' lib.env['shlib_PATTERN'] = '%s.so' lib.includes = os_incdir + ['../common/jack', '../common'] lib.target = example_lib diff --git a/linux/wscript b/linux/wscript index 5e828255..45edc6a1 100644 --- a/linux/wscript +++ b/linux/wscript @@ -33,6 +33,7 @@ def create_jack_driver_obj(bld, target, sources, uselib = None): def build(bld): if bld.env['BUILD_JACKD'] == True: jackd = bld.new_task_gen('cxx', 'program') + jackd.features += 'cxx' jackd.includes = ['../linux', '../posix', '../common/jack', '../common', '../dbus'] jackd.defines = ['HAVE_CONFIG_H','SERVER_SIDE'] jackd.source = ['../common/Jackdmp.cpp']