ubuntu - Cannot mark file as executable (?) -
[note:] first thought problem caused cuda, because of filesystem (see in answers) - belong program, if else got stuck here.
the problem
i try program nvidia-gpu on ubuntu, of cuda.
when i'm compiling works fine - no errors, no warnings. in end executable cannot open, message permission denied. when check access rights see file isn't "marked executable". if try set it, box gets unchecked again. commands like
sudo chmod +x ./myprogram don't work (the rights stay same were).
what did
i installed
sudo apt-get install nvidia-cuda-dev nvidia-cuda-toolkit and afterwards
sudo apt-get install build-essential freeglut3-dev libgl1-mesa-glx libglu1-mesa-dev libx11-dev libxi-dev libxmu-dev the code should alright, since it's working on every other machine not on ubuntu/gpu combination (?).
the according cmakeslists.txt
cmake_minimum_required(version 2.8) project( gpusobel ) find_package( cuda required) find_package( opencv required ) if (cuda_found) message("cuda found!") set(cuda_nvcc_flags ${cuda_nvcc_flags} -o3 -lineinfo -gencode arch=compute_20,code=sm_20 -gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_35,code=compute_35) set(cudasrcs main.cu ) cuda_add_executable(gpusobel ${cudasrcs}) else() message("cuda not found, abort") endif() set(cmake_cxx_flags "-g -wall") # sse support if(cmake_compiler_is_gnucxx) set(cmake_cxx_flags "${cmake_cxx_flags} -msse -msse2 -msse3") endif() target_link_libraries( gpusobel ${opencv_libs} ) add_custom_command(target gpusobel post_build command ${cmake_command} -e copy_directory ${cmake_source_dir}/images $<target_file_dir:gpusobel>/images) please enlighten me why sudo powerless here, compile- or linux-error ?
have seen http://bikulov.org/blog/2013/12/24/example-of-cmake-file-for-cuda-plus-cpp-code/ ?? use code cmake.
Comments
Post a Comment