Skip to content

Initial support for GNU/Hurd#2088

Open
pinotree wants to merge 1 commit into
abseil:masterfrom
pinotree:hurd
Open

Initial support for GNU/Hurd#2088
pinotree wants to merge 1 commit into
abseil:masterfrom
pinotree:hurd

Conversation

@pinotree

@pinotree pinotree commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Tweak configuration & tests so that most of abseil works on the Hurd:

  • enable available TLS (__thread, in practice)
  • enable available mmap
  • enable available POSIX semaphores
  • enable available POSIX write()
  • disable the ELF symbolizer: while the object format is ELF, the symbolizer uses bits (i.e. mmap files in /proc) not currently available
  • use the available /proc/self/exe
  • tweak a log test for the different value of EBADF
  • tweak the strerror test for the GNU libc Hurd string representation of -1

@mkruskal-google

mkruskal-google commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

How many more changes will be needed for this? This looks fairly minimal, but Hurd is not in our support matrix, and we don't test against it. So it may be accidentally broken again by future changes.

To evaluate whether or not this is a good idea, it would be good to see the full scope of the necessary changes. The more you need to touch, the less likely it is to be stable

Tweak configuration & tests so that most of abseil works on the Hurd:
- enable available TLS ("__thread", in practice)
- enable available mmap
- enable available POSIX semaphores
- enable available POSIX write()
- disable the ELF symbolizer: while the object format is ELF, the
  symbolizer uses bits (i.e. "mmap" files in /proc) not currently
  available
- use the available /proc/self/exe
- tweak a log test for the different value of EBADF
- tweak the strerror test for the GNU libc Hurd string representation
  of -1
@pinotree

Copy link
Copy Markdown
Contributor Author

How many more changes will be needed for this?

It is mostly this; I just rebased this PR with an additional fix for absl_strerror_test that I missed.

As for things to do:

  • NumbersTest.Atod in absl_numbers_test fails, I have not investigated the reason
  • I did not go through the list of skipped/disabled tests to see whether there is something important/missing; I do not expect negative surprises here though
  • the StrError implementation and its test assume that the values of the POSIX errnos start from 1; on the Hurd they start from 0x40000001 instead, so
    • the caching done by NewStrErrorTable is not effective for actual errnos; that said, the fallback that calls strerror_r() works just fine
    • StrErrorTest.MultipleThreads is not really testing actual errnos

My plan is to send changes for each separately, so it is easier to review them.

So it may be accidentally broken again by future changes.

That is fine for me. Once abseil is changed to build/work on the Hurd, I do not expect a constant stream of changes to keep it up-to-date -- followup fixes should be easy to do and to review (IMHO).

@mkruskal-google

Copy link
Copy Markdown
Contributor

I think for something like this it might be easier to review it in totality. My worry is that we accept this PR (which seems pretty minimal) and then the next one seems too invasive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants