Skip to content
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

Cygwin: bulding errors - meta bug #40

Closed
XVilka opened this issue Dec 20, 2012 · 7 comments
Closed

Cygwin: bulding errors - meta bug #40

XVilka opened this issue Dec 20, 2012 · 7 comments

Comments

@XVilka
Copy link
Contributor

XVilka commented Dec 20, 2012

Cygwin, Windows 7 x64 box

cc -c -MD   -fPIC -g -Wall -DWWWROOT=\"/usr/local/lib/radare2/0.9.3git/www\" -I/cygdrive/d/Work/radare2/libr/include -o sys.o sys.c
sys.c:1:0: warning: -fPIC ignored for target (all code is position independent)
In file included from /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../include/w32api/winsock.h:36:0,
                 from /cygdrive/d/Work/radare2/libr/include/r_types.h:28,
                 from sys.c:5:
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../include/w32api/psdk_inc/_fd_types.h:100:2: warning: #warning "fd_set and associated macros have been defined in sys/types.      This can cause runtime problems with W32 sockets"
sys.c: In function 'r_sys_backtrace':
sys.c:100:2: warning: #warning TODO: r_sys_bt : unimplemented
sys.c: In function 'r_sys_getdir':
sys.c:210:2: warning: implicit declaration of function '_getcwd'
sys.c:210:14: warning: initialization makes pointer from integer without a cast
sys.c: At top level:
sys.c:140:13: warning: 'signal_handler' defined but not used
sys.c:152:12: warning: 'checkcmd' defined but not used
cc -c -MD   -fPIC -g -Wall -DWWWROOT=\"/usr/local/lib/radare2/0.9.3git/www\" -I/cygdrive/d/Work/radare2/libr/include -o buf.o buf.c
buf.c:1:0: warning: -fPIC ignored for target (all code is position independent)
cc -c -MD   -fPIC -g -Wall -DWWWROOT=\"/usr/local/lib/radare2/0.9.3git/www\" -I/cygdrive/d/Work/radare2/libr/include -o w32-sys.o w32-sys.c
w32-sys.c:1:0: warning: -fPIC ignored for target (all code is position independent)
w32-sys.c:6:19: fatal error: tchar.h: No such file or directory
compilation terminated.
/cygdrive/d/Work/radare2/libr/../global.mk:43: recipe for target `w32-sys.o' failed
make[4]: *** [w32-sys.o] Error 1
make[4]: Leaving directory `/cygdrive/d/Work/radare2/libr/util'
Makefile:33: recipe for target `util' failed
make[3]: *** [util] Error 2
make[3]: Leaving directory `/cygdrive/d/Work/radare2/libr'
Makefile:23: recipe for target `all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory `/cygdrive/d/Work/radare2/libr'
Makefile:26: recipe for target `libr' failed
make[1]: *** [libr] Error 2
make[1]: Leaving directory `/cygdrive/d/Work/radare2'
Makefile:17: recipe for target `all' failed
make: *** [all] Error 2
@XVilka
Copy link
Contributor Author

XVilka commented Dec 20, 2012

So, issue not in this - just need to patch #ifdefs for CYGWIN to be more *nix, than WINDOWS.

@radare
Copy link
Collaborator

radare commented Dec 21, 2012

Feel free to provide a working patch so we can add cygwin into the supported ports

@radare radare closed this as completed Sep 14, 2013
@radare radare reopened this Sep 14, 2013
@radare
Copy link
Collaborator

radare commented Sep 14, 2013

Can you try again? I have made tchar.h conditional

@radare radare closed this as completed May 26, 2014
@XVilka XVilka changed the title w32-sys.c:6:19: fatal error: tchar.h: No such file or directory Cygwin: bulding errors - meta bug Jun 24, 2014
@XVilka
Copy link
Contributor Author

XVilka commented Jun 24, 2014

$ make
make -C libr/util
make[1]: Entering directory '/cygdrive/d/Work/radare/radare2/libr/util'
gcc -c  -MD   -fPIC -g -Wall -D__CYGWIN__=1 -I/cygdrive/d/Work/radare/radare2/libr/include -DGIT_TAP=\"0.9.8-rc2-74-g4b7796d\" -o mem.o mem.c
mem.c:1:0: warning: -fPIC ignored for target (all code is position independent)
 /* radare - LGPL - Copyright 2007-2014 - pancake */
 ^
In file included from /usr/include/cygwin/sys_time.h:13:0,
                 from /usr/include/sys/time.h:61,
                 from /cygdrive/d/Work/radare/radare2/libr/include/r_types.h:89,
                 from /cygdrive/d/Work/radare/radare2/libr/include/r_util.h:6,
                 from mem.c:3:
/usr/include/sys/select.h:31:5: error: conflicting types for 'select'
 int select __P ((int __n, fd_set *__readfds, fd_set *__writefds,
     ^
In file included from /cygdrive/d/Work/radare/radare2/libr/include/r_types.h:42:0,
                 from /cygdrive/d/Work/radare/radare2/libr/include/r_util.h:6,
                 from mem.c:3:
/usr/include/w32api/winsock.h:299:34: note: previous declaration of 'select' was here
   WINSOCK_API_LINKAGE int WSAAPI select(int nfds,fd_set *readfds,fd_set *writefds,fd_set *exceptfds,const PTIMEVAL timeout);
                                  ^
/cygdrive/d/Work/radare/radare2/libr/../global.mk:44: recipe for target 'mem.o' failed
make[1]: *** [mem.o] Error 1
make[1]: Leaving directory '/cygdrive/d/Work/radare/radare2/libr/util'
Makefile:24: recipe for target 'all' failed
make: *** [all] Error 2

@XVilka XVilka reopened this Jun 24, 2014
@radare
Copy link
Collaborator

radare commented Jun 24, 2014

Try removing the include select.h on windows this is inside winsock. If it works put it inside an #ifndef cygwin and try again/pullreq

On 24 Jun 2014, at 21:24, Anton Kochkov [email protected] wrote:

$ make
make -C libr/util
make[1]: Entering directory '/cygdrive/d/Work/radare/radare2/libr/util'
gcc -c -MD -fPIC -g -Wall -D__CYGWIN__=1 -I/cygdrive/d/Work/radare/radare2/libr/include -DGIT_TAP="0.9.8-rc2-74-g4b7796d" -o mem.o mem.c
mem.c:1:0: warning: -fPIC ignored for target (all code is position independent)
/* radare - LGPL - Copyright 2007-2014 - pancake /
^
In file included from /usr/include/cygwin/sys_time.h:13:0,
from /usr/include/sys/time.h:61,
from /cygdrive/d/Work/radare/radare2/libr/include/r_types.h:89,
from /cygdrive/d/Work/radare/radare2/libr/include/r_util.h:6,
from mem.c:3:
/usr/include/sys/select.h:31:5: error: conflicting types for 'select'
int select __P ((int __n, fd_set __readfds, fd_set __writefds,
^
In file included from /cygdrive/d/Work/radare/radare2/libr/include/r_types.h:42:0,
from /cygdrive/d/Work/radare/radare2/libr/include/r_util.h:6,
from mem.c:3:
/usr/include/w32api/winsock.h:299:34: note: previous declaration of 'select' was here
WINSOCK_API_LINKAGE int WSAAPI select(int nfds,fd_set *readfds,fd_set *writefds,fd_set *exceptfds,const PTIMEVAL timeout);
^
/cygdrive/d/Work/radare/radare2/libr/../global.mk:44: recipe for target 'mem.o' failed
make[1]: * [mem.o] Error 1
make[1]: Leaving directory '/cygdrive/d/Work/radare/radare2/libr/util'
Makefile:24: recipe for target 'all' failed
make: *
* [all] Error 2


Reply to this email directly or view it on GitHub.

@XVilka
Copy link
Contributor Author

XVilka commented Aug 11, 2015

All fixed (except -fPIC, but that's minor, only messing building logs, not the resulting files).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants