AIX Open Source

 View Only
Expand all | Collapse all

Rust on AIX (powerPC)

Archive User

Archive UserSat August 04, 2018 01:48 AM

  • 1.  Rust on AIX (powerPC)

    Posted Sat August 04, 2018 01:48 AM

    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.

     



  • 2.  RE: Rust on AIX (powerPC)

    Posted Tue August 15, 2023 08:27 AM

    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
    ------------------------------



  • 3.  RE: Rust on AIX (powerPC)

    Posted Thu August 17, 2023 01:10 AM
    Edited by SI YUAN ZHANG Thu August 17, 2023 01:10 AM

    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
    ------------------------------



  • 4.  RE: Rust on AIX (powerPC)

    Posted Fri October 06, 2023 05:05 AM

    SI YUAN ZHANG

    I'm looking for rust on AIX, can you help me with that?



    ------------------------------
    Nishith Khandelwal
    ------------------------------



  • 5.  RE: Rust on AIX (powerPC)

    Posted Tue October 10, 2023 05:15 AM

    @Nishith Khandelwal  Hi  Nishith,  yes,  I am glad to provide you the access to Rust AIX.  Can you please send me an email (or private message) to provide some general information (such as your company,  your email address,  and the major purpose of trying Rust AIX,  e.g any Rust apps/crates you are interested, etc.)?   Then I will reply to you with the instructions on download.  Thanks. 



    ------------------------------
    SI YUAN ZHANG
    ------------------------------



  • 6.  RE: Rust on AIX (powerPC)

    Posted Wed October 11, 2023 12:36 AM

    Hi SI YUAN ZHANG

    I have already sent an email on siyuan.zhang@cn.ibm.com with all the details.

    please check and help me on this.

    Thanks



    ------------------------------
    Nishith Khandelwal
    ------------------------------



  • 7.  RE: Rust on AIX (powerPC)

    Posted Mon October 16, 2023 02:47 AM

    Hi SI YUAN ZHANG

    I'm still waiting for your response.

    i have already sent an email to you on above mentioned email few days back and keep on asking for the help in email thread as well

    please help if possible.



    ------------------------------
    Nishith Khandelwal
    ------------------------------



  • 8.  RE: Rust on AIX (powerPC)

    Posted Mon October 16, 2023 06:08 AM

    Hi,  Nishith

    Very strange.  I haven't received any email from you.  Last week I sent you a private message here.  Please check your Inbox and reply with your info.  Or can you please try again with the email: xl_beta@ca.ibm.com?   Sorry for the delay but I do need your info (company & email) to register you on our early program website for download access.  Thanks.



    ------------------------------
    SI YUAN ZHANG
    ------------------------------



  • 9.  RE: Rust on AIX (powerPC)

    Posted Mon October 16, 2023 06:25 AM

    Sent you private message with the details.



    ------------------------------
    Nishith Khandelwal
    ------------------------------



  • 10.  RE: Rust on AIX (powerPC)

    Posted Thu April 04, 2024 04:30 AM

    while building maturin for python on aix  i was presented with an infamous rust dependency...how can i get access to the aix rust beta?

    Installing build dependencies ... error
      error: subprocess-exited-with-error
    
      pip subprocess to install build dependencies did not run successfully.
      exit code: 1
    
      [61 lines of output]
      Collecting maturin<2.0,>=1.0
        Downloading maturin-1.5.1.tar.gz (181 kB)
           --------------------------------------- 181.3/181.3 kB 1.4 MB/s eta 0:00:00
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Collecting tomli>=1.1.0
        Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
      Building wheels for collected packages: maturin
        Building wheel for maturin (pyproject.toml): started
        Building wheel for maturin (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
    
        Building wheel for maturin (pyproject.toml) did not run successfully.
        exit code: 1
    
        [35 lines of output]
        /tmp/pip-build-env-m94yaf8e/overlay/lib/python3.9/site-packages/setuptools/config/_apply_pyprojecttoml.py:83: SetuptoolsWarning: `install_requires` overwritten in `pyproject.toml` (dependencies)
          corresp(dist, value, root_dir)
        running bdist_wheel
        running build
        running build_py
        creating build
        creating build/lib.aix-7302-2345-64-cpython-39
        creating build/lib.aix-7302-2345-64-cpython-39/maturin
        copying maturin/__init__.py -> build/lib.aix-7302-2345-64-cpython-39/maturin
        copying maturin/__main__.py -> build/lib.aix-7302-2345-64-cpython-39/maturin
        copying maturin/import_hook.py -> build/lib.aix-7302-2345-64-cpython-39/maturin
        running egg_info
        creating maturin.egg-info
        writing maturin.egg-info/PKG-INFO
        writing dependency_links to maturin.egg-info/dependency_links.txt
        writing requirements to maturin.egg-info/requires.txt
        writing top-level names to maturin.egg-info/top_level.txt
        writing manifest file 'maturin.egg-info/SOURCES.txt'
        reading manifest file 'maturin.egg-info/SOURCES.txt'
        reading manifest template 'MANIFEST.in'
        warning: no files found matching '*.json' under directory 'src/python_interpreter'
        writing manifest file 'maturin.egg-info/SOURCES.txt'
        running build_ext
        running build_rust
        error: can't find Rust compiler
    



    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 11.  RE: Rust on AIX (powerPC)

    Posted Fri April 05, 2024 02:31 AM

    Hi Chris,

    Please send an email to xl_beta@ca.ibm.com by giving an company name and email id.



    ------------------------------
    SANGAMESH
    ------------------------------



  • 12.  RE: Rust on AIX (powerPC)

    Posted Mon April 08, 2024 04:07 AM

    email sent few days ago...no response unfortunately...as i'm somewhat in a hurry...any other mystic options to get hold of the compiler, beside building it myself?



    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 13.  RE: Rust on AIX (powerPC)

    Posted Mon April 08, 2024 05:16 AM

    Hi,  Chris,  

    Sorry for slow response - was on holiday since last Thursday.   I will enroll you into our Rust Alpha program today.  



    ------------------------------
    SI YUAN ZHANG
    ------------------------------



  • 14.  RE: Rust on AIX (powerPC)

    Posted Mon April 08, 2024 06:20 AM

    perfect, thank you!



    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 15.  RE: Rust on AIX (powerPC)

    Posted Thu July 04, 2024 11:56 AM

    Hi Si Yuan Zhang. I sent you an email requesting to join the Rust on AIX program.

    I look forward to hearing back from you! :)



    ------------------------------
    Shane Bishop
    ------------------------------



  • 16.  RE: Rust on AIX (powerPC)

    Posted Fri July 05, 2024 01:50 AM

    Sure.  Thank you for being interested in our Alpha.  I will enroll you.  Thanks Shane.



    ------------------------------
    SI YUAN ZHANG
    ------------------------------



  • 17.  RE: Rust on AIX (powerPC)

    Posted Fri October 18, 2024 11:30 AM

    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
    ------------------------------



  • 18.  RE: Rust on AIX (powerPC)

    Posted Mon October 28, 2024 02:41 PM

    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
    ------------------------------



  • 19.  RE: Rust on AIX (powerPC)

    Posted Fri November 29, 2024 10:04 AM

    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 maturin
    Failed to build maturin
    ERROR: Could not build wheels for maturin, which is required to install pyproject.toml-based projects
    


    ------------------------------
    Joerg Luehmann
    ------------------------------



  • 20.  RE: Rust on AIX (powerPC)

    Posted Fri November 29, 2024 10:16 AM

    Hi Joerg,

    Can you try removing "-m64" and just leave in the "-maix64"?

    Thanks,

    Adam



    ------------------------------
    Adam D'Andrea
    ------------------------------



  • 21.  RE: Rust on AIX (powerPC)

    Posted Fri November 29, 2024 10:30 AM

    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=-maix64
    export OBJECT_MODE=64
    export CC="gcc -pthread"
    export CFLAGS=-maix64
    export LDFLAGS="-lm"

    kind regards 

    Joerg



    ------------------------------
    Joerg Luehmann
    ------------------------------



  • 22.  RE: Rust on AIX (powerPC)

    Posted Fri November 29, 2024 11:34 AM
    Edited by Adam D'Andrea Fri November 29, 2024 11:39 AM

    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
    ------------------------------



  • 23.  RE: Rust on AIX (powerPC)

    Posted Mon December 02, 2024 02:11 AM

    Great Adam,

    thank you very much.

    Joerg



    ------------------------------
    Joerg Luehmann
    ------------------------------



  • 24.  RE: Rust on AIX (powerPC)

    Posted Mon December 02, 2024 06:26 AM

    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-12
    export CXX=/opt/freeware/bin/gcc-12
    export RUSTFLAGS="-Clink-arg=-lbsd -Clink-arg=-lunwind -Clink-arg=-bbigtoc"
    export OBJECT_MODE=64
    export OPENSSL_DIR=/usr
    export OPENSSL_NO_VENDOR=1
    export OPENSSL_STATIC=0
    export CFLAGS="-maix64"
    export CCFLAGS="-maix64"
    ulimit -m unlimited
    ulimit -s unlimited
    ulimit -d unlimited

    Perhaps you can try it out. 

    Regards,

    Gabriel



    ------------------------------
    Gabriel Canton
    ------------------------------



  • 25.  RE: Rust on AIX (powerPC)

    Posted Mon December 02, 2024 09:33 AM

    Thanks Gabriel

    Speaking with a developer, you could also make this change in the `cc` crate for file src/lib.rs:

    @@ -2114,6 +2114,12 @@ impl Build {
                    cmd.args.push("-m32".into());
                } else if target.abi == "x32" {
                    cmd.args.push("-mx32".into());
                } else if target.os == "aix" {
                    if cmd.family == ToolFamily::Gnu {
                        cmd.args.push("-maix64".into());
                    } else {
                        cmd.args.push("-m64".into());
                    }
                } else if target.arch == "x86_64" || target.arch == "powerpc64" {
                    cmd.args.push("-m64".into());
                }

    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.



    ------------------------------
    Adam D'Andrea
    ------------------------------



  • 26.  RE: Rust on AIX (powerPC)

    Posted 9 days ago

    I've seen that some "people" at IBM thought it would be a good idea to try to monetize an SDK for RUST.  I guess they were wanting to drive more people away from AIX?  

    Do they not know that RUST's SDK can be gotten for free anywhere else?

    But, my question is now:  Is there at least a free run time that will work with Python modules? 



    ------------------------------
    Howard Coles
    ------------------------------



  • 27.  RE: Rust on AIX (powerPC)

    Posted 2 days ago

    Ahh we're not trying to monetize it and to that effect we've put out a free community edition which can now be accessed here:  https://early-access.ibm.com/software/support/trial/cst/welcomepage.wss?siteId=2171&tabId=6097&w=1



    ------------------------------
    Adam D'Andrea
    ------------------------------