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

macos sampctl package run error! #414

Closed tars-c closed 3 years ago

tars-c commented 3 years ago
INFO: Package does not have any tags, consider versioning your code with: `sampctl package release`
failed to run package: received runtime error: failed to start server: failed to start pty: fork/exec /Users/<username>/SAMP/MYRP/samp03svr: exec format error

The command was used. The pwn build was successful and the amx file could not be launched.

Eventually, the server did not start. I also kept pawn.json as default. I tried running it with the --bare option, but I got the same error.

What is this error and how can I fix it?

macOS 10.14.6 firewall enabled: off homebrew version: latest Xcode Command Version: 10.1

tars-c commented 3 years ago

Well ... I built the sampctl and pty libraries that use sampctl. A little more detailed error could be confirmed.

failed to run package: received runtime error: failed to start server: failed to start pty: fork/exec /Users/<username>/_SAMPCTL/samp03svr: Setctty set but Ctty not valid in child
exit status 1

I still haven't solved the problem and I can't use sampctl. Should I think there is a problem with the pty library?

Do you know how to fix it?

tars-c commented 3 years ago

image: image

Using ZSH(Iterm.app) image

Using Default Terminal.app (No ZSH) image

tars-c commented 3 years ago

I thought the "zsh" extension was the problem, but "zsh" didn't have a problem.

As I keep searching, it seems that sampctl package run is not available in osx.

Related link: https://stackoverflow.com/questions/8233518/unable-to-run-a-binary-in-mac-running-on-linux

$file/path/destination/file
samp03svr: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamic link, interpreter/lib/ld-, for GNU/Linux 2.6.18, removed

It looks like samp03svr needs to be recompiled for OSX version. If you have any other opinions, please write comment. If there is no comment, close the issue.

(macOS has no choice but to use Docker!)

Compiler osx, linux image: image

ADRFranklin commented 3 years ago

You can't use sampctl on Mac, without docker. Because Mac has removed x86 bit application support, which is what the compiler uses to compile your gamemode.

I'm not a Mac user, so compiling it for Mac might work, but I can't confirm such an action.

luanargolodev commented 3 years ago

Hello tars-c, How did you manage to compile?

Southclaws commented 3 years ago

You can't use sampctl on Mac

sampctl works fine, it's the compiler binary that won't run.

You'd need to compile the pawn compiler for x86_64/amd64 architecture while maintaining a 32 bit wide address space in the Pawn VM. Not sure if anyone has bothered to do this yet.

tars-c commented 3 years ago

@argololuan currently use to linux machine(ubuntu) and compiler util program sampctl