jcorporation / myMPD

myMPD is a standalone and mobile friendly web mpd client with a tiny footprint and advanced features.
https://jcorporation.github.io/myMPD/
GNU General Public License v3.0
419 stars 65 forks source link

Wrong include path of header causes failed compilation with OpenWrt SDK #545

Closed tmn505 closed 3 years ago

tmn505 commented 3 years ago

myMPD version: 8.0.3

Mostly rax.h header path is wrong with one occurrence of sds.h, see the attached preliminary OpenWrt recipe (patches directory). OpenWrt uses some predefined macros at: https://github.com/openwrt/openwrt/blob/openwrt-21.02/include/cmake.mk#L47 I don't know what exactly causes the strict handling of headers, since I don't know much about cmake.

Steps to reproduce the behavior:

  1. Download https://downloads.openwrt.org/releases/21.02.0-rc4/targets/ramips/mt76x8/openwrt-sdk-21.02.0-rc4-ramips-mt76x8_gcc-8.4.0_musl.Linux-x86_64.tar.xz
  2. Unpack SDK and run following commands:
    scripts/feeds update -a
    scripts/feeds install libpcre libflac libid3tag
  3. Unpack recipe mympd.tar.gz to package directory of SDK.
  4. Run:
    make -j1 V=s

    You can speed it up by increasing make jobs, but output won't be readable, to remedy this run:

    make -j$(nproc) BUILD_LOG=1

    and check the failed log in logs/package/mympd/compile.txt.

jcorporation commented 3 years ago

Thanks for this bug report. Is there an official myMPD package for OpenWRT?

For myMPD 8.1.0 the include strategy is reworked completely. This could fix the issues or can reproduce more issues like this.

I tried above commands but I get build errors unrelated to myMPD. Can you provide a logs/package/mympd/compile.txt?

I see a patch file. It's a shame that no one tries to merge this upstream. Runs myMPD in OpenWRT as root? Or why the root check is disabled in the patch?

tmn505 commented 3 years ago

Okay, this is weird, Yesterday the compilation (8.0.2) tripped on each include which I added to 002-fix-include-location.patch. Maybe I added some variable when creating and tuning the recipe, which persisted in SDK or environment. Now I can't reproduce the failure for 8.0.2 and 8.0.3. I'll close the bug as invalid for now. If I'll hit it again, then I'll reopen it. Sorry for the noise.

Is there an official myMPD package for OpenWRT?

No, I just started to create the package to properly integrate this project in my device. It builds and runs properly, as soon as I'll manage to add procd init script and UCI configuration, I'll submit PR to add it to contrib/packaging directory.

For myMPD 8.1.0 the include strategy is reworked completely. This could fix the issues or can reproduce more issues like this.

I'll test that branch tomorrow.

Can you provide a logs/package/mympd/compile.txt?

Unfortunately I don't have the failed one so I'll add the successful compile.txt.

I see a patch file. It's a shame that no one tries to merge this upstream.

I forgot to tell to remove the 002-fix-include-location.patch before reproducing, but now it's moot point, since I can't reproduce Yesterdays failure, and that make the patch invalid.

Runs myMPD in OpenWRT as root? Or why the root check is disabled in the patch?

This is only for now to shrug permission errors, I don't intend to keep the patch allowing root exec.

jcorporation commented 3 years ago

No, I just started to create the package to properly integrate this project in my device. It builds and runs properly, as soon as I'll manage to add procd init script and UCI configuration, I'll submit PR to add it to contrib/packaging directory.

This would be cool. Feel free to contact me if you need help.