Franticware / SGDK_wine

Wine wrapper generator script that enables SGDK usage in e.g. Linux
MIT License
17 stars 2 forks source link

bad interpreter: Permission denied #7

Closed gustavolinux closed 1 year ago

gustavolinux commented 1 year ago

I'm having trouble to comple a sample here at ~/pCloudDrive/MegaDrive/SGDK/sample/joy-test

make GDK=$HOME/pCloudDrive/MegaDrive/SGDK -f $HOME/pCloudDrive/MegaDrive/SGDK/makefile_wine.gen
mkdir -p src/boot
mkdir -p out
/home/drummond/pCloudDrive/MegaDrive/SGDK/bin/gcc  -DSGDK_GCC -m68000 -Wall -Wextra -Wno-shift-negative-value -Wno-main -Wno-unused-parameter -fno-builtin -fms-extensions -Iinc -Isrc -Ires -I/home/drummond/pCloudDrive/MegaDrive/SGDK/inc -I/home/drummond/pCloudDrive/MegaDrive/SGDK/res -B/home/drummond/pCloudDrive/MegaDrive/SGDK/bin -c src/boot/rom_head.c -o out/rom_head.o
sh: /home/drummond/pCloudDrive/MegaDrive/SGDK/bin/gcc: /bin/bash: bad interpreter: Permission denied
make: *** [/home/drummond/pCloudDrive/MegaDrive/SGDK/makefile_wine.gen:171: out/rom_head.o] Error 126

What should I do in this case?

Franticware commented 1 year ago

I have not seen this before. What kind of Linux do you use?

What do these commands output for you? ls -la /home/drummond/pCloudDrive/MegaDrive/SGDK/bin/gcc echo cat /home/drummond/pCloudDrive/MegaDrive/SGDK/bin/gcc echo /home/drummond/pCloudDrive/MegaDrive/SGDK/bin/gcc

gustavolinux commented 1 year ago
ls -la /home/drummond/pCloudDrive/MegaDrive/SGDK/bin/gcc
-rw-r--r-- 1 drummond drummond 127 dez 30 15:37 /home/drummond/pCloudDrive/MegaDrive/SGDK/bin/gcc
cat /home/drummond/pCloudDrive/MegaDrive/SGDK/bin/gcc
#!/bin/bash
BIN_DIR="$(dirname "$0")"
WINEDEBUG=-all WINEPREFIX="$BIN_DIR/.wineconf" wine "$BIN_DIR/$(basename "$0").exe" "$@"
echo /home/drummond/pCloudDrive/MegaDrive/SGDK/bin/gcc
/home/drummond/pCloudDrive/MegaDrive/SGDK/bin/gcc
gustavolinux commented 1 year ago

I found out it was an issue related to pCloudDrive.... tried in a normal directory and it's working as normal now.

Franticware commented 1 year ago

Yes, the issue was that gcc did not retain executable permission (the filesystem probably does not support it). It should have been -rwxr-xr-x