Speaking with a developer, you could also make this change in the `cc` crate for file src/lib.rs:
Overall, we suggest using clang long term with our Rust compiler instead of GCC, just for the sake of interoperability. But maturin should still build for you with GCC.
Original Message:
Sent: Mon December 02, 2024 06:26 AM
From: Gabriel Canton
Subject: Rust on AIX (powerPC)
Hi Joerg, I recently had a similar problem trying to install oracledb, which requires maturin. To make it work, I had to use gcc v12 and Python 3.11. I also set my environment like this:
export CC=/opt/freeware/bin/gcc-12export CXX=/opt/freeware/bin/gcc-12export RUSTFLAGS="-Clink-arg=-lbsd -Clink-arg=-lunwind -Clink-arg=-bbigtoc"export OBJECT_MODE=64export OPENSSL_DIR=/usrexport OPENSSL_NO_VENDOR=1export OPENSSL_STATIC=0export CFLAGS="-maix64"export CCFLAGS="-maix64"ulimit -m unlimitedulimit -s unlimitedulimit -d unlimited
Perhaps you can try it out.
Regards,
Gabriel
------------------------------
Gabriel Canton
Original Message:
Sent: Mon December 02, 2024 02:10 AM
From: Joerg Luehmann
Subject: Rust on AIX (powerPC)
Great Adam,
thank you very much.
Joerg
------------------------------
Joerg Luehmann
Original Message:
Sent: Fri November 29, 2024 11:34 AM
From: Adam D'Andrea
Subject: Rust on AIX (powerPC)
Hi Joerg,
We're trying a change to see what happens when we build maturin. Will get back to you if it works.
Thanks,
Adam
------------------------------
Adam D'Andrea
Original Message:
Sent: Fri November 29, 2024 10:30 AM
From: Joerg Luehmann
Subject: Rust on AIX (powerPC)
Hello Adam,
this is exactly my problem. I do not know how. I did not set the -m64 compiler option. Here is my environment:
export CXX="g++ -pthread"export CXXFLAGS=-maix64export OBJECT_MODE=64export CC="gcc -pthread"export CFLAGS=-maix64export LDFLAGS="-lm"
kind regards
Joerg
------------------------------
Joerg Luehmann
Original Message:
Sent: Fri November 29, 2024 10:15 AM
From: Adam D'Andrea
Subject: Rust on AIX (powerPC)
Hi Joerg,
Can you try removing "-m64" and just leave in the "-maix64"?
Thanks,
Adam
------------------------------
Adam D'Andrea
Original Message:
Sent: Fri November 29, 2024 09:30 AM
From: Joerg Luehmann
Subject: Rust on AIX (powerPC)
Hi All,
sorry for hijacking this thread. I have download the rust compiler. But i have no luck compiling maturin.
warning: psm@0.1.21: gcc: error: unrecognized command-line option '-m64' error: failed to run custom build command for `psm v0.1.21` Caused by: process didn't exit successfully: `/tmp/pip-install-qt9hcl9d/maturin_7f994eadffff4b8589883995da8e2696/target/release/build/psm-2110e5c4db491ae3/build-script-build` (exit status: 1) --- stdout OPT_LEVEL = Some(3) OUT_DIR = Some(/tmp/pip-install-qt9hcl9d/maturin_7f994eadffff4b8589883995da8e2696/target/release/build/psm-8fb41c824374d0e7/out) TARGET = Some(powerpc64-ibm-aix) HOST = Some(powerpc64-ibm-aix) cargo:rerun-if-env-changed=CC_powerpc64-ibm-aix CC_powerpc64-ibm-aix = None cargo:rerun-if-env-changed=CC_powerpc64_ibm_aix CC_powerpc64_ibm_aix = None cargo:rerun-if-env-changed=HOST_CC HOST_CC = None cargo:rerun-if-env-changed=CC CC = Some(gcc -pthread) cargo:rerun-if-env-changed=CC_KNOWN_WRAPPER_CUSTOM CC_KNOWN_WRAPPER_CUSTOM = None RUSTC_WRAPPER = None cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS CRATE_CC_NO_DEFAULTS = None DEBUG = Some(false) CARGO_CFG_TARGET_FEATURE = None cargo:rerun-if-env-changed=CFLAGS_powerpc64-ibm-aix CFLAGS_powerpc64-ibm-aix = None cargo:rerun-if-env-changed=CFLAGS_powerpc64_ibm_aix CFLAGS_powerpc64_ibm_aix = None cargo:rerun-if-env-changed=HOST_CFLAGS HOST_CFLAGS = None cargo:rerun-if-env-changed=CFLAGS CFLAGS = Some(-maix64) cargo:rerun-if-env-changed=CC_SHELL_ESCAPED_FLAGS CC_SHELL_ESCAPED_FLAGS = None cargo:rustc-cfg=asm cargo:rustc-cfg=switchable_stack cargo:warning=gcc: error: unrecognized command-line option '-m64' --- stderr error occurred: Command "gcc" "-pthread" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-maix64" "-xassembler-with-cpp" "-DCFG_TARGET_OS_aix" "-DCFG_TARGET_ARCH_powerpc64" "-DCFG_TARGET_ENV_" "-o" "/tmp/pip-install-qt9hcl9d/maturin_7f994eadffff4b8589883995da8e2696/target/release/build/psm-8fb41c824374d0e7/out/e4479bd7784abb10-powerpc64_aix.o" "-c" "src/arch/powerpc64_aix.s" with args gcc did not execute successfully (status code exit status: 1). warning: build failed, waiting for other jobs to finish... error: `cargo build --manifest-path Cargo.toml --message-format=json-render-diagnostics --release -v --no-default-features --locked` failed with code 101 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for maturinFailed to build maturinERROR: Could not build wheels for maturin, which is required to install pyproject.toml-based projects
------------------------------
Joerg Luehmann
Original Message:
Sent: Thu October 24, 2024 03:42 PM
From: Adam D'Andrea
Subject: Rust on AIX (powerPC)
Hi everyone,
If anyone is interested in the alpha going forward, please send an email to xl_beta@ca.ibm.com by giving an company name and email id.
Thanks,
Adam
------------------------------
Adam D'Andrea
Original Message:
Sent: Fri October 18, 2024 11:30 AM
From: Gabriel Canton
Subject: Rust on AIX (powerPC)
Hi Si Yuan Zhang, I sent you an email as well providing the details of my request. I'll be waiting for your instructions.
Thanks!
------------------------------
Gabriel Canton
Original Message:
Sent: Thu August 17, 2023 01:09 AM
From: SI YUAN ZHANG
Subject: Rust on AIX (powerPC)
Hi Howard @Howard Coles very glad to see you asking about Rust for AIX. Actually IBM Compiler team did launch an early program (Alpha) for Rust on AIX. If you or your known friends/customers are interested, please feel free to contact me (siyuan.zhang@cn.ibm.com) , with some basic information such as Name, company name, contact email, and the purpose of trying Rust AIX. Then I will send you the link of Alpha program and make sure you get access to the Rust for AIX Alpha package. Looking forward to your try-out. Thanks.
------------------------------
SI YUAN ZHANG
Original Message:
Sent: Tue August 15, 2023 08:26 AM
From: Howard Coles
Subject: Rust on AIX (powerPC)
This question was asked back in 2018, but I'd like re-introduce it.
Are there any efforts to setup RPMs for AIX to enable easy install of rust?
------------------------------
Howard Coles
Original Message:
Sent: Sat August 04, 2018 01:47 AM
From: Archive User
Subject: Rust on AIX (powerPC)
Originally posted by: strikr
Hi:
Rust is an important systems programming language. It is Open Source as well with a growing developer mindset and many interesting projects.
https://github.com/trending/rust
At this juncture, the rust project components - std, rustc and cargo are available for the PowerPC platform.
powerpc-unknown-linux-gnu | ✓ | ✓ | ✓ | PowerPC Linux |
powerpc64-unknown-linux-gnu | ✓ | ✓ | ✓ | PPC64 Linux |
powerpc64le-unknown-linux-gnu | ✓ | ✓ | ✓ | PPC64LE Linux |
https://forge.rust-lang.org/platform-support.html
More so, the LLVM project supports PowerPC, PowerPC-64
https://llvm.org/Features.html
LLVM for System Z
https://www.phoronix.com/scan.php?page=news_item&px=MTM2NjU
Is there any effort initiated by AIXToolbox team to either cross-compile or contribute code to the Rust project, to try and support Rust on AIX ? Any thoughts ?
warm regards
Saifi.