Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a question that's two-thirds a linux question - maybe a WSL specific question - and a third embedded development toolchain question.

I really don't like dealing with the prima donnas at stackoverflow - not that everyone is that way but enough of them are, but I'm not sure codeproject is a great place to post this. It's kind of a long shot.

basically I'm running into a permissions problem running a makefile that chmod 777 -R isn't fixing. Curiously, running chmod *did* fix it earlier today on the same machine (i have a screen shot to prove to myself I'm not crazy). I stepped away from WSL for half a day and came back to the same prompt, ran the same command and it no work.

This is all using cross compilers, just to complicate everything.

I've unzipped two cross compiler toolchains to my home directory in WSL

I have a source tree called xboot whose makefile is set up to use cross compilers, so long as you point it to the appropriate compiler directory.

Earlier today, I attempted to run make ..., and even sudo make ... (arguments omitted) and ran into a Permission Denied error.
chmod 777 -R ~/arm-gcc seemed to fix this.

Later, I got the same error again.

I have a second toolchain for a slightly different ARM that I need to compile with. Again I run into permission problems.

I say this may be a WSL specific problem because I've never had this issue using a third party VM, like VMWare Player.

What I have tried:

chmod 777 -R ~/xboot
chmod 777 -R ~/arm-gnueabihf-gcc
make CROSS_COMPILE=/home/honey/arm-gnueabihf- PLATFORM=arm32-h3

Which yields
[ROMDISK] Packing romdisk
[CC] arch/arm32/lib/cpu/cmd-bootlinux.c
make[2]: /home/honey/arm-gnueabihf-gcc: Permission denied
make[2]: *** [rules.mk:33: .obj/arch/arm32/lib/cpu/cmd-bootlinux.o] Error 127
make[1]: *** [Makefile:346: arch/arm32/lib/cpu] Error 2
make: *** [Makefile:10: all] Error 2


I've also tried sudo with the same result

Putting child 0x55acbe333fe0 (.obj/arch/arm32/lib/cpu/cmd-bootlinux.o) PID 18847 on the chain.
Live child 0x55acbe333fe0 (.obj/arch/arm32/lib/cpu/cmd-bootlinux.o) PID 18847
[CC] arch/arm32/lib/cpu/cmd-bootlinux.c
Reaping winning child 0x55acbe333fe0 PID 18847
make[2]: /home/honey/arm-gnueabihf-gcc: Permission denied
make[2]: *** [rules.mk:33: .obj/arch/arm32/lib/cpu/cmd-bootlinux.o] Error 127
Reaping losing child 0x55733c1469c0 PID 18846
make[1]: *** [Makefile:346: arch/arm32/lib/cpu] Error 2
Removing child 0x55733c1469c0 PID 18846 from chain.
Reaping losing child 0x55a06f7ee8b0 PID 18831
make: *** [Makefile:10: all] Error 2
Removing child 0x55a06f7ee8b0 PID 18831 from chain.


rules.mk line 33 is this:
@$(CC) $(X_CFLAGS) $($(BASENAME)-flags) -MD -MP -MF $@.d $(X_INCDIRS) -c $< -o $@
Posted
Updated 4-May-23 3:58am
v5
Comments
Peter_in_2780 27-Apr-23 2:59am    
More likely occurring on an intermediate file, rather than toolchain component.
I'm guessing umask is set to something sane.
strace is the masochist's friend in cases like this; not sure how much trace you can crank up in make.
honey the codewitch 27-Apr-23 7:43am    
I've tried strace, and I don't remember the result because it was when I first ran into this problem. I'll try again
Richard MacCutchan 27-Apr-23 3:37am    
Can you run ls -lR /home/honey/arm-gnueabihf-gcc, and show us the results?
honey the codewitch 27-Apr-23 7:43am    
Here's a sample. It all looks like this (there's a lot of it)
-rwxr-xr-x 1 honey honey 10392 Jul 1 2021 FrameDecorator.py
-rwxr-xr-x 1 honey honey 1577 Jul 1 2021 FrameIterator.py
-rwxr-xr-x 1 honey honey 6758 Jul 1 2021 __init__.py
drwxr-xr-x 2 honey honey 4096 Jul 1 2021 command
-rwxr-xr-x 1 honey honey 8031 Jul 1 2021 frames.py
drwxr-xr-x 2 honey honey 4096 Jul 1 2021 function
drwxr-xr-x 2 honey honey 4096 Jul 1 2021 printer
-rwxr-xr-x 1 honey honey 10913 Jul 1 2021 printing.py
-rwxr-xr-x 1 honey honey 4209 Jul 1 2021 prompt.py
-rwxr-xr-x 1 honey honey 5530 Jul 1 2021 types.py
-rwxr-xr-x 1 honey honey 3137 Jul 1 2021 unwinder.py
-rwxr-xr-x 1 honey honey 11077 Jul 1 2021 xmethod.py
Richard MacCutchan 27-Apr-23 8:30am    
That all looks fine to me. I think you will need to use one of the debug options to make, to try and see what it is actually doing when the error occurs.

1 solution

Have you tried a "make clean" before running your make command? Desperation, I know, but it might help if Peter's on the right track.
 
Share this answer
 
Comments
honey the codewitch 4-May-23 10:01am    
Yes. I run make clean before I build. I got it working using an older version of the actual toolchain - not changing the build scripts at all. I still don't know why though, which is why I'm leaving this open.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900