lordmilko / i686-elf-tools

i386-, i686- and x86_64-elf GCC, GDB and Binutils
MIT License
242 stars 45 forks source link

Cant build - /bin/bash: line 1: i686-elf-gcc: command not found #25

Closed TrueXPixells closed 11 months ago

TrueXPixells commented 11 months ago

Hello, i want to build it via github actions for both platforms, cpus but windows is failing https://github.com/TrueXPixells/x86_64-elf-tools/actions/runs/6536971178/job/17749817555

lordmilko commented 11 months ago

I can see you are running a script called build.sh. This does not look like the latest version of the script (which is in original.sh)

Based on the error message, the most likely issue to me is something to do with your PATH. Your PATH needs to contain the output directory that the Linux build is emitted to

In your code you have the following

    export PATH="/opt/mxe/usr/bin:$PATH"

This line looks incorrect. The output directories need to be on your PATH

https://github.com/lordmilko/i686-elf-tools/blob/88c5c8ccfc87137975ca64f1b29685604ff513e7/i686-elf-tools.sh#L57

TrueXPixells commented 11 months ago

ah i added this, but didnt worked as well (same error, only win platform was failing) https://github.com/TrueXPixells/x86_64-elf-tools/actions/runs/6564337692/job/17830505035

lordmilko commented 11 months ago

The error is related to your PATH, it's not finding the Linux version that was built. Your code seems to be setting the PATH to only include the OS that is being built for - this is wrong.

I'm not sure why exactly you're modifying the build script. The build script provided by this repo already supports i686 and x86_64 builds. If you want to build a newer version of GCC/binutils/GDB, you can simply invoke the build script of this repo without modification and specify the version/architecture/OS to build for. Additionally, you are using an older version of the build script, which, unlike the latest version of i686-elf-tools.sh, does not emit the PATH to the console (which would help you in debugging your PATH issues)

I recommend testing whether your build works using the latest build script provided by this repo, and going from there. As your issue pertains to a modified, unsupported version of the build script, I will close this issue.