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

fatal error while building #16

Open
ybkdemon opened this issue Dec 10, 2016 · 0 comments
Open

fatal error while building #16

ybkdemon opened this issue Dec 10, 2016 · 0 comments

Comments

@ybkdemon
Copy link

ybkdemon commented Dec 10, 2016

When I tried to build project with
scons mode=release install=true
it gives the following error:
scons: Reading SConscript files ...
Building NVCC tool
scons: warning: Two different environments were specified for target src/detail/matrix/copy_operations.os, but they appear to have the same action: $SHCXX -o $TARGET -c $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM $SOURCES
File "/home/ybk/workspace/persistent-rnn/SConscript", line 45, in <module> scons: *** Multiple ways to build the same target were specified for: src/detail/matrix/copy_operations.os (from ['/home/ybk/workspace/persistent-rnn/src/detail/matrix/copy_operations.cu'] and from ['src/detail/matrix/copy_operations.cpp'])
File "/home/ybk/workspace/persistent-rnn/SConscript", line 45, in <module>

So I tried another way to build it with
source ubuntu-64-environment.sh
sudo scons install=true
it gives another error like:
scons:Reading SConscript files ...
Building NVCC tool
Installing Persistent RNN Kernels
scons: done reading SConscript files.
scons: Building targets ...
nvcc -o .debug_build/benchmark/benchmark-atomic-throughput.o -c -Xcompiler -g -Xcompiler -DPRNN_DEBUG -Xcompiler -Wall -Xcompiler -Werror -I /usr/local/cuda/include -I .debug_build/include -I include -gencode=arch=compute_30,code=sm_30 -G -std=c++11 "-D CUDA_ARCH_MAJOR=3" -Xcompiler=-Wno-unused-function -Xcompiler=-Wno-unused-private-field benchmark/benchmark-atomic-throughput.cu
In file included from /usr/local/cuda/include/cuda_runtime.h:112:0, from <command-line>:0: /usr/local/cuda/include/common_functions.h:87:15: fatal error: new: No such file or directory #include <new>
compilation terminated.
scons: *** [.debug_build/benchmark/benchmark-atomic-throughput.o] Error 1
scons: building terminated because of errors.

At first I thought it was the problem of clang++ to find c++ include files, so i write an example named new_feature to test whether clang++ can do #include <new>
#include <iostream>
#include <string>
#include <new>
class MyClass
{
public:
std::string s ="Hello, world\n"; // Non-static data member initializer
};
int main()
{
std::cout << MyClass().s;
}
Then I run it with:
clang++ -std=c++11 -stdlib=libc++ -Werror -Weverything -Wno-disabled-macro-expansion -Wno-float-equal -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-global-constructors -Wno-exit-time-destructors -Wno-missing-prototypes -Wno-padded -Wno-old-style-cast -lc++ -lc++abi new_feature.cpp
and it runs well and gives the output file.
So I don't know why the project gives me an error like that when I try to build it...

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

1 participant