hakuna-m/wubiuefi

Unable to build project

Closed this issue · 12 comments

Hi, I'm having trouble building this project. There are no instructions on setting up the build environment. This is what I've tried in both actual Ubuntu and WSL Ubuntu:
Install Python2, Wine/Wine32
Clone project
In project directory, run make
This is the output I get:
make tools/check_wine sh: 1: tools/check_wine: not found make: *** [Makefile:131: check_wine] Error 127
What am I missing here?
Thanks in advance.

For reference, I just want to build the project because I want to try updating isolist.ini to accommodate installation of Ubuntu 23.04. 22.04.x will not install for me. 20.04.x installs fine and I was able to update to 22.04.4, but when I updated to 22.04.10 while on my way to 23.04, my grub configuration got corrupted and nothing I tried could get me back into my Wubi/Ubuntu installation. Everything ended with Grub saying "Failed to open \EFI\ubuntu[][][]S[] - Invalid Parameter. Similarly, whenever I directly install 22.04.x from wubiuefi, Grub is not able to find Ubuntu. Only 20.04 has worked so far.

make tools/check_wine sh: 1: tools/check_wine: not found make: *** [Makefile:131: check_wine] Error 127

Wubi development requires basic development tools. e.g. If you run make, it is necessary that "make" is installed.

To install "make" only:
sudo apt install make

To install basic development tools including "make"
sudo apt install build-essentials

But I am not sure that it solves your GRUB issue.

Probably, you need a menu entry for Wubiuefi to run the UEFI GRUB for Wubi and not the standard UEFI GRUB for Ubuntu.

If you want run the UEFI GRUB for Wubi, you need a menu entry for \EFI\ubuntu\wubildr\shimx64.efi

see https://github.com/hakuna-m/wubiuefi/wiki/FAQ#where-is-my-ubuntu-entry-in-windows-boot-manager-for-uefi-

Hi Hakuna,
I have already done all of the things you listed. Make is installed and I also tried the wubi shimx64.efi, it did not work.

I have already done all of the things you listed.

I checked your error message again. I assume that there are 3 lines and "not found" and "make" are not in the same line.

tools/check_wine
sh: 1: tools/check_wine: not found
make: *** [Makefile:131: check_wine] Error 127

The error is in the first line of the file tools/check_wine

The first line of tools/check_wine contains
#!/bin/sh

.i.e /bin/sh is not found

/bin/sh is part of the package dash

sudo apt install dash

But I am wondering why that package has not been installed in your system !? It is an essential standard package in every Ubuntu installation.

I also tried the wubi shimx64.efi, it did not work.

If you don't need Secure Boot, try to use \EFI\ubuntu\wubildr\grub64.efi from UEFI boot menu.

I checked, dash is installed already. I still get the same error.

I already tried grubx64.efi with secure boot disabled too.

I checked, dash is installed already. I still get the same error.

Does the file in the first line /bin/sh exist ?

ls -l /bin/sh

Yes it does.

I got also the error message:

tools/check_wine
sh: 1: tools/check_wine: not found
make: *** [Makefile:131: check_wine] Error 127

But I got it by changing the first line of tools/check_wine to #!/bin/shsh
/bin/shsh does not exist. If I change it back to #!/bin/sh, it works.

Is your error message exactly the same as the error message above ? There are a lot of similar errors with different meanings.

e.g. I got that one.....

tools/check_wine
tools/check_wine: 12: install_wine: not found
make: *** [Makefile:131: check_wine] Error 127

... by deleting tools/install_wine

image
This was from a fresh clone of wubiuefi, master branch, on a fresh install of Ubuntu on WSL.
Here's ls of wubiuefi/tools:
image
tools/check_wine:
image
ls -l of wubiuefi:
image
ls -l of wubiuefi/tools:
image

Try setting the text on the top to /bin/bash. I've had scripts fail from using /bin/sh

image
It appears that this is where the error occurs in the make flow. I added that echo line to confirm.
image
Changing check_wine to use /bin/bash instead of /bin/sh would not be effective in this case, since for some reason the terminal is unable to find the check_wine file in the first place

I figured out what the problem was.
I had been cloning the repository in Windows using GitHub for desktop, so the files were being written using DOS line terminators, which bash/sh are interpreting as characters, making it unable to interpret bash scripts correctly.
I cloned the repository using git in WSL and am now able to get farther along in building the project. I think this issue can be closed.