-
Notifications
You must be signed in to change notification settings - Fork 4
"Machine type" popup on WSL blocking build
The "Image file … is valid, but is for a machine type other than the current machine" dialog pops up and blocks the build until closed. E.g.:
Or:
Of course it is. That's the very point of cross-compilation. The build still proceeds, but it's not possible to complete it without user intervention (bye bye CI!).
The popup issue is specific to WSL. Running an alien-arch executable under Linux just fails silently (which is the desired effect — "fail fast, die young") because Linux does not assume that a graphic session is always present. Unfortunately, Windows does.
The issue is discussed online here (legal notice — none of us is affiliated with that repo, or cryptocurrencies in general; we are linking the page solely because it best describes the problem).
conftest
or conftest.exe
is created by the ./configure
script to detect whether binaries created by the compiler are immediately executable ("checking whether we are cross-compiling"). According to this manual page,
specifying the host without specifying the build should be avoided, as configure may (and once did) assume that the host you specify is also the build, which may not be true.
The "tests/tblahblah.exe" popup appears near the end of the build — when a test suite has been compiled and is being run. These popups are much more numerous. You would probably want to switch to the terminal where the build is running and interrupt it with Ctrl+C
.
If the --host=$(TARGET)
argument to ./configure
is provided, provide --build=$(BUILD)
as well.
It would be a mistake to skip building the test suites — you want them for continuous integration, or at least for post-hoc troubleshooting. If the tests are run by a separate command, remove it, but still install test binaries to $(PREFIX)/$(TARGET)/bin
. If tests are run by Autotest (with make check
), pass TESTS=
(i.e. set TESTS
to an empty list), e.g.:
-$(MAKE) -C '$(1)' -j '$(JOBS)' check -k TESTS=
An alternative (but less straightforward) way would be to use TEST_LOGS=
instead of TESTS=
.
The information in this article was true as of commit 62b92f0a4819864659dba1794d65a1a86333de7d
("mpfr, mpc: TESTS=").
Categories: General | Housekeeping | Component breeding tips | Common build problems | Bedtime reading