Skip to content
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

uname applet to emulate msys2's mingw64 environment's uname #296

Open
ghost opened this issue Feb 23, 2023 · 5 comments
Open

uname applet to emulate msys2's mingw64 environment's uname #296

ghost opened this issue Feb 23, 2023 · 5 comments

Comments

@ghost
Copy link

ghost commented Feb 23, 2023

Currently:

uname -m = x86_64
uname -r = 6.3
uname -s = Windows_NT
uname -v = 9600

On msys2's mingw64 environment:

uname -m = x86_64
uname -r = 3.4.6.x86_64
uname -s = MINGW64_NT-6.3-9600
uname -v = 2023-02-15 18:03 UTC

Most users will use a mingw64 based gcc with busybox-w32 anyway (w64devkit?) so it's wise to copy msys2's mingw64 environment's uname. The current value of uname caused configure script to fail to detect the platform it's building on.

checking build system type... ./config.guess: unable to guess system type

This script (version 2017-08-08), has failed to recognize the
operating system you are using. If your script is old, overwrite *all*
copies of config.guess and config.sub with the latest versions from:

  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub

If ./config.guess has already been updated, send the following data and any
information you think might be pertinent to config-patches@gnu.org to
provide the necessary information to handle your system.

config.guess timestamp = 2017-08-08

uname -m = x86_64
uname -r = 6.3
uname -s = Windows_NT
uname -v = 9600

/usr/bin/uname -p = x86_64
/bin/uname -X     = x86_64

hostinfo               =
/bin/universe          =
/usr/bin/arch -k       = x86_64
/bin/arch              = x86_64
/usr/bin/oslevel       =
/usr/convex/getsysinfo =

UNAME_MACHINE = x86_64
UNAME_RELEASE = 6.3
UNAME_SYSTEM  = Windows_NT
UNAME_VERSION = 9600
configure: error: cannot guess build type; you must specify one
@rmyorston
Copy link
Owner

The busybox-w32 binaries I make available don't come with a development environment so it would be inappropriate to guess how they might be used. uname in those binaries will continue to report the Windows OS version.

w64devkit ships a custom busybox-w32 binary. Perhaps they'd consider altering the output of uname?

@ghost
Copy link
Author

ghost commented Feb 24, 2023

Getting autotools to add your uname to it database is way harder than you just change your uname to an already supported platform.

@ghost
Copy link
Author

ghost commented Feb 24, 2023

Could you implement it like this: set the environment variable BB_MSYS2_MINGW_UNAME to overwrite the result of uname?

@ale5000-git
Copy link

ale5000-git commented Feb 24, 2023

They are just wrong, just run uname -s on Linux, it print Linux; so output other things beside the OS is wrong.

@ghost
Copy link
Author

ghost commented Feb 25, 2023

They are just wrong, just run uname -s on Linux, it print Linux; so output other things beside the OS is wrong.

wrong or not is unimportant, the point is to emulate mingw so configure script won't fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants