wiire-a/pixiewps

unable to build since rencent changes

sheepdestroyer opened this issue · 6 comments

I used to build pxieview on my fedora26 system but since recently, not able to anymore :

[sheepdestroyer@sheepora-X230 pixiewps]$ cd src/
[sheepdestroyer@sheepora-X230 src]$ make
cc -O2 -pipe -march=native  -o pixiewps pixiewps.c random_r.c mbedtls/sha256.c mbedtls/md.c mbedtls/md_wrap.c -lpthread 
In file included from random_r.c:40:0:
random_r.h:26:8: error: redefinition of ‘struct random_data’
 struct random_data {
        ^~~~~~~~~~~
In file included from random_r.c:27:0:
/usr/include/stdlib.h:320:8: note: originally defined here
 struct random_data
        ^~~~~~~~~~~
In file included from random_r.c:40:0:
random_r.h:36:6: error: conflicting types for ‘random_r’
 void random_r(struct random_data *buf, int32_t *result);
      ^~~~~~~~
In file included from random_r.c:27:0:
/usr/include/stdlib.h:331:12: note: previous declaration of ‘random_r’ was here
 extern int random_r (struct random_data *__restrict __buf,
            ^~~~~~~~
In file included from random_r.c:40:0:
random_r.h:37:5: error: conflicting types for ‘srandom_r’
 int srandom_r(unsigned int seed, struct random_data *buf);
     ^~~~~~~~~
In file included from random_r.c:27:0:
/usr/include/stdlib.h:334:12: note: previous declaration of ‘srandom_r’ was here
 extern int srandom_r (unsigned int __seed, struct random_data *__buf)
            ^~~~~~~~~
In file included from random_r.c:40:0:
random_r.h:38:5: error: conflicting types for ‘initstate_r’
 int initstate_r(unsigned int seed, char *arg_state, size_t n, struct random_data *buf);
     ^~~~~~~~~~~
In file included from random_r.c:27:0:
/usr/include/stdlib.h:337:12: note: previous declaration of ‘initstate_r’ was here
 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
            ^~~~~~~~~~~
In file included from random_r.c:40:0:
random_r.h:39:5: error: conflicting types for ‘setstate_r’
 int setstate_r(char *arg_state, struct random_data *buf);
     ^~~~~~~~~~
In file included from random_r.c:27:0:
/usr/include/stdlib.h:342:12: note: previous declaration of ‘setstate_r’ was here
 extern int setstate_r (char *__restrict __statebuf,
            ^~~~~~~~~~
random_r.c:145:6: error: conflicting types for ‘random_r’
 void random_r(struct random_data *buf, int32_t *result)
      ^~~~~~~~
In file included from random_r.c:27:0:
/usr/include/stdlib.h:331:12: note: previous declaration of ‘random_r’ was here
 extern int random_r (struct random_data *__restrict __buf,
            ^~~~~~~~
random_r.c:203:5: error: conflicting types for ‘srandom_r’
 int srandom_r (unsigned int seed, struct random_data *buf)
     ^~~~~~~~~
In file included from random_r.c:27:0:
/usr/include/stdlib.h:334:12: note: previous declaration of ‘srandom_r’ was here
 extern int srandom_r (unsigned int __seed, struct random_data *__buf)
            ^~~~~~~~~
random_r.c:271:5: error: conflicting types for ‘initstate_r’
 int initstate_r (unsigned int seed, char *arg_state, size_t n, struct random_data *buf)
     ^~~~~~~~~~~
In file included from random_r.c:27:0:
/usr/include/stdlib.h:337:12: note: previous declaration of ‘initstate_r’ was here
 extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
            ^~~~~~~~~~~
random_r.c:330:5: error: conflicting types for ‘setstate_r’
 int setstate_r (char *arg_state, struct random_data *buf)
     ^~~~~~~~~~
In file included from random_r.c:27:0:
/usr/include/stdlib.h:342:12: note: previous declaration of ‘setstate_r’ was here
 extern int setstate_r (char *__restrict __statebuf,
            ^~~~~~~~~~
make: *** [Makefile:12: all] Error 1
[sheepdestroyer@sheepora-X230 src]$ 

i'm curious which change is responsible for that to happen. care to bisect ?

i'll need to learn how to do that (I guess there is a smart automated way instead of just picking a commit by hand and building?).
back latter with more if had time and successful.

easy and fun

[sheepdestroyer@sheepora-X230 pixiewps]$ git bisect bad
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[367697a24f8d078b1567a2aabe7bcc2e9f8bebba] Makefile: rename CCFLAGS to CFLAGS
[sheepdestroyer@sheepora-X230 pixiewps]$ 

Which makes me think that I have a few tweaks in my .bashrc:

[sheepdestroyer@sheepora-X230 pixiewps]$ echo $CFLAGS
-O2 -pipe -march=native

Relevant to what I get? Should I better not do that?

Should be fixed now.

yep, can confirm