New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build error OS: FreeBSD 9.x,10.x/gcc v4.2.1 AT: libr/anal/p/anal_avr.c ERR: unknown field 'consts' at 'cpu_models[]' #6268
Comments
wat? build fine here |
Done.
It was occured in x32/gcc 4.2.1 20070831 patched [FreeBSD] |
i have tested on freebsd-amd64, linux-arm and osx-x86-64, no issues at all |
What compiler do you use? |
$ gcc --version
|
It's this bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 |
@unixfreaxjp please try now |
This, occurred as well in amd64 in two machines different FreeBSD version (9.x and 10.x) |
@unixfreaxjp please try now |
Retrying now. @Maijin |
The solution is to eliminate anonymous union. |
@XVilka @Maijin @radare x32 log: Tue Nov 29 20:33:56 JST 2016
heads/master-0-g74bb05a
:
CC anal_avr.c
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:112: warning: braces around scalar initializer
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:112: warning: (near initialization for 'cpu_models[0].inherit')
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:113: error: field name not in record or union initializer
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:113: error: (near initialization for 'cpu_models[0].inherit')
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:113: warning: braces around scalar initializer
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:113: warning: (near initialization for 'cpu_models[0].inherit')
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:114: warning: initialization from incompatible pointer type
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:115: warning: excess elements in scalar initializer
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:115: warning: (near initialization for 'cpu_models[0].inherit')
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:116: warning: excess elements in scalar initializer
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:116: warning: (near initialization for 'cpu_models[0].inherit')
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:118: warning: excess elements in scalar initializer
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:118: warning: (near initialization for 'cpu_models[0].inherit')
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:122: warning: braces around scalar initializer
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:122: warning: (near initialization for 'cpu_models[1].inherit')
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:123: error: field name not in record or union initializer
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:123: error: (near initialization for 'cpu_models[1].inherit')
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:123: warning: braces around scalar initializer
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:123: warning: (near initialization for 'cpu_models[1].inherit')
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:124: warning: initialization from incompatible pointer type
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:125: warning: excess elements in scalar initializer
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:125: warning: (near initialization for 'cpu_models[1].inherit')
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:126: warning: excess elements in scalar initializer
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:126: warning: (near initialization for 'cpu_models[1].inherit')
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:128: warning: excess elements in scalar initializer
/TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.c:128: warning: (near initialization for 'cpu_models[1].inherit')
gmake[3]: *** [/TEST/radare/radare2/libr/../global.mk:42: /TEST/radare/radare2/libr/..//libr/anal/p/anal_avr.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[2]: *** [Makefile:83: anal] Error 2
gmake[2]: *** Waiting for unfinished jobs....
/TEST/radare/radare2/libr/bin/p
SHLR=/TEST/radare/radare2/libr/..//libr/../shlr
gmake[1]: *** [Makefile:31: all] Error 2
gmake: *** [Makefile:51: all] Error 2 |
Someone will do the fix today, just not right now. |
I will urgently plan upgrade gcc on many of the bsd analysis clusters then. We use servers to analyze UNIX bad stuff, not client.. upgrading gcc will upgrade ton of dev stuff too.. radare2 0.10.5 9999999 @ freebsd-x86-32 git.0.10.5
commit: HEAD build: 2016-11-29 Cheers. |
@radare @XVilka @Maijin @unixfreaxjp @killabytenow radare2-1.0 aka "Finally" works, proof: $ date&&r2 -v
Thu Dec 1 14:37:04 JST 2016
radare2 1.0 9999999 @ freebsd-x86-32 git.1.0
commit: HEAD build: 2016-12-01 radare2 version 1.0.2 is also proven works / built fine: $ date&&r2 -v
Thu Dec 1 14:44:38 JST 2016
radare2 1.0.2 9999999 @ freebsd-x86-32 git.1.0.2
commit: HEAD build: 2016-12-01 ##The problem is sourced in here:## There must be a code change in development after 1.0.2 RELEASE (November the 10th, 2016) that affects this good gcc compatibility quality that A policy in the development need to be decided on the |
yeah im not really a fan of anonymous unions, wondering if there's any gcc flag to enforce this |
why this issue is closed if its not fixed? |
Because I know that you are busy.. and people can use workaround to use 1.0.2,
Believe me, I already on seeking that too. But there is no easy configure option that can be used for forcing this. I agree for the @XVilka suggestion for the recoding without anonymous unions , or, we are accepting the limitation on used gcc version. It is the decision that you should make due to product's compatibility, quality, roadmaps are related. |
I tested 13c15cb (and to de-anonymize the AVR union ) on 32bit: $ date&&r2 -v&&uname
Thu Dec 1 23:21:57 JST 2016
radare2 1.1.0-git 13133 @ freebsd-x86-32 git.1.0.2-189-ge4b5f0f
commit: e4b5f0f32b0f6bff4f3537bd2800d5801eb5e513 build: 2016-12-01
FreeBSD 64bit: $ pwd&&date&&r2 -v&&uname
/TEST/radare2
Thu Dec 1 23:29:40 JST 2016
radare2 1.1.0-git 13133 @ freebsd-x86-64 git.1.0.2-189-ge4b5f0f
commit: e4b5f0f32b0f6bff4f3537bd2800d5801eb5e513 build: 2016-12-01
FreeBSD Thank you now it works just fine :) |
You are welcome
… On 1 Dec 2016, at 15:30, unixfreaxjp ***@***.***> wrote:
I tested 13c15cb (Deanonymize the AVR union ) on x86-32 and x86-64
32bit:
$ date&&r2 -v&&uname
Thu Dec 1 23:21:57 JST 2016
radare2 1.1.0-git 13133 @ freebsd-x86-32 git.1.0.2-189-ge4b5f0f
commit: e4b5f0f build: 2016-12-01
FreeBSD
64bit:
$ pwd&&date&&r2 -v&&uname
/TEST/radare2
Thu Dec 1 23:29:40 JST 2016
radare2 1.1.0-git 13133 @ freebsd-x86-64 git.1.0.2-189-ge4b5f0f
commit: e4b5f0f build: 2016-12-01
FreeBSD
Thank you very much @radare, it works just fine :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
This is the copy of wrongly posted issue at radareorg/radare#3
compiler info:
Build error log (full):
https://github.com/unixfreaxjp/malwaremustdie/blob/master/radare2test/r2freebsdi686-3.md
Linux version is unaffected:
The usage of (undeclared/undefined)
.consts
for FreeBSD is not compatible in/libr/anal/p/anal_avr.c
this function atCPU_MODEL cpu_models[]
, xref: (1) https://github.com/radare/radare2/blob/master/libr/anal/p/anal_avr.c#L112 and (2) https://github.com/radare/radare2/blob/master/libr/anal/p/anal_avr.c#L120problem:
**Anonymized Union**
Code:
@radare @XVilka @crowell @jvoisin @Maijin
The text was updated successfully, but these errors were encountered: