Hi!
I can't build new OpenOCD (from the repo), 0.7.0 does not have these
problems.
The first issue is that configure does not detect libusb_error_name(),
but this is present in the lib, so the actual build fails:
> checking libusb-1.0/libusb.h usability... yes
> checking libusb-1.0/libusb.h presence... yes
> checking for libusb-1.0/libusb.h... yes
> checking for library containing libusb_error_name... no
> configure: WARNING: libusb-1.x older than 1.0.9 detected, consider updating
...
> libtool: compile: i686-w64-mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -I.
> -I../../../../src/jtag/drivers -I../../.. -I../../../../src -I../../../src
> -I../../../../src/helper -DPKGDATADIR=\"/usr/local/share/openocd\"
> -DPKGLIBDIR=\"/usr/local/lib/openocd\" -I../../../../jimtcl -I../../../jimtcl
> -g -O2 -D__USE_MINGW_ANSI_STDIO -Wall -Wstrict-prototypes -Wformat-security
> -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align
> -Wredundant-decls -Werror -MT libusb1_common.lo -MD -MP -MF
> .deps/libusb1_common.Tpo -c ../../../../src/jtag/drivers/libusb1_common.c -o
> libusb1_common.o
> In file included from ../../../../src/jtag/drivers/libusb1_common.h:25:0,
> from ../../../../src/jtag/drivers/libusb1_common.c:26:
> /home/freddie/mingw-w64/i686/i686-w64-mingw32/include/libusb-1.0/libusb.h:1033:26:
> error: conflicting types for 'libusb_error_name'
> const char * LIBUSB_CALL libusb_error_name(int errcode);
> ^
> In file included from ../../../config.h:335:0,
> from ../../../../src/jtag/drivers/libusb1_common.c:23:
> ../../../../src/helper/replacements.h:283:13: note: previous declaration of
> 'libusb_error_name' was here
> const char *libusb_error_name(int error_code);
> ^
> make[7]: *** [libusb1_common.lo] Błąd 1
> make[7]: Opuszczenie katalogu
> `/home/freddie/openocd/build-win32/src/jtag/drivers'
> make[6]: *** [all-recursive] Błąd 1
> make[6]: Opuszczenie katalogu
> `/home/freddie/openocd/build-win32/src/jtag/drivers'
> make[5]: *** [all-recursive] Błąd 1
> make[5]: Opuszczenie katalogu `/home/freddie/openocd/build-win32/src/jtag'
> make[4]: *** [all] Błąd 2
> make[4]: Opuszczenie katalogu `/home/freddie/openocd/build-win32/src/jtag'
> make[3]: *** [all-recursive] Błąd 1
> make[3]: Opuszczenie katalogu `/home/freddie/openocd/build-win32/src'
> make[2]: *** [all] Błąd 2
> make[2]: Opuszczenie katalogu `/home/freddie/openocd/build-win32/src'
> make[1]: *** [all-recursive] Błąd 1
> make[1]: Opuszczenie katalogu `/home/freddie/openocd/build-win32'
> make: *** [all] Błąd 2
New libusb (libusbx 1.0.15, I've tried 1.0.16 too) is present, 0.7.0
builds just fine.
I guess the root cause is the search for libusb_error_name() function,
which in the header is defined as:
const char * LIBUSB_CALL libusb_error_name(int errcode);
The configure program that tests this looks like this:
...
> | char libusb_error_name ();
> | int
> | main ()
> | {
> | return libusb_error_name ();
> | ;
> | return 0;
> | }
> configure:14892: i686-w64-mingw32-gcc -std=gnu99 -o conftest.exe -g -O2
> -D__USE_MINGW_ANSI_STDIO conftest.c -lusb-1.0 -lftdi -lusb >&5
If I compile sth like this it also fails, but if I include
libusb-1.0/libusb.h and add some parameter to the call:
> #include <libusb-1.0/libusb.h>
>
> int
> main ()
> {
> return (int)libusb_error_name (1);
> ;
> return 0;
> }
It works perfectly. That's why I think the test is somehow wrong. I
guess the problematic thing here is the LIBUSB_CALL macro, which on
windows is replaced with WINAPI, which causes name mangling - in the
libusb-1.0.a the function is:
> 00001b50 T _libusb_error_name@4
The check has to be somehow improved for windows. I guess the simplies
solution (I don't know if it's simple in configure...) is to actually
include the libusb-1.0 header and call the function with a parameter.
The second problem is that now automake prints some strange messages at
the beginning of the ./bootstrap...
> + aclocal
> + libtoolize --automake --copy
> + autoconf
> + autoheader
> + automake --gnu --add-missing --copy
> src/jtag/Makefile.am:20: warning: source file 'zy1000/zy1000.c' is in a
> subdirectory,
> src/jtag/Makefile.am:20: but option 'subdir-objects' is disabled
> automake: warning: possible forward-incompatibility.
> automake: At least a source file is in a subdirectory, but the
> 'subdir-objects'
> automake: automake option hasn't been enabled. For now, the corresponding
> output
> automake: object file(s) will be placed in the top-level directory. However,
> automake: this behaviour will change in future Automake versions: they will
> automake: unconditionally cause object files to be placed in the same
> subdirectory
> automake: of the corresponding sources.
> automake: You are advised to start using 'subdir-objects' option throughout
> your
> automake: project, to avoid future incompatibilities.
> src/jtag/Makefile.am:24: warning: source file 'minidummy/minidummy.c' is in a
> subdirectory,
> src/jtag/Makefile.am:24: but option 'subdir-objects' is disabled
> src/jtag/drivers/Makefile.am:82: warning: source file
> 'versaloon/usbtoxxx/usbtogpio.c' is in a subdirectory,
> src/jtag/drivers/Makefile.am:82: but option 'subdir-objects' is disabled
> src/jtag/drivers/Makefile.am:82: warning: source file
> 'versaloon/usbtoxxx/usbtojtagraw.c' is in a subdirectory,
> src/jtag/drivers/Makefile.am:82: but option 'subdir-objects' is disabled
> src/jtag/drivers/Makefile.am:82: warning: source file
> 'versaloon/usbtoxxx/usbtoswd.c' is in a subdirectory,
> src/jtag/drivers/Makefile.am:82: but option 'subdir-objects' is disabled
> src/jtag/drivers/Makefile.am:82: warning: source file
> 'versaloon/usbtoxxx/usbtopwr.c' is in a subdirectory,
> src/jtag/drivers/Makefile.am:82: but option 'subdir-objects' is disabled
> src/jtag/drivers/Makefile.am:82: warning: source file
> 'versaloon/usbtoxxx/usbtoxxx.c' is in a subdirectory,
> src/jtag/drivers/Makefile.am:82: but option 'subdir-objects' is disabled
> src/jtag/drivers/Makefile.am:82: warning: source file 'versaloon/versaloon.c'
> is in a subdirectory,
> src/jtag/drivers/Makefile.am:82: but option 'subdir-objects' is disabled
> Setting up submodules
> Bootstrap complete. Quick build instructions:
> ./configure ....
Any ideas?
Regards,
FCh
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel