Error while building CM 13 from source - Android Q&A, Help & Troubleshooting

Hello everyone!
I compile CyanogenMod 13 for my Galaxy Note 10.1. The whole process was perfect, but at the end I got an error:
Code:
Construct recovery from boot
mkdir -p /home/alex/Projects/cm13/out/target/product/n8000/obj/PACKAGING/recovery_patch_intermediates/
PATH=/home/alex/Projects/cm13/out/host/linux-x86/bin:$PATH /home/alex/Projects/cm13/out/host/linux-x86/bin/imgdiff /home/alex/Projects/cm13/out/target/product/n8000/boot.img /home/alex/Projects/cm13/out/target/product/n8000/recovery.img /home/alex/Projects/cm13/out/target/product/n8000/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p
build/tools/generate-notice-files.py /home/alex/Projects/cm13/out/target/product/n8000/obj/NOTICE.txt /home/alex/Projects/cm13/out/target/product/n8000/obj/NOTICE.html "Notices for files contained in the filesystem images in this directory:" /home/alex/Projects/cm13/out/target/product/n8000/obj/NOTICE_FILES/src
failed to reconstruct target deflate chunk 1 [(null)]; treating as normal
Traceback (most recent call last):
File "build/tools/generate-notice-files.py", line 191, in <module>
main(args)
File "build/tools/generate-notice-files.py", line 181, in main
file_md5sum = md5sum(filename)
File "build/tools/generate-notice-files.py", line 80, in md5sum
return hexify(sum.digest())
File "build/tools/generate-notice-files.py", line 65, in hexify
return ("%02x"*len(s)) % tuple(map(ord, s))
TypeError: ord() expected string of length 1, but int found
make: *** [build/core/Makefile:663: /home/alex/Projects/cm13/out/target/product/n8000/obj/NOTICE.html] Ошибка 1
make: *** Ожидание завершения заданий…
It appears when I compile system.img. Boot and recovery images were built without any problems. I assume the problem lies in NOTICE files that generates by python script. I have two options: disable notice files generating or solve this problem. But I know nothing of this.
Hope for your help.

Related

Error when Compiling from source (PA)

First of all I tried everything that could be possible before coming on here asking for help and was hoping someone would know what is wrong.
Anyways I simply resynced the REPO from github like always but when I tried compiling the new version of PA I got this error:
Code:
Downloading prebuilts
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 319k 100 319k 0 0 253k 0 0:00:01 0:00:01 --:--:-- 253k
Archive: ./proprietary/Term.apk
inflating: ./proprietary/lib/armeabi/libjackpal-androidterm4.so
Setting up environment
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/armv7-a/vendorsetup.sh
including device/semc/coconut/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including vendor/pa/vendorsetup.sh
including sdk/bash_completion/adb.bash
Lunching device
build/core/product_config.mk:196: *** _nic.PRODUCTS.[[device/semc/coconut/full_coconut.mk]]: "device/semc/mogami-common/mogami.mk" does not exist. Stop.
Device coconut not found. Attempting to retrieve device repository from CyanogenMod Github (github.c0m/CyanogenMod).
Traceback (most recent call last):
File "build/tools/roomservice.py", line 56, in <module>
result = json.loads(urllib2.urlopen(githubreq).read())
File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.6/urllib2.py", line 397, in open
response = meth(req, response)
File "/usr/lib/python2.6/urllib2.py", line 510, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.6/urllib2.py", line 435, in error
return self._call_chain(*args)
File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/lib/python2.6/urllib2.py", line 518, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: Forbidden
build/core/product_config.mk:196: *** _nic.PRODUCTS.[[device/semc/coconut/full_coconut.mk]]: "device/semc/mogami-common/mogami.mk" does not exist. Stop.
** Don't have a product spec for: 'pa_coconut'
** Do you have the right repo manifest?
Starting compilation
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:196: *** _nic.PRODUCTS.[[device/semc/coconut/full_coconut.mk]]: "device/semc/mogami-common/mogami.mk" does not exist. Stop.
Device coconut not found. Attempting to retrieve device repository from CyanogenMod Github (github.c0m/CyanogenMod).
Traceback (most recent call last):
File "build/tools/roomservice.py", line 56, in <module>
result = json.loads(urllib2.urlopen(githubreq).read())
File "/usr/lib/python2.6/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.6/urllib2.py", line 397, in open
response = meth(req, response)
File "/usr/lib/python2.6/urllib2.py", line 510, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.6/urllib2.py", line 435, in error
return self._call_chain(*args)
File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/lib/python2.6/urllib2.py", line 518, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: Forbidden
build/core/product_config.mk:196: *** _nic.PRODUCTS.[[device/semc/coconut/full_coconut.mk]]: "device/semc/mogami-common/mogami.mk" does not exist. Stop.
** Don't have a product spec for: 'pa_coconut'
** Do you have the right repo manifest?
No such item in brunch menu. Try 'breakfast'
Total time elapsed: 0 minutes (3.466118097 seconds)
Ow by the way I was compiling for wt19i but somehow it searches for an other device (atleast this is what is written when I try to compile it).
If nobody knows why is it doing this then I might just go and ask the support of the official rom on what to do.

