On Saturday 10 October 2009, David Brownell wrote:
> I was doing some test builds on Cygwin and seem to have reached
> an impasse. At least part of it looks to be related to libtool.
> See below. Will someone report good fixes?
Partial answer found. These problems seem to have been caused
by some other version of make getting picked up, from a MinGW
based toolchain. It didn't quite work right. :(
Remaining issue: libtool fails since it keeps trying to do
something with a "libpopt" from /usr/lib, which it doesn't find.
>
> - Dave
>
>
> (1) "options.c" build failure. The GCC commands going into libtool
> look fine, but libtool mangles the PKGDATA declaration ... which
> breaks the build. -Dx=\"value\" becomes "-Dx=\\value\\ ", and
> that's obviously utter garbage.
>
> C:/cygwin/bin/sh.exe ../../libtool --tag=CC --mode=compile gcc -std=gnu99
> -DHAVE_CONFIG_H -I. -I../.. -I../../src/server -I../../src/target
> -DPKGDATADIR=\"/usr/local/share/openocd\" -g -O2 -Wall -Wstrict-prototypes
> -Wformat-security -Wextra -Wno-unused-parameter -Wbad-function-cast
> -Wcast-align -Wredundant-decls -Werror -MT libhelper_la-options.lo -MD -MP
> -MF .deps/libhelper_la-options.Tpo -c -o libhelper_la-options.lo `test -f
> 'options.c' || echo './'`options.c
>
> libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..
> -I../../src/server -I../../src/target
> "-DPKGDATADIR=\\/usr/local/share/openocd\\ " -g -O2 -Wall -Wstrict-prototypes
> -Wformat-security -Wextra -Wno-unused-parameter -Wbad-function-cast
> -Wcast-align -Wredundant-decls -Werror -MT libhelper_la-options.lo -MD -MP
> -MF .deps/libhelper_la-options.Tpo -c options.c -o libhelper_la-options.o
>
> options.c: In function `add_default_dirs':
> options.c:106: error: stray '\' in program
> options.c:106: error: parse error before '/' token
> options.c:106: error: stray '\' in program
> options.c:107: error: stray '\' in program
> options.c:107: error: parse error before '/' token
> options.c:107: error: stray '\' in program
> make[3]: *** [libhelper_la-options.lo] Error 1
>
>
> (2) "openocd.c" also fails; this time -DRELSTR=... is removed,
> PKGBLDDATE gets different mangling, and neither backquoted
> command gets executed.
>
> I suspect a partial fix for that one might be just to expand its
> value in some other way ... both shell invocations ("date" and
> "guess-rev.sh") fail. Given the error above, that won't suffice...
>
> C:/cygwin/bin/sh.exe ../libtool --tag=CC --mode=compile gcc -std=gnu99
> -DHAVE_CONFIG_H -I. -I.. -DPKGBLDDATE=\"`date +%F-%R`\"
> -DRELSTR=\"`../guess-rev.sh ..`\" -I../src -I../src/helper -I../src/jtag
> -I../src/target -I../src/xsvf -I../src/svf -I../src/server -I../src/flash
> -I../src/pld -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wextra
> -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls
> -Werror -MT libopenocd_la-openocd.lo -MD -MP -MF
> .deps/libopenocd_la-openocd.Tpo -c -o libopenocd_la-openocd.lo `test -f
> 'openocd.c' || echo './'`openocd.c
>
> /usr/bin/sh: \: command not found
>
> libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..
> -DPKGBLDDATE=\\\`date "+%F-%R\\ -I../src" -I../src/helper -I../src/jtag
> -I../src/target -I../src/xsvf -I../src/svf -I../src/server -I../src/flash
> -I../src/pld -g -O2 -Wall -Wstrict-prototypes -Wformat-security -Wextra
> -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls
> -Werror -MT libopenocd_la-openocd.lo -MD -MP -MF
> .deps/libopenocd_la-openocd.Tpo -c openocd.c -o libopenocd_la-openocd.o
>
> gcc: +%F-%R\ -I../src: No such file or directory
>
> openocd.c: In function `handle_version_command':
> openocd.c:75: error: parse error before "RELSTR"
> openocd.c:75: error: stray '\' in program
> openocd.c:75: error: stray '`' in program
> openocd.c: In function `setup_command_handler':
> openocd.c:211: error: parse error before "RELSTR"
> openocd.c:211: error: stray '\' in program
> openocd.c:211: error: stray '`' in program
> make[3]: *** [libopenocd_la-openocd.lo] Error 1
>
>
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development