Revision: 98404 http://trac.macports.org//changeset/98404 Author: blair@macports.org Date: 2012-10-04 12:19:06 -0700 (Thu, 04 Oct 2012) Log Message: ----------- gdb: prevent compiler failure: do not compile if cctools-headers is installed. This prevents the following compile failure which is caused by bfd/mach-o.h including mach-o/loader.h, which is found in ${prefix}/include instead of gdb's source directory. The file in ${prefix}/include doesn't define the symbols that gdb needs. /usr/bin/clang -pipe -O2 -I/opt/local/include -Wno-unused-value -arch x86_64 -I. -I. -I./common -I./config -DLOCALEDIR="\"/opt/local/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -c -o solib-darwin.o -MT solib-darwin.o -MMD -MP -MF .deps/solib-darwin.Tpo solib-darwin.c In file included from solib-darwin.c:43: ../bfd/mach-o.h:510:3: error: unknown type name 'bfd_mach_o_load_command_type'; did you mean 'bfd_mach_o_uuid_command'? bfd_mach_o_load_command_type type; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ bfd_mach_o_uuid_command ../bfd/mach-o.h:438:1: note: 'bfd_mach_o_uuid_command' declared here bfd_mach_o_uuid_command; ^ ../bfd/mach-o.h:592:39: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] int bfd_mach_o_lookup_command (bfd *, bfd_mach_o_load_command_type, bfd_mach_o_load_command **); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../bfd/mach-o.h:613:43: warning: declaration of 'enum bfd_mach_o_cpu_type' will not be visible outside of this function [-Wvisibility] unsigned long bfd_mach_o_stack_addr (enum bfd_mach_o_cpu_type); ^ ../bfd/mach-o.h:619:47: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] const bfd_target *bfd_mach_o_header_p (bfd *, bfd_mach_o_filetype, ^~~~~~~~~~~~~~~~~~~ ../bfd/mach-o.h:620:40: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] bfd_mach_o_cpu_type); ^~~~~~~~~~~~~~~~~~~ solib-darwin.c:223:38: error: use of undeclared identifier 'BFD_MACH_O_LC_LOAD_DYLINKER' BFD_MACH_O_LC_LOAD_DYLINKER, &cmd) == 1) ^ solib-darwin.c:295:22: error: use of undeclared identifier 'BFD_MACH_O_MH_MAGIC' if (hdr_val != BFD_MACH_O_MH_MAGIC && hdr_val != BFD_MACH_O_MH_MAGIC_64) ^ solib-darwin.c:295:56: error: use of undeclared identifier 'BFD_MACH_O_MH_MAGIC_64' if (hdr_val != BFD_MACH_O_MH_MAGIC && hdr_val != BFD_MACH_O_MH_MAGIC_64) ^ solib-darwin.c:300:22: error: use of undeclared identifier 'BFD_MACH_O_MH_EXECUTE' if (hdr_val == BFD_MACH_O_MH_EXECUTE) ^ 4 warnings and 5 errors generated. make[2]: *** [solib-darwin.o] Error 1 make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gdb/gdb/work/gdb-7.5/gdb' make[1]: *** [all-gdb] Error 2 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gdb/gdb/work/gdb-7.5' make: *** [all] Error 2 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gdb/gdb/work/gdb-7.5' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gdb/gdb/work/gdb-7.5" && /usr/bin/make -w all Exit code: 2 Modified Paths: -------------- trunk/dports/devel/gdb/Portfile Modified: trunk/dports/devel/gdb/Portfile =================================================================== --- trunk/dports/devel/gdb/Portfile 2012-10-04 19:16:10 UTC (rev 98403) +++ trunk/dports/devel/gdb/Portfile 2012-10-04 19:19:06 UTC (rev 98404) @@ -46,6 +46,13 @@ } } +pre-configure { + if {[file exists ${prefix}//include/mach-o/loader.h]} { + ui_error "cctools-headers must be deactivated before upgrade." + error "Please run `sudo port deactivate cctools-headers` and try again." + } +} + configure.args-append \ --infodir=${prefix}/share/info \ --mandir=${prefix}/share/man \
participants (1)
-
blair@macports.org