[Q] Error when compile cm12

When i compile cm12 for s5312 devices we had error:
Install system fs image: /home/karthick/ROM/*cm12/out/target/*product/corsica/*system.img
/home/karthick/ROM/*cm12/out/target/*product/corsica/*system.img+/home/*karthick/ROM/cm12/*out/target/product/*corsica/obj/*PACKAGING/*recovery_patch_interm*ediates/*recovery_from_boot.p maxsize=1023356928 blocksize=135168 total=380108490 reserve=10407936
#@echo -e "\033[33m""Package target files:""\033[0m"" /home/karthick/ROM/*cm12/out/target/*product/corsica/obj/*PACKAGING/*target_files_intermed*iates/*cm_corsica-target_fil*es-da94839291.zip"
building image from target_files RECOVERY...
building image from target_files BOOT...
Traceback (most recent call last):
File "./build/tools/*releasetools/*make_recovery_patch",* line 53, in <module>
main(sys.argv[1:])
File "./build/tools/*releasetools/*make_recovery_patch",* line 49, in main
common.MakeRecoveryP*atch(input_dir, output_sink, recovery_img, boot_img)
File "/home/karthick/ROM/*cm12/build/tools/*releasetools/*common.py", line 1167, in MakeRecoveryPatch
td_pair = GetTypeAndDevice("/*boot", info_dict)
File "/home/karthick/ROM/*cm12/build/tools/*releasetools/*common.py", line 1118, in GetTypeAndDevice
return PARTITION_TYPES[fsta*b[mount_point].fs_ty*pe], fstab[mount_point].d*evice
KeyError: '/boot'
build/core/*Makefile:1422: recipe for target '/home/karthick/ROM/*cm12/out/target/*product/corsica/obj/*PACKAGING/*target_files_intermed*iates/*cm_corsica-target_fil*es-da94839291.zip' failed
Please help us to solve this problem. Thank you

[Q] Cyanogenmod libandroid_runtime build error

hi guys,
i recently did a repo sync and ran the 'brunch codina' command.
almost all went well except for this:
Code:
frameworks/base/core/jni/android/graphics/Paint.cpp:809: error: undefined reference to 'android::uirenderer::Blur::convertRadiusToSigma(float)'
collect2: error: ld returned 1 exit status
build/core/shared_library_internal.mk:68: recipe for target '/home/ishtiaque/CM12/android/system/out/target/product/codina/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/LINKED/libandroid_runtime.so' failed
make: *** [/home/ishtiaque/CM12/android/system/out/target/product/codina/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/LINKED/libandroid_runtime.so] Error 1
make: *** Waiting for unfinished jobs....
any workaround to this problem?
thanks
ishtiaque9 said:
hi guys,
i recently did a repo sync and ran the 'brunch codina' command.
almost all went well except for this:
Code:
frameworks/base/core/jni/android/graphics/Paint.cpp:809: error: undefined reference to 'android::uirenderer::Blur::convertRadiusToSigma(float)'
collect2: error: ld returned 1 exit status
build/core/shared_library_internal.mk:68: recipe for target '/home/ishtiaque/CM12/android/system/out/target/product/codina/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/LINKED/libandroid_runtime.so' failed
make: *** [/home/ishtiaque/CM12/android/system/out/target/product/codina/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/LINKED/libandroid_runtime.so] Error 1
make: *** Waiting for unfinished jobs....
any workaround to this problem?
thanks
Click to expand...
Click to collapse
I have the same problem, do you solved it???
dankocher said:
I have the same problem, do you solved it???
Click to expand...
Click to collapse
you can try clearing up your source dir and do a fresh repo sync again... that worked for me
ishtiaque9 said:
you can try clearing up your source dir and do a fresh repo sync again... that worked for me
Click to expand...
Click to collapse
Yes, thanks, I solved it
but now i have this problem
Code:
/home/daniel/android/system/out/target/product/w7ds/system.img+/home/daniel/android/system/out/target/product/w7ds/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=1389527040 blocksize=135168 total=467905175 reserve=14057472
Package target files: /home/daniel/android/system/out/target/product/w7ds/obj/PACKAGING/target_files_intermediates/cm_w7ds-target_files-b975427339.zip
Traceback (most recent call last):
File "./build/tools/releasetools/make_recovery_patch", line 53, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/make_recovery_patch", line 35, in main
OPTIONS.info_dict = common.LoadInfoDict(input_dir)
File "/home/daniel/android/system/build/tools/releasetools/common.py", line 176, in LoadInfoDict
d["fstab"] = LoadRecoveryFSTab(read_helper, d["fstab_version"], d["device_type"])
File "/home/daniel/android/system/build/tools/releasetools/common.py", line 251, in LoadRecoveryFSTab
raise ValueError("malformed recovery.fstab line: \"%s\"" % (line,))
ValueError: malformed recovery.fstab line: "/boot mtd boot"
make: *** [/home/daniel/android/system/out/target/product/w7ds/obj/PACKAGING/target_files_intermediates/cm_w7ds-target_files-b975427339.zip] Error 1
dankocher said:
Yes, thanks, I solved it
but now i have this problem
Code:
/home/daniel/android/system/out/target/product/w7ds/system.img+/home/daniel/android/system/out/target/product/w7ds/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=1389527040 blocksize=135168 total=467905175 reserve=14057472
Package target files: /home/daniel/android/system/out/target/product/w7ds/obj/PACKAGING/target_files_intermediates/cm_w7ds-target_files-b975427339.zip
Traceback (most recent call last):
File "./build/tools/releasetools/make_recovery_patch", line 53, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/make_recovery_patch", line 35, in main
OPTIONS.info_dict = common.LoadInfoDict(input_dir)
File "/home/daniel/android/system/build/tools/releasetools/common.py", line 176, in LoadInfoDict
d["fstab"] = LoadRecoveryFSTab(read_helper, d["fstab_version"], d["device_type"])
File "/home/daniel/android/system/build/tools/releasetools/common.py", line 251, in LoadRecoveryFSTab
raise ValueError("malformed recovery.fstab line: \"%s\"" % (line,))
ValueError: malformed recovery.fstab line: "/boot mtd boot"
make: *** [/home/daniel/android/system/out/target/product/w7ds/obj/PACKAGING/target_files_intermediates/cm_w7ds-target_files-b975427339.zip] Error 1
Click to expand...
Click to collapse
well for my device i'm skipping the make_recovery_patch file so i can't really tell what's the issue. maybe you should try using tabs instead of spaces in your fstab.w7ds file...

[Q] Recovery image is too large, is there any way of reducing the boot.img file size?

Hello.
I've got a Lenovo S6000 which I've extracted the boot.img from and used mkvendor.sh to generate the device tree.
The problem is such that because of the ridiculous amount of space left for the recovery and boot image, I can't compile a recovery image using:
Code:
$ make recoveryimage -j8
I've tried appending 'CFLAGS=-Os' (optimising for size) after running make clobber, but to no avail.
The exact output of the make command is as follows:
Code:
/home/george/CyanogenMod/out/target/product/s6000/boot.img maxsize=3514368 blocksize=135168 total=5062656 reserve=270336
error: /home/george/CyanogenMod/out/target/product/s6000/boot.img too large (5062656 > [3784704 - 270336])
build/core/Makefile:562: recipe for target '/home/george/CyanogenMod/out/target/product/s6000/boot.img' failed
make: *** [/home/george/CyanogenMod/out/target/product/s6000/boot.img] Error 1
make: *** Deleting file '/home/george/CyanogenMod/out/target/product/s6000/boot.img'
make: *** Waiting for unfinished jobs....
Is there an alternative recovery which is smaller than CWM which I could use? Or a work around?
Before you ask, yes, I am using a prebuilt kernel extracted from the device - I understand that that partly to blame. The source code is available but doesn't compile well (missing headers, syntax errors and annoying inline function errors to name a few).

hyphenation error

So, i get this error every single time i try to compile any Android ROM, even AOSP.
I'm sure i'm missing a package, but i can't figure out which it is, so i'm asking here for any help on identifying the problem.
Code:
FAILED: /bin/bash -c "frameworks/minikin/tools/mk_hyb_file.py external/hyphenation-patterns/da//hyph-da.pat.txt /home/gee/omni/out/target/product/shieldtablet/obj/ETC/hyph-da_intermediates/hyph-da.hyb"
602 unique nodes, 1676 total
Traceback (most recent call last):
File "frameworks/minikin/tools/mk_hyb_file.py", line 567, in <module>
main()
File "frameworks/minikin/tools/mk_hyb_file.py", line 564, in main
verify_hyb_file(out_fn, pat_fn, chr_fn, hyp_fn)
File "frameworks/minikin/tools/mk_hyb_file.py", line 529, in verify_hyb_file
ch_map, reconstructed_chr = map_to_chr(alphabet_map)
File "frameworks/minikin/tools/mk_hyb_file.py", line 440, in map_to_chr
assert len(lowercase) == 1, 'expected 1 lowercase character'
AssertionError: expected 1 lowercase character
[ 0% 17/2717] Ensure Jack server is installed and started
Jack server already installed in "/home/gee/.jack-server"
Server is already running
[ 0% 17/2717] Build hyb /home/gee/omni/out/target/pr... <- external/hyphenation-patterns/cy//hyph-cy.pat.txt
FAILED: /bin/bash -c "frameworks/minikin/tools/mk_hyb_file.py external/hyphenation-patterns/cy//hyph-cy.pat.txt /home/gee/omni/out/target/product/shieldtablet/obj/ETC/hyph-cy_intermediates/hyph-cy.hyb"
3290 unique nodes, 10601 total
Traceback (most recent call last):
File "frameworks/minikin/tools/mk_hyb_file.py", line 567, in <module>
main()
File "frameworks/minikin/tools/mk_hyb_file.py", line 564, in main
verify_hyb_file(out_fn, pat_fn, chr_fn, hyp_fn)
File "frameworks/minikin/tools/mk_hyb_file.py", line 529, in verify_hyb_file
ch_map, reconstructed_chr = map_to_chr(alphabet_map)
File "frameworks/minikin/tools/mk_hyb_file.py", line 440, in map_to_chr
assert len(lowercase) == 1, 'expected 1 lowercase character'
AssertionError: expected 1 lowercase character
[ 0% 17/2717] build /home/gee/omni/out/target/product/shieldtablet/obj/KERNEL_OBJ/usr
make: Entering directory '/home/gee/omni/kernel/nvidia/shield'
GEN /home/gee/omni/out/target/product/shieldtablet/obj/KERNEL_OBJ/Makefile
drivers/cpufreq/Kconfig:53:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:61:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:70:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:79:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:91:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:103:warning: choice value used outside its choice group
drivers/cpuquiet/Kconfig:60:warning: choice value used outside its choice group
drivers/cpuquiet/Kconfig:66:warning: choice value used outside its choice group
drivers/cpuquiet/Kconfig:73:warning: choice value used outside its choice group
#
# configuration written to .config
#
make: Leaving directory '/home/gee/omni/kernel/nvidia/shield'
make: Entering directory '/home/gee/omni/kernel/nvidia/shield'
CHK include/generated/uapi/linux/version.h
make: Leaving directory '/home/gee/omni/kernel/nvidia/shield'
[ 0% 17/2717] Build hyb /home/gee/omni/out/target/pr...xternal/hyphenation-patterns/de//hyph-de-1901.pat.txt
FAILED: /bin/bash -c "frameworks/minikin/tools/mk_hyb_file.py external/hyphenation-patterns/de//hyph-de-1901.pat.txt /home/gee/omni/out/target/product/shieldtablet/obj/ETC/hyph-de-1901_intermediates/hyph-de-1901.hyb"
8858 unique nodes, 29816 total
Traceback (most recent call last):
File "frameworks/minikin/tools/mk_hyb_file.py", line 567, in <module>
main()
File "frameworks/minikin/tools/mk_hyb_file.py", line 564, in main
verify_hyb_file(out_fn, pat_fn, chr_fn, hyp_fn)
File "frameworks/minikin/tools/mk_hyb_file.py", line 529, in verify_hyb_file
ch_map, reconstructed_chr = map_to_chr(alphabet_map)
File "frameworks/minikin/tools/mk_hyb_file.py", line 440, in map_to_chr
assert len(lowercase) == 1, 'expected 1 lowercase character'
AssertionError: expected 1 lowercase character
ninja: build stopped: subcommand failed.
make: *** [build/core/ninja.mk:158: ninja_wrapper] Error 1
The distribution is Void Linux, and yes i'd like to use my distro of choice to compile a ROm instead of having to switch to Ubuntu or Arch, where it obviously works.
I did install hyphen and about 20 other packages i thought could be the missing ones.
Thanks in advance.
Found a fix by using python 3 instead of 2 for hyphenation.
For future reference: https://github.com/CM-Huawei-P8-Development/local_manifests_gra_l09/issues/1
oh wow, same error here building for htc 10, and only started since moving from arch to void... perhaps this is void related. will mention to them.

Categories

Resources