New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #29881 (closed defect: fixed)

Opened 2 years ago

Last modified 23 months ago

hdfeos: C preprocessor "/lib/cpp" fails sanity check with hdf4 +universal

Reported by: david.w.watson@… Owned by: takeshi@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: universal Cc: ryandesign@…
Port: hdfeos

Description

hdfeos fails to upgrade

Attachments

main.log (4.8 KB) - added by david.w.watson@… 2 years ago.
hdfeos_config.log (18.1 KB) - added by david.w.watson@… 23 months ago.
hdfeos-patch.diff (1.0 KB) - added by ryandesign@… 23 months ago.
possibly useful patch

Change History

Changed 2 years ago by david.w.watson@…

comment:1 Changed 2 years ago by jmr@…

  • Owner changed from macports-tickets@… to takeshi@…
  • Cc takeshi@… removed
  • Summary changed from hdfeos fails to upgrade to hdfeos fails to upgrade: "error: C preprocessor "/lib/cpp" fails sanity check"

comment:2 Changed 23 months ago by david.w.watson@…

Still trying to upgrade hdfeos, changing compilers to gcc-mp-4.4 as installed by macports, get this error:

:info:configure checking for C compiler default output file name... 
:info:configure configure: error: C compiler cannot create executables

After looking around I can't find the hdf4 libraries in destroot, but port command shows they are installed and active. Where are they and can this be the cause of my problem?

comment:3 follow-up: ↓ 4 Changed 23 months ago by takeshi@…

I don't have /lib/cpp. I have /usr/bin/cpp. Can you attach config.log?

Changed 23 months ago by david.w.watson@…

comment:4 in reply to: ↑ 3 Changed 23 months ago by david.w.watson@…

Replying to takeshi@…:

I don't have /lib/cpp. I have /usr/bin/cpp. Can you attach config.log?

Sorry, the first hdfeos_config.log I attached was the wrong one. Replaced it with the correct one.

comment:5 follow-up: ↓ 6 Changed 23 months ago by takeshi@…

It appears that

h4cc -E

causes an error by complaining that

gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags

I would like to take a look at

$ port installed hdf4

and CFLAGS in ${prefix}/bin/h4cc.

comment:6 in reply to: ↑ 5 Changed 23 months ago by david.w.watson@…

Replying to takeshi@…:

It appears that

h4cc -E

causes an error by complaining that

gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags

I would like to take a look at

$ port installed hdf4

and CFLAGS in ${prefix}/bin/h4cc.

port installed hdf4 gives "hdf4 @4.2.6_0+universal (active)" CFLAGS from h4cc is CFLAGS=" -pipe -O2 -arch x86_64 -arch i386 -O"

comment:7 Changed 23 months ago by takeshi@…

  • Status changed from new to closed
  • Resolution set to fixed

h4cc -E of universal variant does not work since multiple -arch is given. It would be better to fix hdf4 to make h4cc -E work correctly but it is beyond the work of the maintainer. I replaced /lib/cpp with /usr/bin/cpp in configure as a quick fix. Committed in r80888.

comment:8 Changed 23 months ago by ryandesign@…

  • Cc ryandesign@… added
  • Status changed from closed to reopened
  • Resolution fixed deleted
  • Keywords universal added
  • Summary changed from hdfeos fails to upgrade: "error: C preprocessor "/lib/cpp" fails sanity check" to hdfeos: C preprocessor "/lib/cpp" fails sanity check with hdf4 +universal

r80888 fixed the problem when building hdfeos with the universal variant, but the problem doesn't really have anything to do with hdfeos's universal variant; it has to do with hdf4's universal variant. So the problem still occurs when hdf4 is built with the universal variant but hdfeos is built without the universal variant. Why restrict this patch to the universal variant -- why not do it all the time? While we're at it, why not use ${configure.cpp} instead of hardcoding /usr/bin/cpp? See attached patch.

However, we now see that if hdf4 is built +universal and we install hdfeos -universal, hdfeos builds, but ends up being universal anyway! This is a bug in hdf4 for which I've filed #30260.

Changed 23 months ago by ryandesign@…

possibly useful patch

comment:9 Changed 23 months ago by takeshi@…

  • Status changed from reopened to closed
  • Resolution set to fixed

Committed in r80921.

Note: See TracTickets for help on using tickets.