I I am doing yocto build in WSL environment. However, it is no longer proceeding in nodejs compile.
I've been waiting for it to end, but only the build time is being updated.
nodejs-18.16.0-r0 do_compile - 1h20m27s (pid 187)
Hello Kim,
I understand that you're facing a similar issue as I am. However, I haven't been able to resolve it yet. I'm currently seeking a solution to fix it.
If you have found a solution to this problem, please share it with me. I would greatly appreciate hearing your insights and experiences in resolving our common issue.
Thank you,
Man Lee
I am using wsl2 ubuntu 20.04. i also have struggled in wsl 2 for compiling yocto build. %95 of times, it was related to low RAM issue. Ram usage peaks and gives unrelated errors. Create .wslconfig file in C:\Users\<username> and add those lines:
[wsl2]
memory=5GB
Dont do anything while compilation, compile tasks seperately and compile easy tasks first.
This is my experience.
Best regards.
Hi HEXER
Was your issue also a nodejs compile issue?
Hi @sutton_kim,
Thank you for your reply.
I reviewed your error logs, and I identified the following error:
collect2: fatal error: ld terminated with signal 9 [Killed]
This is an error related to memory space.
You can try to increase the SWAP memory to at least 8GB, and the /home space disk.
Best regards, Brian.
Hi @sutton_kim,
Could you please share your error logs produced by Yocto?
Also, based on the i.MX Yocto Project User's Guide it is recommended to use Ubuntu environment.
"The recommended minimum Ubuntu version is 20.04 or later."
Have a great day!
Best regards, Brian.
Hi brian
Can you explain why you think it's a SWAP memory issue?
now, I am trying.
BestRegards
Hi @sutton_kim,
As I said in my last reply. The problem is related to memory because the operating system is killing the process and usually is related to memory but not specifically to SWAP memory, which could be a probable reason in addition to the RAM memory lack issue.
You can see more about the SWAP memory or partition and the usage on Linux systems at the following link: An introduction to swap space on Linux systems | Opensource.com
Please check this link.
Have a great day!
hi Brian
I tested increasing swap memory 16BG.
However, this does not solve it.
do you have a any idea?
Best Regards.
Hi Brian
my ubuntu version is 20.4
below is error log
| collect2: fatal error: ld terminated with signal 9 [Killed]
| compilation terminated.
| make[1]: *** [node.target.mk:218: Release/node] Error 1
| make[1]: *** Waiting for unfinished jobs....
| rm bfc4ab6848d78126dd96ea1cc2909493619e2620.intermediate 001fef872bcdd412983a45d8751148446514e391.intermediate 0ecc6719bf1f9373e09aab7ca8e249bc65708f7b.intermediate 27f057ffd656a5a48c99be9d693d885fa74e6838.intermediate f0a82c14c8271d9ee3baddfc8f0b6dbcd3b7256d.intermediate b3fe029693590b3f84422b3d42e7496dcc1c55c5.intermediate
| make: *** [Makefile:134: node] Error 2
| WARNING: /home/sukim/kasan/build.imx8/tmp/work/aarch64-elina-linux/nodejs/18.16.0-r0/temp/run.do_compile.1063:1 exit 1 from 'exit 1'
|
ERROR: Task (/home/sukim/kasan/meta/project/meta-cx/recipes-devtools/nodejs/nodejs_18.16.0.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1235 tasks of which 162 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 3 seconds
NOTE: Build completion summary:
NOTE: do_populate_sysroot: 29.1% sstate reuse(34 setscene, 83 scratch)
NOTE: do_deploy_source_date_epoch: 33.1% sstate reuse(41 setscene, 83 scratch)
NOTE: do_package: 0.0% sstate reuse(0 setscene, 39 scratch)
NOTE: do_packagedata: 100.0% sstate reuse(39 setscene, 0 scratch)
NOTE: do_package_write_rpm: 100.0% sstate reuse(39 setscene, 0 scratch)
NOTE: do_populate_lic: 100.0% sstate reuse(1 setscene, 0 scratch)
Summary: 1 task failed:
/home/sukim/kasan/meta/project/meta-cx/recipes-devtools/nodejs/nodejs_18.16.0.bb:do_compile
Summary: There were 45 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
also below run.do_compile log error part
Hi @sutton_kim ,
It seems like you're experiencing a hang during the nodejs compile step of your Yocto build in a Windows Subsystem for Linux (WSL) environment. This can be due to a number of reasons, but a common one is a lack of system resources, particularly memory.
Firstly, ensure that your system meets the minimum requirements for a Yocto build. According to the Yocto Project Quick Start guide, you should have at least 50 Gbytes of free disk space and 4 Gbytes of RAM. If you're running other heavy applications concurrently, consider closing them to free up resources.
If system resources are not the issue, it's possible that there's a problem with the specific version of nodejs you're trying to compile. You could try switching to a different version to see if the problem persists.
Another potential issue could be the WSL environment itself. While WSL has made great strides in compatibility, it's not 100% equivalent to a native Linux environment. If possible, you might want to try your build in a native Linux environment to see if the problem persists.
Finally, you could try cleaning your build environment with the command 'bitbake -c cleanall nodejs' and then reattempt the build.
For more detailed troubleshooting, you might find the following resources helpful:
Regards,
Prakash
Hi prakashram72
My disk has more than 50G and also has more than 4G RAM.
my imx8 board nodejs version is 18.16.0
I already tried bitbake nodejs -c cleanall. but it hasn't been solved.
And I tried various methods as below, but it was not solved.