Southclaws / sampctl

The Swiss Army Knife of SA:MP - vital tools for any server owner or library maintainer.
GNU General Public License v3.0
242 stars 33 forks source link

No such directory when using "package build" for the first time on Ubuntu #406

Closed ghost closed 4 years ago

ghost commented 4 years ago

Here is the output:

INFO: failed to open repo as git repository: repository does not exist
INFO: se8870/ProjectX read package from directory /home/alice/Desktop/Project X
INFO: se8870/ProjectX building dependency tree and ensuring cached copies
INFO: |- se8870/ProjectX is parent
INFO: |- iterating 2 dependencies of se8870/ProjectX
INFO: |-|- github.com/sampctl/samp-stdlib ensured
INFO: |-|- iterating 1 dependencies of sampctl/samp-stdlib
INFO: |-|-|- github.com/sampctl/pawn-stdlib ensured
INFO: |-|-|- iterating 0 dependencies of sampctl/pawn-stdlib
INFO: |-|- github.com/pBlueG/SA-MP-MySQL ensured
INFO: |-|- added target path for resource includes: /home/alice/Desktop/Project X/dependencies/.resources/SA-MP-MySQL-5f509e
INFO: |-|- ignoring platform mismatch windows
INFO: |-|- github.com/pBlueG/SA-MP-MySQL is a plugin
INFO: |-|- iterating 0 dependencies of pBlueG/SA-MP-MySQL
INFO: se8870/ProjectX flattened dependencies to 3 leaves
INFO: Checking for cached package pawn-v3.10.10-linux.tgz in /home/alice/.samp
INFO: setting permissions for binaries
INFO: Using cached package pawn-v3.10.10-linux.tgz
INFO: using include path /home/alice/Desktop/Project X/dependencies/samp-stdlib
INFO: using include path /home/alice/Desktop/Project X/dependencies/pawn-stdlib
INFO: using include path /home/alice/Desktop/Project X/dependencies/.resources/SA-MP-MySQL-5f509e
INFO: building se8870/ProjectX with 3.10.10
INFO: executing compiler in /home/alice/Desktop/Project X/gamemodes as [LD_LIBRARY_PATH=/home/alice/.samp/pawn/3.10.10 DYLD_LIBRARY_PATH=/home/alice/.samp/pawn/3.10.10] [/home/alice/.samp/pawn/3.10.10/pawncc /home/alice/Desktop/Project X/gamemodes/main.pwn -D/home/alice/Desktop/Project X/gamemodes -o/home/alice/Desktop/Project X/gamemodes/main.amx -d3 -;+ -(+ -\+ -Z+ -i/home/alice/Desktop/Project X/dependencies/samp-stdlib -i/home/alice/Desktop/Project X/dependencies/pawn-stdlib -i/home/alice/Desktop/Project X/dependencies/.resources/SA-MP-MySQL-5f509e]
failed to compile package entry: fork/exec /home/alice/.samp/pawn/3.10.10/pawncc: no such file or directory

Just ignore failed to open repo because its finding my repository not rutimes. Also maybe i can download manually but better find a solution for user linux who got error like this.

ADRFranklin commented 4 years ago

We are still unsure as to what causes this, because it's something to do with the compiler itself and possibly not finding the shared library that is in the same folder as it.

It could be due to the fact that while downloading the compiler, it become corrupted and won't execute properly. It has been an issue that even myself has faced in the past but was unable to find out the cause for it, though after a re-install, it fixed the issue.

If you are able to leave some information about the permissions it has, the file size and using ldd to show what it links against on your system, would be helpful towards fixing this problem in the future.

Southclaws commented 4 years ago

I think this happens with compiler 3.10.9+ (if I remember correct) and is related to a newer version of some dependency inside the binary. Though I could be wrong.

Try with pawn compiler 3.10.8 it might work.

ghost commented 4 years ago

I think i solved the problem, it's because i'm using a 64 bit and pawncc require lib32 package. Here is the command i used during my research to "how to fix this issue"

sudo apt install sudo dpkg --add-architecture i386
sudo apt update
sudo apt install lib32z1 libtstdc++6:i386
cd ~/.samp/pawn/3.10.10/
sudo chmod +x pawncc

After that, i test again with sampctl package build and it worked. Here i made a .sh file: https://gist.github.com/se8870/c1a7265f02cc2722dfb1b0d137fcba46 (Debian based only)

Southclaws commented 4 years ago

Ah yes, I completely forgot about that detail! Thanks for sharing the solution.

eoussama commented 3 years ago

sudo apt install sudo dpkg --add-architecture i386 sudo apt update sudo apt install lib32z1 libtstdc++6:i386 cd ~/.samp/pawn/3.10.10/ sudo chmod +x pawncc

Should be

-- sudo apt install sudo dpkg --add-architecture i386
++ sudo apt install 
++ sudo dpkg --add-architecture i386
   sudo apt update
   sudo apt install lib32z1 lib32stdc++6
   cd ~/.samp/pawn/3.10.10/
   sudo chmod +x pawncc