pawn-lang / compiler

Pawn compiler for SA-MP with bug fixes and new features - runs on Windows, Linux, macOS
Other
306 stars 72 forks source link

Compiler does not accept filename for compilation #501

Open Misiur opened 4 years ago

Misiur commented 4 years ago

3.10.10 linux release build 3.10.9 windows release build Trying to build from source, will update with last known working version as well.

strace does not suggest that the filename param is used at all. Will update how it goes with sampctl. New thread is being created by the compiler I belive. Full strace

execve("./pawncc", ["./pawncc", "new.pwn"], [/* 33 vars */]) = 0
strace: [ Process PID=6948 runs in 32 bit mode. ]
brk(NULL)                               = 0x8aa7000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7ef7000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=103309, ...}) = 0
mmap2(NULL, 103309, PROT_READ, MAP_PRIVATE, 3, 0) = 0xf7edd000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/root/UGRP/pawno/libpawnc.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\201\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0777, st_size=667094, ...}) = 0
mmap2(NULL, 264388, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xf7e9c000
mprotect(0xf7ed6000, 4096, PROT_NONE)   = 0
mmap2(0xf7ed7000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3a000) = 0xf7ed7000
mmap2(0xf7eda000, 10436, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xf7eda000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib32/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\207\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1775464, ...}) = 0
mmap2(NULL, 1784348, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xf7ce8000
mprotect(0xf7e95000, 4096, PROT_NONE)   = 0
mmap2(0xf7e96000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ad000) = 0xf7e96000
mmap2(0xf7e99000, 10780, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xf7e99000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7ce7000
set_thread_area({entry_number:-1, base_addr:0xf7ce7700, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 (entry_number:12)
mprotect(0xf7e96000, 8192, PROT_READ)   = 0
mprotect(0xf7ed7000, 8192, PROT_READ)   = 0
mprotect(0x8049000, 4096, PROT_READ)    = 0
mprotect(0xf7f20000, 4096, PROT_READ)   = 0
munmap(0xf7edd000, 103309)              = 0
mmap2(NULL, 397312, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7c86000
mmap2(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7c55000
brk(NULL)                               = 0x8aa7000
brk(0x8ac8000)                          = 0x8ac8000
access("./pawn.cfg", R_OK)              = 0
open("./pawn.cfg", O_RDONLY)            = 3
fstat64(3, {st_mode=S_IFREG|0777, st_size=11, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0777, st_size=11, ...}) = 0
_llseek(3, 0, [0], SEEK_SET)            = 0
read(3, "-)+ -;+ -d3", 11)              = 11
_llseek(3, 11, [11], SEEK_SET)          = 0
close(3)                                = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
write(1, "Pawn compiler 3.10.9\t \t \tCopyrig"..., 65) = 65
write(1, "\n", 1)                       = 1
write(1, "Usage:   pawncc <filename> [file"..., 52) = 52
write(1, "Options:\n", 9)               = 9
write(1, "         -A<num>  alignment in b"..., 71) = 71
write(1, "         -a       output assembl"..., 40) = 40
write(1, "         -C[+/-]  compact encodi"..., 63) = 63
write(1, "         -c<name> codepage name "..., 73) = 73
write(1, "         -Dpath   active directo"..., 40) = 40
write(1, "         -d<num>  debugging leve"..., 48) = 48
write(1, "             0    no symbolic in"..., 62) = 62
write(1, "             1    run-time check"..., 59) = 59
write(1, "             2    full debug inf"..., 62) = 62
write(1, "             3    same as -d2, b"..., 47) = 47
write(1, "         -e<name> set name of er"..., 57) = 57
write(1, "         -i<name> path for inclu"..., 41) = 41
write(1, "         -l       create list fi"..., 53) = 53
write(1, "         -o<name> set base name "..., 56) = 56
write(1, "         -O<num>  optimization l"..., 51) = 51
write(1, "             0    no optimizatio"..., 34) = 34
write(1, "             1    JIT-compatible"..., 52) = 52
write(1, "             2    full optimizat"..., 37) = 37
write(1, "         -p<name> set name of \"p"..., 44) = 44
write(1, "         -R[+/-]  add detailed r"..., 77) = 77
write(1, "         -r[name] write cross re"..., 79) = 79
write(1, "         -S<num>  stack/heap siz"..., 58) = 58
write(1, "         -s<num>  skip lines fro"..., 49) = 49
write(1, "         -t<num>  TAB indent siz"..., 70) = 70
write(1, "         -v<num>  verbosity leve"..., 76) = 76
write(1, "         -w<num>  disable a spec"..., 59) = 59
write(1, "         -X<num>  abstract machi"..., 55) = 55
write(1, "         -XD<num> abstract machi"..., 66) = 66
write(1, "         -Z[+/-]  run in compati"..., 56) = 56
write(1, "         -E[+/-]  turn warnings "..., 45) = 45
write(1, "         -\\       use '\\' for es"..., 48) = 48
write(1, "         -^       use '^' for es"..., 48) = 48
write(1, "         -;[+/-]  require a semi"..., 72) = 72
write(1, "         -([+/-]  require parant"..., 74) = 74
write(1, "         sym=val  define constan"..., 57) = 57
write(1, "         sym=     define constan"..., 53) = 53
write(1, "\nOptions with a value may option"..., 79) = 79
write(1, "with a colon (\":\") or an equal s"..., 78) = 78
write(1, "and \"-d:0\" are all equivalent.\n", 31) = 31
munmap(0xf7c55000, 200704)              = 0
munmap(0xf7c86000, 397312)              = 0
exit_group(3)                           = ?
+++ exited with 3 +++

Workspace Information:

Zeex commented 4 years ago

Try changing -(+ to -)+ in your pawn.cfg, this worked for me. In this case it just comes across an unknown flag and prints the usage message.

It would be great if it actually said which flag is invalid though.

Zeex commented 4 years ago

Added an error message in https://github.com/pawn-lang/compiler/commit/a9fb3f07128b3c6eff7c0e1a25ba1e5bcef0f923

Invalid or unsupported option: <argument here>

e.g.

Invalid or unsupported option: -)+
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity.