-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot build ksh 1.0.10 with MSYS2/MinGW #801
Comments
Still does not work: $ export SHELL=/bin/bash.exe ; $SHELL ./bin/package make CC="/usr/bin/gcc -m64 -std=gnu17" PACKAGEROOT="$PWD" HOSTTYPE="msys.i386-64" |
Thanks for the report. MSYS2/MinGW is not a system I've ever used. I generally try to avoid Windows as much as possible, but I'm going to have to figure out a way to test it on this system and make it build. FWIW, Cygwin should work, it's tested every now and then. |
@McDutchie Quick setup via Cygwin shell:
---- snip ----
---- snip ---- Does that help ? |
@McDutchie Any updates? |
No one is currently getting paid for developing ksh, and I don't know when I'll have the time, opportunity and inclination to sit down with a Windows 10 box and figure this out. I don't have one in the house. So, unless someone else figures this out before me, you're going to have to be patient. |
@cedricblancher |
I'm also interested. Where can I find your script you used to try to build ksh93 ? |
No matter what, it fails on windows because of fork(). Does mamake like any other make, have ability to resume if it failed during compilation? Asking because as I understand, this is a series of shell scripts. Same error too (minus pid number): |
@McDutchie |
Could you please send a stand alone script which can be used to build ksh93 on msys2? Just a shell script, without the whole PKGBUILD machinery. |
Sure. Though it is optional, you might want to patch in this patch I used from gisburn's repo linked. I wasn't sure where you wanted it to be installed, so I left that part out. If you have problems with the script, let me know. #!/bin/sh
# This script assumes you're using gcc.
# Optional: Apply the supplied patch file. Your choice.
#
# A few environmental variables need to be set:
export GCC_DIR="$(gcc -print-search-dirs | sed -ne '/^install: /s///p')" # To fix the cc1.exe not found issue.
export PATH="$PATH:$GCC_DIR"
# A few tweaks to the other environmental variables. To fix other issues that will arise.
export CFLAGS="-I${GCC_DIR}/include -L${GCC_DIR} -L/usr/lib"
export CCFLAGS="${CFLAGS} -fno-use-linker-plugin"
export LIBRARY_PATH="${GCC_DIR}"
# These next two sed commands are necessary to ensure it builds right.
# First one, is to add a shebang to a file because windows can't run it properly without it.
sed -i '1s/^/#!\/usr\/bin\/bash\n/' src/cmd/INIT/mamprobe.sh
sed -i '6s/^/#undef _lib_iconv_open\n/' src/lib/libast/features/iconv # Without this, fails with libiconv installed
# This will fail the first time, this is to be expected and will then run again.
CC="/usr/bin/gcc" /usr/bin/bash bin/package make PACKAGEROOT="$PWD" || true
# Run it again.
CC="/usr/bin/gcc" /usr/bin/bash bin/package make PACKAGEROOT="$PWD" || true |
Though I'm wondering: Why did you not want makepkg? You just run makepkg as long as the very few dependencies are installed like gcc and makepkg itself. |
|
There was a bit going on, so I'll try to summarize some of the craziness. First, MSYS2 essentially is Cygwin (at the lowest level, it's a fork of Cygwin with some additional patches). Now, on to what's necessary to get ksh 1.0.10 to build on it
Lastly, there is a difference of opinion on the pull request to add ksh93 as a package in MSYS2 on whether we should override a bunch of defaults (such as changing |
@cedricblancher |
We cannot build ksh 1.0.10 with MSYS2/MinGW, bin/package fails like this:
$ (SHELL=/bin/dash ; $SHELL ./bin/package make)
package: /home/ced/mingw_ksh93/ksh: must be in the package root directory tree
The text was updated successfully, but these errors were encountered: