Projeto-Pindorama / heirloom-ng

A collection of standard Unix utilities that is intended to provide maximum compatibility with traditional Unix while incorporating additional features necessary today.
http://heirloom-ng.pindorama.dob.jp
Other
24 stars 7 forks source link

Contribute chroot.8, fix date.c on Glibc 2.31+, & fix awk.g.y's headers #14

Closed ghost closed 1 year ago

ghost commented 1 year ago

DETAILS:

Tested on:

Note that for all three, I had to remove -static from LDFLAGS and remove -Wl,-Bstatic from both LIBBZ2 and LIBZ (the versions that were commented out, that is).

Feedback appreciated; please test on other systems before merging.

takusuman commented 1 year ago

Great!

ghost commented 1 year ago

@takusuman oops... I forgot a commit that I just pushed literally one minute ago, that fixed nawk on alpine/musl.

In nawk/awk.g.y, there should be a line that says #include <stdint.h> right below #include "awk.h". Could you copy the changes without me having to create a second PR?

The commit is here: https://github.com/Projeto-Pindorama/heirloom-ng/commit/a11d9fa6686ff8500914d9cd55b3a62ae808a6fa

takusuman commented 1 year ago

Note that for all three, I had to remove -static from LDFLAGS and remove -Wl,-Bstatic from both LIBBZ2 and LIBZ (the versions that were commented out, that is).

Maybe the -dev packages for libbz2 and libz weren't installed? That's weird. At least on Copacabana Linux, which include both the .a and .so files for these libraries, it can compile statically without problems. I'll check this out later on.

Feedback appreciated; please test on other systems before merging.

It compiles (dynamically) on Ubuntu 22.04, with the GNU C Library 2.35 and with the GNU Compiler Collection 11.3.0, nothing really new here. Maybe some *BSD user wish to test it? I don't have any BSD running here, so I can't test it for myself in a "organic" way without being on a VM.

takusuman commented 1 year ago

In nawk/awk.g.y, there should be a line that says #include <stdint.h> right below #include "awk.h". Could you copy the changes without me having to create a second PR?

Well, I think it would be more laborious to copy the line and paste here than just creating another P.R. I'd recommend that you created another P.R., it wouldn't be a problem for me at least. Just let me upgrade the README with the compatibility list, O.k.? EDIT: Done! 0d23fc8d092ca57a1d69f12a0f3435a502947fa2

ghost commented 1 year ago

It compiles (dynamically) on Ubuntu 22.04, with the GNU C Library 2.35 and with the GNU Compiler Collection 11.3.0, nothing really new here.

Thanks for confirming, I wanted to ensure nothing broke on select systems.

Maybe the -dev packages for libbz2 and libz weren't installed? That's weird.

Nope, on all 3 the -dev packages were installed. Arch doesn't even ship any package with libbz2.a.

Maybe some *BSD user wish to test it? I don't have any BSD running here, so I can't test it for myself in a "organic" way without being on a VM.

I've run OpenBSD on real hardware before, but I currently am not running it; however, I do have enough resources to run it in a VM. I could test it later.

I'll open a new PR. Thank you for being so kind to me; I'm still relatively new to actually using GitHub for development other than simply lurking about.

takusuman commented 1 year ago

Nope, on all 3 the -dev packages were installed. Arch doesn't even ship any package with libbz2.a.

I think GNU C-based distributions don't like static linking that much. 😅

I've run OpenBSD on real hardware before, but I currently am not running it; however, I do have enough resources to run it in a VM. I could test it later.

Great. Thank you.

I'll open a new PR.

Merged right now, by the way (#15).

Thank you for being so kind to me; I'm still relatively new to actually using GitHub for development other than simply lurking about.

You're welcome!