So I have been attempting to compile CM13 for my Samsung Galaxy S4 T-Mobile (JFLTETMO SGH-M919) phone. The first thing I did was read the entire guide here:

Which looked very helpful and promissing. I followed the instructions to a proverbial “T”. I even reloaded my machine with Ubuntu 14.04 just like what was used in the guide. However, the process stoped and I ran into this error:

Export includes file: packages/apps/Terminal/jni/ — /home/alaskalinuxuser/Documents/projects/phones/compile/cm13/out/target/product/jfltetmo/obj/SHARED_LIBRARIES/libjni_terminal_intermediates/export_includes
Notice file: external/libvterm/NOTICE — /home/alaskalinuxuser/Documents/projects/phones/compile/cm13/out/target/product/jfltetmo/obj/NOTICE_FILES/src//system/lib/libvterm.a.txt
Notice file: packages/providers/UserDictionaryProvider/NOTICE — /home/alaskalinuxuser/Documents/projects/phones/compile/cm13/out/target/product/jfltetmo/obj/NOTICE_FILES/src//system/app/UserDictionaryProvider/UserDictionaryProvider.apk.txt
Notice file: frameworks/base/packages/WAPPushManager/NOTICE — /home/alaskalinuxuser/Documents/projects/phones/compile/cm13/out/target/product/jfltetmo/obj/NOTICE_FILES/src//system/app/WAPPushManager/WAPPushManager.apk.txt
/bin/bash: mvn: command not found
make: *** [/home/alaskalinuxuser/Documents/projects/phones/compile/cm13/out/target/common/obj/JAVA_LIBRARIES/ambientsdk_intermediates/com.cyngn.ambient.ambientsdk-1.5.8.aar] Error 127
make: *** Waiting for unfinished jobs….
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.
make: Leaving directory `/home/alaskalinuxuser/Documents/projects/phones/compile/cm13′

#### make failed to build some targets (04:26 (mm:ss)) ####

Note that the compile failed 4 hours and 26 minutes after I started it. So what failed? Well, apparently, these line are the key:

/bin/bash: mvn: command not found
make: *** [/home/alaskalinuxuser/Documents/projects/phones/compile/cm13/out/target/common/obj/JAVA_LIBRARIES/ambientsdk_intermediates/com.cyngn.ambient.ambientsdk-1.5.8.aar] Error 127

Whenevery you are compiling, you can always spot the problems in your logs by looking for 4 key words: Failed, Error, Warning, and Stop. In this case, the key word was Error. Simply trace that path backwards, or in our case, up one line, and you see what looks like an error in the form of “command not found”. In this case, it cannot find the mvn command, which is a command to start the Maven system. The Maven system is a tool to build Java-based projects. If you didn’t know that, don’t feel bad, I had to look it up, too.
The question was, how do I fix it? Here I spent some time at the terminal.

$ mvn
The program ‘mvn’ is currently not installed. You can install it by typing:
sudo apt-get install maven2

$ sudo apt-get install maven2

This required a lot of dependencies, which proves that the guide does not actually include all of the needed pre-requisites. It makes me wonder, however, if there are more missing programs or files that I need which are not put into the instructions. So, back to work, and we will see what happens when we run the compiler again.

Linux – Keep it simple.

Leave a Reply

Your email address will not be published. Required fields are marked *