Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#62431 closed defect (fixed)

libgcrypt @1.9.2 does not build on PPC Tiger, Mac OS X 10.4.11, because of: rndlinux.c:36:26: error: Availability.h: No such file or directory

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: tiger Cc:
Port: libgcrypt

Description

/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I..  -I../src -I../src -isystem/opt/local/include/LegacySupport -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT rndlinux.lo -MD -MP -MF .deps/rndlinux.Tpo -c -o rndlinux.lo rndlinux.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -isystem/opt/local/include/LegacySupport -I/opt/local/include -I/opt/local/include -pipe -Os -std=gnu89 -arch ppc -fno-delete-null-pointer-checks -Wall -MT rndlinux.lo -MD -MP -MF .deps/rndlinux.Tpo -c rndlinux.c  -fno-common -DPIC -o .libs/rndlinux.o
rndlinux.c:36:26: error: Availability.h: No such file or directory
make[2]: *** [rndlinux.lo] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libgcrypt/libgcrypt/work/libgcrypt-1.9.2/random'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libgcrypt/libgcrypt/work/libgcrypt-1.9.2'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libgcrypt/libgcrypt/work/libgcrypt-1.9.2'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_libgcrypt/libgcrypt/work/libgcrypt-1.9.2" && /usr/bin/make -w all 
Exit code: 2

On Leopard Availability.h exists…

/Developer/SDKs/MacOSX10.5.sdk/usr/include/Availability.h
/usr/include/Availability.h

Attachments (1)

main.log (129.6 KB) - added by ballapete (Peter "Pete" Dyballa) 3 years ago.
Main.log from PPC Tiger

Download all attachments as: .zip

Change History (11)

Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Tiger

comment:1 Changed 3 years ago by mf2k (Frank Schima)

Cc: mps@… removed
Owner: set to Schamschula
Status: newassigned

comment:2 Changed 3 years ago by Schamschula (Marius Schamschula)

I'm sorry, but I can't be of much help on a PPC system. Have no way of testing this issue.

comment:3 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

The bug has been reported here.

comment:4 Changed 3 years ago by kencu (Ken)

Tiger does not have any header called Availability.h. It has only AvailabilityMacros.h.

Personally I don't think it is going to be very reasonable to expect upstream to work around this. This is for MacPorts to sort out.

The absolute simplest thing to do is to make a symlink:

sudo ln -s /usr/include/AvailabilityMacros.h /usr/include/Availability.h

build your port, and then remove it if you like.

I might add an include to LegacySupport for Availability.h for Tiger to pull in the AvailabilityMacros.h header; that would be really simple as well.

However, it is beneficial to take the Availability.h from Leopard, modify it in minor ways so it is appropriate for Tiger, and use that instead of a symlink. We already require people using Leopard to make some minor changes to their SDK, after all. It is not a completely terrible idea to expect Tiger users to make a couple of minor modifications as well.

I have such a header, and I use it sometimes (like building clang-7.0 on Tiger Intel, for example).

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:5 in reply to:  4 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Replying to kencu:

The absolute simplest thing to do is to make a symlink:

sudo ln -s /usr/include/AvailabilityMacros.h /usr/include/Availability.h

This worked, libgcrypt built.

I might add an include to LegacySupport for Availability.h for Tiger to pull in the AvailabilityMacros.h header; that would be really simple as well.

A sym-link would suffice…

comment:6 Changed 3 years ago by evanmiller (Evan Miller)

Hi, I encountered the same issue. This commit should fix libgcrypt on Tiger: https://github.com/evanmiller/macports-ports/commit/8ae3bb279af3105be3e9cffb7bb1a497bda729ed

Will open a pull request if it looks OK.

comment:7 Changed 3 years ago by Schamschula (Marius Schamschula)

That should work.

comment:8 Changed 3 years ago by kencu (Ken)

Most ports are just checking for <Availabilty.h>

My general solution for all of them at once is to merge this branch into legacysupport if it works out:

<https://github.com/macports/macports-legacy-support/tree/addavailabiltytiger/tiger_only/include>

These are a slightly modified set of the Availability* headers from Leopard, with changes for Tiger. It would be moved into the general legacy support includes in a post-destroot block. I've been using them for several years, and there seem to be no issues, but sometimes these things can bite and I was just trying to make a final decision about whether to have them used all the time, or have them as an opt-in option.

I am leaning towards all the time.

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:9 Changed 3 years ago by evanmiller (Evan Miller)

Resolution: fixed
Status: assignedclosed

In b699dbde26efe274fc192b17b57d91baa8e0f320/macports-ports (master):

libgcrypt: Support for Tiger

Closes #62431

comment:10 Changed 3 years ago by evanmiller (Evan Miller)

In cf2d12d981214a4b310e5b2bd81edad146ceb62d/macports-ports (master):

libgcrypt: Remove unnecessary Tiger patch

Availability.h is now included in legacysupport.

See: #62431

Note: See TracTickets for help on using tickets.