[General Questions and Answers] david_pjimenez:
Hi XDA community!

I have been trying to build Lineage OS for Redmi NOTE 3 PRO and almost everything in the building its ok. However, when the building get 100% and it's trying to generate the image I received this error "IOError: [Errno 28] No space left on device".

OS: Arch Linux 64 bits

List of commands:

export JAVA_HOME=/usr/lib/jvm/java-x-openjdk

virtualenv2 venv

source venv/bin/activate (This is to avoid Python problms)

repo init -u https://github.com/LineageOS/android.git -b cm-14.1

repo sync

source build/envsetup.sh

breakfast kenzo

export USE_CCACHE=1

export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G" (This is to avoid Jack memory problems)

prebuilts/misc/linux-x86/ccache/ccache -M 125G

croot

brunch kenzo

Build log:

[ 99% 2054/2062] build /home/mrencrypt...t/target/product/kenzo/obj/NOTICE.html

Combining NOTICE files into HTML

Combining NOTICE files into text

[ 99% 2058/2062] Target system fs imag...G/systemimage_intermediates/system.img

BuildImage: in_dir = /home/mrencrypted/LineageOS/out/target/product/kenzo/system, out_file = /home/mrencrypted/LineageOS/out/target/product/kenzo/obj/PACKAGING/systemimage_intermediates/system.img

fs type is not ext4

Running: mkuserimg.sh -s /home/mrencrypted/LineageOS/out/target/product/kenzo/system /home/mrencrypted/LineageOS/out/target/product/kenzo/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 2684354560 -D /home/mrencrypted/LineageOS/out/target/product/kenzo/system -L system /home/mrencrypted/LineageOS/out/target/product/kenzo/root/file_contexts.bin

make_ext4fs -s -T -1 -S /home/mrencrypted/LineageOS/out/target/product/kenzo/root/file_contexts.bin -L system -l 2684354560 -a system /home/mrencrypted/LineageOS/out/target/product/kenzo/obj/PACKAGING/systemimage_intermediates/system.img /home/mrencrypted/LineageOS/out/target/product/kenzo/system /home/mrencrypted/LineageOS/out/target/product/kenzo/system

Creating filesystem with parameters:

Size: 2684354560

Block size: 4096

Blocks per group: 32768

Inodes per group: 8192

Inode size: 256

Journal blocks: 10240

Label: system

Blocks: 655360

Block groups: 20

Reserved block group size: 159

Created filesystem with 3283/163840 inodes and 304476/655360 blocks

Running ['mkuserimg.sh', '-s', '/home/mrencrypted/LineageOS/out/target/product/kenzo/system', '/home/mrencrypted/LineageOS/out/target/product/kenzo/obj/PACKAGING/systemimage_intermediates/system.img', 'ext4', 'system', '2684354560', '-D', '/home/mrencrypted/LineageOS/out/target/product/kenzo/system', '-L', 'system', '/home/mrencrypted/LineageOS/out/target/product/kenzo/root/file_contexts.bin'] command, exit code = 0

[ 99% 2059/2062] Install system fs ima...OS/out/target/product/kenzo/system.img

/home/mrencrypted/LineageOS/out/target/product/kenzo/system.img+/home/mrencrypted/LineageOS/out/target/product/kenzo/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=2740531200 blocksize=135168 total=1209454035 reserve=27709440

[ 99% 2060/2062] Package target files:...eage_kenzo-target_files-4e567fe648.zip

using prebuilt recovery.img from BOOTABLE_IMAGES...

using prebuilt boot.img from BOOTABLE_IMAGES...

putting script in bin/install-recovery.sh

running: unzip -o -q /home/mrencrypted/LineageOS/out/target/product/kenzo/obj/PACKAGING/target_files_intermediates/lineage_kenzo-target_files-4e567fe648.zip -d /tmp/targetfiles-TPGd6X

++++ boot ++++

using prebuilt boot.img from BOOTABLE_IMAGES...

++++ recovery ++++

using prebuilt recovery.img from BOOTABLE_IMAGES...

++++ system ++++

creating system.img...

BuildImage: in_dir = /tmp/targetfiles-TPGd6X/system, out_file = /tmp/system-8A9YBm.img

fs type is not ext4

Running: mkuserimg.sh -s /tmp/targetfiles-TPGd6X/system /tmp/system-8A9YBm.img ext4 system 2684354560 -T 1230789600 -C /tmp/targetfiles-TPGd6X/META/filesystem_config.txt -B /tmp/system-blocklist-pJZNp2.map -L system /tmp/targetfiles-TPGd6X/META/file_contexts.bin

make_ext4fs -s -T 1230789600 -S /tmp/targetfiles-TPGd6X/META/file_contexts.bin -C /tmp/targetfiles-TPGd6X/META/filesystem_config.txt -B /tmp/system-blocklist-pJZNp2.map -L system -l 2684354560 -a system /tmp/system-8A9YBm.img /tmp/targetfiles-TPGd6X/system

loaded 3275 fs_config entries

Creating filesystem with parameters:

Size: 2684354560

Block size: 4096

Blocks per group: 32768

Inodes per group: 8192

Inode size: 256

Journal blocks: 10240

Label: system

Blocks: 655360

Block groups: 20

Reserved block group size: 159

Created filesystem with 3285/163840 inodes and 304857/655360 blocks

Running ['mkuserimg.sh', '-s', '/tmp/targetfiles-TPGd6X/system', '/tmp/system-8A9YBm.img', 'ext4', 'system', '2684354560', '-T', '1230789600', '-C', '/tmp/targetfiles-TPGd6X/META/filesystem_config.txt', '-B', '/tmp/system-blocklist-pJZNp2.map', '-L', 'system', '/tmp/targetfiles-TPGd6X/META/file_contexts.bin'] command, exit code = 0

++++ userdata ++++

creating userdata.img...

BuildImage: in_dir = /tmp/tmpatwxzG/data, out_file = /tmp/tmpZ0y9R0

fs type is not ext4

Running: mkf2fsuserimg.sh /tmp/tmpZ0y9R0 26838785024

in mkf2fsuserimg.sh PATH=/home/mrencrypted/LineageOS/out/host/linux-x86/bin:/home/mrencrypted/LineageOS/out/host/linux-x86/bin/:/usr/lib/jvm/java-8-openjdk-amd64/bin:/home/mrencrypted/LineageOS/out/host/linux-x86/bin:/home/mrencrypted/LineageOS/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/mrencrypted/LineageOS/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/mrencrypted/LineageOS/development/scripts:/home/mrencrypted/LineageOS/prebuilts/devtools/tools:/home/mrencrypted/LineageOS/external/selinux/prebuilts/bin:/home/mrencrypted/LineageOS/prebuilts/android-emulator/linux-x86_64:/home/mrencrypted/LineageOS/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

make_f2fs -l 26838785024 /tmp/tmpZ0y9R0

Info: zone aligned segment0 blkaddr: 512

Info: Overprovision ratio = 1.250%

Info: Overprovision segments = 323 (GC reserved = 167)

Running ['mkf2fsuserimg.sh', '/tmp/tmpZ0y9R0', '26838785024'] command, exit code = 0

userdata size (14) is 0.00% of limit (26838785024)

++++ extrauserdata ++++

++++ cache ++++

creating cache.img...

BuildImage: in_dir = /tmp/tmp1Pei6Z/cache, out_file = /tmp/tmpiP27lz

fs type is not ext4

Running: mkf2fsuserimg.sh /tmp/tmpiP27lz 268435456

