Cannot Build cpp due to clang++ unsupported option '-mrelaxed-simd' for target 'x86_64-pc-linux-gnu' · Issue #884 · faasm/faasm · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'am trying to test with some cpp files with faasm.
I've cloned faasm v0.27.0 locally and checkouted the client/cpp v0.5.0 and faabric v0.2.0 according to the .env file.
After that I just go through following the tutorial:
$ source bin/workon.sh
$ faasmctl deploy.compose \
--ini-file=./faasm.ini \
--workers=0 \
--mount-source=. \
--clean
$ faasmctl cli.faasm
(faasm) inv dev.cmake
(faasm) inv dev.tools
(faasm) exit
$ faasmctl cli.cpp
(cpp) inv func demo hello
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=/usr/local/faasm/toolchain/tools/WasiToolchain.cmake -DCMAKE_BUILD_TYPE=Release /code/cpp/func
-- Faasm building STATIC libraries
-- Faasm building target
System is unknown to cmake, create:
Platform/WASI to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. Please post that file on discourse.cmake.org.
-- Detected wasm build (sysroot=/usr/local/faasm/llvm-sysroot)
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /code/cpp/build/func
[1/2] Building CXX object demo/CMakeFiles/hello.dir/hello.cpp.obj
FAILED: demo/CMakeFiles/hello.dir/hello.cpp.obj
/usr/local/faasm/toolchain/bin/clang++ -DWASM_PROF=1 -D__faasm -O3 -mrelaxed-simd -msimd128 --sysroot=/usr/local/faasm/llvm-sysroot -m32 -DANSI -D__faasm -D_WASI_EMULATED_GETPID -D_WASI_EMULATED_PROCESS_CLOCKS -D_WASI_EMULATED_SIGNAL -std=gnu++17 -MD -MT demo/CMakeFiles/hello.dir/hello.cpp.obj -MF demo/CMakeFiles/hello.dir/hello.cpp.obj.d -o demo/CMakeFiles/hello.dir/hello.cpp.obj -c /code/cpp/func/demo/hello.cpp
clang++: error: unsupported option '-mrelaxed-simd'for target 'x86_64-pc-linux-gnu'
clang++: error: unsupported option '-msimd128'for target 'x86_64-pc-linux-gnu'
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/code/cpp/venv/bin/inv", line 8, in<module>sys.exit(program.run())
File "/code/cpp/venv/lib/python3.10/site-packages/invoke/program.py", line 398, in run
self.execute()
File "/code/cpp/venv/lib/python3.10/site-packages/invoke/program.py", line 583, in execute
executor.execute(*self.tasks)
File "/code/cpp/venv/lib/python3.10/site-packages/invoke/executor.py", line 140, in execute
result = call.task(*args, **call.kwargs)
File "/code/cpp/venv/lib/python3.10/site-packages/invoke/tasks.py", line 138, in __call__
result = self.body(*args, **kwargs)
File "/code/cpp/tasks/func.py", line 75, in compile
wasm_cmake(
File "/code/cpp/faasmtools/compile_util.py", line 44, in wasm_cmake
raise RuntimeError("failed on make for {}".format(target))
RuntimeError: failed on make for hello
I suppose maybe I should upgrade my clang or set right target, but I didn't find that in tutorial. I've noticed that in some of the pr you've support clang-18 in client/cpp but still clang-17 in faasm project, where I have no idea whether this is my local problem or incorrect setting from the cloud image.
I tried to make change of FAASM_WASM_TRIPLE and WASM_CFLAGS within faasm docker, but that didn't work.
I'm wondering how I can fix it to continue to run some cpp in Faasm, or any steps I missed?
I'am looking forward to your reply. Thanks!
The text was updated successfully, but these errors were encountered:
It looks like something went wrong during your set-up.
Did you follow the quick start documents?
For example, the following works for me:
docker run --rm -it faasm.azurecr.io/cpp-sysroot:0.6.0 /usr/local/faasm/toolchain/bin/clang -v
clang version 18.1.0rc (https://github.com/llvm/llvm-project c6c86965d967886ca5a2ed8968c949cd42cdd49a)
Target: wasm32-unknown-wasi
Thread model: posix
InstalledDir: /usr/local/faasm/toolchain/bin
Could you clarify what steps did you follow to reproduce the issue?
In particular, could you confirm if the following works:
# Clone fresh version
git clone https://github.com/faasm/faasm
cd faasm
git submodule update --init
# Here I am assuming you want a development cluster# (this prioritizes binaries cached in your host, non-existant at the beginning)source ./bin/workon.sh
faasmctl deploy.compose --mount-source .# Build the missing binaries
faasmctl cli.faasm
inv dev.tools --build=Debug
exit# You are ready to run functions
faasmctl cli.cpp
inv func.local --clean
exit
Hello, I'am trying to test with some cpp files with faasm.
I've cloned faasm v0.27.0 locally and checkouted the client/cpp v0.5.0 and faabric v0.2.0 according to the .env file.
After that I just go through following the tutorial:
I suppose maybe I should upgrade my clang or set right target, but I didn't find that in tutorial. I've noticed that in some of the pr you've support clang-18 in client/cpp but still clang-17 in faasm project, where I have no idea whether this is my local problem or incorrect setting from the cloud image.
I tried to make change of
FAASM_WASM_TRIPLE
andWASM_CFLAGS
within faasm docker, but that didn't work.I'm wondering how I can fix it to continue to run some cpp in Faasm, or any steps I missed?
I'am looking forward to your reply. Thanks!
The text was updated successfully, but these errors were encountered: