gcc versions later than 5 are not supported while compiling ethminer





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















Important stuff:



Hello users of Ubuntu. Recently I have decided to step into the Ethereum mining world and compile ethminer myself. After installing cuda however, I ran into a small problem. While doing sudo cmake --build . after cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF, the console outputted this:



[  0%] Built target BuildInfo.h
[ 29%] Built target devcore
[ 41%] Built target ethash
[ 45%] Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
In file included from /usr/local/cuda/include/cuda_runtime.h:78:0,
from <command-line>:0:
/usr/local/cuda/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!
#error -- unsupported GNU version! gcc versions later than 5 are not supported!
^~~~~
CMake Error at ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o.Release.cmake:222 (message):
Error generating
/home/diamond/ethminer/build/libethash-cuda/CMakeFiles/ethash-cuda.dir//./ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o


libethash-cuda/CMakeFiles/ethash-cuda.dir/build.make:63: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o' failed
make[2]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o] Error 1
CMakeFiles/Makefile2:232: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/all' failed
make[1]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2


Additional info:



I installed CUDA using sudo apt install cuda. It installed nvidia-275 and cuda itself (along with a lot other stuff)










share|improve this question


















  • 2





    IIRC there are some cmake variables you can use to specify a particular gcc to use; try for example adding -D CUDA_NVCC_FLAGS="-ccbin gcc-4.9" (assuming you have gcc-4.9 installed)

    – steeldriver
    Jul 19 '17 at 13:39











  • Got it working. sudo apt install gcc-4.9 g++-4.9 then from here, do ls -la /usr/bin/ | grep -oP "[S]*(gcc|g++)(-[a-z]+)*[s]" | xargs bash -c 'for link in ${@:1}; do sudo ln -s -f "/usr/bin/${link}-${0}" "/usr/bin/${link}"; done' 4.9

    – dat tutbrus
    Jul 20 '17 at 6:36




















1















Important stuff:



Hello users of Ubuntu. Recently I have decided to step into the Ethereum mining world and compile ethminer myself. After installing cuda however, I ran into a small problem. While doing sudo cmake --build . after cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF, the console outputted this:



[  0%] Built target BuildInfo.h
[ 29%] Built target devcore
[ 41%] Built target ethash
[ 45%] Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
In file included from /usr/local/cuda/include/cuda_runtime.h:78:0,
from <command-line>:0:
/usr/local/cuda/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!
#error -- unsupported GNU version! gcc versions later than 5 are not supported!
^~~~~
CMake Error at ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o.Release.cmake:222 (message):
Error generating
/home/diamond/ethminer/build/libethash-cuda/CMakeFiles/ethash-cuda.dir//./ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o


libethash-cuda/CMakeFiles/ethash-cuda.dir/build.make:63: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o' failed
make[2]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o] Error 1
CMakeFiles/Makefile2:232: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/all' failed
make[1]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2


Additional info:



I installed CUDA using sudo apt install cuda. It installed nvidia-275 and cuda itself (along with a lot other stuff)










share|improve this question


















  • 2





    IIRC there are some cmake variables you can use to specify a particular gcc to use; try for example adding -D CUDA_NVCC_FLAGS="-ccbin gcc-4.9" (assuming you have gcc-4.9 installed)

    – steeldriver
    Jul 19 '17 at 13:39











  • Got it working. sudo apt install gcc-4.9 g++-4.9 then from here, do ls -la /usr/bin/ | grep -oP "[S]*(gcc|g++)(-[a-z]+)*[s]" | xargs bash -c 'for link in ${@:1}; do sudo ln -s -f "/usr/bin/${link}-${0}" "/usr/bin/${link}"; done' 4.9

    – dat tutbrus
    Jul 20 '17 at 6:36
















1












1








1








Important stuff:



Hello users of Ubuntu. Recently I have decided to step into the Ethereum mining world and compile ethminer myself. After installing cuda however, I ran into a small problem. While doing sudo cmake --build . after cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF, the console outputted this:



[  0%] Built target BuildInfo.h
[ 29%] Built target devcore
[ 41%] Built target ethash
[ 45%] Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
In file included from /usr/local/cuda/include/cuda_runtime.h:78:0,
from <command-line>:0:
/usr/local/cuda/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!
#error -- unsupported GNU version! gcc versions later than 5 are not supported!
^~~~~
CMake Error at ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o.Release.cmake:222 (message):
Error generating
/home/diamond/ethminer/build/libethash-cuda/CMakeFiles/ethash-cuda.dir//./ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o


libethash-cuda/CMakeFiles/ethash-cuda.dir/build.make:63: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o' failed
make[2]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o] Error 1
CMakeFiles/Makefile2:232: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/all' failed
make[1]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2


Additional info:



I installed CUDA using sudo apt install cuda. It installed nvidia-275 and cuda itself (along with a lot other stuff)










share|improve this question














Important stuff:



Hello users of Ubuntu. Recently I have decided to step into the Ethereum mining world and compile ethminer myself. After installing cuda however, I ran into a small problem. While doing sudo cmake --build . after cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF, the console outputted this:



[  0%] Built target BuildInfo.h
[ 29%] Built target devcore
[ 41%] Built target ethash
[ 45%] Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
In file included from /usr/local/cuda/include/cuda_runtime.h:78:0,
from <command-line>:0:
/usr/local/cuda/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!
#error -- unsupported GNU version! gcc versions later than 5 are not supported!
^~~~~
CMake Error at ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o.Release.cmake:222 (message):
Error generating
/home/diamond/ethminer/build/libethash-cuda/CMakeFiles/ethash-cuda.dir//./ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o


