aws-sdk-cpp icon indicating copy to clipboard operation
aws-sdk-cpp copied to clipboard

on Centos "make" fails with a file copy error, "sudo make" succeeds.

Open DigiTester opened this issue 8 years ago • 3 comments

There appear to be permission problems with files in the git repo. But I'm not sure what they are. The non-sudo build works fine on a Mac. I've cut down to only building core and SNS because a full build takes an hour... then fails at 100% complete.

[100%] Linking CXX executable aws-cpp-sdk-core-tests
Error copying directory from "/home/digiflex/aws-sdk-cpp/aws-cpp-sdk-core-tests/resources" to "/home/digiflex/aws-sdk-cpp/build/aws-cpp-sdk-core-tests".
make[2]: *** [aws-cpp-sdk-core-tests/aws-cpp-sdk-core-tests] Error 1
make[1]: *** [aws-cpp-sdk-core-tests/CMakeFiles/aws-cpp-sdk-core-tests.dir/all] Error 2
make: *** [all] Error 2

Alternatively, if I "make" then after that fails "sudo make" just does the problematic file copy and successfully runs the tests. Running the whole thing as root works too.

What platform/OS are you using?

Centos 7

$ cmake3 --version cmake3 version 3.6.3 $ gcc --version gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16) $ clang --version clang version 7.0.0 (https://llvm.org/git/clang.git 590cfc2ac3ed6b2b18bab2eba2c78a8ba56435d4) (https://llvm.org/git/llvm.git ecb72f4119329da830d94ea651d7eb695321c90a) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/local/bin

What's your CMake arguments?

Both these: cmake3 -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="core;sns" .. cmake3 -DBUILD_ONLY="core;sns" ..

Can you provide a TRACE level log? (sanitize any sensitive information)

The permissions are as follows (multiple listings edited for brevity) Tracing "/home/digiflex/aws-sdk-cpp/aws-cpp-sdk-core-tests/resources" which contains only the directory aws4_testsuite:

drwxrwxr-x. 6 digiflex digiflex  125 Apr 30 11:21 aws-cpp-sdk-core-tests
drwxrwxr-x. 3 digiflex digiflex   28 Apr 30 11:21 resources
drwxrwxr-x. 3 digiflex digiflex   57 Apr 30 11:21 aws4_testsuite

DigiTester avatar May 02 '18 00:05 DigiTester

FYI -- I use CentOS 7 with GCC 6.2.0. Last time I had to build AWS SDK tests were broken (don't recall the exact issue -- could be the same), had to switch them off (-DENABLE_TESTING=OFF on cmake cmdline)

crusader-mike avatar Jun 14 '18 21:06 crusader-mike

Hi @DigiTester and @crusader-mike , sorry for the late response, and I hope this is no longer an issue for you two but just in case, there's a couple things I'd like to respond here.

The sudo is definitely a permission issue, the dependencies are automatically built as separate projects so it tries to install them on {project_dir}/.deps/build unless you set the argument -DBUILD_DEPS=OFF, note that you will still need to build them separately and specify the location, but this way you can choose where they build and won't necessarily need the sudo. Second thing is, gcc 4.8.5 will give you problems, and CentOs dev packages won't upgrade further, so you'll have to upgrade manually from source. As for the testing problems those are usually when looking for libstdc++, in my case I fixed it with the command : export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64 but you can set the lib path on your cmake arguments as well. Let me know if you still are facing the your these issues.

KaibaLopez avatar Aug 01 '19 22:08 KaibaLopez

Second thing is, gcc 4.8.5 will give you problems, and CentOs dev packages won't upgrade further, so you'll have to upgrade manually from source.

... or use SCL:

$ sudo yum -y install centos-release-scl
...
$ sudo yum -y install devtoolset-8-gcc-c++.x86_64
...
$ scl enable devtoolset-8 rh-git29 -- bash
...
$ g++ --version
g++ (GCC) 8.2.1 20180905 (Red Hat 8.2.1-3)
...

crusader-mike avatar Aug 01 '19 23:08 crusader-mike