Open-source Languages & Tools for z/OS

 View Only
  • 1.  Conda Install Problem

    Posted 01-20-2021 16:49

    Hello, 

    After installing Miniconda (v 1.2.1) I tried creating a new environment and installing a package to it, for example: 

    conda create -n curl

    conda activate curl

    conda install .. curl

    The conda create and activate worked fine but the install produced several messages like as follows:

    IBMUSER:/u/ibmuser: >conda install -c https://conda.anaconda.org/zoss-appdev gzip
    compile command returned 65280
    Failed to load /u/ibmuser/.ffi/i_.so: CEE3501S The module /u/ibmuser/.ffi/i_.so was not found.
    No ffi call function could be found or created
    compile command returned 65280
    Failed to load /u/ibmuser/.ffi/v_iiPi.so: CEE3501S The module /u/ibmuser/.ffi/v_iiPi.so was not found.
    compile command returned 65280

    I was able to circumvent the error but copying the missing files from the Miniconda install lib/ffi directory, but I wonder if I missed something during the Miniconda install/config?

    Regards

    Greg



    ------------------------------
    Greg Keuken
    Systems Programmer
    IBM
    ------------------------------


  • 2.  RE: Conda Install Problem

    ROCKETEER
    Posted 01-21-2021 05:25
    Hi Greg Keuken,

    Make sure the FFI_LIB environment variable is set correctly: env | grep FFI_LIB
    it must be set to "$CONDA_PREFIX/lib/ffi" when activating the base environment

    So, your problem might be that you forgot to run the command 'conda activate base' before 'conda create -n curl' etc.

    Thanks,
    Alexander

    ------------------------------
    Alexander Klochkov
    Rocket Software
    ------------------------------



  • 3.  RE: Conda Install Problem

    Posted 01-21-2021 08:39

    Thanks Alexander,

    I didn't see 'conda activate base' as a requirement in the Miniconda PDF doc for creating new environments. Perhaps this should be added?

    This did indeed solve the problem, however, now I run into another minor issue. It seems that after creating a new environment and activating only that new environment after a logon, any further conda commands (like conda info --env or conda list) will still produce the above error messages.

    So for example:

    I logon to z/OS USS (WITHOUT doing conda activate base) .. I can run conda commands without the CEE3501S errors. Note that FFI_LIB environment variable is NOT set at this point.

    I run:

    conda activate base

    conda create -n test

    conda install .. gzip

    conda activate test

    at this point everything is working fine .. but 

    I then update users .bashrc to only activate the new environment (eg. 'conda activate test') and after logging back on to USS other conda commands (like conda list) will produce CEE3501S errors unless I export FFI_LIB variable, or 'conda activate base' AND then 'conda activate test'.

     



    ------------------------------
    Greg Keuken
    Systems Programmer
    IBM
    ------------------------------



  • 4.  RE: Conda Install Problem

    Posted 01-26-2021 11:04
    Hello Greg,
    This information is not included into documentation, because it is not mandatory: directory $HOME/.ffi with all required files should be automatically created when you run conda commands. However, it doesn't happen in your environment. We are going to investigate that. Note, that the engineers have to prioritize support assistance for customers that are paying for support, so the research might take time.
    There is another workaround to skip activating base environment. You need to install libffi package into each environment, you are going to use. When you activate the environment FFI_LIB environment variable will be set.

    ------------------------------
    Tatiana Balaburkina
    Rocket Software
    ------------------------------



  • 5.  RE: Conda Install Problem

    Posted 05-19-2021 07:00
    Hi

    Do you have an estimated fix date for this?

    Regards,

    Pete​

    ------------------------------
    Pete Osborne
    HSBC
    ------------------------------



  • 6.  RE: Conda Install Problem

    Posted 05-26-2021 05:59
    Hi Pete,
    We prioritize our work based on customers input. Unfortunately, since there is no interest from customers with support contract, the fix is not scheduled.

    ------------------------------
    Tatiana Balaburkina
    Rocket Software
    ------------------------------



  • 7.  RE: Conda Install Problem

    Posted 05-26-2021 06:39
    And that is why forcing the z/OS community to use conda is not a good idea. If conda is broken then there are no alternatives. Forcing every site to use the conda configuration when deploying individual packages is also an issue. It was a nice idea but time to rethink.

    ------------------------------
    LionelDyck <><
    https://github.com/zigi
    https://github.com/lbdyck
    ------------------------------



  • 8.  RE: Conda Install Problem

    Posted 05-27-2021 13:28
    Lionel, we have yet to see any evidence this is a bug in z/OS conda or z/OS Miniconda.  A large majority of our user base and 100% of our customers on support contracts have not encountered this issue and we remain confident that conda was the right choice for download, install and updating our z/OS open source ports.

    ------------------------------
    Peter Fandel
    Rocket Software
    ------------------------------



  • 9.  RE: Conda Install Problem

    ROCKETEER
    Posted 07-14-2021 16:23
    Hello Greg & Pete,

    FYI, here's an explanation of why this issue might be occurring. It's related to how FFI (foreign function interface) works in Python on z/OS. Internally, Python uses libffi to perform the actual work of making FFI calls. For every such call, libffi loads a DLL (an .so file) corresponding to the signature of the function being called. Libffi itself is bundled with a number of pre-built DLLs, located in the lib/ffi subdirectory of the package. This directory, however, is only 'plugged in' when the environment is activated, or, alternatively, when FFI_LIB is set up manually.

    If there's no FFI_LIB, libffi cannot 'see' the built-in signatures, and any FFI call presents it a 'new', unknown signature. In such situations, it builds the corresponding DLL on-the-fly and places it into the directory $HOME/.ffi - this is like a personal cache of new FFI DLLs. DLLs are built using XLC, which means you need to be able to run it. If XLC fails for whatever reason, it will result in CEE3501S like Greg was seeing.

    When you start conda in OMVS, it's easy to hit this because OMVS storage is limited by TSO region, which is often too small. XLC requires quite a lot of storage, and with a small TSO region, CEE3501S will be all you'll get.

    Regards,
    Vladimir

    ------------------------------
    Vladimir Ein
    Rocket Internal - All Brands
    Yekaterinburg Russian Federation
    ------------------------------