piface314 / ygo-fabrica

A project manager for EDOPro card packs.
MIT License
24 stars 4 forks source link

(v2) Additional installation steps neccessary on gentoo-linux #9

Closed monyarm closed 2 years ago

monyarm commented 3 years ago

1: symlinking luajit-2.1.0-beta3 to luajit, because ygofab expects the executable to be called luajit (this is something of a non-issue, as it's more so gentoo's fault)

2: commenting out the vips install code, because it can't detect that vips is installed (even though the vips command runs in the terminal)

luajit-2.1.0-beta3 make.lua install --locale en                                                                                                                              [ERROR] failed to install vips
  1. Installation of luafilesystem, because lua-path doesn't have mkdir, if luafilesystem is not present.
    luajit-2.1.0-beta3: make.lua:263: attempt to call field 'mkdir' (a nil value)
    stack traceback:
        make.lua:263: in function 'base'
        make.lua:253: in function 'fn'
        ./lib/interpreter.lua:124: in function 'exec'
        make.lua:326: in main chunk
        [C]: at 0x55e204fde2a0

4.Removal of Log.assert due to broken localization

[ERROR] luajit-2.1.0-beta3: ./lib/logs.lua:28: bad argument #7 to 'write' (string expected, got nil)
stack traceback:
        [C]: in function 'write'
        ./lib/logs.lua:28: in function 'error'
        ./lib/logs.lua:22: in function 'assert'
        make.lua:269: in function 'fonts'
        make.lua:254: in function 'fn'
        ./lib/interpreter.lua:124: in function 'exec'
        make.lua:326: in main chunk
        [C]: at 0x557403c242a0
piface314 commented 3 years ago

I'm doing a lot of changes to the installer recently, so yeah, I will rewrite the installation steps anyway. Thanks for pointing out the part of luafilesystem. I had removed it from the dependency list, because I thought path had it already included. My bad.

piface314 commented 3 years ago

By the way, you don't have to necessarily install that version of LuaJIT. If there is another version that already installs it with the shorter name, you can use it. Also, it's my fault too that the wiki isn't complete yet .-.

monyarm commented 3 years ago

Logs.Assert is still broken with the exact same error.

piface314 commented 3 years ago

-.- just now I noticed a typo in make-locale.lua... but even with the typo here, it doesn't seem to cause any error for me. Could you show me your error log again? Or is it exactly the same lines again?

When you reported this error the first time, it happened with me too, but now it's not the case.

monyarm commented 3 years ago

Exact same and if I remove the assert from that line it works, but the same error happens on the next assert, rince and repeat.

On Tue, Mar 23, 2021, 5:25 PM Henrique Santana @.***> wrote:

-.- just now I noticed a typo in make-locale.lua... but even with the typo here, it doesn't seem to cause any error for me. Could you show me your error log again? Or is it exactly the same lines again?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/piface314/ygo-fabrica/issues/9#issuecomment-804995303, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXHJKWKIUP2QRKVHKMRDADTFCXGPANCNFSM4XTW3GRA .

piface314 commented 3 years ago

I mean, even the line number is the same? I changed that file considerably, make.lua:269 currently is just an else statement lol

monyarm commented 3 years ago

Well, ya, the line numbers are different, but it's the exact same kind of error

[ERROR] luajit: ./lib/logs.lua:25: bad argument #7 to 'write' (string
expected, got nil)
stack traceback:
       [C]: in function 'write'
       ./lib/logs.lua:25: in function 'error'
       ./lib/logs.lua:19: in function 'assert'
       make.lua:313: in function 'bins'
       make.lua:283: in function 'fn'
       ./lib/interpreter.lua:123: in function 'exec'
       make.lua:352: in main chunk
       [C]: at 0x56545f0a02a0

It happens when what's being asserted is a function like write, or cp or exec.

On Tue, Mar 23, 2021 at 5:42 PM Henrique Santana @.***> wrote:

I mean, even the line number is the same? I changed that file considerably, make.lua:269 currently is just an else statement lol

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/piface314/ygo-fabrica/issues/9#issuecomment-805009213, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXHJKUFER4ME4CZEHYAJMDTFCZIFANCNFSM4XTW3GRA .

piface314 commented 3 years ago

Hmm, now I see there are really some problems here - some strings are missing - but what puzzles me is why it errors out for you. When an assertion does not fail, the other arguments aren't even checked, see:

function Logs.assert(v, ...)
  if not v then Logs.error(...) end
  return v
end

That's why for me, even when a string is missing, I don't see an error. I don't know why it spits out that error for you.

piface314 commented 3 years ago

Just to check, could you please show me the output if you run =os.execute('echo') in luajit interactive mode?

$ luajit
LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2017 Mike Pall. http://luajit.org/
JIT: ON SSE2 SSE3 SSE4.1 BMI2 fold cse dce fwd dse narrow loop abc sink fuse
> =os.execute('echo')

0

Is it different from this?

monyarm commented 3 years ago

it is

 monyarm  ~  luajit
LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2017 Mike Pall. http://luajit.org/
JIT: ON SSE2 SSE3 SSE4.1 BMI2 fold cse dce fwd dse narrow loop abc sink
fuse
> =os.execute('echo')

true    exit    0

On Tue, Mar 23, 2021 at 6:28 PM Henrique Santana @.***> wrote:

Just to check, could you please show me the output if you run =os.execute('echo') in luajit interactive mode?

$ luajit LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2017 Mike Pall. http://luajit.org/ JIT: ON SSE2 SSE3 SSE4.1 BMI2 fold cse dce fwd dse narrow loop abc sink fuse

=os.execute('echo')

0

Is it different from this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/piface314/ygo-fabrica/issues/9#issuecomment-805045325, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXHJKQEUJU6F7LEHK45S7TTFC6R5ANCNFSM4XTW3GRA .

piface314 commented 3 years ago

Now that explains a lot haha. To check if an external command was successful, the return value of os.execute was checked. But in my experience it only returned that code as its first return value. It happened to return that code as the third value on Windows, so I thought that was a Windows only thing. Thanks for pointing this out. That probably messed other parts of the installation, so I'd suggest you to delete everything and install it again, changing line 140 in make.lua, which currently is like this:

function exec(command, ...) return os.execute(command:format(...)) == 0 end

to this:

function exec(command, ...)
  local c1, _, c2 = os.execute(command:format(...))
  return c1 == 0 or c2 == 0
end

I'll reopen this issue until it is officially fixed.

piface314 commented 2 years ago

Now this time it should be working. I'll just release these fixes as a patch release so you can try it.