Opened 13 years ago

Closed 10 years ago

#30127 closed defect (worksforme)

arm-elf-gcc @4.6.0 presence of hdf4 port prevents arm-elf-gcc from building

Reported by: michael@… Owned by: stuartwesterman (Stuart Westerman)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: arm-elf-gcc

Description (last modified by ryandesign (Ryan Carsten Schmidt))

If HDF4 is installed (and activated), then arm-elf-gcc (and possibly other gcc versions) fail to build:

:info:build /usr/bin/gcc-4.2 -I/opt/local/include -c   -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-ma .....
:info:build             /opt/local/var/macports/build/_opt_local_var_macports_sources_mirror.aarnet.edu.au_macports-portfiles_cross_arm-elf-gcc/work/gcc-4.6.0/gcc/config/arm/arm.c -o arm.o
:info:build In file included from /opt/local/include/hdf.h:20,
:info:build                  from /opt/local/include/df.h:35,
:info:build                  from /opt/local/var/macports/build/_opt_local_var_macports_sources_mirror.aarnet.edu.au_macports-portfiles_cross_arm-elf-gcc/work/gcc-4.6.0/gcc/config/arm/arm.c:55:
:info:build /opt/local/include/hdfi.h:1613:29: error: attempt to use poisoned "malloc"
:info:build /opt/local/include/hdfi.h:1614:29: error: attempt to use poisoned "calloc"
:info:build /opt/local/include/hdfi.h:1616:29: error: attempt to use poisoned "realloc"
:info:build /opt/local/include/hdfi.h:1636:37: error: attempt to use poisoned "strdup"


De-activating the HDF4 port before installing gcc fixes this problem.

This seems to be the result of:

  • unfortunate naming of a global header by hdf (fixed in HDF5)
  • poor ordering of header paths (gcc internal paths should have priority -- the header is included from arm.c with double quotes not angle brackets, ie #include "df.h" not #include <df.h>)

Can this be fixed with, at the very least, a warning to the unwary? The df.h header is not installed by gcc so it should be safe to reactivate HDF4.

Change History (4)

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

Description: modified (diff)

comment:2 Changed 10 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to stuartwesterman@…

comment:3 Changed 10 years ago by stuartwesterman (Stuart Westerman)

I just tested this problem. It's not an issue anymore. Please close.

comment:4 Changed 10 years ago by mf2k (Frank Schima)

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.