c-for-go
c-for-go copied to clipboard
cannot determine size of struct sockaddr_in
/usr/local/include/libr/r_socket.h:65:21: cannot determine size of struct sockaddr_in (and 1 more errors)
Here is the line causing it https://github.com/radare/radare2/blob/master/libr/include/r_socket.h#L65
radare2.yml contents:
---
GENERATOR:
PackageName: radare2
PackageDescription: "Package radare2 provides Go bindings for radare2 reverse engineering library"
PackageLicense: "LGPLv3"
PkgConfigOpts: [libr]
Includes: ['/usr/local/include/libr/r_core.h', '/usr/local/include/libr/r_asm.h', '/usr/local/include/libr/r_anal.h', '/usr/local/include/libr/r_bin.h', '/usr/local/include/libr/r_debug.h', '/usr/local/include/libr/r_io.h', '/usr/local/include/libr/r_config.h', '/usr/local/include/libr/r_flag.h', '/usr/local/include/libr/r_sign.h', '/usr/local/include/libr/r_hash.h', '/usr/local/include/libr/r_diff.h', '/usr/local/include/libr/r_egg.h', '/usr/local/include/libr/r_fs.h', '/usr/local/include/libr/r_lang.h', '/usr/local/include/libr/r_pdb.h']
PARSER:
IncludePaths: ['/usr/lib/gcc/x86_64-redhat-linux/7/include', '/usr/local/include', '/usr/include', '/usr/local/include/libr', '/usr/local/include/libr/include']
SourcesPaths: ['/usr/local/include/libr/r_core.h', '/usr/local/include/libr/r_asm.h', '/usr/local/include/libr/r_anal.h', '/usr/local/include/libr/r_bin.h', '/usr/local/include/libr/r_debug.h', '/usr/local/include/libr/r_io.h', '/usr/local/include/libr/r_config.h', '/usr/local/include/libr/r_flag.h', '/usr/local/include/libr/r_sign.h', '/usr/local/include/libr/r_hash.h', '/usr/local/include/libr/r_diff.h', '/usr/local/include/libr/r_egg.h', '/usr/local/include/libr/r_fs.h', '/usr/local/include/libr/r_lang.h', '/usr/local/include/libr/r_pdb.h']
Defines:
__UNIX__: 1
TRANSLATOR:
ConstRules:
defines: eval
Rules:
global:
- {action: accept, from "^r_"}
- {transform: export}
private:
- {transform: unexport}
@cznic I'm requesting your help there, pls
@xlab I hope to look into it tomorrow. Stay tuned please ;-)
So I tried to reproduce the issue, but so far I was not even able to find libr or what it should be with my package manager (OpenSuse) and I'd prefer not installing random headers into my system include folders.
I suggest to create a preferably mimimized but standalone example and including it in a new at cznic/cc. I'm affraid that without such help I'm probably unable to help to resolve the issue.
Sure. Will prepare the minimal example.
Strange, I tried to make a small testcase, but it does work, unlike the radare2 example. cgo.zip
Retried again, this error still present. See https://github.com/radareorg/radare2-bindings#usage If I run
./genbind.py -o /tmp/qwe -l go
it will produce radare2.yml and will print this error.
@XVilka will check on this week, thanks for the update.
Have you had a chance to look?
Error is still here - tried with the latest c-for-go and radare2.
Let me know how we can solve it.