Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error when trying to build custom roms; #28

Open
Borksek opened this issue Sep 20, 2018 · 22 comments
Open

An error when trying to build custom roms; #28

Borksek opened this issue Sep 20, 2018 · 22 comments

Comments

@Borksek
Copy link

Borksek commented Sep 20, 2018

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
Copy link
Owner

djeman commented Sep 20, 2018

Yip,

Maybe it's this problem => #27
Have you all device trees ?

AIM need the AndroidProducts.mk file ?

@Borksek
Copy link
Author

Borksek commented Sep 21, 2018

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
Copy link
Author

Borksek commented Sep 21, 2018

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
Copy link
Owner

djeman commented Sep 21, 2018

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
Copy link
Author

Borksek commented Sep 21, 2018

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

@Borksek
Copy link
Author

Borksek commented Sep 21, 2018

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

@Borksek
Copy link
Author

Borksek commented Sep 21, 2018

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
Copy link
Owner

djeman commented Sep 21, 2018

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

@Borksek
Copy link
Author

Borksek commented Sep 21, 2018

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
Copy link
Author

Borksek commented Sep 21, 2018

😢🔫 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
Copy link
Author

Borksek commented Sep 21, 2018

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
Copy link
Owner

djeman commented Sep 21, 2018

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 => AIMROM-DEVICES/device_lenovo_kuntao@3749840
Ok it's an example but with the same modifications you can create your aim project ;)

@Borksek
Copy link
Author

Borksek commented Sep 21, 2018

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
Copy link
Owner

djeman commented Sep 21, 2018

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
Copy link
Author

Borksek commented Sep 21, 2018

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
Copy link
Owner

djeman commented Sep 21, 2018

Have you the common folder ?

@Borksek
Copy link
Author

Borksek commented Sep 21, 2018

sharkls-common? yes

@djeman
Copy link
Owner

djeman commented Sep 21, 2018

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
Copy link
Author

Borksek commented Sep 21, 2018

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
Copy link

owlCoder commented Sep 22, 2018

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
Copy link

Mic-360 commented Nov 22, 2020

😢🔫` 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
Copy link
Owner

djeman commented Nov 22, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants