fd icon indicating copy to clipboard operation
fd copied to clipboard

[feature request] support build on AIX

Open arozehnal opened this issue 10 months ago • 7 comments

Checks

  • [x] I have read the troubleshooting section and still think this is a bug.

Describe the bug you encountered:

I am not a programmer, I just wanted to compile fd for AIX. The compilation ended up with errors see attachment. Am I making a mistake somewhere? Is there any way to fix it?

log.TXT

Describe what you expected to happen:

No response

What version of fd are you using?

last

Which operating system / distribution are you on?

aix 7.2

rustc -V
rustc 1.84.1 (e98916a71 2025-02-05) (IBM Open SDK for Rust on AIX 1.84 (5900-BND, 5765-J24))
Community Edition.

cargo -V
cargo 1.84.1 (66221abde 2024-11-19)

arozehnal avatar Feb 22 '25 10:02 arozehnal

That looks to me like the nix crate doesn't support AIX.

And yes, it isn't listed as a supported target on their readme

tmccombs avatar Feb 22 '25 19:02 tmccombs

It's probably possible to make nix an optional dependency. But is there an easy way to test builds on AIX? Otherwise we're kinda programming blind

tavianator avatar Feb 22 '25 20:02 tavianator

I understand that there is a problem with the availability of AIX for testing. But if it is about compilation and verification of functionality, I offer my help.

arozehnal avatar Feb 22 '25 20:02 arozehnal

I managed to build fd on AIX, but I'm not really confident about my workaround codes to contribute it to public. But here are some changes to make it work on AIX:

  1. switched to using libc instead of nix due to lack of support. Also get rid of crtlc because it depends on nix too
  2. disable LTO because there is an issue with proc-macros on AIX
  3. Jemalloc does not work on AIX either

@arozehnal if you need the binary or .diff file, I will provide it

huynp1999 avatar Nov 07 '25 07:11 huynp1999

OK, binary will be fine :-)

arozehnal avatar Nov 07 '25 22:11 arozehnal

Seems like github does not allow to upload file in comment. Anyway, I put it on https://play.min.io:9443, account minioadmin:minioadmin. Go to bucket name "testbucket", and you will find the fd binary in there =))

Also you need to install dependencies in IBM_OPEN_XL_CPP_UTILITIES_17.1.3.0_AIX.tar.Z from https://www.ibm.com/support/pages/ibm-open-xl-cc-utilities-aix-1713 Unzip and installp all .rte in it

huynp1999 avatar Nov 10 '25 03:11 huynp1999

Thanks a lot, it works on the first try. :-)

I'm still missing bat I can't compíle on AIX either. I thought it would get better after update Rust SDK for AIX. But the status is the same.

arozehnal avatar Nov 10 '25 17:11 arozehnal