nisargjhaveri/WirelessAndroidAutoDongle

Cannot Build with CLI (File Path Not Found) - Raspberry Pi 02w

L3Prichaun13 opened this issue · 40 comments

I have made a folder on the root of my C:\ drive called "repos"
in powershell I did cd c:\repos
then I cloned the repo: git clone --recurse-submodules https://github.com/nisargjhaveri/WirelessAndroidAutoDongle

in powershell I did cd C:\repos\WirelessAndroidAutoDongle\buildroot
in powershell I ran make BR2_EXTERNAL=../aa_wireless_dongle/ O=Output/rpi02w raspberrypizero2w_defconfig

the result was an error, please help.
I do not want to use a pre-made sd card as I have plans to add some other logic and push it to this repo once proven and vetted.
From looking at the board folder within aa_wireless_dongle, I do NOT see a raspberrypizero2w folder... Not sure if this is the issue yet though.
Right now I am in the stage of understanding the current repo and proof of concept with my setup
image

Here is what my buildroot looks like as well

image

I've never really tried to run directly on Windows/Powershell, not sure if it will work. Try the docker method or a linux VM or WSL?

I spent an entire evening trying to build on Windows, I was unsuccessful even with MSY2 and Cygwin.

WSL is how I do it now.

Install WSL and build as per normal. It's just Linux.

@nisargjhaveri the make file does need an update to delete the awwg folder each build because otherwise it doesn't actually build changes and running clean every time slows the whole build down unnecessarily. I was doing it manually for a while and then eventually I just added it to my own copy of the makefile.

I don't use Docker, just build it normally.

@nisargjhaveri the make file does need an update to delete the awwg folder each build because otherwise it doesn't actually build changes and running clean every time slows the whole build down unnecessarily. I was doing it manually for a while and then eventually I just added it to my own copy of the makefile.

I generally do make aawg-rebuild when I just need to build aawg. I believe this is the pattern with most other packages in buildroot. Does it help?

@nisargjhaveri the make file does need an update to delete the awwg folder each build because otherwise it doesn't actually build changes and running clean every time slows the whole build down unnecessarily. I was doing it manually for a while and then eventually I just added it to my own copy of the makefile.

I generally do make aawg-rebuild when I just need to build aawg. I believe this is the pattern with most other packages in buildroot. Does it help?

Did not know that was an option lol.

Same deal when I use WSL and build manually. I even deleted the repo then pulled it down again " Laptop:/mnt/c/repos/WirelessAndroidAutoDongle/buildroot# make BR2_EXTERNAL=../aa_wireless_dongle/ O=Output/rpi02w raspberrypizero2w_defconfig /bin/bash: /mnt/c/repos/WirelessAndroidAutoDongle/buildroot/support/scripts/setlocalversion: /bin/sh^M: bad interpreter: No such file or directory /usr/bin/env: ‘bash\r’: No such file or directory /bin/bash: line 1: gcc: command not found /bin/bash: line 1: [: : integer expression expected mkdir -p /mnt/c/repos/WirelessAndroidAutoDongle/buildroot/Output/rpi02w/build/buildroot-config/lxdialog PKG_CONFIG_PATH="" make CC="gcc" HOSTCC="gcc" \ obj=/mnt/c/repos/WirelessAndroidAutoDongle/buildroot/Output/rpi02w/build/buildroot-config -C support/kconfig -f Makefile.br conf ././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found ././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token $'\r'' '/./lxdialog/check-lxdialog.sh: line 6: ldflags() ././check.sh: line 15: syntax error: unexpected end of file gcc -DLOCALE -I/mnt/c/repos/WirelessAndroidAutoDongle/buildroot/Output/rpi02w/build/buildroot-config -DCONFIG_="" -MM .c > /mnt/c/repos/WirelessAndroidAutoDongle/buildroot/Output/rpi02w/build/buildroot-config/.depend 2>/dev/null || : ././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found ././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token $'\r'' '/./lxdialog/check-lxdialog.sh: line 6: ldflags() ././check.sh: line 15: syntax error: unexpected end of file gcc -DLOCALE -I/mnt/c/repos/WirelessAndroidAutoDongle/buildroot/Output/rpi02w/build/buildroot-config -DCONFIG_="" -c conf.c -o /mnt/c/repos/WirelessAndroidAutoDongle/buildroot/Output/rpi02w/build/buildroot-config/conf.o make[2]: gcc: No such file or directory make[2]: *** [Makefile.br:34: /mnt/c/repos/WirelessAndroidAutoDongle/buildroot/Output/rpi02w/build/buildroot-config/conf.o] Error 127 make[1]: *** [Makefile:956: /mnt/c/repos/WirelessAndroidAutoDongle/buildroot/Output/rpi02w/build/buildroot-config/conf] Error 2 make: *** [Makefile:82: _all] Error 2 "

