---

** [tickets:#151] OpenOCD fails to build on macOS due to redefined macro**

**Status:** new
**Milestone:** 0.9.0
**Created:** Sun Apr 23, 2017 10:07 PM UTC by Girts F
**Last Updated:** Sun Apr 23, 2017 10:07 PM UTC
**Owner:** nobody


~~~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./src -I./src -I./src/helper 
-DPKGDATADIR=\"/usr/local/share/openocd\" -DBINDIR=\"/usr/local/bin\" 
-I./jimtcl -I./jimtcl -Wall -Wstrict-prototypes -Wformat-security -Wshadow 
-Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align 
-Wredundant-decls -Werror -g -O2 -MT 
src/target/openrisc/or1k_tap_xilinx_bscan.lo -MD -MP -MF 
src/target/openrisc/.deps/or1k_tap_xilinx_bscan.Tpo -c 
src/target/openrisc/or1k_tap_xilinx_bscan.c -o 
src/target/openrisc/or1k_tap_xilinx_bscan.o
src/target/aarch64.c:33:9: error: '__unused' macro redefined 
[-Werror,-Wmacro-redefined]
#define __unused __attribute((unused))
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/sys/cdefs.h:161:9:
 note: previous
      definition is here
#define __unused        __attribute__((unused))
        ^
1 error generated.
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I./src 
-I./src -I./src/helper -DPKGDATADIR=\"/usr/local/share/openocd\" 
-DBINDIR=\"/usr/local/bin\" -I./jimtcl -I./jimtcl  -Wall -Wstrict-prototypes 
-Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast 
-Wcast-align -Wredundant-decls -Werror  -g -O2 -MT 
src/server/src_server_libserver_la-telnet_server.lo -MD -MP -MF 
src/server/.deps/src_server_libserver_la-telnet_server.Tpo -c -o 
src/server/src_server_libserver_la-telnet_server.lo `test -f 
'src/server/telnet_server.c' || echo './'`src/server/telnet_server.c
make[2]: *** [src/target/aarch64.lo] Error 1
~~~
This is on macOS 10.12.4 at commit 8addd9503eeb7704907d2340378d1200e3bbb99c.

CC version:
~~~
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
~~~


---

Sent from sourceforge.net because openocd-devel@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/openocd/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/openocd/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to