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

Disable x86 (32-bit) Linux builds or issue a warning #4091

Open
fatcerberus opened this issue Oct 30, 2017 · 9 comments
Open

Disable x86 (32-bit) Linux builds or issue a warning #4091

fatcerberus opened this issue Oct 30, 2017 · 9 comments

Comments

@fatcerberus
Copy link
Contributor

Tried to make a 32-bit ChakraCore build for Linux (Ubuntu), but the build failed. I was able to build for x64 without a hitch, but x86 proved futile.

Command line:

fatcerberus@pigcult-vm:~/src/ChakraCore$ ./build.sh --embed-icu -j=4 --lto --arch=x86

Gave me the following output:

lto: ranlib disabled
Custom CXX /home/fatcerberus/src/ChakraCore/cc-toolchain/build/bin/clang++
Custom CC  /home/fatcerberus/src/ChakraCore/cc-toolchain/build/bin/clang
Build path: /home/fatcerberus/src/ChakraCore/out/Release
-- /home/fatcerberus/src/ChakraCore/bin/ch/DbgController.js.h is up to date. skipping.
Compile Target : x86
Generating Release makefiles

-- found ICU libs: deps/icu/source/output/include//../lib/
-- Configuring done
-- Generating done
-- Build files have been written to: /home/fatcerberus/src/ChakraCore/out/Release
[  0%] Building CXX object lib/Jsrt/Core/CMakeFiles/Chakra.Jsrt.Core.dir/JsrtContextCore.cpp.o
[  1%] Building CXX object pal/src/CMakeFiles/Chakra.Pal.dir/cruntime/file.cpp.o
clang-4.0: error: argument unused during compilation: '-arch i386' [-Werror,-Wunused-command-line-argument]
lib/Jsrt/Core/CMakeFiles/Chakra.Jsrt.Core.dir/build.make:62: recipe for target 'lib/Jsrt/Core/CMakeFiles/Chakra.Jsrt.Core.dir/JsrtContextCore.cpp.o' failed
make[2]: *** [lib/Jsrt/Core/CMakeFiles/Chakra.Jsrt.Core.dir/JsrtContextCore.cpp.o] Error 1
CMakeFiles/Makefile2:1448: recipe for target 'lib/Jsrt/Core/CMakeFiles/Chakra.Jsrt.Core.dir/all' failed
make[1]: *** [lib/Jsrt/Core/CMakeFiles/Chakra.Jsrt.Core.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
clang-4.0: error: argument unused during compilation: '-arch i386' [-Werror,-Wunused-command-line-argument]
pal/src/CMakeFiles/Chakra.Pal.dir/build.make:62: recipe for target 'pal/src/CMakeFiles/Chakra.Pal.dir/cruntime/file.cpp.o' failed
make[2]: *** [pal/src/CMakeFiles/Chakra.Pal.dir/cruntime/file.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[  1%] Building CXX object pal/src/CMakeFiles/Chakra.Pal.dir/cruntime/filecrt.cpp.o
[  1%] Building CXX object pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/filecrt.cpp.o
[  1%] Building CXX object pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/file.cpp.o
clang-4.0: error: argument unused during compilation: '-arch i386' [-Werror,-Wunused-command-line-argument]
pal/src/CMakeFiles/Chakra.Pal.dir/build.make:86: recipe for target 'pal/src/CMakeFiles/Chakra.Pal.dir/cruntime/filecrt.cpp.o' failed
make[2]: *** [pal/src/CMakeFiles/Chakra.Pal.dir/cruntime/filecrt.cpp.o] Error 1
CMakeFiles/Makefile2:142: recipe for target 'pal/src/CMakeFiles/Chakra.Pal.dir/all' failed
make[1]: *** [pal/src/CMakeFiles/Chakra.Pal.dir/all] Error 2
clang-4.0: error: argument unused during compilation: '-arch i386' [-Werror,-Wunused-command-line-argument]
pal/src/CMakeFiles/Chakra.Pal.Singular.dir/build.make:62: recipe for target 'pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/file.cpp.o' failed
make[2]: *** [pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/file.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
clang-4.0: error: argument unused during compilation: '-arch i386' [-Werror,-Wunused-command-line-argument]
pal/src/CMakeFiles/Chakra.Pal.Singular.dir/build.make:86: recipe for target 'pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/filecrt.cpp.o' failed
make[2]: *** [pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/filecrt.cpp.o] Error 1
[  1%] Building CXX object pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/finite.cpp.o
clang-4.0: error: argument unused during compilation: '-arch i386' [-Werror,-Wunused-command-line-argument]
pal/src/CMakeFiles/Chakra.Pal.Singular.dir/build.make:110: recipe for target 'pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/finite.cpp.o' failed
make[2]: *** [pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/finite.cpp.o] Error 1
CMakeFiles/Makefile2:105: recipe for target 'pal/src/CMakeFiles/Chakra.Pal.Singular.dir/all' failed
make[1]: *** [pal/src/CMakeFiles/Chakra.Pal.Singular.dir/all] Error 2
[  1%] Building CXX object lib/Backend/CMakeFiles/Chakra.Backend.dir/AgenPeeps.cpp.o
[  1%] Building CXX object lib/Backend/CMakeFiles/Chakra.Backend.dir/AsmJsJITInfo.cpp.o
[  1%] Building CXX object lib/Backend/CMakeFiles/Chakra.Backend.dir/Backend.cpp.o
clang-4.0clang-4.0: : errorerror: : argument unused during compilation: '-arch i386' [-Werror,-Wunused-command-line-argument]argument unused during compilation: '-arch i386' [-Werror,-Wunused-command-line-argument]

lib/Backend/CMakeFiles/Chakra.Backend.dir/build.make:62: recipe for target 'lib/Backend/CMakeFiles/Chakra.Backend.dir/AgenPeeps.cpp.o' failed
make[2]: *** [lib/Backend/CMakeFiles/Chakra.Backend.dir/AgenPeeps.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
lib/Backend/CMakeFiles/Chakra.Backend.dir/build.make:86: recipe for target 'lib/Backend/CMakeFiles/Chakra.Backend.dir/AsmJsJITInfo.cpp.o' failed
make[2]: *** [lib/Backend/CMakeFiles/Chakra.Backend.dir/AsmJsJITInfo.cpp.o] Error 1
[  1%] Building CXX object lib/Backend/CMakeFiles/Chakra.Backend.dir/BackendApi.cpp.o
clang-4.0: error: argument unused during compilation: '-arch i386' [-Werror,-Wunused-command-line-argument]
clang-4.0: error: argument unused during compilation: '-arch i386' [-Werror,-Wunused-command-line-argument]
lib/Backend/CMakeFiles/Chakra.Backend.dir/build.make:110: recipe for target 'lib/Backend/CMakeFiles/Chakra.Backend.dir/Backend.cpp.o' failed
make[2]: *** [lib/Backend/CMakeFiles/Chakra.Backend.dir/Backend.cpp.o] Error 1
lib/Backend/CMakeFiles/Chakra.Backend.dir/build.make:134: recipe for target 'lib/Backend/CMakeFiles/Chakra.Backend.dir/BackendApi.cpp.o' failed
make[2]: *** [lib/Backend/CMakeFiles/Chakra.Backend.dir/BackendApi.cpp.o] Error 1
CMakeFiles/Makefile2:285: recipe for target 'lib/Backend/CMakeFiles/Chakra.Backend.dir/all' failed
make[1]: *** [lib/Backend/CMakeFiles/Chakra.Backend.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
See error details above. Exit code was 2
@obastemur
Copy link
Collaborator

@fatcerberus no short/mid term x86 support on *nix. We might add a message warning the user for x86. Would you like to send a PR?

@fatcerberus
Copy link
Contributor Author

Oh, it's not supported? That's fine then, I thought it was because the --help output shows:

--arch[=S]        Set target arch (arm, x86, amd64)

Implying it's supported. I agree there should be a warning for it, though.

@dilijev dilijev changed the title Unable to build x86 ChakraCore on Linux Linux build of ChakraCore for x86 should warn that x86 is not supported. Nov 6, 2017
@obastemur
Copy link
Collaborator

Implying it's supported. I agree there should be a warning for it, though.

@fatcerberus would you like to send a PR?

@fatcerberus
Copy link
Contributor Author

@obastemur I would, but what I’m confused about is that build.sh is only for Unix platforms; is x86 relevant to any of them? It seems to only be relevant for Windows nowadays, where build.sh doesn’t apply.

In light of all that, it seems like the --arch=x86 option shouldn’t even exist?

@obastemur
Copy link
Collaborator

In light of all that, it seems like the --arch=x86 option shouldn’t even exist?

At the moment, yes, there is nothing can keep end-user from using it or there is no even warning. could be nice to have a warning message ? and we could close this issue with that? :)

@fatcerberus
Copy link
Contributor Author

Yeah, what I was trying to figure out was whether to make a PR that adds the warning, or if I should just completely remove x86 from the list of architectures on the —help screen (or both).

@obastemur
Copy link
Collaborator

Simply adding a warning is enough IMHO.

@ppenzin
Copy link
Member

ppenzin commented Apr 17, 2020

The errors have nothing to do with x86 support per se, -arch flag is not getting used in that particular compile command, which is normally a warning, but -Werror turns it into an error and aborts the build, which does sound a bit excessive.

@ppenzin ppenzin changed the title Linux build of ChakraCore for x86 should warn that x86 is not supported. Unable to build x86 ChakraCore on Linux Apr 17, 2020
@rhuanjl
Copy link
Collaborator

rhuanjl commented May 21, 2020

As an extra note, x86 has never been supported on linux - so if it does actually build after the flags are fixed there will likely be some issues to iron out - I think there are few places in the source tree where there's architecture specific stuff that has x86 gated behind #ifdef windows or #ifdef win32 or the like.

This is purely anecdotal I haven't gone through the source tree looking for these (I also don't have a linux machine so cannot easily experiment with this - whilst the linux and macOS builds are similar apple have removed support for running 32bit code from macOS, so I cannot run 32bit binaries on my machine).

@ppenzin ppenzin changed the title Unable to build x86 ChakraCore on Linux Disable x86 (32-bit) Linux builds or issue a warning Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants