codesnake / OpenELEC.tv

Port of the OpenELEC for Amlogic-based TV boxes
http://openelec.tv
62 stars 70 forks source link

compilation stops at compiling 'amcodec' #146

Closed wwortel closed 8 years ago

wwortel commented 8 years ago

This never caused a problem until a recent upgrade of my Debian8 host. Now the compilers detect an issue in cross-compilation. The log:

CROSS COMPILE Badness: /usr/include in INCLUDEPATH: /usr/include/amcodec cc1plus: internal compiler error: in add_path, at incpath.c:463

The .mk file of libamcodec, of which amcodec is a part, does do some settings of the include paths but a check performed during compilation now thinks something is critically not ok. Google-ing on this 'Badness error' did not give much insight in how to correct this. The error seems related to part of the tools not being aware that cross-compilation is called for. As this code is critical to the functioning of Kodi I am now stuck. HELP please!!! (completely rebuilding the toolchain and OE did not solve this)

codesnake commented 8 years ago

What project and branch you are trying to compile?

wwortel commented 8 years ago

thanks; the compile is for Amlogic, M8 device. There was no problem before and now this 'Badness' has appeared after the Debian8 update on my amd64 based host. Probably not a coincidence is that in the .mk recipe and makefile of libamcodec 'HEADERS_DIR' is used. No other .mk or Makefile uses this in the entire project. Only libamcodec-45a1086/amcodec/Makefile uses HEADERS_DIR in an isolated way. Some tools, like glib, use xxx_HEADERS_DIR as a locally named version of the beast in their Makefile. In gcc there is an 'INSTALL_HEADERS_DIR'. Assume some pre-compile check triggers on this 'HEADERS_DIR' statement and now finds it not ok in cross-compilation. Tried to leave it out but then other errors are thrown although the 'Badness' disappears. I can try to rewrite the Makefile of libamcodec to circumvent the need for HEADERS_DIR' . Your suggestions are very welcome.

codesnake commented 8 years ago

So this error happens when you compile libamcodec or kodi?

EDIT: Basically this error means that cross-compiler got an include directory that points to host header files (such as /usr/include), instead of a directory in cross-compiler sysroot.

wwortel commented 8 years ago

tnx; the log indicates this is while compiling kodi/xbmc; there are parallel compilations going on. See added snippet from the log from where errors start to the end.

CompilerBadnessLogSnippet.txt

wwortel commented 8 years ago

Having started completely from scratch, with fresh git checkout of your OpenELEC.tv and compiling for a M8, cannot reproduce the error. So am closing this issue; thanks for having given it attention.

Two unrelated other problems emerged, just for your information:

  1. the sources for libssh are currently not reachable (worked around that by putting it on my own website and change of URL in .mk),
  2. without unsetting Amlogic 'options' 'ADDITIONAL_DRIVERS' the attempt to compile all drivers fails on dvbhdhomerun (mended it by putting "" as ADDITIONAL_DRIVERS). From there on all compiled