Opened 13 years ago

Closed 12 years ago

#28444 closed defect (fixed)

gdb fails to build universal

Reported by: jonnyflash-owlgod Owned by: dweber@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: universal Cc: shapovalow@…, alex.mailhuhn@…
Port: gdb

Description

gdb fails to build during after running a

port upgrade outdated

command.

I've attached the log, which seems to refer to a cryptic file that lipo is having trouble with.

I'm running OS X 10.6.6, all updates installed, on a MacBook Pro.

I've attached the full log, but these are the(to me) bits that seem relevant:

cc1: warnings being treated as errors
libbfd.c: In function 'bfd_getb_signed_64':
libbfd.c:708: warning: left shift count >= width of type
libbfd.c:708: warning: left shift count >= width of type
libbfd.c: In function 'bfd_getl_signed_64':
libbfd.c:731: warning: left shift count >= width of type
libbfd.c:731: warning: left shift count >= width of type
libbfd.c: In function 'bfd_putb64':
libbfd.c:763: warning: right shift count >= width of type
libbfd.c:764: warning: right shift count >= width of type
libbfd.c:765: warning: right shift count >= width of type
libbfd.c:766: warning: right shift count >= width of type
libbfd.c: In function 'bfd_putl64':
libbfd.c:781: warning: right shift count >= width of type
libbfd.c:782: warning: right shift count >= width of type
libbfd.c:783: warning: right shift count >= width of type
libbfd.c:784: warning: right shift count >= width of type
lipo: can't figure out the architecture type of: /var/tmp//cc5gOycg.out
make[4]: *** [libbfd.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-bfd] Error 2
make: *** [all] Error 2
shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gdb/work/gdb-7.2" && /usr/bin/make -j2 all " returned error 2

Attachments (1)

gdb_log.log (14.4 KB) - added by jonnyflash-owlgod 13 years ago.
log file from attempt to build gdb +universal

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by jonnyflash-owlgod

Attachment: gdb_log.log added

log file from attempt to build gdb +universal

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: osx removed
Owner: changed from macports-tickets@… to dweber@…

comment:2 Changed 13 years ago by mdzaun@…

I'm seeing the same problem.

By a quick look at the offending code in libbfd.c, the compiler warning looks unsubstantiated. Hence, wondering if building w/o -Werror would do. Not sure how to do that from macports.

comment:3 Changed 13 years ago by shapovalow@…

Cc: shapovalow@… added

Cc Me!

comment:4 Changed 13 years ago by alex.mailhuhn@…

By a quick look at the offending code in libbfd.c, the compiler warning looks unsubstantiated. Hence, wondering if building w/o > -Werror would do. Not sure how to do that from macports.

This indeed helps directly pointing to the core of the problem: After disabling the -Werror compiler flag (adding --disable-werror to the function call configure.args-append inside the Portfile) the "port build gdb" command still yields an error message in the file "/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gdb/gdb/main.log":

:info:build /usr/bin/gcc-4.2 -O2 -I/opt/local/include -arch x86_64 -arch i386   -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 -Ignulib  -DMI_OUT=1 -DTUI=1  -I/opt/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include  -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts  -c -o gdb.o -MT gdb.o -MMD -MP -MF .deps/gdb.Tpo gdb.c
:info:build gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
:info:build make[2]: *** [gdb.o] Error 1

This seems to be an incompatibility with the multi architechture build in the +universal variant, which is the only one available for gdb. Is there any way to switch off the compiler flag "-arch i386"? or the other one? and include a combination of single architecture builds with "lipo"? I have no idea what the flags -M... are used for and who created the Makefiles that contain them. Can these be circumvented?

comment:5 Changed 13 years ago by alex.mailhuhn@…

Cc: alex.mailhuhn@… added

Cc Me!

comment:6 Changed 12 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Switched to use muniversal in r89680. It expects BFD_HOST_64_BIT to be a single value that can be evaluated at configure time, and it looks like there might be some others like that as well.

Note: See TracTickets for help on using tickets.