|
From: Xiaofan C. <xia...@gm...> - 2015-03-18 05:01:46
|
Hi there, I have problems to build libusb git under latest MinGW.org toolchain. Older version of MinGW (with GCC 4.7.2) seems to be fine. MinGW-w64 toolchain are also fine. In libusb project, we try to make it compatible with MinGW, MinGW-w64, Cygwin and MSVC. Please help to see if this is a MinGW.org problem or not. Thanks. The codes are here. https://github.com/libusb/libusb/tree/master/libusb/os Regards, Xiaofan (libusb and libusb-win32 project admin) ---------- Forwarded message ---------- From: Xiaofan Chen <xia...@gm...> Date: Sat, Mar 7, 2015 at 9:24 AM Subject: MinGW.org build problem To: "lib...@li..." <lib...@li...> I have just installed a new installation of MinGW.org toolchain and it does not seem to work with the latest git. I am wondering if this is a MinGW.org problem or not. MinGW.org does not seem to be in a good situation right now... make all-recursive make[1]: Entering directory `/c/work/libusb/libusb' Making all in libusb make[2]: Entering directory `/c/work/libusb/libusb/libusb' make[3]: Entering directory `/c/work/libusb/libusb/libusb' CC libusb_1_0_la-core.lo In file included from libusbi.h:237:0, from core.c:44: ./os/threads_windows.h:81:20: warning: 'struct timespec' declared inside parameter list [enabled by default] const struct timespec *abstime); ^ ./os/threads_windows.h:81:20: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] In file included from core.c:44:0: libusbi.h:1058:41: warning: 'struct timespec' declared inside parameter list [enabled by default] int (*clock_gettime)(int clkid, struct timespec *tp); ^ CC libusb_1_0_la-descriptor.lo In file included from libusbi.h:237:0, from descriptor.c:29: ./os/threads_windows.h:81:20: warning: 'struct timespec' declared inside parameter list [enabled by default] const struct timespec *abstime); ^ ./os/threads_windows.h:81:20: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] In file included from descriptor.c:29:0: libusbi.h:1058:41: warning: 'struct timespec' declared inside parameter list [enabled by default] int (*clock_gettime)(int clkid, struct timespec *tp); ^ CC libusb_1_0_la-io.lo In file included from libusbi.h:237:0, from io.c:40: ./os/threads_windows.h:81:20: warning: 'struct timespec' declared inside parameter list [enabled by default] const struct timespec *abstime); ^ ./os/threads_windows.h:81:20: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] In file included from io.c:40:0: libusbi.h:1058:41: warning: 'struct timespec' declared inside parameter list [enabled by default] int (*clock_gettime)(int clkid, struct timespec *tp); ^ io.c: In function 'calculate_timeout': io.c:1198:18: error: storage size of 'current_time' isn't known struct timespec current_time; ^ io.c:1198:18: warning: unused variable 'current_time' [-Wunused-variable] io.c: In function 'libusb_wait_for_event': io.c:1917:18: error: storage size of 'timeout' isn't known struct timespec timeout; ^ io.c:1917:18: warning: unused variable 'timeout' [-Wunused-variable] io.c: In function 'handle_timeouts_locked': io.c:1960:18: error: storage size of 'systime_ts' isn't known struct timespec systime_ts; ^ io.c:1960:18: warning: unused variable 'systime_ts' [-Wunused-variable] io.c: In function 'libusb_get_next_timeout': io.c:2493:18: error: storage size of 'cur_ts' isn't known struct timespec cur_ts; ^ io.c:2493:18: warning: unused variable 'cur_ts' [-Wunused-variable] make[3]: [libusb_1_0_la-io.lo] Error 1 (ignored) mv: cannot stat `.deps/libusb_1_0_la-io.Tpo': No such file or directory make[3]: [libusb_1_0_la-io.lo] Error 1 (ignored) CC libusb_1_0_la-strerror.lo In file included from libusbi.h:237:0, from strerror.c:29: ./os/threads_windows.h:81:20: warning: 'struct timespec' declared inside parameter list [enabled by default] const struct timespec *abstime); ^ ./os/threads_windows.h:81:20: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] In file included from strerror.c:29:0: libusbi.h:1058:41: warning: 'struct timespec' declared inside parameter list [enabled by default] int (*clock_gettime)(int clkid, struct timespec *tp); ^ CC libusb_1_0_la-sync.lo In file included from libusbi.h:237:0, from sync.c:27: ./os/threads_windows.h:81:20: warning: 'struct timespec' declared inside parameter list [enabled by default] const struct timespec *abstime); ^ ./os/threads_windows.h:81:20: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] In file included from sync.c:27:0: libusbi.h:1058:41: warning: 'struct timespec' declared inside parameter list [enabled by default] int (*clock_gettime)(int clkid, struct timespec *tp); ^ CC libusb_1_0_la-hotplug.lo In file included from libusbi.h:237:0, from hotplug.c:33: ./os/threads_windows.h:81:20: warning: 'struct timespec' declared inside parameter list [enabled by default] const struct timespec *abstime); ^ ./os/threads_windows.h:81:20: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] In file included from hotplug.c:33:0: libusbi.h:1058:41: warning: 'struct timespec' declared inside parameter list [enabled by default] int (*clock_gettime)(int clkid, struct timespec *tp); ^ CC os/libusb_1_0_la-threads_windows.lo In file included from ./libusbi.h:237:0, from os/threads_windows.c:27: ./os/threads_windows.h:81:20: warning: 'struct timespec' declared inside parameter list [enabled by default] const struct timespec *abstime); ^ ./os/threads_windows.h:81:20: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] In file included from os/threads_windows.c:27:0: ./libusbi.h:1058:41: warning: 'struct timespec' declared inside parameter list [enabled by default] int (*clock_gettime)(int clkid, struct timespec *tp); ^ os/threads_windows.c:179:20: warning: 'struct timespec' declared inside parameter list [enabled by default] const struct timespec *abstime) { ^ os/threads_windows.c:177:5: error: conflicting types for 'usbi_cond_timedwait' int usbi_cond_timedwait(usbi_cond_t *cond, ^ In file included from ./libusbi.h:237:0, from os/threads_windows.c:27: ./os/threads_windows.h:79:5: note: previous declaration of 'usbi_cond_timedwait' was here int usbi_cond_timedwait(usbi_cond_t *cond, ^ os/threads_windows.c: In function 'usbi_cond_timedwait': os/threads_windows.c:183:18: error: storage size of 'cur_time_ns' isn't known struct timespec cur_time_ns; ^ In file included from os/threads_windows.c:27:0: ./libusbi.h:167:36: error: dereferencing pointer to incomplete type (tv)->tv_sec = (ts)->tv_sec; \ ^ os/threads_windows.c:198:2: note: in expansion of macro 'TIMESPEC_TO_TIMEVAL' TIMESPEC_TO_TIMEVAL(&targ_time, abstime); ^ ./libusbi.h:168:37: error: dereferencing pointer to incomplete type (tv)->tv_usec = (ts)->tv_nsec / 1000; \ ^ os/threads_windows.c:198:2: note: in expansion of macro 'TIMESPEC_TO_TIMEVAL' TIMESPEC_TO_TIMEVAL(&targ_time, abstime); ^ os/threads_windows.c:183:18: warning: unused variable 'cur_time_ns' [-Wunused-variable] struct timespec cur_time_ns; ^ make[3]: [os/libusb_1_0_la-threads_windows.lo] Error 1 (ignored) mv: cannot stat `os/.deps/libusb_1_0_la-threads_windows.Tpo': No such file or directory make[3]: [os/libusb_1_0_la-threads_windows.lo] Error 1 (ignored) CC os/libusb_1_0_la-poll_windows.lo In file included from ./libusbi.h:237:0, from os/poll_windows.c:49: ./os/threads_windows.h:81:20: warning: 'struct timespec' declared inside parameter list [enabled by default] const struct timespec *abstime); ^ ./os/threads_windows.h:81:20: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] In file included from os/poll_windows.c:49:0: ./libusbi.h:1058:41: warning: 'struct timespec' declared inside parameter list [enabled by default] int (*clock_gettime)(int clkid, struct timespec *tp); ^ CC os/libusb_1_0_la-windows_usb.lo In file included from ./libusbi.h:237:0, from os/windows_usb.c:38: ./os/threads_windows.h:81:20: warning: 'struct timespec' declared inside parameter list [enabled by default] const struct timespec *abstime); ^ ./os/threads_windows.h:81:20: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] In file included from os/windows_usb.c:38:0: ./libusbi.h:1058:41: warning: 'struct timespec' declared inside parameter list [enabled by default] int (*clock_gettime)(int clkid, struct timespec *tp); ^ os/windows_usb.c:48:53: warning: 'struct timespec' declared inside parameter list [enabled by default] static int windows_clock_gettime(int clk_id, struct timespec *tp); ^ os/windows_usb.c: In function 'windows_clock_gettime_threaded': os/windows_usb.c:2386:5: error: invalid use of undefined type 'struct timespec' timer_tp.tv_sec = (long)(hires_counter.QuadPart / hires_frequency); ^ os/windows_usb.c:2387:5: error: invalid use of undefined type 'struct timespec' timer_tp.tv_nsec = (long)(((hires_counter.QuadPart % hires_frequency)/1000) * hires_ticks_to_ps); ^ os/windows_usb.c:2391:5: warning: passing argument 2 of 'windows_clock_gettime' from incompatible pointer type [enabled by default] windows_clock_gettime(USBI_CLOCK_REALTIME, &timer_tp); ^ os/windows_usb.c:48:12: note: expected 'struct timespec *' but argument is of type 'struct timespec *' static int windows_clock_gettime(int clk_id, struct timespec *tp); ^ os/windows_usb.c: At top level: os/windows_usb.c:2408:12: error: conflicting types for 'windows_clock_gettime' static int windows_clock_gettime(int clk_id, struct timespec *tp) ^ os/windows_usb.c:48:12: note: previous declaration of 'windows_clock_gettime' was here static int windows_clock_gettime(int clk_id, struct timespec *tp); ^ os/windows_usb.c: In function 'windows_clock_gettime': os/windows_usb.c:2423:6: error: dereferencing pointer to incomplete type *tp = timer_tp; ^ os/windows_usb.c:2445:5: error: dereferencing pointer to incomplete type tp->tv_sec = (long)(rtime.QuadPart / 10000000); ^ os/windows_usb.c:2446:5: error: dereferencing pointer to incomplete type tp->tv_nsec = (long)((rtime.QuadPart % 10000000)*100); ^ os/windows_usb.c: At top level: os/windows_usb.c:2496:2: warning: initialization from incompatible pointer type [enabled by default] windows_clock_gettime, ^ os/windows_usb.c:2496:2: warning: (near initialization for 'windows_backend.clock_gettime') [enabled by default] os/windows_usb.c:48:12: warning: 'windows_clock_gettime' used but never defined [enabled by default] static int windows_clock_gettime(int clk_id, struct timespec *tp); ^ make[3]: [os/libusb_1_0_la-windows_usb.lo] Error 1 (ignored) mv: cannot stat `os/.deps/libusb_1_0_la-windows_usb.Tpo': No such file or directory make[3]: [os/libusb_1_0_la-windows_usb.lo] Error 1 (ignored) GEN libusb-1.0.lo CCLD libusb-1.0.la libtool: link: `libusb_1_0_la-io.lo' is not a valid libtool object make[3]: [libusb-1.0.la] Error 1 (ignored) make[3]: Leaving directory `/c/work/libusb/libusb/libusb' CC libusb_1_0_la-io.lo In file included from libusbi.h:237:0, from io.c:40: ./os/threads_windows.h:81:20: warning: 'struct timespec' declared inside parameter list [enabled by default] const struct timespec *abstime); ^ ./os/threads_windows.h:81:20: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] In file included from io.c:40:0: libusbi.h:1058:41: warning: 'struct timespec' declared inside parameter list [enabled by default] int (*clock_gettime)(int clkid, struct timespec *tp); ^ io.c: In function 'calculate_timeout': io.c:1198:18: error: storage size of 'current_time' isn't known struct timespec current_time; ^ io.c:1198:18: warning: unused variable 'current_time' [-Wunused-variable] io.c: In function 'libusb_wait_for_event': io.c:1917:18: error: storage size of 'timeout' isn't known struct timespec timeout; ^ io.c:1917:18: warning: unused variable 'timeout' [-Wunused-variable] io.c: In function 'handle_timeouts_locked': io.c:1960:18: error: storage size of 'systime_ts' isn't known struct timespec systime_ts; ^ io.c:1960:18: warning: unused variable 'systime_ts' [-Wunused-variable] io.c: In function 'libusb_get_next_timeout': io.c:2493:18: error: storage size of 'cur_ts' isn't known struct timespec cur_ts; ^ io.c:2493:18: warning: unused variable 'cur_ts' [-Wunused-variable] make[2]: [libusb_1_0_la-io.lo] Error 1 (ignored) mv: cannot stat `.deps/libusb_1_0_la-io.Tpo': No such file or directory make[2]: [libusb_1_0_la-io.lo] Error 1 (ignored) CC os/libusb_1_0_la-threads_windows.lo In file included from ./libusbi.h:237:0, from os/threads_windows.c:27: ./os/threads_windows.h:81:20: warning: 'struct timespec' declared inside parameter list [enabled by default] const struct timespec *abstime); ^ ./os/threads_windows.h:81:20: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] In file included from os/threads_windows.c:27:0: ./libusbi.h:1058:41: warning: 'struct timespec' declared inside parameter list [enabled by default] int (*clock_gettime)(int clkid, struct timespec *tp); ^ os/threads_windows.c:179:20: warning: 'struct timespec' declared inside parameter list [enabled by default] const struct timespec *abstime) { ^ os/threads_windows.c:177:5: error: conflicting types for 'usbi_cond_timedwait' int usbi_cond_timedwait(usbi_cond_t *cond, ^ In file included from ./libusbi.h:237:0, from os/threads_windows.c:27: ./os/threads_windows.h:79:5: note: previous declaration of 'usbi_cond_timedwait' was here int usbi_cond_timedwait(usbi_cond_t *cond, ^ os/threads_windows.c: In function 'usbi_cond_timedwait': os/threads_windows.c:183:18: error: storage size of 'cur_time_ns' isn't known struct timespec cur_time_ns; ^ In file included from os/threads_windows.c:27:0: ./libusbi.h:167:36: error: dereferencing pointer to incomplete type (tv)->tv_sec = (ts)->tv_sec; \ ^ os/threads_windows.c:198:2: note: in expansion of macro 'TIMESPEC_TO_TIMEVAL' TIMESPEC_TO_TIMEVAL(&targ_time, abstime); ^ ./libusbi.h:168:37: error: dereferencing pointer to incomplete type (tv)->tv_usec = (ts)->tv_nsec / 1000; \ ^ os/threads_windows.c:198:2: note: in expansion of macro 'TIMESPEC_TO_TIMEVAL' TIMESPEC_TO_TIMEVAL(&targ_time, abstime); ^ os/threads_windows.c:183:18: warning: unused variable 'cur_time_ns' [-Wunused-variable] struct timespec cur_time_ns; ^ make[2]: [os/libusb_1_0_la-threads_windows.lo] Error 1 (ignored) mv: cannot stat `os/.deps/libusb_1_0_la-threads_windows.Tpo': No such file or directory make[2]: [os/libusb_1_0_la-threads_windows.lo] Error 1 (ignored) CC os/libusb_1_0_la-windows_usb.lo In file included from ./libusbi.h:237:0, from os/windows_usb.c:38: ./os/threads_windows.h:81:20: warning: 'struct timespec' declared inside parameter list [enabled by default] const struct timespec *abstime); ^ ./os/threads_windows.h:81:20: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] In file included from os/windows_usb.c:38:0: ./libusbi.h:1058:41: warning: 'struct timespec' declared inside parameter list [enabled by default] int (*clock_gettime)(int clkid, struct timespec *tp); ^ os/windows_usb.c:48:53: warning: 'struct timespec' declared inside parameter list [enabled by default] static int windows_clock_gettime(int clk_id, struct timespec *tp); ^ os/windows_usb.c: In function 'windows_clock_gettime_threaded': os/windows_usb.c:2386:5: error: invalid use of undefined type 'struct timespec' timer_tp.tv_sec = (long)(hires_counter.QuadPart / hires_frequency); ^ os/windows_usb.c:2387:5: error: invalid use of undefined type 'struct timespec' timer_tp.tv_nsec = (long)(((hires_counter.QuadPart % hires_frequency)/1000) * hires_ticks_to_ps); ^ os/windows_usb.c:2391:5: warning: passing argument 2 of 'windows_clock_gettime' from incompatible pointer type [enabled by default] windows_clock_gettime(USBI_CLOCK_REALTIME, &timer_tp); ^ os/windows_usb.c:48:12: note: expected 'struct timespec *' but argument is of type 'struct timespec *' static int windows_clock_gettime(int clk_id, struct timespec *tp); ^ os/windows_usb.c: At top level: os/windows_usb.c:2408:12: error: conflicting types for 'windows_clock_gettime' static int windows_clock_gettime(int clk_id, struct timespec *tp) ^ os/windows_usb.c:48:12: note: previous declaration of 'windows_clock_gettime' was here static int windows_clock_gettime(int clk_id, struct timespec *tp); ^ os/windows_usb.c: In function 'windows_clock_gettime': os/windows_usb.c:2423:6: error: dereferencing pointer to incomplete type *tp = timer_tp; ^ os/windows_usb.c:2445:5: error: dereferencing pointer to incomplete type tp->tv_sec = (long)(rtime.QuadPart / 10000000); ^ os/windows_usb.c:2446:5: error: dereferencing pointer to incomplete type tp->tv_nsec = (long)((rtime.QuadPart % 10000000)*100); ^ os/windows_usb.c: At top level: os/windows_usb.c:2496:2: warning: initialization from incompatible pointer type [enabled by default] windows_clock_gettime, ^ os/windows_usb.c:2496:2: warning: (near initialization for 'windows_backend.clock_gettime') [enabled by default] os/windows_usb.c:48:12: warning: 'windows_clock_gettime' used but never defined [enabled by default] static int windows_clock_gettime(int clk_id, struct timespec *tp); ^ make[2]: [os/libusb_1_0_la-windows_usb.lo] Error 1 (ignored) mv: cannot stat `os/.deps/libusb_1_0_la-windows_usb.Tpo': No such file or directory make[2]: [os/libusb_1_0_la-windows_usb.lo] Error 1 (ignored) CCLD libusb-1.0.la libtool: link: `libusb_1_0_la-io.lo' is not a valid libtool object make[2]: [libusb-1.0.la] Error 1 (ignored) GEN libusb-1.0.dll make[2]: Leaving directory `/c/work/libusb/libusb/libusb' Making all in doc make[2]: Entering directory `/c/work/libusb/libusb/doc' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/c/work/libusb/libusb/doc' Making all in examples make[2]: Entering directory `/c/work/libusb/libusb/examples' CC listdevs.o make[2]: *** No rule to make target `../libusb/libusb-1.0.la', needed by `listdevs.exe'. Stop. make[2]: Leaving directory `/c/work/libusb/libusb/examples' make[1]: [all-recursive] Error 1 (ignored) make[1]: Leaving directory `/c/work/libusb/libusb' |