nowsecure / r2frida

Radare2 and Frida better together.
MIT License
1.18k stars 121 forks source link

io_frida.c(2052): error C2059: syntax error: 'constant' #495

Closed mriamnobody closed 10 months ago

mriamnobody commented 1 year ago

System and Tool Version:

Windows 11 (X64)
radare2: 5..8
r2frida: 5.7.8
python: 3.9.0
VS Community 2022: 17.6.2

Having spent more than three hours attempting to resolve or find a workaround for this issue, I unfortunately haven't had any success. There were also other issues with the build.bat file, but I managed to correct them. One such issue involved the use of the cat keyboard and the xxd command in the build.bat file, which resulted in an is not recognized as an internal or external command, operable program or batch file error.

Initially, I cloned the repositories using the git clone command, then I proceeded to install radare2 using the preconfigure.bat, configure.bat, and make.bat files. No issues arose during the installation of radare2. I also added radare2 to the PATH. Afterwards, I tried to install r2frida using build.bat from r2frida, but encountered an error message saying:

io_frida.c
io_frida.c(2052): error C2059: syntax error: 'constant'
Compilation Failed

This is my output from Command Prompt:

Using R2_BASE: "C:\Users\rosha\Downloads\Compressed\radare2\prefix\bin"
        1 file(s) copied.
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

> r2frida-agent@5.7.8 prepare
> npm run build

> r2frida-agent@5.7.8 build
> frida-compile src/agent -Sco src/_agent.js -c

added 448 packages, and audited 449 packages in 10s

79 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Downloading Frida Core Sdk
Extracting...

7-Zip SFX 19.00 (x86) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21

Extracting archive: C:\Users\rosha\Downloads\Compressed\r2frida\src\frida\frida-core-sdk-15.2.2-x86_64.exe
--
Path = C:\Users\rosha\Downloads\Compressed\r2frida\src\frida\frida-core-sdk-15.2.2-x86_64.exe
Type = 7z

Everything is Ok
Compiling...
cl /O2 /MT /nologo /LD /Gy /D_USRDLL /D_WINDLL /DFRIDA_VERSION_STRING="15.2.2" io_frida.c /I""C:\Users\rosha\Downloads\Compressed\radare2\prefix\bin"\include" /I""C:\Users\rosha\Downloads\Compressed\radare2\prefix\bin"\include\libr" /I""C:\Users\rosha\Downloads\Compressed\radare2\prefix\bin"\include\libr\sdb" /I"C:\Users\rosha\Downloads\Compressed\r2frida\src" /I"C:\Users\rosha\Downloads\Compressed\r2frida\src\frida" "C:\Users\rosha\Downloads\Compressed\r2frida\src\frida\frida-core.lib" ""C:\Users\rosha\Downloads\Compressed\radare2\prefix\bin"\lib\*.lib"
io_frida.c
io_frida.c(2052): error C2059: syntax error: 'constant'
Compilation Failed

Previously, during the installation of the latest version, I encountered an issue that had already been reported here. The comments in that issue suggested that using version 5.7.8 would resolve this installation problem.

mriamnobody commented 1 year ago

@oleavr @trufae

trufae commented 10 months ago

i will take care of the windows support after the 5.9 release, im aware the are some bugs, but this one should be fixed already

trufae commented 10 months ago

Closing this ticket to reference it from https://github.com/nowsecure/r2frida/issues/444 as its the centralized point to track all the windows problems. Thanks for reporting