rizinorg / rizin

UNIX-like reverse engineering framework and command-line toolset.
https://rizin.re
GNU Lesser General Public License v3.0
2.59k stars 346 forks source link

Windows 32 bit builds #546

Closed caribpa closed 3 years ago

caribpa commented 3 years ago

Hi,

I've noticed that Rizin doesn't have an installer for 32 bit Windows (unlike radare2), and having ready-to-go builds for my 32 bit boards would be amazing.

Are there any plans for providing 32 bit builds for the stable releases?

Thank you.

wargio commented 3 years ago

Hi, thank you for suggesting this. yes we should be able to support this!

caribpa commented 3 years ago

Hi @wargio, happy to hear it!

How about the ARM versions, like armv7?

caribpa commented 3 years ago

By the way, I realized that all the tar.gz releases are not "gzipped", they are just tar archives with the wrong extension.

wargio commented 3 years ago

How about the ARM versions, like armv7?

Windows arm ? or Linux arm? for those i do not think we have any host that allows to build it.

XVilka commented 3 years ago

A good addition for the 0.1.1

ret2libc commented 3 years ago

Yes I think we can easily provide the 32bit. Not sure about Windows ARM: first we should check if/how is possible to cross compile from windows to arm, second I am not sure there would be too much request for it. Honestly, there are a lot of combinations OS/arch and we can't reasonably provide pre-built binaries for all of them.

caribpa commented 3 years ago

Windows arm ? or Linux arm? for those i do not think we have any host that allows to build it.

My boards are Linux arm. Windows arm is really exotic IMO and I don't have anything with it to test/build Rizin.

This is when I went to try if the android static builds work on my armv7 and found that the tar.gz are not compressed.

ret2libc commented 3 years ago

Windows arm ? or Linux arm? for those i do not think we have any host that allows to build it.

My boards are Linux arm. Windows arm is really exotic IMO and I don't have anything with it to test/build Rizin.

This is when I went to try if the android static builds work on my armv7 and found that the tar.gz are not compressed.

As said, there are really a lot of combinations and I'm not sure we would be able to maintain too many combinations. What I am investigating is https://github.com/rizinorg/rizin/issues/387 which would allow us to actually provide repositories for RPMs/DEBs-based distros for several architectures, but I haven't done that yet.

I'm worried that if we provide a static version of -armv7 (like we do now for x86_64) then maybe we get a request for armv6, and in few months armv8, specific arm cpu, etc. With x86 the thing is a bit simpler. I think what proposed above should be a good compromise, what do you think?

caribpa commented 3 years ago

Indeed, I understand your concern.

OBS seems like a good solution, though self-hosting your own instance in order to provide automatic builds may be overkill. For now it could be easier to provide a docker image (and a little guide) just for this purpose (in the fashion radare2 did with dockcross).

By the way, the -android-arm.tar.gz release works in my armv7 boards, but Rizin is expecting a fixed path for the temporary files:

armv7

ret2libc commented 3 years ago

Indeed, I understand your concern.

OBS seems like a good solution, though self-hosting your own instance in order to provide automatic builds may be overkill.

It is not self-hosting. That's the point AFAIK, the OBS is hosted somewhere else and we don't have to deal with it.

For now it could be easier to provide a docker image (and a little guide) just for this purpose (in the fashion radare2 did with dockcross).

I think something like this might help on how to cross-compile. https://github.com/rizinorg/rizin/blob/dev/BUILDING.md#cross-compilation-for-android

dockcross might indeed be handy, however it just helps you get the compiler toolchains AFAIU. I guess the above link would still be the main reference to crosscompile rizin. Helping on documenting this would be very much appreciated and it could be a nice addition to our https://github.com/rizinorg/book/, if you would like to contribute :)

