Project

General

Profile

Bug #185

Updated by Sven Eckelmann over 5 years ago

Running @gen-compat-autoconf.sh@ generates a broken header file ("@compat-autoconf.h@"), because the first line contains the invalid characters @-n@. This causes the build to fail with following error:

<pre><code>compat-autoconf.h:1:1: error: expected identifier or '(' before '-' token</code></pre>

This error is possibly caused by "line 8":https://git.open-mesh.org/batman-adv.git/blob/5b3eab94367eb94b8cff8af053e3c7465374a818:/gen-compat-autoconf.sh#l8 8":https://www.open-mesh.org/projects/batman-adv/repository/revisions/master/entry/gen-compat-autoconf.sh#L8 in the @gen-compat-autoconf.sh@ script. This line does **not** invoke echo with the @-n@ parameter, instead it outputs @-n@ literally which is then included in the header file and causing the error.

Quote from Stack Overflow (https://stackoverflow.com/questions/13258664/echo-n-will-not-print-n/13258861#13258861): (http://stackoverflow.com/a/13258861/1532986):
> If you invoke Bash with the name sh, it will mimic sh, where the -n option was not available to echo. (…)

Possible fix:
I think line 8 is redundant, because line 39 would create the file anyway. If you want an alternative (to be sure) I'd suggest to replace line 8 by '@touch "${TMP}"@'.

Infos:
System: Mac OS 10.9.2
Bash: GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)
Batman: batman-adv-legacy-2014-01-24-e51bd5682e51e6afd8c914686ed675161a75b2d2 from https://github.com/freifunk-gluon/batman-adv-legacy

Back