in mkf2fsuserimg.sh PATH=/home/mrencrypted/LineageOS/out/host/linux-x86/bin:/home/mrencrypted/LineageOS/out/host/linux-x86/bin/:/usr/lib/jvm/java-8-openjdk-amd64/bin:/home/mrencrypted/LineageOS/out/host/linux-x86/bin:/home/mrencrypted/LineageOS/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/mrencrypted/LineageOS/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/mrencrypted/LineageOS/development/scripts:/home/mrencrypted/LineageOS/prebuilts/devtools/tools:/home/mrencrypted/LineageOS/external/selinux/prebuilts/bin:/home/mrencrypted/LineageOS/prebuilts/android-emulator/linux-x86_64:/home/mrencrypted/LineageOS/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

make_f2fs -l 268435456 /tmp/tmpiP27lz

Info: zone aligned segment0 blkaddr: 512

Info: Overprovision ratio = 15.000%

Info: Overprovision segments = 35 (GC reserved = 21)

Running ['mkf2fsuserimg.sh', '/tmp/tmpiP27lz', '268435456'] command, exit code = 0

cache size (14) is 0.00% of limit (268435456)

done.

[ 99% 2061/2062] Package OTA: /home/mr...kenzo/lineage_kenzo-ota-4e567fe648.zip

FAILED: /bin/bash -c "(echo "./build/tools/releasetools/ota_from_target_files" > /home/mrencrypted/LineageOS/out/target/product/kenzo/ota_script_path ) && (PATH=/home/mrencrypted/LineageOS/out/host/linux-x86/bin/:\$PATH MKBOOTIMG=/home/mrencrypted/LineageOS/out/host/linux-x86/bin/mkbootimg	./build/tools/releasetools/ota_from_target_files -v	--block	-p /home/mrencrypted/LineageOS/out/host/linux-x86	-k build/target/product/security/testkey	--backup=true	/home/mrencrypted/LineageOS/out/target/product/kenzo/obj/PACKAGING/target_files_intermediates/lineage_kenzo-target_files-4e567fe648.zip /home/mrencrypted/LineageOS/out/target/product/kenzo/lineage_kenzo-ota-4e567fe648.zip )"

unzipping target target-files...

running: unzip -o -q /home/mrencrypted/LineageOS/out/target/product/kenzo/obj/PACKAGING/target_files_intermediates/lineage_kenzo-target_files-4e567fe648.zip -d /tmp/targetfiles-6bTfOZ

--- target info ---

blockimgdiff_versions = (str) 1,2,3,4

blocksize = (int) 131072

boot_size = (int) 67108864

