olivluca / danube-voip

This is a sip client using the 2 FXS ports available on routers based on the Infineon Danube and running openwrt.
16 stars 10 forks source link

svd fails to build with OpenWrt master #12

Closed Luflosi closed 3 months ago

Luflosi commented 3 years ago

I successfully installed the precompiled binary package on a router running the latest stable OpenWrt release. Thank you very much for this project. I'm now trying to build this package from source with a recent version of the OpenWrt master branch. I followed the instructions from https://github.com/olivluca/danube-voip/issues/10#issuecomment-596725245 (not the git commands). But the build fails:

Last output of make ``` make[4]: Entering directory '/path/to/openwrt/build_dir/target-mips_24kc_musl/svd' make all-recursive make[5]: Entering directory '/path/to/openwrt/build_dir/target-mips_24kc_musl/svd' Making all in src make[6]: Entering directory '/path/to/openwrt/build_dir/target-mips_24kc_musl/svd/src' mips-openwrt-linux-musl-gcc -DHAVE_CONFIG_H -I. -I.. -Wunused -I/path/to/openwrt/staging_dir/target-mips_24kc_musl/usr/include/sofia-sip-1.13 -I/path/to/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/usr/include -I/path/to/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/include/fortify -I/path/to/openwrt/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/include -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/path/to/openwrt/build_dir/target-mips_24kc_musl/svd=svd -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/path/to/openwrt/staging_dir/target-mips_24kc_musl/usr/include/drv_tapi -I/path/to/openwrt/staging_dir/target-mips_24kc_musl/usr/include/libab -I/path/to/openwrt/staging_dir/target-mips_24kc_musl/usr/include/libconfig -DDONT_BIND_TO_DEVICE=1 -MT svd_cfg.o -MD -MP -MF .deps/svd_cfg.Tpo -c -o svd_cfg.o svd_cfg.c In file included from svd.h:36, from svd_cfg.c:9: sofia.h:25:10: fatal error: sofia-sip/stun_tag.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[6]: *** [Makefile:374: svd_cfg.o] Error 1 make[6]: Leaving directory '/path/to/openwrt/build_dir/target-mips_24kc_musl/svd/src' make[5]: *** [Makefile:355: all-recursive] Error 1 make[5]: Leaving directory '/path/to/openwrt/build_dir/target-mips_24kc_musl/svd' make[4]: *** [Makefile:296: all] Error 2 make[4]: Leaving directory '/path/to/openwrt/build_dir/target-mips_24kc_musl/svd' make[3]: *** [Makefile:54: /path/to/openwrt/build_dir/target-mips_24kc_musl/svd/.built] Error 2 make[3]: Leaving directory '/path/to/danube-voip/svd' time: package/feeds/custom/svd/compile#4.04#1.65#7.04 ERROR: package/feeds/custom/svd failed to build. make[2]: *** [package/Makefile:116: package/feeds/custom/svd/compile] Error 1 make[2]: Leaving directory '/path/to/openwrt' make[1]: *** [package/Makefile:110: /path/to/openwrt/staging_dir/target-mips_24kc_musl/stamp/.package_compile] Error 2 make[1]: Leaving directory '/path/to/openwrt' make: *** [/path/to/openwrt/include/toplevel.mk:230: world] Error 2 ```

I'm not sure if this is a problem with my environment or with this package.

olivluca commented 3 years ago

Currently I don't have an openwrt build system, but it seems the problem is with sofia-sip, I don't know why. Maybe now it has to be defined also as a PKG_BUILD_DEPENDS, the DEPENDS is not enough?

Luflosi commented 3 years ago

I edited svd/Makefile and replaced PKG_BUILD_DEPENDS:=libab with PKG_BUILD_DEPENDS:=libab sofia-sip but I still get the same error message. Was this what you meant? I'm happy to try any other ideas you may have.

olivluca commented 3 months ago

I just found out that you were getting sofia-sip from the telephony feed and there it is compiled with --disable-stun, hence the error. I updated this repo to build with openwrt 23.05.4 (and a custom version of sofia-sip with stun enabled), I didn't test it very thoroughly but it works (provided you manage to install all the packages: 23.05.4 is too big for this device). Better late than never :stuck_out_tongue_winking_eye: