Tag Archives: fail

[SOLVED] CyanogenMod build issues on Debian “wheezy” (testing)

0
Filed under CyanogenMod, Wheezy
Tagged as , , , , , , , ,

So, with all of the recent changes in the CyanogenMod codebase, I decided that I wanted to build my own ROM from source.

I have done this in the past, on Debian testing, with no issues. Though, it has been a while since I’ve built from source, as I’ve been using the official nightly builds.

So I did my typical things:

repo sync
source build/envsetup.sh
lunch cyanogen_crespo-eng
make -j12 bacon

Everything seemed to be working correctly at first…and then…:

target thumb C: init <= system/core/init/parser.c
system/core/cpio/mkbootfs.c: In function ‘_eject’:
system/core/cpio/mkbootfs.c:82:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
target thumb C: init <= system/core/init/logo.c
In file included from /usr/include/bits/errno.h:25:0,
                 from /usr/include/errno.h:36,
                 from build/tools/acp/acp.c:22:
/usr/include/linux/errno.h:4:23: fatal error: asm/errno.h: No such file or directory
compilation terminated.
In file included from /usr/include/bits/errno.h:25:0,
                 from /usr/include/errno.h:36,
                 from build/libs/host/CopyFile.c:24:
/usr/include/linux/errno.h:4:23: fatal error: asm/errno.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/CopyFile.o] Error 1
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

After doing some research, I discovered that the files in question should be located in the package linux-libc-dev. Interestingly, this package was already installed and current on my system.

So I started digging in...

I discovered bug 638418 on Debian's bug tracker. It seems as if the problem is fixed in sid, however, it is not yet fixed in wheezy.

So, to over-ride the bug, we can manually intervene, and create the symlink ourselves.

sudo ln -s /usr/include/`uname -m`-linux-gnu/asm/ /usr/include/asm

This fixes the build issues, however, I am unsure of the long-term implications of this workaround. I am not sure if we will have issues when we update our packages to the version where this is corrected (ie, the packages can't make the symlink themselves because it's already present.) If this is the case, we may need to remove the symlink manually:

sudo rm /usr/include/asm

In the meantime, enjoy! Have fun building KANGs!

Easy AdSense by Unreal