zhad3 / zrenderer

A renderer for Ragnarok Online sprites

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error build in Windows

LeonardoFeriato opened this issue · comments

OS: Windows 10 PRO
Visual Studio: 2022 Community
https://github.com/zhad3/zrenderer/releases/tag/v1.3.5

Following those steps: #15 (comment)

image

image
error:

lld-link: error: could not open 'D:\Git\zrenderer\LuaD/c/build/x86_64-release/liblua5.1.lib': no such file or directory
Error: linking with LLD failed
ldc2 failed with exit code 1.

Trying use those steps too: https://sourceforge.net/projects/luabinaries/files/5.1.5/Windows%20Libraries/Static/

commented

Hi @LeonardoFeriato

**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.11.22
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>cd /D G:\Projects\zRO Tools\zrenderer

G:\Projects\zRO Tools\zrenderer>dub --version
DUB version 1.29.0, built on Jul 20 2022

G:\Projects\zRO Tools\zrenderer>ldc2 --version
LDC - the LLVM D compiler (1.30.0):
  based on DMD v2.100.1 and LLVM 14.0.3
  built with LDC - the LLVM D compiler (1.30.0)
  Default target: x86_64-pc-windows-msvc
  Host CPU: haswell
  http://dlang.org - http://wiki.dlang.org/LDC

  Registered Targets:
    aarch64    - AArch64 (little endian)
    aarch64_32 - AArch64 (little endian ILP32)
    aarch64_be - AArch64 (big endian)
    amdgcn     - AMD GCN GPUs
    <snip>
    x86        - 32-bit X86: Pentium-Pro and above
    x86-64     - 64-bit X86: EM64T and AMD64
    xcore      - XCore

G:\Projects\zRO Tools\zrenderer>dub build --compiler=ldc2 --build=release --force :server > build_output.txt

Works for me.

I see that you're using Visual Studio 2022. That I haven't tested yet.
But considering the error message I would expect an error happening when trying to compile lua5.1. Somewhere around

luad ~master: building configuration "library"...
Running pre-build commands...

Please run dub --version and ldc2 --version and attach the full build log.

Hi, @zhad3

Follow what you need, there is some parts in brazilian portuguese in build log, but I think with Google Translate you won't have any problems

**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.4.4
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************

D:\Git\zrenderer>dub --version
DUB version 1.29.0, built on Jul 20 2022

