Ticket #34232 (closed defect: fixed)
swarm installs headers which conflict with system headers
| Reported by: | jmstephensjr@… | Owned by: | cristiano.fontana@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.0.4 |
| Keywords: | Cc: | mfeiri@…, jeremyhu@… | |
| Port: | cctools swarm |
Description (last modified by ryandesign@…) (diff)
I have tried to install this port several times in the last few days. All attempts failed. This port now required for gcc 4 series.
System as follows:
- Mac 10.6.8
- MacPorts 2.0.4
Thanks in advance.
JMS
Attachments
Change History
Changed 13 months ago by jmstephensjr@…
- Attachment cctools.txt added
comment:1 Changed 13 months ago by ryandesign@…
- Cc mfeiri@… added
- Owner changed from macports-tickets@… to jeremyhu@…
- Summary changed from cctools 822 Rev 2 fails to build to cctools 822 Rev 2 fails to build: error: redefinition of ‘struct objc_super’
- Description modified (diff)
- Port set to cctools
comment:2 Changed 13 months ago by jeremyhu@…
- Status changed from new to assigned
/usr/bin/gcc-4.2 -Os -g -Wall -I./../include -I. -D_MACH_I386_THREAD_STATUS_FPSTATE_LEGACY_FIELD_NAMES_ -D_ARCHITECTURE_I386_FPU_FPSTATE_LEGACY_FIELD_NAMES_ -DEFI_SUPPORT -I/opt/local/include -arch x86_64 -I/opt/local/libexec/llvm-3.0/include -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3 -g -fno-common -c -o ./print_objc.o print_objc.c
In file included from /usr/include/objc/objc-runtime.h:2,
from print_objc.c:34:
/usr/include/objc/message.h:33: error: redefinition of ‘struct objc_super’
/usr/include/objc/message.h:53: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘id’
/usr/include/objc/message.h:54: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘id’
/usr/include/objc/message.h:75: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/usr/include/objc/message.h:76: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/usr/include/objc/message.h:99: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘long’
/usr/include/objc/message.h:114: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘id’
/usr/include/objc/message.h:116: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/usr/include/objc/message.h:135: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘id’
/usr/include/objc/message.h:137: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
/usr/include/objc/message.h:156: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘id’
/usr/include/objc/message.h:157: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
print_objc.c: In function ‘print_objc_segment’:
print_objc.c:638: warning: implicit declaration of function ‘CLS_GETINFO’
print_objc.c:638: error: ‘CLS_META’ undeclared (first use in this function)
print_objc.c:638: error: (Each undeclared identifier is reported only once
print_objc.c:638: error: for each function it appears in.)
print_objc.c:677: error: ‘CLS_CLASS’ undeclared (first use in this function)
make[1]: *** [print_objc.o] Error 1
Please attach the preprocessed source by running:
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cctools/cctools/work/cctools-822/otool /usr/bin/gcc-4.2 -Os -g -Wall -I./../include -I. -D_MACH_I386_THREAD_STATUS_FPSTATE_LEGACY_FIELD_NAMES_ -D_ARCHITECTURE_I386_FPU_FPSTATE_LEGACY_FIELD_NAMES_ -DEFI_SUPPORT -I/opt/local/include -arch x86_64 -I/opt/local/libexec/llvm-3.0/include -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3 -g -fno-common -E -o ~/Desktop/print_objc.pp.c print_objc.c
You should attach the file print_objc.pp.c from your Desktop.
comment:3 Changed 13 months ago by jeremyhu@…
Also, if you could try compiling it with clang, it will give better information about the problem, so please give that a try as well.
comment:4 Changed 13 months ago by jmstephensjr@…
As requested, I have attached the file (print_objc.pp.c) generated by gcc-4.2
comment:5 Changed 13 months ago by jmstephensjr@…
As requested, I have attached the file (print_objc.pp.c) generated by clang (ver 1.5)
comment:7 Changed 13 months ago by jeremyhu@…
Can you attach the error message as generated by clang (not the preprocessed source)?
comment:8 Changed 13 months ago by jeremyhu@…
Ok, so /opt/local/include/objc/objc-api.h and /usr/include/objc/message.h are in conflict.
What port provides /opt/local/include/objc/objc-api.h? Can you please attach both /opt/local/include/objc/objc-api.h and /usr/include/objc/message.h
comment:9 Changed 13 months ago by jmstephensjr@…
RE ownership of objc-api.h:
~ $ port -v provides /opt/local/include/objc/objc-api.h /opt/local/include/objc/objc-api.h is provided by: swarm
~ $ port -v info swarm swarm @2.3.0, Revision 1 (science) Variants: universal Description: Swarm is a platform for agent-based models (ABMs). Homepage: http://www.swarm.org/ Library Dependencies: port:blt, port:tcl, port:tk, port:xpm, port:libffi, port:zlib, port:libpng, port:hdf5-18 Platforms: darwin License: GPL Maintainers: cristiano.fontana@pd.infn.it
comment:10 Changed 13 months ago by jmstephensjr@…
Files objc-api.h and message.h now attached.
Changed 13 months ago by jmstephensjr@…
- Attachment cctools_no_swarm.txt added
removed swarm and tried to compile/install (success)
comment:11 Changed 13 months ago by jmstephensjr@…
FYI. I removed swarm, did a clean --all on swarm and cctools, and reran compile and install on cctools. SUCCESS. I have attached the output from the compile and install of cctools. Notice there are many "implausible timestamps" and many warnings, but it did compile and install.
comment:12 Changed 13 months ago by jeremyhu@…
- Status changed from assigned to new
- Cc jeremyhu@… added
- Port changed from cctools to cctools swarm
- Owner changed from jeremyhu@… to cristiano.fontana@…
- Summary changed from cctools 822 Rev 2 fails to build: error: redefinition of ‘struct objc_super’ to swarm installs headers which conflict with system headers
comment:13 Changed 13 months ago by jeremyhu@…
Thanks, I'm installing swarm now to see if I can figure out more of what is going on, but it looks like a swarm bug.
comment:14 Changed 13 months ago by jeremyhu@…
Yeah, this is definitely a swarm bug. It's installing headers from gcc's objc runtime. This is clearly wrong, and I highly doubt that anything built against it will even work with the OSX ObjC runtime.
comment:15 Changed 13 months ago by jeremyhu@…
swarm doesn't even build for me on SL (XCode 4.2), Lion (XCode 4.3), or ML.
comment:16 Changed 13 months ago by jeremyhu@…
- Status changed from new to closed
- Resolution set to fixed
comment:17 Changed 13 months ago by jeremyhu@…
Note that it still doesn't build for me except on Leopard, but at least now you won't shoot yourself in the foot with bad ObjC runtime headers from a rogue port.
comment:18 Changed 13 months ago by jmstephensjr@…
Many thanks.
-- JMS


debug output