djeman / android_device_samsung_j3xnlte

20 stars 30 forks source link

An error when trying to build custom roms; #28

Open Borksek opened 6 years ago

Borksek commented 6 years ago

Hey, I've been trying to update AIM rom for this device but after the changes to the device tree it doesn't seem to wan't to work. The error I keep getting and doesn't want to be fixed is the following; ninja: Entering directory `.' ninja: error: unknown target 'j3xnlte' build/core/ninja.mk:166: recipe for target 'ninja_wrapper' failed make: *** [ninja_wrapper] Error 1

djeman commented 6 years ago

Yip,

Maybe it's this problem => https://github.com/djeman/android_device_samsung_j3xnlte/issues/27 Have you all device trees ?

AIM need the AndroidProducts.mk file ?

Borksek commented 6 years ago

I have the AndroidProducts.mk file inside my j320xnlte directory. I tried to merge together the Sharkls common files "aka the other files that you removed from your device tree" to the j320xnlte directory. But it still doesn't find it whatever I do.

Borksek commented 6 years ago

I also tried doing the normal way by putting the Sharkls file into andorid/Device/sharkls-common but it still doesnt work for some reason. It doesn't specify the target device for some reason even though it finds out the errors that the sharkls-common file creates because rild is specified by AIM rom already, but i fixed it by simply removing rild and removing the line that calls it.

djeman commented 6 years ago

You don't know how is structured a device tree ? :) I don't understand you ...

Why you tried to merge common with j3xnlte directory ? Have you updated your local manifest and sync all ? Extract your differences before (git diff) to apply it on the good directory after. https://github.com/djeman/android_device_samsung_j3xnlte/wiki/Local-manifest-CM-14.1

I can add AndroidProducts.mk if you need it, it's the same file of the lineage.mk but for the aosp. j3xnlte AndroidProducts.mk => https://pastebin.com/iwyAHt4Y j3xnlte device_j3xnlte.mk => https://pastebin.com/ccciTjcp

When all directories are in place you need to relaunch envsetup.sh to detect new devicie trees.

Borksek commented 6 years ago

I didn't try to merge any of them ^.^ I just did that as a last resort because it didn't work

Borksek commented 6 years ago

I'm gonna try those two files you gave me and ill try to see if it works, thanks!

Borksek commented 6 years ago

borksek@borksek-Legion-Y520T-25IKL:/Android/aim/device/samsung/j3xnlte$ ls Android.mk AndroidProducts.mk BoardConfig.mk configs device_j3xnlte.mk aim.mk extract-files.sh init j3xnlte.mk lineage.dependencies proprietary-files.txt setup-makefiles.sh vendorsetup.sh borksek@borksek-Legion-Y520T-25IKL:/Android/aim/device/samsung/j3xnlte$ nano device_j3xnlte.mk borksek@borksek-Legion-Y520T-25IKL:/Android/aim/device/samsung/j3xnlte$ cd ../../.. borksek@borksek-Legion-Y520T-25IKL:/Android/aim$ . build/envsetup.sh

Generating a list of devices from vendorsetup.sh...

Type in 'lunch' to enter the device menu

Generating a list of devices from vendorsetup.sh...

Type in 'lunch' to enter the device menu

borksek@borksek-Legion-Y520T-25IKL:~/Android/aim$ lunch

                  Welcome to the device menu                      

 Below are all the devices currently available to be compiled     

 1. aim_j3xnlte-userdebug
 2. aim_j3xnlte-eng
 3. aim_angler-userdebug
 4. aim_bullhead-userdebug
 5. aim_dragon-userdebug
 6. aim_hammerhead-userdebug
 7. aim_marlin-userdebug
 8. aim_sailfish-userdebug
 9. aim_shamu-userdebug
 10. aim_shieldtablet-userdebug

Go ahead and pick a number... 1 build/core/product_config.mk:265: No matches for product "aim_j3xnlte". Stop. Device j3xnlte not found. Attempting to retrieve device repository from AIM Github Traceback (most recent call last): File "build/tools/roomservice.py", line 51, in result = json.loads(urllib2.urlopen(request).read()) File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 435, in open response = meth(req, response) File "/usr/lib/python2.7/urllib2.py", line 548, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.7/urllib2.py", line 473, in error return self._call_chain(args) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(args) File "/usr/lib/python2.7/urllib2.py", line 556, 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:265: No matches for product "aim_j3xnlte". Stop.

Don't have a product spec for: 'aim_j3xnlte' Do you have the right repo manifest? build/core/product_config.mk:265: *** No matches for product "aim_j3xnlte". Stop.

Don't have a product spec for: 'aim_j3xnlte' Do you have the right repo manifest?

djeman commented 6 years ago

But it worked before ? ^^ In the device_j3xnlte.mk changes "lineage_j3xnlte" to "full_j3xnlte" I forgot.

Borksek commented 6 years ago

when you change aim_j3xnlte to full_j3xnlte it says;

build/core/product_config.mk:265: *** No matches for product "aim_j3xnlte". Stop. Device j3xnlte not found. Attempting to retrieve device repository from aim Github

Repository for j3xnlte not found in the aim Github repository list. If this is in error, you may need to manually add it to .repo/local_manifests/aim_manifest.xml build/core/product_config.mk:265: *** No matches for product "aim_j3xnlte". Stop.

Don't have a product spec for: 'aim_j3xnlte' Do you have the right repo manifest? build/core/product_config.mk:265: *** No matches for product "aim_j3xnlte". Stop.

Don't have a product spec for: 'aim_j3xnlte' Do you have the right repo manifest?

Borksek commented 6 years ago

😢🔫 finnaly fixed the problem but a new problem came up...

ninja: error: '/home/borksek/Android/aim/out/target/product/j3xnlte/kernel', needed by '/home/borksek/Android/aim/out/target/product/j3xnlte/boot.img', missing and no known rule to make it build/core/ninja.mk:166: recipe for target 'ninja_wrapper' failed make: *** [ninja_wrapper] Error 1

make failed to build some targets (01:19 (mm:ss))

borksek@borksek-Legion-Y520T-25IKL:/Android/aim$ cd kernel borksek@borksek-Legion-Y520T-25IKL:/Android/aim/kernel$ ls samsung borksek@borksek-Legion-Y520T-25IKL:/Android/aim/kernel$ cd samsung borksek@borksek-Legion-Y520T-25IKL:/Android/aim/kernel/samsung$ ls j3xnlte borksek@borksek-Legion-Y520T-25IKL:/Android/aim/kernel/samsung$ cd j3xnlte/ borksek@borksek-Legion-Y520T-25IKL:/Android/aim/kernel/samsung/j3xnlte$ ls android arch COPYING crypto drivers fs init Kbuild kernel linaro Makefile net README.md samples security tools virt AndroidKernel.mk block CREDITS Documentation firmware include ipc Kconfig lib MAINTAINERS mm README REPORTING-BUGS scripts sound usr borksek@borksek-Legion-Y520T-25IKL:/Android/aim/kernel/samsung/j3xnlte$

Borksek commented 6 years ago

btw; according to slack, you should merge those two. It fixed the problem but i was stupid and forgot to change aim.mk "lineage_j3xnlte" to "aim_j3xnlte"

djeman commented 6 years ago

Yep maybe but it worked before ? Because it's not false the 'aim_j3xnlte' project do not exists ^^

But maybe you need to learn what the aim needs to define a new device tree ... me I'm working on lineage, it's a repository for lineage.

This patch is needed to add a project for aim => https://github.com/AIMROM-DEVICES/device_lenovo_kuntao/commit/3749840e67d439fa08f00ac44226f219356f9475 Ok it's an example but with the same modifications you can create your aim project ;)

Borksek commented 6 years ago

Yeah djeman, two of those up is the response after I fixed it. Maybe you missed it due to you were here before I answeared ;)

djeman commented 6 years ago

Do not forget this line => "$(call inherit-product, vendor/aim/config/common_full_phone.mk)" ;)

But yep the better method is to convert lineage.mk for aim.

Borksek commented 6 years ago

I did change that line :-) but for some reason still doesn't work :(

ninja: error: '/home/borksek/Android/aim/out/target/product/j3xnlte/kernel', needed by '/home/borksek/Android/aim/out/target/product/j3xnlte/boot.img', missing and no known rule to make it build/core/ninja.mk:166: recipe for target 'ninja_wrapper' failed make: *** [ninja_wrapper] Error 1 make failed to build some targets (01:19 (mm:ss))

borksek@borksek-Legion-Y520T-25IKL:/Android/aim$ cd kernel borksek@borksek-Legion-Y520T-25IKL:/Android/aim/kernel$ ls samsung borksek@borksek-Legion-Y520T-25IKL:/Android/aim/kernel$ cd samsung borksek@borksek-Legion-Y520T-25IKL:/Android/aim/kernel/samsung$ ls j3xnlte borksek@borksek-Legion-Y520T-25IKL:/Android/aim/kernel/samsung$ cd j3xnlte/ borksek@borksek-Legion-Y520T-25IKL:/Android/aim/kernel/samsung/j3xnlte$ ls android arch COPYING crypto drivers fs init Kbuild kernel linaro Makefile net README.md samples security tools virt AndroidKernel.mk block CREDITS Documentation firmware include ipc Kconfig lib MAINTAINERS mm README REPORTING-BUGS scripts sound usr borksek@borksek-Legion-Y520T-25IKL:/Android/aim/kernel/samsung/j3xnlte$

djeman commented 6 years ago

Have you the common folder ?

Borksek commented 6 years ago

sharkls-common? yes

djeman commented 6 years ago

Arf I don't saw that => "kernel/samsung/j3xnlte" ^^

I said you I renamed the kernel repo, so the kernel folder too. kernel repo => android_kernel_samsung_sharkls so the kernel folder => "kernel/samsung/sharkls"

Borksek commented 6 years ago

Ughh djeman im sorry :(

Starting build with ninja ninja: Entering directory `.' ninja: error: '/home/borksek/Android/aim/out/target/product/j3xnlte/obj/SHARED_LIBRARIES/libfmjni_intermediates/export_includes', needed by '/home/borksek/Android/aim/out/target/product/j3xnlte/obj/SHARED_LIBRARIES/libengfm_intermediates/import_includes', missing and no known rule to make it build/core/ninja.mk:166: recipe for target 'ninja_wrapper' failed make: *** [ninja_wrapper] Error 1

I know you're annoyed because of this but i'm sorry :((

owlCoder commented 6 years ago

AIM is Lineage based. So, basically its Lineage fork with framework and UI changes. Also, AIM ROM has lineage -> aim convert script which should work with every Lineage tree. Do a clean up without any device configs and put new local_manifest also sometimes .dependencies file can cause problems.

Mic-360 commented 3 years ago

😢🔫` finnaly fixed the problem but a new problem came up...

ninja: error: '/home/borksek/Android/aim/out/target/product/j3xnlte/kernel', needed by '/home/borksek/Android/aim/out/target/product/j3xnlte/boot.img', missing and no known rule to make it build/core/ninja.mk:166: recipe for target 'ninja_wrapper' failed make: *** [ninja_wrapper] Error 1

I am facing the exact same problem how you fixed this problem
@Borksek

djeman commented 3 years ago

It's not the true error, the kernel is not build but we do not know why with only the ninja error. The compilation error has appeared before the ninja result.

"Ninja" is the tool to launch the build of all components in the good order but it stops when an error occur in the compilation of one element.

Try to build only the kernel. Your error said the kernel is not found to create the boot.img.