D:\Git\zrenderer>ldc2 --version
LDC - the LLVM D compiler (1.30.0):
  based on DMD v2.100.1 and LLVM 14.0.3
  built with LDC - the LLVM D compiler (1.30.0)
  Default target: x86_64-pc-windows-msvc
  Host CPU: ivybridge
  http://dlang.org - http://wiki.dlang.org/LDC

  Registered Targets:
    aarch64    - AArch64 (little endian)
    aarch64_32 - AArch64 (little endian ILP32)
    aarch64_be - AArch64 (big endian)
    amdgcn     - AMD GCN GPUs
    arm        - ARM
    arm64      - ARM64 (little endian)
    arm64_32   - ARM64 (little endian ILP32)
    armeb      - ARM (big endian)
    avr        - Atmel AVR Microcontroller
    bpf        - BPF (host endia
    bpfeb      - BPF (big endian)
    bpfel      - BPF (little endian)
    hexagon    - Hexagon
    lanai      - Lanai
    mips       - MIPS (32-bit big endian)
    mips64     - MIPS (64-bit big endian)
    mips64el   - MIPS (64-bit little endian)
    mipsel     - MIPS (32-bit little endian)
    msp430     - MSP430 [experimental]
    nvptx      - NVIDIA PTX 32-bit
    nvptx64    - NVIDIA PTX 64-bit
    ppc32      - PowerPC 32
    ppc32le    - PowerPC 32 LE
    ppc64      - PowerPC 64
    ppc64le    - PowerPC 64 LE
    r600       - AMD GPUs HD2XXX-HD6XXX
    riscv32    - 32-bit RISC-V
    riscv64    - 64-bit RISC-V
    sparc      - Sparc
    sparcel    - Sparc LE
    sparcv9    - Sparc V9
    systemz    - SystemZ
    thumb      - Thumb
    thumbeb    - Thumb (big endian)
    ve         - VE
    wasm32     - WebAssembly 32-bit
    wasm64     - WebAssembly 64-bit
    x86        - 32-bit X86: Pentium-Pro and above
    x86-64     - 64-bit X86: EM64T and AMD64
    xcore      - XCore

D:\Git\zrenderer>dub build --compiler=ldc2 --build=release --force :server > build_output.txt 

In #15 (comment) he said:

added C:\Program Files\LDC 1.28\lib64 and C:\Program Files\LDC 1.28\bin to path. (ldc2 installer doesn't add)

Which is the path he's talking about? Maybe my mistake is here.

build_output.txt

commented

This seems to be the cause of error:
TRACKER : error TRK0005: Failed to locate: "CL.exe". O sistema não pode encontrar o arquivo especificado.

It also appears that lua5.1 was not compiled due to some silent error (there are no build logs).

Can you open the visual studio developer console and type in cl.exe?

**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.11.22
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>cl.exe
Microsoft (R) C/C++-Optimierungscompiler Version 19.29.30147 für x64
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

Syntax: cl [ Option... ] Dateiname... [ /link Linkeroption... ]

I installed again my Visual Studio 2022 with the correct C++ compilers and using this return https://stackoverflow.com/questions/70840683/installed-visual-studio-2022-but-cl-is-not-recognized-as-an-internal-or-extern

My path is C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64

**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.4.4
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************

C:\Program Files\Microsoft Visual Studio\2022\Community>cl.exe
Microsoft (R) C/C++ Optimizing Compiler Versão 19.34.31937 para x86
Copyright (C) Microsoft Corporation. Todos os direitos reservados.

uso: cl [ option... ] filename... [ /link linkoption... ]

C:\Program Files\Microsoft Visual Studio\2022\Community>

And I tried again the command dub build --compiler=ldc2 --build=release --force :server > build_output.txt

LuaD\luad\table.d(190,2): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
LuaD\luad\lfunction.d(89,2): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
Error: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\HostX64\x64\link.exe failed with status: 1120
ldc2 failed with exit code 1.

Follow the new output
build_output.txt

I installed Visual Studio 2019, same issue:

**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.11.23
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************

D:\Git\zrenderer>dub --version
DUB version 1.29.0, built on Jul 20 2022

D:\Git\zrenderer>ldc2 --version
LDC - the LLVM D compiler (1.30.0):
  based on DMD v2.100.1 and LLVM 14.0.3
  built with LDC - the LLVM D compiler (1.30.0)
  Default target: x86_64-pc-windows-msvc
  Host CPU: ivybridge
  http://dlang.org - http://wiki.dlang.org/LDC

  Registered Targets:
    aarch64    - AArch64 (little endian)
    aarch64_32 - AArch64 (little endian ILP32)
    aarch64_be - AArch64 (big endian)
    amdgcn     - AMD GCN GPUs
    arm        - ARM
    arm64      - ARM64 (little endian)
    arm64_32   - ARM64 (little endian ILP32)
    armeb      - ARM (big endian)
    avr        - Atmel AVR Microcontroller
    bpf        - BPF (host endian)
    bpfeb      - BPF (big endian)
    bpfel      - BPF (little endian)
    hexagon    - Hexagon
    lanai      - Lanai
    mips       - MIPS (32-bit big endian)
    mips64     - MIPS (64-bit big endian)
    mips64el   - MIPS (64-bit little endian)
    mipsel     - MIPS (32-bit little endian)
    msp430     - MSP430 [experimental]
    nvptx      - NVIDIA PTX 32-bit
    nvptx64    - NVIDIA PTX 64-bit
    ppc32      - PowerPC 32
    ppc32le    - PowerPC 32 LE
    ppc64      - PowerPC 64
    ppc64le    - PowerPC 64 LE
    r600       - AMD GPUs HD2XXX-HD6XXX
    riscv32    - 32-bit RISC-V
    riscv64    - 64-bit RISC-V
    sparc      - Sparc
    sparcel    - Sparc LE
    sparcv9    - Sparc V9
    systemz    - SystemZ
    thumb      - Thumb
    thumbeb    - Thumb (big endian)
    ve         - VE
    wasm32     - WebAssembly 32-bit
    wasm64     - WebAssembly 64-bit
    x86        - 32-bit X86: Pentium-Pro and above
    x86-64     - 64-bit X86: EM64T and AMD64
    xcore      - XCore

D:\Git\zrenderer>
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.11.23
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************

D:\Git\zrenderer>dub build --compiler=ldc2 --build=release --force :server > build_output.txt
...
LuaD\luad\table.d(190,2): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
LuaD\luad\lfunction.d(89,2): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
Error: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe failed with status: 1120
ldc2 failed with exit code 1.

Follow the output.

build_output.txt

Hey @zhad3 I got it.
I do exactly what he said #15 (comment) and it work.

Some additions:

  • Only work with x64 Native Tools Command Prompt for VS 2019
  • The zrenderer folder needed to be in C:\

Now I'll read the documentation again to use it correctly because double-click in zrenderer.exe doesn't work here, only the server opens.

I have all files extracted by zextractor, how do I use these files with zrenderer?

Thank you for your attention and patience.

commented

Glad to know you could compile it.

Regarding the point:

Now I'll read the documentation again to use it correctly because double-click in zrenderer.exe doesn't work here, only the server opens.

You cannot "double-click" zrenderer.exe because it does not have a UI. You need to call it from a terminal like this: .\zrenderer.exe <command args>.

You can take a look at the examples from the README.

Yeah, I saw it later. LOL
So you can close this issue, I will try some tests and if necessary I open a new one.
Thank you very much.