build.prop = (dict) {'persist.audio.dirac.speaker': 'true', 'ro.sys.sdcardfs': 'true', 'persist.audio.fluence.speaker': 'true', 'bluetooth.hfp.client': '1', 'audio.safx.pbe.enabled': 'true', 'dalvik.vm.isa.arm.variant': 'cortex-a53.a57', 'ro.product.cpu.abilist': 'arm64-v8a,armeabi-v7a,armeabi', 'debug.enable.sglscale': '1', 'ro.build.product': 'kenzo', 'ro.build.id': 'NOF27B', 'ro.hwui.gradient_cache_size': '1', 'dalvik.vm.stack-trace-file': '/data/anr/traces.txt', 'ro.product.cpu.abilist32': 'armeabi-v7a,armeabi', 'ro.build.selinux': '1', 'ro.qc.sdk.audio.fluencetype': 'fluence', 'tunnel.audio.encode': 'false', 'ro.frp.pst': '/dev/block/bootdevice/by-name/config', 'af.fast_track_multiplier': '1', 'dalvik.vm.lockprof.threshold': '500', 'ro.build.fingerprint': 'Xiaomi/kenzo/kenzo:6.0.1/MMB29M/6.11.24:user/release-keys', 'ro.product.manufacturer': 'Xiaomi', 'dalvik.vm.isa.arm64.features': 'default', 'audio.offload.pcm.24bit.enable': 'false', 'persist.radio.cs_srv_type': '1', 'ro.hwui.layer_cache_size': '48', 'ro.build.description': 'kenzo-user 6.0.1 MMB29M 6.11.24 release-keys', 'ro.bootimage.build.fingerprint': 'Xiaomi/lineage_kenzo/kenzo:7.1.1/NOF27B/4e567fe648:userdebug/test-keys', 'ro.product.cpu.abi': 'arm64-v8a', 'ro.sys.fw.dex2oat_thread_count': '4', 'ro.product.brand': 'Xiaomi', 'wifi.interface': 'wlan0', 'ro.cm.build.version.plat.sdk': '7', 'ro.product.model': 'Redmi Note 3', 'persist.radio.redir_party_num': '0', 'media.camera.ts.monotonic': '0', 'ro.cmlegal.url': 'https://lineageos.org/legal', 'persist.audio.fluence.voicecall': 'true', 'persist.cne.feature': '1', 'media.msm8956hw': '1', 'audio.offload.multiple.enabled': 'false', 'persist.demo.hdmirotationlock': 'false', 'ro.build.host': 'deadcrackers', 'ro.build.version.security_patch': '2017-03-05', 'telephony.lteOnCdmaDevice': '1', 'media.sf.extractor-plugin': 'libffmpeg_extractor.so', 'ro.product.locale': 'en-US', 'audio.offload.min.duration.secs': '30', 'ro.btconfig.vendor': 'qcom', 'persist.audio.fluence.voicerec': 'true', 'audio.offload.video': 'false', 'dalvik.vm.isa.arm64.variant': 'generic', 'mmp.enable.3g2': 'true', 'persist.radio.NO_STAPA': '1', 'persist.hwc.downscale_threshold': '1.15', 'persist.sys.dalvik.vm.lib.2': 'libart.so', 'persist.loc.nlp_name': 'com.qualcomm.location', 'ro.board.platform': 'msm8952', 'voice.playback.conc.disabled': 'true', 'ro.product.cpu.abilist64': 'arm64-v8a', 'audio.playback.mch.downsample': 'true', 'net.tcp.2g_init_rwnd': '10', 'ro.vendor.extension_library': 'libqti-perfd-client.so', 'persist.radio.multisim.config': 'dsds', 'persist.rild.nitz_long_ons_3': '', 'persist.rild.nitz_long_ons_2': '', 'persist.rild.nitz_long_ons_1': '', 'persist.rild.nitz_long_ons_0': '', 'ro.build.flavor': 'lineage_kenzo-userdebug', 'dalvik.vm.isa.arm.features': 'default', 'audio.deep_buffer.media': 'true', 'rild.libargs': '-d /dev/smd0', 'ro.gps.agps_provider': '1', 'persist.rild.nitz_short_ons_0': '', 'ro.build.version.release': '7.1.1', 'ro.build.version.codename': 'REL', 'DEVICE_PROVISIONED': '1', 'audio.offload.disable': '1', 'net.bt.name': 'Android', 'persist.data.netmgrd.qos.enable': 'true', 'ro.hwui.text_large_cache_width': '2048', 'persist.audio.fluence.audiorec': 'false', 'persist.radio.VT_HYBRID_ENABLE': '1', 'ro.opengles.version': '196609', 'use.voice.path.for.pcm.voip': 'true', 'persist.rild.nitz_plmn': '', 'ro.hwui.text_small_cache_height': '1024', 'ro.build.display.id': 'lineage_kenzo-userdebug 7.1.1 NOF27B 4e567fe648 test-keys', 'audio.offload.pcm.16bit.enable': 'false', 'persist.radio.hw_mbn_update': '0', 'ro.config.ringtone': 'Orion.ogg', 'persist.radio.force_on_dc': 'true', 'persist.gps.qc_nlp_in_use': '1', 'debug.egl.hw': '0', 'ro.storage_manager.enabled': 'true', 'ro.carrier': 'unknown', 'ro.product.board': 'msm8952', 'ro.build.version.preview_sdk': '0', 'ro.com.google.clientidbase': 'android-xiaomi', 'persist.radio.start_ota_daemon': '1', 'ro.cm.build.version.plat.rev': '0', 'persist.timed.enable': 'true', 'ro.build.date': 'Sun Mar 12 11:16:42 CST 2017', 'ro.use_data_netmgrd': 'true', 'persist.radio.sib16_support': '1', 'qcom.bluetooth.soc': 'smd', 'ro.build.date.utc': '1489339002', 'audio.offload.buffer.size.kb': '64', 'keyguard.no_require_sim': 'true', 'ro.qc.sdk.audio.ssr': 'false', 'voice.conc.fallbackpath': 'deep-buffer', 'persist.dpm.feature': '5', 'ro.cm.display.version': '14.1-20170312-UNOFFICIAL-kenzo', 'ro.build.version.all_codenames': 'REL', 'mm.enable.smoothstreaming': 'true', 'ro.btconfig.if': 'smd', 'persist.dbg.vt_avail_ovr': '1', 'dev.pm.dyn_samplingrate': '1', 'ro.build.type': 'userdebug', 'ro.hwui.text_small_cache_width': '1024', 'voice.record.conc.disabled': 'false', 'ro.cm.version': '14.1-20170312-UNOFFICIAL-kenzo', 'persist.radio.sw_mbn_update': '0', 'ro.product.name': 'lineage_kenzo', 'ro.hwui.drop_shadow_cache_size': '6', 'ro.build.version.base_os': '', 'ro.telephony.call_ring.multiple': 'false', 'voice.voip.conc.disabled': 'true', 'persist.data.mode': 'concurrent', 'media.sf.omx-plugin': 'libffmpeg_omx.so', 'ro.expect.recovery_id': '0x55964bed7d97eba9319ef1e465a1a86de830e81d000000000000000000000000', 'ro.telephony.default_network': '22,20', 'ro.wifi.channels': '', 'ro.hwui.r_buffer_cache_size': '8', 'persist.camera.HAL3.enabled': '1', 'ro.modversion': '14.1-20170312-UNOFFICIAL-kenzo', 'ro.build.characteristics': 'default', 'debug.mdpcomp.logs': '0', 'audio.offload.gapless.enabled': 'true', 'ro.build.version.incremental': '4e567fe648', 'ro.config.alarm_alert': 'Hassium.ogg', 'ro.hwui.text_large_cache_height': '1024', 'rild.libpath': '/vendor/lib64/libril-qc-qmi-1.so', 'ro.build.tags': 'test-keys', 'ro.sf.lcd_density': '480', 'ro.build.version.sdk': '25', 'ro.cm.releasetype': 'UNOFFICIAL', 'audio.dolby.ds2.enabled': 'true', 'persist.audio.fluence.spk.mono': 'true', 'ril.subscription.types': 'RUIM', 'persist.dpm.nsrm.bkg.evt': '3955', 'ro.build.user': 'mrencrypted', 'persist.dbg.volte_avail_ovr': '1', 'ro.hwui.path_cache_size': '32', 'ro.product.device': 'kenzo', 'debug.sf.hw': '0', 'persist.rild.nitz_short_ons_1': '', 'persist.rild.nitz_short_ons_2': '', 'persist.rild.nitz_short_ons_3': '', 'persist.radio.rat_on': 'combine', 'ro.btconfig.dev': '/dev/smd3', 'ro.hwui.texture_cache_flushrate': '0.4', 'ro.hwui.texture_cache_size': '72', 'ro.cm.device': 'kenzo', 'audio_hal.period_size': '192', 'ro.btconfig.chip': 'WCN3680', 'ro.telephony.default_cdma_sub': '0', 'persist.radio.apm_sim_not_pwdn': '1', 'persist.hwc.mdpcomp.enable': 'true', 'persist.radio.custom_ecc': '1', 'persist.sys.dun.override': '0', 'ro.config.notification_sound': 'Argon.ogg', 'audio.offload.track.enable': 'false', 'media.aac_51_output_enabled': 'true'}

cache_fs_type = (str) ext4

cache_size = (int) 268435456

default_system_dev_certificate = (str) build/target/product/security/testkey

device_type = (str) MMC

extfs_sparse_flag = (str) -s

extra_recovery_keys = (str) vendor/cm/build/target/product/security/lineage

fs_type = (str) ext4

fstab = (dict) {'/cache': <common.Partition object at 0x7fd310749690>, '/boot': <common.Partition object at 0x7fd3107492d0>, '/system': <common.Partition object at 0x7fd310749290>, '/dsp': <common.Partition object at 0x7fd3107490d0>, '/frp': <common.Partition object at 0x7fd310749150>, '/persist': <common.Partition object at 0x7fd3107496d0>, '/recovery': <common.Partition object at 0x7fd310749750>, '/firmware': <common.Partition object at 0x7fd310749250>, '/data': <common.Partition object at 0x7fd310749810>, '/misc': <common.Partition object at 0x7fd310749610>}

fstab_version = (int) 2

mkbootimg_args = (str) --ramdisk_offset 0x01000000 --tags_offset 0x00000100

mkbootimg_version_args = (str) --os_version 7.1.1 --os_patch_level 2017-03-05

multistage_support = (str) 1

ota_override_device = (str) kenzo

ota_override_prop = (str)

