I am getting this error while creating executable file:
[1/2] clang++ -shared -o ./SampleDll_check.dll #SampleDll_check.dll.rsp
FAILED: SampleDll_check.dll SampleDll_check.lib
clang++ -shared -o ./SampleDll_check.dll #SampleDll_check.dll.rsp
clang++: error: no input files
ninja: build stopped: subcommand failed.
Please provide any hint what is wrong?
Related
I'm trying to build the simplest OpenMP or OpenACC C++ program with GPU offload using gcc-10, CUDA 11 on Ubuntu 18.04 and this CMakeLists.txt file (or OpenMP version):
cmake_minimum_required(VERSION 3.18)
project(hello VERSION 0.1.0)
find_package(OpenACC REQUIRED)
add_executable(hello main.cpp)
target_compile_options(hello PRIVATE -O3 -fopenacc -foffload=nvptx-none)
target_link_libraries (hello OpenACC::OpenACC_CXX)
The build fails with:
[build] [100%] Linking CXX executable hello
[build] /usr/local/bin/cmake -E cmake_link_script CMakeFiles/hello.dir/link.txt --verbose=1
[build] /usr/bin/g++-10 -O3 -DNDEBUG -fopenacc CMakeFiles/hello.dir/main.cpp.o -o hello
[build] ptxas fatal : Value 'sm_30' is not defined for option 'gpu-name'
[build] nvptx-as: ptxas returned 255 exit status
[build] mkoffload: fatal error: /usr/bin/x86_64-linux-gnu-accel-nvptx-none-gcc-10 returned 1 exit status
[build] compilation terminated.
I suspect that a flag defining GPU architecture is missing, but I can't find relevant documentation. Offloading Support in GCC: Compilation options don't have Nvidia example and when I try my best guess -foffload="-arch=sm_75" or -foffload=nvidia-"-arch=sm_75", I get:
[build] [ 50%] Building CXX object CMakeFiles/hello.dir/main.cpp.o
[build] /usr/local/bin/cmake -E time /usr/bin/g++-10 -DFMT_LOCALE -O3 -DNDEBUG -O3 -fopenacc -foffload=nvptx-none -foffload=\"-arch=sm_75\" -std=gnu++2a -o CMakeFiles/hello.dir/main.cpp.o -c /home/paul/st/hello/main.cpp
[build] g++-10: fatal error: GCC is not configured to support "-arch as offload target
[build] compilation terminated.
Any clues or relevant links will be highly appreciated.
Please help figure out what the problem when I tried build "ninja" for "ClickHouse"
https://clickhouse.yandex/docs/ru/development/build_osx/
SDKs/MacOSX10.15.sdk -D OS_DARWIN -nostdinc++ -MD -MT dbms/CMakeFiles/dbms.dir/src/Storages/LiveView/StorageLiveView.cpp.o -MF dbms/CMakeFiles/dbms.dir/src/Storages/LiveView/StorageLiveView.cpp.o.d -o dbms/CMakeFiles/dbms.dir/src/Storages/LiveView/StorageLiveView.cpp.o -c ../dbms/src/Storages/LiveView/StorageLiveView.cpp
In file included from ../dbms/src/Storages/LiveView/StorageLiveView.cpp:31:
../dbms/src/Storages/LiveView/LiveViewBlockInputStream.h:188:57: error: use of undeclared identifier 'timestamp'
last_event_timestamp_usec = static_cast<UInt64>(timestamp.epochMicroseconds());
^
1 error generated.
[3313/4079] Building CXX object dbms/CMakeFiles/dbms.dir/src/Client/ConnectionPoolWithFailover.cpp.o
ninja: build stopped: subcommand failed.
Also, I created a request here:
https://github.com/ClickHouse/ClickHouse/issues/8638
I am trying to build an executable file for Ubuntu machine for v8.
The following is the command executed :
g++ -g -ggdb -o Engine -lm *.o -Wl,--start-group /home/atdesk-83/v8/out/native/obj.target/{tools/gyp/libv8_{base,libbase,snapshot,libplatform},third_party/icu/libicu{uc,i18n,data}}.a -Wl,--end-group -lrt -pthread
I am receiving the error :
/home/atdesk-83/v8/out/native/obj.target/tools/gyp/libv8_base.a: error
adding symbols: Malformed archive collect2: error: ld returned 1 exit
status
Can anyone help to solve this?
I am using g++ version 4.8.5. I am trying to compile my project using it. It compiles without a problem, when compiling directly from the terminal. But, when using a make file, it gives me following error, even though I am using the same option.
cc1plus: error: unrecognized command line option "-std=c++11"
What am I doing wrong here ?
Edit:
as requested, here's my makefile line:
main: main.cc
#g++ -std=c++11 main.cpp -o run
Try using g++'s absolute path:
main: main.cc
#/usr/bin/g++-4.8 -std=c++11 main.cpp -o run
I've downloaded from github and built gcc. After that I've tried to compile a code with OpenMP:
../GCC/build/gcc/xgcc -B./../GCC/build/gcc/ -I./../GCC/build/x86_64-unknown-linux-gnu/libgomp -Wno-write-strings -O3 -Wall -fopenmp -lpng -o mandelbrot-omp mandelbrot-omp.cpp
Then I got the following error message:
xgcc: error: libgomp.spec: No such file or directory
I've checked and found out that libgomp directory contains the libgomp.spec file. The directory is included with -I option. What's wrong?