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

Compile issue on CentOS 6 #6

Closed
m8522s opened this issue Nov 4, 2019 · 3 comments
Closed

Compile issue on CentOS 6 #6

m8522s opened this issue Nov 4, 2019 · 3 comments

Comments

@m8522s
Copy link

m8522s commented Nov 4, 2019

Hi.
I noticed a compile issue on CentOS 6 with GCC 6.3.1 and would like to share the details including a solution/workaround.

First, gcc doesn't know about some options, so I need to replace them in the file cmake/flags.cmake:
Replace std=c++11 by std=c++0x
Replace Ofast by O2

The error message during make is:

In file included from /usr/src/xmrig-cuda-1.0.0-beta/src/cryptonight.h:30:0,
                 from /usr/src/xmrig-cuda-1.0.0-beta/src/xmrig-cuda.cpp:26:
/usr/src/xmrig-cuda-1.0.0-beta/src/crypto/common/Algorithm.h:93:5: error: ‘size_t’ does not name a type
     size_t l2() const
     ^~~~~~

To fix this, I added an include statement in line 29 of file src/crypto/common/Algorithm.h

#include <sys/types.h>

That way, make completes without errors and produces a working libxmrig-cuda.so

xmrig added a commit that referenced this issue Nov 5, 2019
@xmrig
Copy link
Owner

xmrig commented Nov 5, 2019

Please show cmake output from fresh start, I fix -Ofast and size_t (by adding <cstddef> header), but this gcc version should understand std=c++11.
Thank you.

@m8522s
Copy link
Author

m8522s commented Nov 6, 2019

-- The C compiler identification is GNU 6.3.1
-- The CXX compiler identification is GNU 6.3.1
-- Check for working C compiler: /opt/rh/devtoolset-6/root/usr/bin/cc
-- Check for working C compiler: /opt/rh/devtoolset-6/root/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/rh/devtoolset-6/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/devtoolset-6/root/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for __builtin___clear_cache
-- Looking for __builtin___clear_cache - found
-- Found CUDA: /usr/local/cuda (found suitable version "9.1", minimum required is "8.0") 
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/src/xmrig-cuda/build

@m8522s
Copy link
Author

m8522s commented Nov 6, 2019

I also cloned the git repository locally and re-done the compilation steps. Now it compiles with out issue. Thanks for fixing.

@m8522s m8522s closed this as completed Nov 6, 2019
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

2 participants