recovery_api_version = (int) 3

recovery_as_boot = (str)

recovery_mount_options = (str) ext4=max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc

recovery_size = (int) 67108864

selinux_fc = (str) /tmp/targetfiles-6bTfOZ/META/file_contexts.bin

squashfs_sparse_flag = (str) -s

system_size = (int) 2684354560

tool_extensions = (str) device/xiaomi/kenzo/../common

update_rename_support = (str) 1

use_set_metadata = (str) 1

userdata_size = (int) 26838785024

unable to load device-specific module; assuming none

using prebuilt recovery.img from BOOTABLE_IMAGES...

using system.img from target-files

Total of 655360 4096-byte output blocks in 6149 input chunks.

Finding transfers...

Generating digraph...

Finding vertex sequence...

Reversing backward edges...

0/0 dependencies (0.00%) were violated; 0 source blocks stashed.

Improving vertex order...

Revising stash size...

Total 0 blocks (0 bytes) are packed as new blocks due to insufficient cache size.

Reticulating splines...

1205592064 1205592064 (100.00%) new __DATA

max stashed blocks: 0 (0 bytes), limit: 214748364 bytes (0.00%)

Traceback (most recent call last):

File "./build/tools/releasetools/ota_from_target_files", line 2234, in <module>

main(sys.argv[1:])

File "./build/tools/releasetools/ota_from_target_files", line 2190, in main

WriteFullOTAPackage(input_zip, output_zip)

File "./build/tools/releasetools/ota_from_target_files", line 703, in WriteFullOTAPackage

system_diff.WriteScript(script, output_zip)

File "/home/mrencrypted/LineageOS/build/tools/releasetools/common.py", line 1515, in WriteScript

self._WriteUpdate(script, output_zip)

File "/home/mrencrypted/LineageOS/build/tools/releasetools/common.py", line 1666, in _WriteUpdate

'{}.new.dat'.format(self.partition))

File "/home/mrencrypted/LineageOS/build/tools/releasetools/common.py", line 1167, in ZipWrite

zip_file.write(filename, arcname=arcname, compress_type=compress_type)

File "/usr/lib64/python2.7/zipfile.py", line 1187, in write

self.fp.write(buf)

IOError: [Errno 28] No space left on device

ninja: build stopped: subcommand failed.

make: *** [build/core/ninja.mk:152: ninja_wrapper] Error 1

make: Leaving directory '/home/mrencrypted/LineageOS'

#### make failed to build some targets (01:14:23 (hh:mm:ss)) ####

I don't know why I'm is getting an error about cache or space or even Python (I don't think that is about storage space because I have 1TB only for this)

Thanks for any help!

PD: I know that copy & paste the build log in this way is kind of annoying, I tried to upload a text file but it didn't work.