Also, we already provide docker images for arm64 (see https://hub.docker.com/layers/rizin/rizin/stable/images/sha256-62b599a36f9e49f2947916ca8be547c78e8486c0f28fdd420315b03ba8d8ab24?context=explore), maybe we could try to support armv7 as well within docker.

By the way, the -android-arm.tar.gz release works in my armv7 boards, but Rizin is expecting a fixed path for the temporary files:

armv7

Yeah that's known. Static builds are not perfect yet because there are resources that Rizin needs to access and the paths to those resources are absolute for now. There is already an issue tracking it https://github.com/rizinorg/rizin/issues/392 .

caribpa commented 3 years ago

It is not self-hosting. That's the point AFAIK, the OBS is hosted somewhere else and we don't have to deal with it.

My mistake, I went to one of the examples you shared in #387, saw that the package was built for debian, went to the download link at the top and was confused because Debian wasn't listed. Then my mind thought that maybe you needed your own instance to actually provide the packages for all distros, but then I found that you can get the binaries for the successful builds by clicking in the link with the distribution name in the build page.

dockcross might indeed be handy, however it just helps you get the compiler toolchains AFAIU. I guess the above link would still be the main reference to crosscompile rizin. Helping on documenting this would be very much appreciated and it could be a nice addition to our https://github.com/rizinorg/book/, if you would like to contribute :)

The problem with dockcross is that it doesn't support meson (https://github.com/dockcross/dockcross/issues/139), that's why I said that a docker image (supporting cross compilation and meson) would need to be available. Unfortunately Rizin seems to depend on Visual Studio in Windows, so I am not so sure what the alternatives are (I have only used mingw for this purpose and I am completely unfamiliar with meson).

Anyways, I think we are getting a little off-topic, we can continue/move the conversation to #387 🙂

ret2libc commented 3 years ago

dockcross might indeed be handy, however it just helps you get the compiler toolchains AFAIU. I guess the above link would still be the main reference to crosscompile rizin. Helping on documenting this would be very much appreciated and it could be a nice addition to our https://github.com/rizinorg/book/, if you would like to contribute :)

The problem with dockcross is that it doesn't support meson (dockcross/dockcross#139), that's why I said that a docker image (supporting cross compilation and meson) would need to be available.

Uh, that's a pity :(

Unfortunately Rizin seems to depend on Visual Studio in Windows, so I am not so sure what the alternatives are (I have only used mingw for this purpose and I am completely unfamiliar with meson).

We don't really depend on Visual Studio itself, but we need the compiler paths and those kind of things in place (using the Visual studio shell is just the easiest way to get all that configured, but if you are super experienced with Windows I bet you can come up with something). You still need the microsoft compiler though. That's the same as radare2.

XVilka commented 3 years ago

@ret2libc @caribpa regarding Windows builds you don't need Microsoft compiler, it works with clang-cl as well. The problem is that you still need a C runtime and headers for that, and they aren't installed by default in Windows:

caribpa commented 3 years ago

I remember trying to build with clang-cl a 32 bit build before (in a 32 bit Windows 10) and it failed.

I also tried with clang and setting the clang linker (set WINDRES=llvm-rc) with no luck as well.

caribpa commented 3 years ago

I fact I tried it again right now and this is the full log:

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

C:\Program Files\Microsoft Visual Studio\2019\Community>cd "C:\Users\Test\source\repos"

C:\Users\Test\source\repos>rmdir /s /q rizin

C:\Users\Test\source\repos>git clone https://github.com/rizinorg/rizin
Cloning into 'rizin'...
remote: Enumerating objects: 183, done.
remote: Counting objects: 100% (183/183), done.
remote: Compressing objects: 100% (127/127), done.
remote: Total 237633 (delta 94), reused 75 (delta 56), pack-reused 237450
Receiving objects: 100% (237633/237633), 114.30 MiB | 1.97 MiB/s, done.
Resolving deltas: 100% (186355/186355), done.
Updating files: 100% (2980/2980), done.

C:\Users\Test\source\repos>cd rizin

C:\Users\Test\source\repos\rizin>set CC=clang-cl

C:\Users\Test\source\repos\rizin>set CCX=clang-cl++

C:\Users\Test\source\repos\rizin>meson --default-library=static --buildtype=release build
The Meson build system
Version: 0.57.1
Source dir: C:\Users\Test\source\repos\rizin
Build dir: C:\Users\Test\source\repos\rizin\build
Build type: native build
Project name: rizin
Project version: v0.2.0-git
C compiler for the host machine: clang-cl (clang-cl 10.0.0)
C linker for the host machine: lld-link lld-link 10.0.0
Host machine cpu family: x86
Host machine cpu: x86
Program python3 found: YES (c:\users\test\appdata\local\programs\python\python38-32\python.exe)
Program git found: YES (C:\Program Files\Git\cmd\git.EXE)
Message: rizin lib version:
Library dl found: NO
Run-time dependency threads found: YES
Library util found: NO
Library m found: NO
Library ws2_32 found: YES
Library wininet found: YES
Library psapi found: YES
Compiler for C supports arguments --std=gnu99: NO
Compiler for C supports arguments --std=c99: NO
Compiler for C supports arguments -Werror=sizeof-pointer-memaccess: YES
Compiler for C supports arguments -fcommon: NO
Configuring config.h using configuration
Library magic skipped: feature use_sys_magic disabled

|Executing subproject xxhash method meson
|
|Project name: xxhash
|Project version: 0.6.5
|C compiler for the host machine: clang-cl (clang-cl 10.0.0)
|C linker for the host machine: lld-link lld-link 10.0.0
|Build targets in project: 1
|Subproject xxhash finished.

Dependency openssl skipped: feature use_sys_openssl disabled
Did not find pkg-config by name 'pkg-config'
Found Pkg-config: NO
Found CMake: C:\Program Files\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.EXE (3.18.20081302)
Run-time dependency libuv found: NO (tried pkgconfig and cmake)
Downloading libuv source from https://dist.libuv.org/dist/v1.40.0/libuv-v1.40.0.tar.gz
Download size: 1264008
Downloading: ..........

|Executing subproject libuv method meson
|
|Project name: libuv
|Project version: 1.40.0
|C compiler for the host machine: clang-cl (clang-cl 10.0.0)
|C linker for the host machine: lld-link lld-link 10.0.0
|Run-time dependency threads found: YES
|Library m found: NO
|Library dl found: NO
|Library psapi found: YES
|Library user32 found: YES
|Library advapi32 found: YES
|Library iphlpapi found: YES
|Library userenv found: YES
|Library ws2_32 found: YES
|Compiler for C supports arguments -fcommon: NO (cached)
|Build targets in project: 2
|Subproject libuv finished.

Message: HAVE_PTRACE: false
Message: USE_PTRACE_WRAP: false
Message: RZ_CHECKS_LEVEL: 1
Header <sys/personality.h> has symbol "ADDR_NO_RANDOMIZE" : NO
Checking for function "clock_gettime" : NO
Header <features.h> has symbol "__GLIBC__" : NO
Checking for function "arc4random_uniform" : NO
Checking for function "explicit_bzero" : NO
Checking for function "explicit_memset" : NO
Checking for function "clock_nanosleep" : NO
Checking for function "clock_gettime" : NO (cached)
Checking for function "sigaction" : NO
Checking for function "pipe" : NO
Checking for function "execv" : NO
Checking for function "execve" : NO
Checking for function "execvp" : NO
Checking for function "execl" : NO
Checking for function "system" : YES
Checking for function "fork" : NO
Checking for function "pipe2" : NO
Configuring rz_userconf.h using configuration
Message: Version Major: 00
Message: Version Minor: 20
Message: Version Patch: 00
Message: Version GitTip: b838587ca248e8715909cc9bed85b6f7d5dcdd5f0
Configuring rz_version.h using configuration
Configuring librz.pc using configuration
Dependency zlib skipped: feature use_sys_zlib disabled
Downloading zlib source from https://zlib.net/fossils/zlib-1.2.11.tar.gz
Download size: 607698
Downloading: ..........

|Executing subproject zlib method meson
|
|Project name: zlib
|Project version: 1.2.11
|C compiler for the host machine: clang-cl (clang-cl 10.0.0)
|C linker for the host machine: lld-link lld-link 10.0.0
|Compiler for C supports arguments -Wno-implicit-fallthrough: YES
|Compiler for C supports arguments -Wno-implicit-function-declaration: YES
|Windows resource compiler: Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
|Build targets in project: 4
|Subproject zlib finished.

Cloning into 'sdb'...
remote: Enumerating objects: 64, done.
remote: Counting objects: 100% (64/64), done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 7423 (delta 33), reused 24 (delta 14), pack-reused 7359
Receiving objects: 100% (7423/7423), 1.80 MiB | 1.55 MiB/s, done.
Resolving deltas: 100% (5096/5096), done.
Note: switching to '802ecf46502aed5d003af589fafcd260d03164ac'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 802ecf4 minunit.h: Sync with Rizin (#19)

|Executing subproject sdb method meson
|
|Project name: sdb
|Project version: undefined
|C compiler for the host machine: clang-cl (clang-cl 10.0.0)
|C linker for the host machine: lld-link lld-link 10.0.0
|Program C:\Users\Test\AppData\Local\Programs\Python\Python38-32\python found: YES (C:\Users\Test\AppData\Local\Programs\Python\Python38-32\python.exe)
|Message: SDB version = 1.5.1-git
|Checking for function "getpid" : NO
|Checking for function "_getpid" : YES
|Configuring sdb_userconf.h using configuration
|Configuring sdb_version.h using configuration
|Build targets in project: 6
|Subproject sdb finished.

Dependency capstone skipped: feature use_sys_capstone disabled
Cloning into 'capstone-bundled'...
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 29218 (delta 5), reused 7 (delta 3), pack-reused 29201
Receiving objects: 100% (29218/29218), 40.98 MiB | 11.40 MiB/s, done.
Resolving deltas: 100% (21034/21034), done.
Note: switching to '48ed89e6d9cf517972d0110aa31d6b95bed36de6'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 48ed89e6 Fix x86-16 mode (patch imported from radare2)

|Executing subproject capstone-bundled method meson
|
|Project name: capstone
|Project version: undefined
|C compiler for the host machine: clang-cl (clang-cl 10.0.0)
|C linker for the host machine: lld-link lld-link 10.0.0
|Build targets in project: 12
|Subproject capstone-bundled finished.

Dependency tree-sitter skipped: feature use_sys_tree_sitter disabled
Downloading tree-sitter source from https://github.com/tree-sitter/tree-sitter/archive/0.18.0.tar.gz
Downloading file of unknown size.

|Executing subproject tree-sitter method meson
|
|Project name: tree-sitter
|Project version: undefined
|C compiler for the host machine: clang-cl (clang-cl 10.0.0)
|C linker for the host machine: lld-link lld-link 10.0.0
|Compiler for C supports arguments -std=gnu99: NO
|Compiler for C supports arguments -std=c99: NO
|Build targets in project: 13
|Subproject tree-sitter finished.

Dependency liblz4 skipped: feature use_sys_lz4 disabled
Downloading lz4 source from https://github.com/lz4/lz4/archive/v1.9.3.tar.gz
Downloading file of unknown size.

|Executing subproject lz4 method meson
|
|Project name: lz4
|Project version: 1.9.3
|C compiler for the host machine: clang-cl (clang-cl 10.0.0)
|C linker for the host machine: lld-link lld-link 10.0.0
|Build targets in project: 18
|Subproject lz4 finished.

Dependency libzip skipped: feature use_sys_libzip disabled
Downloading libzip source from https://libzip.org/download/libzip-1.7.3.tar.gz
Download size: 1231618
Downloading: ..........

|Executing subproject libzip method meson
|
|Project name: libzip
|Project version: 1.7.3
|C compiler for the host machine: clang-cl (clang-cl 10.0.0)
|C linker for the host machine: lld-link lld-link 10.0.0
|Program python3 found: YES (c:\users\test\appdata\local\programs\python\python38-32\python.exe)
|Dependency zlib from subproject subprojects/zlib-1.2.11 found: NO
|Checking for function "arc4random" : NO
|Checking for function "arc4random" : NO
|Checking for function "clonefile" : NO
|Checking for function "clonefile" : NO
|Checking for function "explicit_bzero" : NO
|Checking for function "explicit_bzero" : NO
|Checking for function "explicit_memset" : NO
|Checking for function "explicit_memset" : NO
|Checking for function "fileno" : YES
|Checking for function "fseeko" : NO
|Checking for function "fseeko" : NO
|Checking for function "ftello" : NO
|Checking for function "ftello" : NO
|Checking for function "getprogname" : NO
|Checking for function "getprogname" : NO
|Checking for function "localtime_r" : NO
|Checking for function "localtime_r" : NO
|Checking for function "mkstemp" : NO
|Checking for function "mkstemp" : NO
|Checking for function "setmode" : YES
|Checking for function "snprintf" : YES
|Checking for function "strdup" : YES
|Checking for function "stricmp" : YES
|Checking for function "strtoll" : YES
|Checking for function "strtoull" : YES
|Checking for function "_close" : YES
|Checking for function "_dup" : YES
|Checking for function "_fdopen" : YES
|Checking for function "_fileno" : YES
|Checking for function "_setmode" : YES
|Checking for function "_snprintf" : NO
|Checking for function "_snprintf" : YES
|Checking for function "_strdup" : YES
|Checking for function "_stricmp" : YES
|Checking for function "_strtoi64" : YES
|Checking for function "_strtoui64" : YES
|Checking for function "_umask" : YES
|Checking for function "_unlink" : YES
|Has header "stdbool.h" : YES
|Has header "strings.h" : NO
|Has header "unistd.h" : NO
|Has header "dirent.h" : NO
|Has header "fts.h" : NO
|Has header "ndir.h" : NO
|Has header "sys/dir.h" : NO
|Has header "sys/ndir.h" : NO
|Has header "sys/attr.h" : NO
|Checking for size of "off_t" : -1
|Checking for size of "off_t" : 4
|Checking for size of "size_t" : 4
|Configuring config.h using configuration
|Has header "limits.h" : YES
|Has header "inttypes.h" : YES
|Checking for type "int8_t" : YES
|Checking for type "uint8_t" : YES
|Checking for type "int16_t" : YES
|Checking for type "uint16_t" : YES
|Checking for type "int32_t" : YES
|Checking for type "uint32_t" : YES
|Checking for type "int64_t" : YES
|Checking for type "uint64_t" : YES
|Checking for type "__int8" : YES
|Checking for type "__int16" : YES
|Checking for type "__int32" : YES
|Checking for type "__int64" : YES
|Configuring zipconf.h using configuration
|Library advapi32 found: YES
|Library bcrypt found: YES
|Build targets in project: 20
|Subproject libzip finished.

|Executing subproject mpc method meson
|
|Project name: mpc
|Project version: d59264ae27228176f5b731871df1a87d7abbb5c8
|Build targets in project: 24
|Subproject mpc finished.

|Executing subproject yxml method meson
|
|Project name: yxml
|Project version: 66507906673bc6159d5d620414479954c9c21c24
|C compiler for the host machine: clang-cl (clang-cl 10.0.0)
|C linker for the host machine: lld-link lld-link 10.0.0
|Build targets in project: 25
|Subproject yxml finished.

Message: Use bundled magic library
Build targets in project: 389

rizin v0.2.0-git

  Directories
    prefix                    : c:/
    bindir                    : bin
    libdir                    : lib
    includedir                : include/librz
    datadir                   : share
    wwwroot                   : share/www
    sdb                       : share/
    zigns                     : share/zigns
    themes                    : share/cons
    fortunes                  : share/fortunes
    flags                     : share/flag
    hud                       : share/hud
    plugins                   : lib/plugins
    extras                    : lib/extras
    bindings                  : lib/bindings

  Configuration
    Debugger enabled          : YES
    System magic library      : NO
    System xxhash library     : NO
    System openssl library    : NO
    System libuv library      : NO
    System capstone library   : NO
    System tree-sitter library: NO
    System lz4 library        : NO
    System zlib library       : NO
    System zip library        : NO
    Use ptrace-wrap           : NO
    Use RPATH                 : NO

  Plugins
    Analysis Plugins          : 6502, 8051, amd29k, arc, arm_cs, arm_gnu, avr, bf, chip8, cr16, cris, dalvik, ebc, gb,
                                h8300, hexagon, i4004, i8080, java, m68k_cs, m680x_cs, malbolge, mcore, mips_cs,
                                mips_gnu, msp430, nios2, null, or1k, pic, ppc_cs, ppc_gnu, propeller, riscv, rsp, sh,
                                snes, sparc_cs, sparc_gnu, spc700, sysz, tms320, tricore, v810, v850, vax, wasm, ws,
                                x86_cs, xap, xcore_cs, xtensa, z80
    Assembler Plugins         : 6502, 8051, amd29k, arc, arm_as, arm_cs, arm_gnu, arm_winedbg, avr, bf, chip8, cr16,
                                cris_gnu, dalvik, dcpu16, ebc, gb, h8300, hexagon, hppa_gnu, i4004, i8080, java,
                                lanai_gnu, lh5801, lm32, m68k_cs, m680x_cs, malbolge, mcore, mcs96, mips_cs, mips_gnu,
                                msp430, nios2, or1k, pic, ppc_as, ppc_cs, ppc_gnu, propeller, riscv, rsp, sh, snes,
                                sparc_cs, sparc_gnu, spc700, sysz, tms320, tms320c64x, tricore, v810, v850, vax, wasm,
                                ws, x86_as, x86_cs, x86_nasm, x86_nz, xap, xcore_cs, xtensa, z80
    Binary Plugins            : any, art, avr, bf, bflt, bios, bootimg, cgc, coff, dex, dmp64, dol, dyldcache, elf,
                                elf64, java, le, mach0, mach064, mbn, mdmp, menuet, mz, ne, nes, nin3ds, ninds, ningb,
                                ningba, nro, nso, omf, qnx, p9, pe, pe64, pebble, prg, psxexe, sfc, smd, sms, spc700,
                                symbols, te, vsf, wasm, xbe, xnu_kernelcache, z64, zimg
    BinLdr Plugins            : ldr_linux
    BinXtr Plugins            : xtr_dyldcache, xtr_fatmach0, xtr_sep64
    Breakpoint Plugins        : arm, bf, mips, ppc, sh, x86
    Core Plugins              : java
    Crypto Plugins            : aes, aes_cbc, base64, base91, blowfish, cps2, des, punycode, rc2, rc4, rc6, rol, ror,
                                rot, serpent, xor
    Debug Plugins             : bf, bochs, esil, gdb, io, native, null, qnx, rap, winkd, windbg
    Egg Plugins               : exec, xor
    IO Plugins                : ar, fd, bfdbg, bochs, debug, default, gdb, gprobe, gzip, http, ihex, mach, malloc,
                                null, procpid, ptrace, qnx, rzk, rzpipe, rzweb, rap, rbuf, self, shm, sparse, tcp,
                                winkd, winedbg, zip, windbg, w32dbg, w32
    Lang Plugins              : lib, pipe, rust, vala
    Parse Plugins             : 6502_pseudo, arm_pseudo, att2intel, avr_pseudo, chip8_pseudo, tms320_pseudo,
                                dalvik_pseudo, m68k_pseudo, mips_pseudo, ppc_pseudo, sh_pseudo, riscv_pseudo,
                                v850_pseudo, wasm_pseudo, x86_pseudo, z80_pseudo

  Subprojects
    capstone-bundled          : YES
    libuv                     : YES
    libzip                    : YES
    lz4                       : YES
    mpc                       : YES
    sdb                       : YES
    tree-sitter               : YES
    xxhash                    : YES
    yxml                      : YES
    zlib                      : YES

Found ninja-1.10.0.git.kitware.jobserver-1 at C:\Users\Test\AppData\Local\Programs\Python\Python38-32\Scripts\ninja.EXE

C:\Users\Test\source\repos\rizin>ninja -C build
ninja: Entering directory `build'
[3/1563] Compiling C object subprojects/libuv-v1.40.0/libuv.a.p/src_timer.c.obj
In file included from ../subprojects/libuv-v1.40.0/src/timer.c:23:
..\subprojects\libuv-v1.40.0\src/heap-inl.h(62,18): warning: unused function 'heap_init' [-Wunused-function]
HEAP_EXPORT(void heap_init(struct heap* heap)) {
                 ^
..\subprojects\libuv-v1.40.0\src/heap-inl.h(239,18): warning: unused function 'heap_dequeue' [-Wunused-function]
HEAP_EXPORT(void heap_dequeue(struct heap* heap, heap_compare_fn less_than)) {
                 ^
2 warnings generated.
[9/1563] Compiling C object subprojects/libuv-v1.40.0/libuv.a.p/src_threadpool.c.obj
../subprojects/libuv-v1.40.0/src/threadpool.c(194,9): warning: 'getenv' is deprecated: This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
  val = getenv("UV_THREADPOOL_SIZE");
        ^
C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\stdlib.h(1183,20): note: 'getenv' has been explicitly marked deprecated here
    _Check_return_ _CRT_INSECURE_DEPRECATE(_dupenv_s)
                   ^
C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\vcruntime.h(316,55): note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\vcruntime.h(306,47): note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
1 warning generated.
[16/1563] Compiling C object librz/bin/librz_bin.a.p/pdb_pdb_downloader.c.obj
../librz/bin/pdb/pdb_downloader.c(34,8): warning: passing 'LPCWSTR' (aka 'const unsigned short *') to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
                free(origin);
                     ^~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(90,42): note: passing argument to parameter '_Block' here
    _Pre_maybenull_ _Post_invalid_ void* _Block
                                         ^
../librz/bin/pdb/pdb_downloader.c(35,8): warning: passing 'LPCWSTR' (aka 'const unsigned short *') to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
                free(dest);
                     ^~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\corecrt_malloc.h(90,42): note: passing argument to parameter '_Block' here
    _Pre_maybenull_ _Post_invalid_ void* _Block
                                         ^
2 warnings generated.
[44/1563] Compiling C object librz/lang/librz_lang.a.p/lang.c.obj
In file included from ../librz/lang/lang.c:8:
../librz/lang/p/pipe.c(43,9): warning: unused variable 'res' [-Wunused-variable]
        int i, res = 0;
               ^
In file included from ../librz/lang/lang.c:13:
../librz/lang/p/c.c(125,9): warning: Warning: C RzLangPlugin is not implemented on this platform [-W#pragma-messages]
#pragma message("Warning: C RzLangPlugin is not implemented on this platform")
        ^
2 warnings generated.
[105/1563] Compiling C object librz/bin/librz_bin.a.p/mangling_cxx.c.obj
In file included from ../librz/bin/mangling/cxx.c:5:
In file included from ..\librz\bin\mangling/./cxx/demangle.h:32:
..\librz\bin\mangling/./cxx/libiberty.h(342,9): warning: 'alloca' macro redefined [-Wmacro-redefined]
#define alloca(x) _alloca(x)
        ^
C:\Program Files\Windows Kits\10\include\10.0.19041.0\ucrt\malloc.h(176,13): note: previous definition is here
    #define alloca _alloca
            ^
1 warning generated.
[113/1563] Compiling C object librz/bin/librz_bin.a.p/mangling_cxx_cp-demangle.c.obj
../librz/bin/mangling/cxx/cp-demangle.c(121,14): warning: incompatible redeclaration of library function 'alloca' [-Wincompatible-library-redeclaration]
extern char *alloca ();
             ^
../librz/bin/mangling/cxx/cp-demangle.c(121,14): note: 'alloca' is a builtin with type 'void *(unsigned int)'
1 warning generated.
[141/1563] Compiling C object librz/asm/librz_asm.a.p/arch_arc_gnu_arcompact-dis.c.obj
../librz/asm/arch/arc/gnu/arcompact-dis.c(644,1): warning: unused function 'bfd_getm32_ac' [-Wunused-function]
bfd_getm32_ac (data)
^
1 warning generated.
[269/1563] Compiling C object librz/asm/librz_asm.a.p/arch_xtensa_gnu_xtensa-dis.c.obj
../librz/asm/arch/xtensa/gnu/xtensa-dis.c(35,12): warning: 'dllimport' attribute ignored [-Wignored-attributes]
__declspec(dllimport)
           ^
1 warning generated.
[271/1563] Compiling C object librz/asm/librz_asm.a.p/arch_z80_z80.c.obj
../librz/asm/arch/z80/z80.c(69,27): warning: unused function 'z80Disass' [-Wunused-function]
FUNC_ATTR_USED static int z80Disass (RzAsmOp *op, const ut8 *buf, int len) {
                          ^
1 warning generated.
[362/1563] Compiling C object librz/analysis/librz_analysis.a.p/.._asm_arch_xtensa_gnu_xtensa-dis.c.obj
../librz/asm/arch/xtensa/gnu/xtensa-dis.c(35,12): warning: 'dllimport' attribute ignored [-Wignored-attributes]
__declspec(dllimport)
           ^
1 warning generated.
[438/1563] Compiling C object librz/debug/librz_debug.a.p/p_native_windows_windows_debug.c.obj
../librz/debug/p/native/windows/windows_debug.c(1478,33): warning: cast to 'HANDLE' (aka 'void *') from smaller integer type 'USHORT' (aka 'unsigned short') [-Wint-to-void-pointer-cast]
                if (w32_NtDuplicateObject(ph, (HANDLE)handle.Handle, GetCurrentProcess(), &dupHandle, 0, 0, 0)) {
                                              ^
1 warning generated.
[467/1563] Compiling C object librz/core/librz_core.a.p/rtr.c.obj
FAILED: librz/core/librz_core.a.p/rtr.c.obj
"clang-cl" "-Ilibrz/core\librz_core.a.p" "-I." "-I.." "-I..\librz\include" "-I..\shlr\heap\include\rz_windows" "-I..\shlr\spp" "-Isubprojects\sdb" "-I..\subprojects\sdb" "-Isubprojects\sdb\src" "-I..\subprojects\sdb\src" "-Isubprojects\zlib-1.2.11" "-I..\subprojects\zlib-1.2.11" "-Ishlr" "-I..\shlr" "-I..\librz\asm\arch\include" "-I..\librz\asm\arch" "-I..\librz\asm\arch\h8300" "-I..\librz\asm\arch\hexagon" "-I..\librz\asm\arch\msp430" "-I..\librz\asm\arch\rsp" "-I..\librz\asm\arch\mcore" "-I..\librz\asm\arch\v850" "-I..\librz\asm\arch\propeller" "-I..\librz\asm\arch\ebc" "-I..\librz\asm\arch\cr16" "-I..\librz\asm\arch\8051" "-I..\librz\asm\arch\v810" "-I..\librz\asm\arch\or1k" "-I..\librz\analysis\arch\gb" "-I..\librz\analysis\arch\hexagon" "-I..\librz\bin\format\elf" "-I..\librz\bin\mangling" "-I..\librz\bin\format" "-I..\shlr\gdb\include" "-I..\shlr\gdb\include\gdbclient" "-I..\shlr\gdb\include\gdbserver" "-I..\shlr\rizin-shell-parser\src\tree_sitter" "-I..\subprojects\tree-sitter-0.18.0\lib\src" "-I..\subprojects\tree-sitter-0.18.0\lib\include" "-I..\subprojects\libuv-v1.40.0\include" "-Ilibrz\core\cmd_descs" "/MD" "/nologo" "/showIncludes" "/W2" "/O2" "-D__STDC__=1" "-D_CRT_DECLARE_NONSTDC_NAMES " "-D_CRT_SECURE_NO_WARNINGS" "-D_CRT_NONSTDC_NO_DEPRECATE" "-Werror=sizeof-pointer-memaccess" "" "-DRZ_PLUGIN_INCORE=1" "/Fdlibrz/core\librz_core.a.p\rtr.c.pdb" /Folibrz/core/librz_core.a.p/rtr.c.obj "/c" ../librz/core/rtr.c
In file included from ../librz/core/rtr.c:9:
In file included from ..\subprojects\libuv-v1.40.0\include\uv.h:64:
..\subprojects\libuv-v1.40.0\include/uv/win.h(27,18): error: typedef redefinition with different types ('intptr_t' (aka 'int') vs 'SSIZE_T' (aka 'long'))
typedef intptr_t ssize_t;
                 ^
..\librz\include\rz_types_base.h(21,17): note: previous definition is here
typedef SSIZE_T ssize_t;
                ^
1 error generated.
[472/1563] Compiling C object librz/core/librz_core.a.p/cmd.c.obj
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(580,76): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
        ReadProcessMemory(h_proc, heapBase, &segheapHeader, sizeof(SEGMENT_HEAP), &bytesRead);
                                                                                  ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(587,81): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
        if (!ReadProcessMemory(h_proc, (PVOID)lfhKeyLocation, &lfhKey, sizeof(WPARAM), &bytesRead)) {
                                                                                       ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(601,100): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                ReadProcessMemory(h_proc, segheapHeader.LfhContext.Buckets[j], &bucket, sizeof(HEAP_LFH_BUCKET), &bytesRead);
                                                                                                                 ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(603,100): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                ReadProcessMemory(h_proc, bucket.AffinitySlots, &paffinitySlot, sizeof(PHEAP_LFH_AFFINITY_SLOT), &bytesRead);
                                                                                                                 ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(605,91): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                ReadProcessMemory(h_proc, paffinitySlot, &affinitySlot, sizeof(HEAP_LFH_AFFINITY_SLOT), &bytesRead);
                                                                                                        ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(627,70): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                                ReadProcessMemory(h_proc, curr, node, sizeof(RTL_BALANCED_NODE), &bytesRead);
                                                                                                 ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(632,75): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                        ReadProcessMemory(h_proc, curr, &entry, sizeof(HEAP_LARGE_ALLOC_DATA), &bytesRead);
                                                                                               ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(641,102): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                        ReadProcessMemory(h_proc, (void *)(*blocks)[*count].address, &extra->granularity, sizeof(USHORT), &bytesRead);
                                                                                                                          ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(651,95): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
        ReadProcessMemory(h_proc, (PVOID)RtlpHpHeapGlobalsOffset, &RtlpHpHeapGlobal, sizeof(WPARAM), &bytesRead);
                                                                                                     ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(660,100): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                        if (!ReadProcessMemory(h_proc, (PVOID)currPageSegment, &pageSegment, sizeof(HEAP_PAGE_SEGMENT), &bytesRead)) {
                                                                                                                        ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(684,88): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                                        ReadProcessMemory(h_proc, (PVOID)from, &vsSubsegment, sizeof(HEAP_VS_SUBSEGMENT), &bytesRead);
                                                                                                                          ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(689,86): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                                                ReadProcessMemory(h_proc, (PVOID)from, &vsChunk, sizeof(HEAP_VS_CHUNK_HEADER), &bytesRead);
                                                                                                                               ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(756,68): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                ReadProcessMemory(h_proc, heap->Base, &heapHeader, sizeof(HEAP), &bytesRead);
                                                                                 ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(767,70): warning: incompatible pointer types passing 'unsigned long long *' to parameter of type 'WPARAM *' (aka 'unsigned int *') [-Wincompatible-pointer-types]
                        bool ret = GetSegmentHeapBlocks(dbg, h_proc, heap->Base, &blocks, &count, &allocated);
                                                                                          ^~~~~~
../librz/core/windows_heap.c(576,116): note: passing argument to parameter 'count' here
static bool GetSegmentHeapBlocks(RzDebug *dbg, HANDLE h_proc, PVOID heapBase, PHeapBlockBasicInfo *blocks, WPARAM *count, SIZE_T *allocated) {
                                                                                                                   ^
../librz/core/windows_heap.c(781,80): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                        ReadProcessMemory(h_proc, entry, &vAlloc, sizeof(HEAP_VIRTUAL_ALLOC_ENTRY), &bytesRead);
                                                                                                    ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(801,90): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                        if (!ReadProcessMemory(h_proc, heapHeader.FrontEndHeap, &lfhHeader, sizeof(LFH_HEAP), &bytesRead)) {
                                                                                                              ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(820,97): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                                        if (!ReadProcessMemory(h_proc, (PVOID)curSubsegment, &subsegment, sizeof(HEAP_SUBSEGMENT), &bytesRead) || !subsegment.BlockSize || !ReadProcessMemory(h_proc, subsegment.LocalInfo, &info, sizeof(HEAP_LOCAL_SEGMENT_INFO), &bytesRead) || !ReadProcessMemory(h_proc, info.LocalData, &localData, sizeof(HEAP_LOCAL_DATA), &bytesRead) || !ReadProcessMemory(h_proc, localData.CrtZone, &blockZone, sizeof(LFH_BLOCK_ZONE), &bytesRead)) {
                                                                                                                                   ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(820,226): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                                        if (!ReadProcessMemory(h_proc, (PVOID)curSubsegment, &subsegment, sizeof(HEAP_SUBSEGMENT), &bytesRead) || !subsegment.BlockSize || !ReadProcessMemory(h_proc, subsegment.LocalInfo, &info, sizeof(HEAP_LOCAL_SEGMENT_INFO), &bytesRead) || !ReadProcessMemory(h_proc, info.LocalData, &localData, sizeof(HEAP_LOCAL_DATA), &bytesRead) || !ReadProcessMemory(h_proc, localData.CrtZone, &blockZone, sizeof(LFH_BLOCK_ZONE), &bytesRead)) {
                                                                                                                                                                                                                                                                    ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(820,321): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                                        if (!ReadProcessMemory(h_proc, (PVOID)curSubsegment, &subsegment, sizeof(HEAP_SUBSEGMENT), &bytesRead) || !subsegment.BlockSize || !ReadProcessMemory(h_proc, subsegment.LocalInfo, &info, sizeof(HEAP_LOCAL_SEGMENT_INFO), &bytesRead) || !ReadProcessMemory(h_proc, info.LocalData, &localData, sizeof(HEAP_LOCAL_DATA), &bytesRead) || !ReadProcessMemory(h_proc, localData.CrtZone, &blockZone, sizeof(LFH_BLOCK_ZONE), &bytesRead)) {
                                                                                                                                                                                                                                                                                                                                                                   ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(820,418): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                                        if (!ReadProcessMemory(h_proc, (PVOID)curSubsegment, &subsegment, sizeof(HEAP_SUBSEGMENT), &bytesRead) || !subsegment.BlockSize || !ReadProcessMemory(h_proc, subsegment.LocalInfo, &info, sizeof(HEAP_LOCAL_SEGMENT_INFO), &bytesRead) || !ReadProcessMemory(h_proc, info.LocalData, &localData, sizeof(HEAP_LOCAL_DATA), &bytesRead) || !ReadProcessMemory(h_proc, localData.CrtZone, &blockZone, sizeof(LFH_BLOCK_ZONE), &bytesRead)) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(829,96): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                                        ReadProcessMemory(h_proc, subsegment.UserBlocks, &userdata, sizeof(HEAP_USERDATA_HEADER), &bytesRead);
                                                                                                                                  ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(836,78): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                                        ReadProcessMemory(h_proc, userdata.BusyBitmap.Buffer, bitmap, bitmapsz, &bytesRead);
                                                                                                                ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(851,69): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                                                        ReadProcessMemory(h_proc, (PVOID)from, &heapEntry, sz_entry, &bytesRead);
                                                                                                                     ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(874,64): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                                ReadProcessMemory(h_proc, curEntry, &entry, sizeof(entry), &bytesRead);
                                                                                           ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(881,127): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                ReadProcessMemory(h_proc, (PVOID)(firstSegment - offsetof(HEAP_SEGMENT, SegmentListEntry)), &segment, sizeof(HEAP_SEGMENT), &bytesRead);
                                                                                                                                            ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(889,71): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                                if (!ReadProcessMemory(h_proc, (PVOID)from, &heapEntry, sz_entry, &bytesRead)) {
                                                                                                  ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(918,75): warning: incompatible pointer types passing 'WPARAM *' (aka 'unsigned int *') to parameter of type 'SIZE_T *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
                        ReadProcessMemory(h_proc, (PVOID)from, &segment, sizeof(HEAP_SEGMENT), &bytesRead);
                                                                                               ^~~~~~~~~~
C:\Program Files\Windows Kits\10\include\10.0.19041.0\um\memoryapi.h(164,23): note: passing argument to parameter 'lpNumberOfBytesRead' here
    _Out_opt_ SIZE_T* lpNumberOfBytesRead
                      ^
In file included from ../librz/core/cmd.c:96:
In file included from ../librz/core/cmd_debug.c:1805:
../librz/core/windows_heap.c(974,11): warning: result of comparison of constant 11738155986457087661 with expression of type 'WPARAM' (aka 'unsigned int') is always false [-Wtautological-constant-out-of-range-compare]
        if (test == 0xa2e64eada2e64ead) { // Hardcoded in ntdll
            ~~~~ ^  ~~~~~~~~~~~~~~~~~~
In file included from ../librz/core/cmd.c:102:
../librz/core/cmd_cmp.c(668,10): warning: implicit declaration of function 'chdir' is invalid in C99 [-Wimplicit-function-declaration]
                                        if (chdir(newdir) == -1) {
                                            ^
../librz/core/cmd_cmp.c(684,11): warning: implicit declaration of function 'chdir' is invalid in C99 [-Wimplicit-function-declaration]
                                                if (chdir(homepath) == -1) {
                                                    ^
../librz/core/cmd_cmp.c(695,9): warning: implicit declaration of function 'chdir' is invalid in C99 [-Wimplicit-function-declaration]
                                if (chdir(input + 1) == -1) {
                                    ^
../librz/core/cmd_cmp.c(701,17): warning: implicit declaration of function 'chdir' is invalid in C99 [-Wimplicit-function-declaration]
                        if (!home || chdir(home) == -1) {
                                     ^
../librz/core/cmd.c(2049,36): warning: cast between incompatible calling conventions 'cdecl' and 'stdcall'; calls through this pointer may abort at runtime [-Wcast-calling-convention]
        HANDLE th = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)rz_cons_flush, NULL, 0, NULL);
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
..\librz\include/rz_cons.h(917,13): note: consider defining 'rz_cons_flush' with the 'stdcall' calling convention
RZ_API void rz_cons_flush(void);
            ^
            __RPC_CALLEE
33 warnings generated.
ninja: build stopped: subcommand failed.
caribpa commented 3 years ago

I installed clang from the optional packages of the C++ development suite (installed with the default packages) from the Visual Studio Community Edition installer.

XVilka commented 3 years ago

So the only error is:

FAILED: librz/core/librz_core.a.p/rtr.c.obj
"clang-cl" "-Ilibrz/core\librz_core.a.p" "-I." "-I.." "-I..\librz\include" "-I..\shlr\heap\include\rz_windows" "-I..\shlr\spp" "-Isubprojects\sdb" "-I..\subprojects\sdb" "-Isubprojects\sdb\src" "-I..\subprojects\sdb\src" "-Isubprojects\zlib-1.2.11" "-I..\subprojects\zlib-1.2.11" "-Ishlr" "-I..\shlr" "-I..\librz\asm\arch\include" "-I..\librz\asm\arch" "-I..\librz\asm\arch\h8300" "-I..\librz\asm\arch\hexagon" "-I..\librz\asm\arch\msp430" "-I..\librz\asm\arch\rsp" "-I..\librz\asm\arch\mcore" "-I..\librz\asm\arch\v850" "-I..\librz\asm\arch\propeller" "-I..\librz\asm\arch\ebc" "-I..\librz\asm\arch\cr16" "-I..\librz\asm\arch\8051" "-I..\librz\asm\arch\v810" "-I..\librz\asm\arch\or1k" "-I..\librz\analysis\arch\gb" "-I..\librz\analysis\arch\hexagon" "-I..\librz\bin\format\elf" "-I..\librz\bin\mangling" "-I..\librz\bin\format" "-I..\shlr\gdb\include" "-I..\shlr\gdb\include\gdbclient" "-I..\shlr\gdb\include\gdbserver" "-I..\shlr\rizin-shell-parser\src\tree_sitter" "-I..\subprojects\tree-sitter-0.18.0\lib\src" "-I..\subprojects\tree-sitter-0.18.0\lib\include" "-I..\subprojects\libuv-v1.40.0\include" "-Ilibrz\core\cmd_descs" "/MD" "/nologo" "/showIncludes" "/W2" "/O2" "-D__STDC__=1" "-D_CRT_DECLARE_NONSTDC_NAMES " "-D_CRT_SECURE_NO_WARNINGS" "-D_CRT_NONSTDC_NO_DEPRECATE" "-Werror=sizeof-pointer-memaccess" "" "-DRZ_PLUGIN_INCORE=1" "/Fdlibrz/core\librz_core.a.p\rtr.c.pdb" /Folibrz/core/librz_core.a.p/rtr.c.obj "/c" ../librz/core/rtr.c
In file included from ../librz/core/rtr.c:9:
In file included from ..\subprojects\libuv-v1.40.0\include\uv.h:64:
..\subprojects\libuv-v1.40.0\include/uv/win.h(27,18): error: typedef redefinition with different types ('intptr_t' (aka 'int') vs 'SSIZE_T' (aka 'long'))
typedef intptr_t ssize_t;
                 ^
..\librz\include\rz_types_base.h(21,17): note: previous definition is here
typedef SSIZE_T ssize_t;
                ^
1 error generated.

It's only a matter of the header fix or a meson.build change. You can try to do it on your own, since you have the machine.

caribpa commented 3 years ago

I replace the name last time (no idea about how to do the meson.build change), and there was an error later.

I did the same this time (replacing with the oneliner find . -type f -exec sed -i 's/ssize_t/rz_&/g' {} + in a msys2 shell after re-cloning rizin, before meson build) and there's an error in the linking:

[...]
18 warnings generated.
[1389/1563] Linking target binrz/rz-run/rz-run.exe
FAILED: binrz/rz-run/rz-run.exe
"lld-link"  /MACHINE:x86 /OUT:binrz/rz-run/rz-run.exe binrz/rz-run/rz-run.exe.p/rz-run.c.obj "/nologo" "/OPT:REF" "librz/main\librz_main.a" "librz/util\librz_util.a" "librzspp.a" "subprojects\sdb\src\libsdb.a" "subprojects\zlib-1.2.11\libz.a" "librz/magic\librz_magic.a" "librz/socket\librz_socket.a" "librz/flag\librz_flag.a" "librz/cons\librz_cons.a" "librz/hash\librz_hash.a" "subprojects\xxhash\libxxhash.a" "librz/crypto\librz_crypto.a" "librz/io\librz_io.a" "shlr\librzbochs.a" "shlr/gdb\libr2gdb.a" "shlr\librzwinkd.a" "shlr\librzqnx.a" "subprojects\libzip-1.7.3\liblibzip.a" "shlr\librzar.a" "shlr\w32dbg_wrap\librzw32dbg_wrap.a" "librz/reg\librz_reg.a" "librz/bp\librz_bp.a" "librz/syscall\librz_syscall.a" "librz/parse\librz_parse.a" "shlr\librztcc.a" "subprojects\mpc\libmpc.a" "librz/asm\librz_asm.a" "librz/bin\librz_bin.a" "subprojects\lz4-1.9.3\liblz4.a" "subprojects\yxml\libyxml.a" "subprojects\capstone-bundled\libcapstone.a" "librz/egg\librz_egg.a" "librz/search\librz_search.a" "librz/analysis\librz_analysis.a" "librz/debug\librz_debug.a" "librz/config\librz_config.a" "librz/core\librz_core.a" "librz/lang\librz_lang.a" "shlr\libshell_parser.a" "subprojects\tree-sitter-0.18.0\libtree_sitter.a" "subprojects\libuv-v1.40.0\libuv.a" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "advapi32.lib" "bcrypt.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "advapi32.lib" "bcrypt.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "psapi.lib" "user32.lib" "advapi32.lib" "iphlpapi.lib" "userenv.lib" "ws2_32.lib" "/SUBSYSTEM:CONSOLE" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib"
lld-link: error: duplicate symbol: _bfd_riscv_num_opcodes
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_opcodes
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_fpr_names_abi
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_gpr_names_abi
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_gpr_names_numeric
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_fpr_names_numeric
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)
[1390/1563] Linking target binrz/rz-hash/rz-hash.exe
FAILED: binrz/rz-hash/rz-hash.exe
"lld-link"  /MACHINE:x86 /OUT:binrz/rz-hash/rz-hash.exe binrz/rz-hash/rz-hash.exe.p/rz-hash.c.obj "/nologo" "/OPT:REF" "librz/main\librz_main.a" "librz/util\librz_util.a" "librzspp.a" "subprojects\sdb\src\libsdb.a" "subprojects\zlib-1.2.11\libz.a" "librz/magic\librz_magic.a" "librz/socket\librz_socket.a" "librz/flag\librz_flag.a" "librz/cons\librz_cons.a" "librz/hash\librz_hash.a" "subprojects\xxhash\libxxhash.a" "librz/crypto\librz_crypto.a" "librz/io\librz_io.a" "shlr\librzbochs.a" "shlr/gdb\libr2gdb.a" "shlr\librzwinkd.a" "shlr\librzqnx.a" "subprojects\libzip-1.7.3\liblibzip.a" "shlr\librzar.a" "shlr\w32dbg_wrap\librzw32dbg_wrap.a" "librz/reg\librz_reg.a" "librz/bp\librz_bp.a" "librz/syscall\librz_syscall.a" "librz/parse\librz_parse.a" "shlr\librztcc.a" "subprojects\mpc\libmpc.a" "librz/asm\librz_asm.a" "librz/bin\librz_bin.a" "subprojects\lz4-1.9.3\liblz4.a" "subprojects\yxml\libyxml.a" "subprojects\capstone-bundled\libcapstone.a" "librz/egg\librz_egg.a" "librz/search\librz_search.a" "librz/analysis\librz_analysis.a" "librz/debug\librz_debug.a" "librz/config\librz_config.a" "librz/core\librz_core.a" "librz/lang\librz_lang.a" "shlr\libshell_parser.a" "subprojects\tree-sitter-0.18.0\libtree_sitter.a" "subprojects\libuv-v1.40.0\libuv.a" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "advapi32.lib" "bcrypt.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "advapi32.lib" "bcrypt.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "psapi.lib" "user32.lib" "advapi32.lib" "iphlpapi.lib" "userenv.lib" "ws2_32.lib" "/SUBSYSTEM:CONSOLE" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib"
lld-link: error: duplicate symbol: _bfd_riscv_num_opcodes
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_opcodes
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_fpr_names_abi
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_gpr_names_abi
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_gpr_names_numeric
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_fpr_names_numeric
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)
[1391/1563] Linking target binrz/rizin/rizin.exe
FAILED: binrz/rizin/rizin.exe
"lld-link"  /MACHINE:x86 /OUT:binrz/rizin/rizin.exe binrz/rizin/rizin.exe.p/rizin.c.obj "/nologo" "/OPT:REF" "librz/util\librz_util.a" "librzspp.a" "subprojects\sdb\src\libsdb.a" "subprojects\zlib-1.2.11\libz.a" "librz/main\librz_main.a" "librz/magic\librz_magic.a" "librz/socket\librz_socket.a" "librz/flag\librz_flag.a" "librz/cons\librz_cons.a" "librz/hash\librz_hash.a" "subprojects\xxhash\libxxhash.a" "librz/crypto\librz_crypto.a" "librz/io\librz_io.a" "shlr\librzbochs.a" "shlr/gdb\libr2gdb.a" "shlr\librzwinkd.a" "shlr\librzqnx.a" "subprojects\libzip-1.7.3\liblibzip.a" "shlr\librzar.a" "shlr\w32dbg_wrap\librzw32dbg_wrap.a" "librz/reg\librz_reg.a" "librz/bp\librz_bp.a" "librz/syscall\librz_syscall.a" "librz/parse\librz_parse.a" "shlr\librztcc.a" "subprojects\mpc\libmpc.a" "librz/asm\librz_asm.a" "librz/bin\librz_bin.a" "subprojects\lz4-1.9.3\liblz4.a" "subprojects\yxml\libyxml.a" "subprojects\capstone-bundled\libcapstone.a" "librz/egg\librz_egg.a" "librz/search\librz_search.a" "librz/analysis\librz_analysis.a" "librz/debug\librz_debug.a" "librz/config\librz_config.a" "librz/core\librz_core.a" "librz/lang\librz_lang.a" "shlr\libshell_parser.a" "subprojects\tree-sitter-0.18.0\libtree_sitter.a" "subprojects\libuv-v1.40.0\libuv.a" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "advapi32.lib" "bcrypt.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "advapi32.lib" "bcrypt.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "psapi.lib" "user32.lib" "advapi32.lib" "iphlpapi.lib" "userenv.lib" "ws2_32.lib" "/SUBSYSTEM:CONSOLE" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib"
lld-link: error: duplicate symbol: _bfd_riscv_num_opcodes
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_opcodes
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_fpr_names_abi
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_gpr_names_abi
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_gpr_names_numeric
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_fpr_names_numeric
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
>>> defined at librz_asm.a(p_asm_riscv.c.obj)
[1392/1563] Linking target binrz/rz-bin/rz-bin.exe
FAILED: binrz/rz-bin/rz-bin.exe
"lld-link"  /MACHINE:x86 /OUT:binrz/rz-bin/rz-bin.exe binrz/rz-bin/rz-bin.exe.p/rz-bin.c.obj "/nologo" "/OPT:REF" "librz/main\librz_main.a" "librz/util\librz_util.a" "librzspp.a" "subprojects\sdb\src\libsdb.a" "subprojects\zlib-1.2.11\libz.a" "librz/magic\librz_magic.a" "librz/socket\librz_socket.a" "librz/flag\librz_flag.a" "librz/cons\librz_cons.a" "librz/hash\librz_hash.a" "subprojects\xxhash\libxxhash.a" "librz/crypto\librz_crypto.a" "librz/io\librz_io.a" "shlr\librzbochs.a" "shlr/gdb\libr2gdb.a" "shlr\librzwinkd.a" "shlr\librzqnx.a" "subprojects\libzip-1.7.3\liblibzip.a" "shlr\librzar.a" "shlr\w32dbg_wrap\librzw32dbg_wrap.a" "librz/reg\librz_reg.a" "librz/bp\librz_bp.a" "librz/syscall\librz_syscall.a" "librz/parse\librz_parse.a" "shlr\librztcc.a" "subprojects\mpc\libmpc.a" "librz/asm\librz_asm.a" "librz/bin\librz_bin.a" "subprojects\lz4-1.9.3\liblz4.a" "subprojects\yxml\libyxml.a" "subprojects\capstone-bundled\libcapstone.a" "librz/egg\librz_egg.a" "librz/search\librz_search.a" "librz/analysis\librz_analysis.a" "librz/debug\librz_debug.a" "librz/config\librz_config.a" "librz/core\librz_core.a" "librz/lang\librz_lang.a" "shlr\libshell_parser.a" "subprojects\tree-sitter-0.18.0\libtree_sitter.a" "subprojects\libuv-v1.40.0\libuv.a" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "advapi32.lib" "bcrypt.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "advapi32.lib" "bcrypt.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "psapi.lib" "user32.lib" "advapi32.lib" "iphlpapi.lib" "userenv.lib" "ws2_32.lib" "/SUBSYSTEM:CONSOLE" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib"
lld-link: error: duplicate symbol: _bfd_riscv_num_opcodes
>>> defined at librz_asm.a(p_asm_riscv.c.obj)
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_opcodes
>>> defined at librz_asm.a(p_asm_riscv.c.obj)
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_fpr_names_abi
>>> defined at librz_asm.a(p_asm_riscv.c.obj)
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_gpr_names_abi
>>> defined at librz_asm.a(p_asm_riscv.c.obj)
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_gpr_names_numeric
>>> defined at librz_asm.a(p_asm_riscv.c.obj)
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_fpr_names_numeric
>>> defined at librz_asm.a(p_asm_riscv.c.obj)
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
[1393/1563] Linking target binrz/rz-asm/rz-asm.exe
FAILED: binrz/rz-asm/rz-asm.exe
"lld-link"  /MACHINE:x86 /OUT:binrz/rz-asm/rz-asm.exe binrz/rz-asm/rz-asm.exe.p/rz-asm.c.obj "/nologo" "/OPT:REF" "librz/main\librz_main.a" "librz/util\librz_util.a" "librzspp.a" "subprojects\sdb\src\libsdb.a" "subprojects\zlib-1.2.11\libz.a" "librz/magic\librz_magic.a" "librz/socket\librz_socket.a" "librz/flag\librz_flag.a" "librz/cons\librz_cons.a" "librz/hash\librz_hash.a" "subprojects\xxhash\libxxhash.a" "librz/crypto\librz_crypto.a" "librz/io\librz_io.a" "shlr\librzbochs.a" "shlr/gdb\libr2gdb.a" "shlr\librzwinkd.a" "shlr\librzqnx.a" "subprojects\libzip-1.7.3\liblibzip.a" "shlr\librzar.a" "shlr\w32dbg_wrap\librzw32dbg_wrap.a" "librz/reg\librz_reg.a" "librz/bp\librz_bp.a" "librz/syscall\librz_syscall.a" "librz/parse\librz_parse.a" "shlr\librztcc.a" "subprojects\mpc\libmpc.a" "librz/asm\librz_asm.a" "librz/bin\librz_bin.a" "subprojects\lz4-1.9.3\liblz4.a" "subprojects\yxml\libyxml.a" "subprojects\capstone-bundled\libcapstone.a" "librz/egg\librz_egg.a" "librz/search\librz_search.a" "librz/analysis\librz_analysis.a" "librz/debug\librz_debug.a" "librz/config\librz_config.a" "librz/core\librz_core.a" "librz/lang\librz_lang.a" "shlr\libshell_parser.a" "subprojects\tree-sitter-0.18.0\libtree_sitter.a" "subprojects\libuv-v1.40.0\libuv.a" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "advapi32.lib" "bcrypt.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "advapi32.lib" "bcrypt.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "ws2_32.lib" "wininet.lib" "psapi.lib" "psapi.lib" "user32.lib" "advapi32.lib" "iphlpapi.lib" "userenv.lib" "ws2_32.lib" "/SUBSYSTEM:CONSOLE" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib"
lld-link: error: duplicate symbol: _bfd_riscv_num_opcodes
>>> defined at librz_asm.a(p_asm_riscv.c.obj)
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_opcodes
>>> defined at librz_asm.a(p_asm_riscv.c.obj)
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_fpr_names_abi
>>> defined at librz_asm.a(p_asm_riscv.c.obj)
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_gpr_names_abi
>>> defined at librz_asm.a(p_asm_riscv.c.obj)
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_gpr_names_numeric
>>> defined at librz_asm.a(p_asm_riscv.c.obj)
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)

lld-link: error: duplicate symbol: _riscv_fpr_names_numeric
>>> defined at librz_asm.a(p_asm_riscv.c.obj)
>>> defined at librz_analysis.a(p_analysis_riscv.c.obj)
[1394/1563] Compiling C object binrz/rz-gg/rz-gg.exe.p/rz-gg.c.obj
ninja: build stopped: subcommand failed.
caribpa commented 3 years ago

Before I forget, it is necessary building with the meson flag --buildtype=release to prevent the buggy mspdbsrv.exe from hanging the build process when generating PDB (debug) files.

XVilka commented 3 years ago

Could you please open this clang-cl problem as a separate issue? Nobody checks the closed issues.