taviso / 123elf

A native port of Lotus 1-2-3 to Linux.
1.18k stars 59 forks source link

"setup file damaged, please run setup123" #14

Closed ghost closed 2 years ago

ghost commented 2 years ago

Tried compiling with the official instructions on Arch Linux and get this error when I run ./123:

123: setup file </home/ironveil/.l123set> damaged, please run setup123

Not sure what went wrong, even after a fresh recompile it still persists. I can add any more information if needed

taviso commented 2 years ago

That's okay, I think you just need to run cp l123set.cf ~/.l123set and it should work!

I know this is ugly, when it's closer to being in a release state I'll write come code that does this automatically!

ghost commented 2 years ago

I've ran that but still get the same error

taviso commented 2 years ago

Hmm - it's possible it can't find one of the files listed in there.

does this work?

$ ls -l /proc/self/cwd/root/lotus/123.v10/ri/USA-English/123.ri 
-rw-r--r-- 1 taviso taviso 1491 May 21 12:39 /proc/self/cwd/root/lotus/123.v10/ri/USA-English/123.ri

It uses /proc/self/cwd as a temporary hack to find the files.

ghost commented 2 years ago

Yup, same output as you:

$ ls -l /proc/self/cwd/root/lotus/123.v10/ri/USA-English/123.ri 
-rw-r--r-- 1 ironveil ironveil 1491 May 22 22:26 /proc/self/cwd/root/lotus/123.v10/ri/USA-English/123.ri
ghost commented 2 years ago

After reading the binutils README, it might be an issue with my compiling of binutils. Since it's late here I'll try recompiling binutils and doing a fresh build on my PC rather than this laptop. I'll update the thread if this fixes it or not (my PC also uses Arch).

taviso commented 2 years ago

Maybe - but I'm surprised it got that far if binutils wasn't working - it might help to see strace output!

ghost commented 2 years ago

Just tried on my PC, using the binutils.sh script for binutils, and get the same output. Here's the strace output for ./123, if that's what you mean by the last bit:

execve("./123", ["./123"], 0x7ffc9194ead0 /* 40 vars */) = 0
[ Process PID=327986 runs in 32 bit mode. ]
strace: WARNING: Proper structure decoding for this personality is not supported, please consider building strace with mpers support enabled.
brk(NULL)                               = 0x835d000
arch_prctl(0x3001 /* ARCH_??? */, 0xffdcd618) = -1 EINVAL (Invalid argument)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7ec4000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=125043, ...}) = 0
mmap2(NULL, 125043, PROT_READ, MAP_PRIVATE, 3, 0) = 0xf7ea5000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib32/libc.so.6", O_RDONLY|O_LARGEFILE|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\240\23\2\0004\0\0\0"..., 512) = 512
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\202n\305\213[S<\202]m\26Nt\241\2650"..., 132, 468) = 132
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=2263904, ...}) = 0
mmap2(NULL, 2295644, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xf7c74000
mprotect(0xf7c94000, 2113536, PROT_NONE) = 0
mmap2(0xf7c94000, 1593344, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x20000) = 0xf7c94000
mmap2(0xf7e19000, 516096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a5000) = 0xf7e19000
mmap2(0xf7e98000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x223000) = 0xf7e98000
mmap2(0xf7e9b000, 38748, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xf7e9b000
close(3)                                = 0
openat(AT_FDCWD, "/usr/lib32/libncursesw.so.6", O_RDONLY|O_LARGEFILE|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\0P\300\0\0004\0\0\0"..., 512) = 512
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=415736, ...}) = 0
mmap2(NULL, 419884, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xf7c0d000
mprotect(0xf7c19000, 360448, PROT_NONE) = 0
mmap2(0xf7c19000, 233472, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc000) = 0xf7c19000
mmap2(0xf7c52000, 122880, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x45000) = 0xf7c52000
mmap2(0xf7c71000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x63000) = 0xf7c71000
close(3)                                = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7c0b000
set_thread_area({entry_number=-1, base_addr=0xf7ec5a00, limit=0x0fffff, seg_32bit=1, contents=0, read_exec_only=0, limit_in_pages=1, seg_not_present=0, useable=1}) = 0 (entry_number=12)
set_tid_address(0xf7ec5a68)             = 327986
set_robust_list(0xf7ec5a70, 12)         = 0
rseq(0xf7ec5f20, 0x20, 0, 0x53053053)   = 0
mprotect(0xf7e98000, 8192, PROT_READ)   = 0
mprotect(0xf7c71000, 8192, PROT_READ)   = 0
mprotect(0x8130000, 4096, PROT_READ)    = 0
mprotect(0xf7f02000, 8192, PROT_READ)   = 0
ugetrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
munmap(0xf7ea5000, 125043)              = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
getrandom("\xd2\x77\xe7\x10", 4, GRND_NONBLOCK) = 4
brk(NULL)                               = 0x835d000
brk(0x837e000)                          = 0x837e000
brk(0x837f000)                          = 0x837f000
openat(AT_FDCWD, "/lib/chrclass/ascii", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/spool/lp/admins/lp/printers", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/spool/lp/interface", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
geteuid32()                             = 1000
getcwd("/home/ironveil/Git/123elf", 1024) = 26
access("/home/ironveil", R_OK|X_OK)     = 0
openat(AT_FDCWD, "/home/ironveil/.l123set", O_RDONLY) = 3
ioctl(3, TCGETS, 0xffdcc480)            = -1 ENOTTY (Inappropriate ioctl for device)
read(3, 0x835d260, 1024)                = -1 EISDIR (Is a directory)
close(3)                                = 0
brk(0x837e000)                          = 0x837e000
write(2, "123: setup file </home/ironveil/"..., 151123: setup file </home/ironveil/.l123set> damaged, please run setup123
123: fichier setup </home/ironveil/.l123set> endommage, veuillez lancer setup123) = 151
write(2, "\n", 1
)                       = 1
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 opost isig icanon echo ...}) = 0
exit_group(2)                           = ?
+++ exited with 2 +++
taviso commented 2 years ago

I think I've figured out the bug, patch on the way soon.