libethash-cuda/CMakeFiles/ethash-cuda.dir/build.make:63: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o' failed
make[2]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o] Error 1
CMakeFiles/Makefile2:232: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/all' failed
make[1]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2


Additional info:



I installed CUDA using sudo apt install cuda. It installed nvidia-275 and cuda itself (along with a lot other stuff)







nvidia compiling gcc cuda cmake






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jul 19 '17 at 12:05









dat tutbrusdat tutbrus

460521




460521








  • 2





    IIRC there are some cmake variables you can use to specify a particular gcc to use; try for example adding -D CUDA_NVCC_FLAGS="-ccbin gcc-4.9" (assuming you have gcc-4.9 installed)

    – steeldriver
    Jul 19 '17 at 13:39











  • Got it working. sudo apt install gcc-4.9 g++-4.9 then from here, do ls -la /usr/bin/ | grep -oP "[S]*(gcc|g++)(-[a-z]+)*[s]" | xargs bash -c 'for link in ${@:1}; do sudo ln -s -f "/usr/bin/${link}-${0}" "/usr/bin/${link}"; done' 4.9

    – dat tutbrus
    Jul 20 '17 at 6:36
















  • 2





    IIRC there are some cmake variables you can use to specify a particular gcc to use; try for example adding -D CUDA_NVCC_FLAGS="-ccbin gcc-4.9" (assuming you have gcc-4.9 installed)

    – steeldriver
    Jul 19 '17 at 13:39











  • Got it working. sudo apt install gcc-4.9 g++-4.9 then from here, do ls -la /usr/bin/ | grep -oP "[S]*(gcc|g++)(-[a-z]+)*[s]" | xargs bash -c 'for link in ${@:1}; do sudo ln -s -f "/usr/bin/${link}-${0}" "/usr/bin/${link}"; done' 4.9

    – dat tutbrus
    Jul 20 '17 at 6:36










2




2





IIRC there are some cmake variables you can use to specify a particular gcc to use; try for example adding -D CUDA_NVCC_FLAGS="-ccbin gcc-4.9" (assuming you have gcc-4.9 installed)

– steeldriver
Jul 19 '17 at 13:39





IIRC there are some cmake variables you can use to specify a particular gcc to use; try for example adding -D CUDA_NVCC_FLAGS="-ccbin gcc-4.9" (assuming you have gcc-4.9 installed)

– steeldriver
Jul 19 '17 at 13:39













Got it working. sudo apt install gcc-4.9 g++-4.9 then from here, do ls -la /usr/bin/ | grep -oP "[S]*(gcc|g++)(-[a-z]+)*[s]" | xargs bash -c 'for link in ${@:1}; do sudo ln -s -f "/usr/bin/${link}-${0}" "/usr/bin/${link}"; done' 4.9

– dat tutbrus
Jul 20 '17 at 6:36







Got it working. sudo apt install gcc-4.9 g++-4.9 then from here, do ls -la /usr/bin/ | grep -oP "[S]*(gcc|g++)(-[a-z]+)*[s]" | xargs bash -c 'for link in ${@:1}; do sudo ln -s -f "/usr/bin/${link}-${0}" "/usr/bin/${link}"; done' 4.9

– dat tutbrus
Jul 20 '17 at 6:36












1 Answer
1






active

oldest

votes


















0














This solved my problem:



sudo rm /usr/local/cuda/bin/gcc
sudo rm /usr/local/cuda/bin/g++
sudo apt install gcc-5 g++-5
sudo ln -s /usr/bin/gcc-5 /usr/local/cuda/bin/gcc
sudo ln -s /usr/bin/g++-5 /usr/local/cuda/bin/g++





share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f937684%2fgcc-versions-later-than-5-are-not-supported-while-compiling-ethminer%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    This solved my problem:



    sudo rm /usr/local/cuda/bin/gcc
    sudo rm /usr/local/cuda/bin/g++
    sudo apt install gcc-5 g++-5
    sudo ln -s /usr/bin/gcc-5 /usr/local/cuda/bin/gcc
    sudo ln -s /usr/bin/g++-5 /usr/local/cuda/bin/g++





    share|improve this answer




























      0














      This solved my problem:



      sudo rm /usr/local/cuda/bin/gcc
      sudo rm /usr/local/cuda/bin/g++
      sudo apt install gcc-5 g++-5
      sudo ln -s /usr/bin/gcc-5 /usr/local/cuda/bin/gcc
      sudo ln -s /usr/bin/g++-5 /usr/local/cuda/bin/g++





      share|improve this answer


























        0












        0








        0







        This solved my problem:



        sudo rm /usr/local/cuda/bin/gcc
        sudo rm /usr/local/cuda/bin/g++
        sudo apt install gcc-5 g++-5
        sudo ln -s /usr/bin/gcc-5 /usr/local/cuda/bin/gcc
        sudo ln -s /usr/bin/g++-5 /usr/local/cuda/bin/g++





        share|improve this answer













        This solved my problem:



        sudo rm /usr/local/cuda/bin/gcc
        sudo rm /usr/local/cuda/bin/g++
        sudo apt install gcc-5 g++-5
        sudo ln -s /usr/bin/gcc-5 /usr/local/cuda/bin/gcc
        sudo ln -s /usr/bin/g++-5 /usr/local/cuda/bin/g++






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 14 at 6:04









        SherzodSherzod

        1




        1






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f937684%2fgcc-versions-later-than-5-are-not-supported-while-compiling-ethminer%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents