Opened 3 years ago

Last modified 3 years ago

#64102 accepted defect

gettext @0.21 : build fails on tiger due to new libproc.h requirement

Reported by: alex-free (Alex Free) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: tiger Cc: kencu (Ken), mascguy (Christopher Nielsen), ballapete (Peter "Pete" Dyballa), evanmiller (Evan Miller), cooljeanius (Eric Gallager), mrkapqa, itaboss (Dan Boss)
Port: gettext libtextstyle

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

Gettext was recently updated to version 0.21. This new version requires libproc.h which was first available on Mac OS X 10.5 Leopard. I have verified that the previous version of gettext 0.20 does not require libproc.h and builds correctly by changing my ports tree to commit [baf0c8bd508912bfedaf58c40dba1a402ffdf2ed/macports-ports].

This is a serious issue, as on Tiger apple-gcc42 has to be compiled before any other packages can be, and apple-gcc42 ends up requiring gettext as a dependency. This completely breaks Tiger support currently in the latest ports tree.

I am highly interested in fixing this, and have started this ticket to begin a discussion on what is best to do. I have seen other ports that have ran into this problem such as termux which patches the file which contains the libproc.h requirement with the previous version which did not require libproc.h. In the case of gettext, this is the file get_ppid_of.c.

Attached is the build log with the relevant error:

Attachments (1)

gettext-fail.txt (2.4 KB) - added by alex-free (Alex Free) 3 years ago.

Download all attachments as: .zip

Change History (17)

Changed 3 years ago by alex-free (Alex Free)

Attachment: gettext-fail.txt added

comment:1 Changed 3 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

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

Cc: ballapete added

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

Description: modified (diff)
Owner: set to ryandesign
Status: newaccepted

Has duplicate #64105.

comment:4 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Since this is an upstream issue, I've reported the problem to the gnulib mailing list. URL to follow...

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

I restored the previous version of Portfile (on gettext 0.19.8.1) to be able to upgrade the outdated Ports.

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

FYI, quite a bit of libproc is actually already in libSystem.dylib on Tiger Intel. It only needs the libproc.h header (see TigerBrew for an example) to work on Tiger.

I did not bring this header into MacPorts because the guts are not there in Tiger PPC, which was all I really cared about. But it might do the job for Tiger Intel in some or most cases.

libproc is hard to duplicate (I tried three years ago) as it needs kernel support for lots of things to work. Some of the simpler things libproc is used for, like the name or location of the process, can be duplicated in other ways, though.

I did build a new kernel for TigerPPC that had some of the libproc support in it -- but then I realized that was a non-starter for MacPorts anyway, so abandoned that idea.

comment:7 in reply to:  4 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign:

Since this is an upstream issue, I've reported the problem to the gnulib mailing list. URL to follow...

https://lists.gnu.org/archive/html/bug-gnulib/2021-12/msg00011.html

comment:8 in reply to:  6 ; Changed 3 years ago by alex-free (Alex Free)

Replying to kencu:

FYI, quite a bit of libproc is actually already in libSystem.dylib on Tiger Intel. It only needs the libproc.h header (see TigerBrew for an example) to work on Tiger.

I did not bring this header into MacPorts because the guts are not there in Tiger PPC, which was all I really cared about. But it might do the job for Tiger Intel in some or most cases.

libproc is hard to duplicate (I tried three years ago) as it needs kernel support for lots of things to work. Some of the simpler things libproc is used for, like the name or location of the process, can be duplicated in other ways, though.

I did build a new kernel for TigerPPC that had some of the libproc support in it -- but then I realized that was a non-starter for MacPorts anyway, so abandoned that idea.

Thanks for the insight. I know your custom kernel may be out of the realm for MacPorts, but I'd like to see how you did it just to learn more about how one goes about doing something like that.

While trying to sort this issue out, I came across your post on messing around with libproc. I actually tried using the TigerBrew headers before reporting this and I still encountered linking issues, some proc library was unavailable. I can try this again and give more specific results if you'd like. Best scenario here is that upstream changes this requirement to an ifdef for systems without libproc in my opinion.

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

I have opened a pull request that #ifdef's around the issue:

https://github.com/macports/macports-ports/pull/13226

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

Cc: evanmiller added

comment:11 in reply to:  8 Changed 3 years ago by kencu (Ken)

Replying to alex-free:

Thanks for the insight. I know your custom kernel may be out of the realm for MacPorts, but I'd like to see how you did it just to learn more about how one goes about doing something like that.

It was in 2018 or 2019, so still a bit of a while back. But I do remember that first of all it was not too difficult, and secondly that it required an absolutely stock Tiger Xcode and tools install, with no upgraded gmake or symlinked newer compiler in use.

I followed one of the (simple) walkthroughs available on the web, like this one:

http://mirror.informatimago.com/next/developer.apple.com/documentation/Darwin/Conceptual/howto/building_xnu/building_xnu.html

and IIRC, I used the source that matched the Tiger Intel release, which was a few digits newer than the released TigerPPC kernel, available from opensource.apple.com.

you probably have been there, and you can see the released versions of every part of MacOS for every release.

comment:12 in reply to:  9 Changed 3 years ago by alex-free (Alex Free)

Replying to evanmiller:

I have opened a pull request that #ifdef's around the issue:

https://github.com/macports/macports-ports/pull/13226

Long live Tiger! Thank you.

comment:13 Changed 3 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:14 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: mrkapqa added
Port: libtextstyle added

Has duplicate #64417.

comment:15 Changed 3 years ago by itaboss (Dan Boss)

Cc: itaboss added

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

It built now:

  gettext @0.21_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2022-01-30T00:45:08+0100'
  gettext-runtime @0.21_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2021-12-18T20:11:09+0100'
  gettext-tools-libs @0.21_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2022-01-29T23:59:36+0100'
  libtextstyle @0.21_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2022-01-29T23:20:51+0100'
Note: See TracTickets for help on using tickets.