On Wed, Mar 27, 2024 at 2:10 PM admiralspeedy @.
> wrote: I don't use Docker, just build it normally. — Reply to this email directly, view it on GitHub <#94 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR6K5EGU5KGIPP5CIV653JDY2MKTNAVCNFSM6AAAAABFKCMOAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRTG43DSOJSHE . You are receiving this because you authored the thread.Message ID: @.*>

What versions of Windows and WSL are you using? Are you cloning the repo properly as per the readme?

git clone --recurse-submodules https://github.com/nisargjhaveri/WirelessAndroidAutoDongle

That's how you're cloning the repo?

If your path is C:\ you are not using WSL properly. You can't even access drives like that with WSL so I suspect you are running these commands in a normal Windows terminal and not actually WSL.

WSL defaults to your home directory where you should make a folder called repos or projects, and then clone the project in there.

I can't see the images you are posting, they just show up as "[image: image.png]".

Stop running it from the C drive, that's about all I can think. Not sure why you are doing that anyways, just make a folder in your Linux home directory on the actual WSL file system.

If you're cloning from outside WSL, git might use crlf as default line endings. You can probably control this by changing core.autocrlf or core.eol settings.

/mnt/c/repos is the C drive. You are making this more complicated than it needs to be lol. Just make a folder in your home directory called "repos" and then clone in there. When you open WSL, it defaults to your home directory which should be /home/username.

Also, one other thing actually now that I think about it. Open /etc/wsl.conf in WSL and add the following:

[interop]
appendWindowsPath = false

Then completely shutdown WSL and restart it.

I do remember having an issue where because by default WSL includes the Windows PATH variable, it was causing me problems because there were spaces in it and Linux doesn't like that. Setting appendWindowsPath to false will stop WSL from including the Windows PATH variable and I have never once needed it, so I don't actually understand why it is enabled by default.

appendWindowsPath = false has to be under [interop], hence why I posted it like that.

Also, you don't even have GCC installed lol: gcc: command not found

gcc: command not found

You need to install GCC...........

Read the readme... You are not doing the second make.

You need to install those packages.

I don't think I had to install them myself when I set up WSL but I don't remember at this point, it's possible.

The first build will take a while, especially if you have a slow CPU.

There isn't really anything to add to the readme unless @nisargjhaveri really wants to put a detailed build guide in it but I assume he doesn't. There isn't much reason for you to do your own builds unless you intend on making changes to the code, and if you are capable of that then it's usually safe to assume you should be able to figure out how to build the code yourself with what is given in the readme (like I did).

I have no control over this repo, I'm just super interested in this project (and tired of replacing USB cables in my car because they wear out from being used multiple times a day) and I'm a programmer myself. If you want to write a more detailed build guide, you can submit a PR.

Well, being that it's a Linux project it's safe to assume it should be built on Linux.

after the back and forth we got it resolved.. There was confusion on which OS I needed to do all of this work in and then some ancillary programs (like gcc) that I didn't even know was a program. Thank you to admiralspeedy for all the assistance

Well, I expect the build to work seamlessly across platforms, especially since we're using Docker. I see you were facing some issues with line ending, I'd love if we can figure out a solution for that.

In any case, it shouldn't be this difficult. While we might not need a super detailed guide, we can always look to improve the instructions and expectations to make it easier. Happy to take in ideas. :)