SoundScapeRenderer / ssr

Main source code repository for the SoundScape Renderer
http://spatialaudio.net/ssr/
GNU General Public License v3.0
134 stars 53 forks source link

Fix exit code of ssr --help/--version, print to stdout #330

Closed mgeier closed 1 year ago

mgeier commented 1 year ago

325 has broken CircleCI, because make distcheck seems to check the output of ssr --help and ssr --version.

mgeier commented 1 year ago

CircleCI log: https://app.circleci.com/pipelines/github/mgeier/ssr/627/workflows/cb64beed-4446-455b-bb68-5d6ab34c38e4/jobs/678

mgeier commented 1 year ago

Yes they should, but make distcheck complains if --help or --version produce anything on stderr, so I used stdout for everything.

But then I put in a bit more effort and selected the output depending on the flags: 3e04e77eab16161249e0dc96edf3c4aaed6b26c7

umlaeute commented 1 year ago

Yes they should, but make distcheck complains if --help or --version produce anything on stderr, so I used stdout for everything.

then there's someting wrong with make distcheck.

umlaeute commented 1 year ago

but make distcheck complains

then there's someting wrong with make distcheck.

do you have any logs that show how make distcheck complains? (it probably is a typo and should read make check; but even so i would like to see the complaint/error/..., as i haven't been able to find it yet...)

mgeier commented 1 year ago

Yes I do, the build of the current master is failing: https://app.circleci.com/pipelines/github/SoundScapeRenderer/ssr/282/workflows/6d3142ed-0089-4e8a-8de0-b3db800b2b88/jobs/288

I might have misinterpreted the logs, though.

I guess that's the relevant part:

bad=0; pid=$$; list="ssr"; for p in $list; do \
  case '  ' in \
   *" $p "* | *" ../../../data/$p "*) continue;; \
  esac; \
  f=`echo "$p" | sed 's,^.*/,,;s,x,x,'`; \
  for opt in --help --version; do \
    if "/root/checkout/ssr-0.5.0-272-ge93451a/_inst/bin/$f" $opt >c${pid}_.out \
         2>c${pid}_.err </dev/null \
     && test -n "`cat c${pid}_.out`" \
     && test -z "`cat c${pid}_.err`"; then :; \
    else echo "$f does not support $opt" 1>&2; bad=1; fi; \
  done; \
done; rm -f c${pid}_.???; exit $bad
ssr does not support --help
ssr does not support --version
make[3]: *** [Makefile:513: installcheck-dist_binSCRIPTS] Error 1

I'm using make distcheck here to create the tarball:

https://github.com/SoundScapeRenderer/ssr/blob/e93451abc995a9c9e754a6516002cbfd6c4425f5/.circleci/config.yml#L91

umlaeute commented 1 year ago

i see. then there probably is nothing wrong with your distcheck target (seeing that all this behaviour comes directly from autotools, presumable when not being run in foreign mode).

In this case I would suggest to just completely drop the non-functional ssr binary (see also #325), rather than adding more hacks to make it appear to work.

mgeier commented 1 year ago

presumable when not being run in foreign mode

I'm not sure if this is relevant, but we use foreign here:

https://github.com/SoundScapeRenderer/ssr/blob/e93451abc995a9c9e754a6516002cbfd6c4425f5/configure.ac#L59-L63

umlaeute commented 1 year ago

hmpf. i'm out of ideas for now.