Skip to content
This repository has been archived by the owner on Jan 9, 2021. It is now read-only.

./fasm: Permission denied #288

Open
stanlane opened this issue Jun 29, 2017 · 10 comments
Open

./fasm: Permission denied #288

stanlane opened this issue Jun 29, 2017 · 10 comments

Comments

@stanlane
Copy link

I followed the steps in https://github.com/nicehash/nheqminer

git clone https://github.com/nicehash/nheqminer.git
cd nheqminer/cpu_xenoncat/asm_linux/
sh assemble.sh
assemble.sh: 1: assemble.sh: ./fasm: Permission denied
assemble.sh: 2: assemble.sh: ./fasm: Permission denied
@jarbro
Copy link

jarbro commented Jun 29, 2017

Type in the following to proceed.
chmod +x fasm
Then run sh assemble.sh

@scriptzteam
Copy link

scriptzteam commented Jun 30, 2017

Maybe this #260 will help??

Had the same but now I got to this after i run cmake ../nheqminer:

-- CXXFLAGS:  -std=c++11 -m64 -msse2
-- LIBS: /usr/lib/x86_64-linux-gnu/libboost_system.a;/usr/lib/x86_64-linux-gnu/libboost_log_setup.a;/usr/lib/x86_64-linux-gnu/libboost_log.a;/usr/lib/x86_64-linux-gnu/libboost_date_time.a;/usr/lib/x86_64-linux-gnu/libboost_filesystem.a;/usr/lib/x86_64-linux-gnu/libboost_thread.a;/usr/lib/x86_64-linux-gnu/libboost_regex.a;/usr/lib/x86_64-linux-gnu/libboost_chrono.a;/usr/lib/x86_64-linux-gnu/libboost_atomic.a;/usr/lib/x86_64-linux-gnu/libpthread.a
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find CUDA (missing: CUDA_CUDART_LIBRARY) (found version "7.5")
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.5/Modules/FindCUDA.cmake:949 (find_package_handle_standard_args)
  cuda_djezo/CMakeLists.txt:20 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/build/CMakeFiles/CMakeOutput.log".
See also "/home/ubuntu/build/CMakeFiles/CMakeError.log".

from the error log

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/ubuntu/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_84c0e/fast"
/usr/bin/make -f CMakeFiles/cmTC_84c0e.dir/build.make CMakeFiles/cmTC_84c0e.dir/build
make[1]: Entering directory '/home/ubuntu/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_84c0e.dir/CheckFunctionExists.c.o
/usr/bin/cc    -m64 -msse2 -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_84c0e.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c
Linking C executable cmTC_84c0e
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_84c0e.dir/link.txt --verbose=1
/usr/bin/cc   -m64 -msse2 -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTC_84c0e.dir/CheckFunctionExists.c.o  -o cmTC_84c0e -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_84c0e.dir/build.make:97: recipe for target 'cmTC_84c0e' failed
make[1]: *** [cmTC_84c0e] Error 1
make[1]: Leaving directory '/home/ubuntu/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_84c0e/fast' failed
make: *** [cmTC_84c0e/fast] Error 2

@pingo2030
Copy link

Hi, I run cmake ../nheqminer and say this:

-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:1 (project):
No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
See also "/root/git/nheqminer/CMakeFiles/CMakeOutput.log".
See also "/root/git/nheqminer/CMakeFiles/CMakeError.log".

please Help me

@hoyanf
Copy link

hoyanf commented Jul 23, 2017

Should remove "./" in assemble.sh as it means run from current directory not global.

cat assemble.sh

./fasm -m 1280000 equihash_avx1.asm
./fasm -m 1280000 equihash_avx2.asm

No problems running manually via cmd prompt

# fasm -m 1280000 equihash_avx1.asm
flat assembler  version 1.71.51  (1280000 kilobytes memory)
3 passes, 0.5 seconds, 17144 bytes.
# fasm -m 1280000 equihash_avx2.asm
flat assembler  version 1.71.51  (1280000 kilobytes memory)
3 passes, 0.5 seconds, 17183 bytes.

@RobBridgeman
Copy link

RobBridgeman commented Aug 12, 2017

I got this same issue, when i ran chmod +x fasm, i now get a syntax error.
./fasm: 1: ./fasm: Syntax Error: "(" unexpected appear twice.

Note i am using the Built in Ubuntu shell for Win 10, so that may be the cause?

@sebastianst
Copy link

just pull my PR #226 already

@JaquesBoum
Copy link

JaquesBoum commented Sep 21, 2017

Or just change the lines to
--- removed ---

At least thats what worked in my setting.

@sebastianst
Copy link

sebastianst commented Sep 21, 2017

@JaquesBoum that is not a good idea, to assemble files as root. Why would you do that?! If anything, that's dangerous. And besides, afterwards, the generated binary is then owned by root so the user cannot clean/delete the sources any more without another sudo rm manual interaction...

@JaquesBoum
Copy link

Good Point. For my use case it made no difference - but I remove my suggestion so it does not get used on a production system by someone.

@sebastianst
Copy link

Sure. As the first comment suggests, it is easier and more secure to just run chmod 755 fasm than invoking something with sudo... And your suggestion should actually work without sudo since it seems that the fasm binary is installed on your system, because you didn't call sudo ./fasm but sudo fasm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants