GLIBC_2.29 not found

Hello,

I experience the attached error of “GLIBC_2.29 not found”


when a module is called in my code. How can the GLIBC version be programmatically updated upon building the Binder?

Thank you :slight_smile:

Unfortunately it looks like phreeqpy 0.5.1 on PyPI only has a binary wheel, and contains some compiled libraries which contradicts the naming- a none-any.whl wheel package should be pure python and run on any machine. You can see this by downloading and unzipping the whl package.

It might be worth contacting the authors to let them know? You could also try compiling the python module yourself.

2 Likes

I am the author of PhreeqPy. It is a platform-independent package that uses ctypes to access an existing DLL or *.so. For convenience, I also include the DLL for Windows, the *.dylib for MacOS as well as the *.so. Instructions, how to create the *.so are in the documentation. I don’t want to build different packages for three operation systems and 10 Python versions, which it currently supports.

1 Like

I think then given what @pya says, @freiburgermsu you could move the installation of the library and package to a postBuild maybe?

Something like this for the postBuild file:

#!/bin/bash
wget https://water.usgs.gov/water-resources/software/PHREEQC/iphreeqc-3.7.3-15968.tar.gz
tar -xzvf iphreeqc-3.7.3-15968.tar.gz
cd iphreeqc-3.7.3-15968
./configure
make
make check
make install
phreeqc = phreeqpy.iphreeqc.phreeqc_dll.IPhreeqc('/home/jovyan/iphreeqc-3.7.3-15968/libiphreeqc.so')
pip install -U phreeqpy

I’m unsure of the phreeqc = line because I’m not 100% sure where ibiphreeqc.so gets made. I wonder if it should be:

phreeqc = phreeqpy.iphreeqc.phreeqc_dll.IPhreeqc('/home/jovyan/iphreeqc-3.7.3-15968/lib/libiphreeqc.so')

If that isn’t going to work, then you may need to resort to a Dockerfile to install this so it works via MyBinder.

It appears phreeqpy is already available on conda-forge and is built, and tested, for each python/platform combination, along with all of its dependencies.

However, requiring the user to find a specific dll at runtime sounds… hard. The conda-forge recipe could be updated to make that path Just Work, as it excels at making stuff portable.

Anyhow, without more info, it looks like the “root cause” of the import is rosspy… which isn’t yet on conda-forge, nor are a number of its first-, second- and nth-level dependencies… but we can do pretty well with an environment.yml

channels:
  - conda-forge
  - nodefaults
dependencies:
  - pip:
    - rosspy
  # first-order deps of rosspy
  - matplotlib-base
  - pandas
  - phreeqpy
  - scipy
  # second-order deps of rosspy
  - mpmath
  - sortedcontainers
  - quantities
  - pulp
  - pyodesys
  - sympy
  # baseline
  - pip
  - python >=3.7
  - wheel

These leaves the following wheels it had to build at install time:

rosspy chempy chemw pubchempy pyneqsys chemicals fluids

It’s plausible all of those could also be built for conda-forge.

Here’s a gist:

2 Likes

Hello @fomightez,

Thank you for the detailed suggestion. The folder to which the PHREEQpy will be built is apparently beyond the permissions of a postBuild " e[91m/usr/bin/install: cannot create regular file '/usr/local/lib/libiphreeqc-3.7.3.so'e[0me[91m: Permission denied " from this output

make  check-TESTS
make[2]: Entering directory '/home/jovyan/iphreeqc-3.7.3-15968/tests'
make[3]: Entering directory '/home/jovyan/iphreeqc-3.7.3-15968/tests'
PASS: test_c
PASS: test_cxx
============================================================================
Testsuite summary for IPhreeqc 3.7.3-15968
============================================================================
# TOTAL: 2
# PASS:  2
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
make[3]: Leaving directory '/home/jovyan/iphreeqc-3.7.3-15968/tests'
make[2]: Leaving directory '/home/jovyan/iphreeqc-3.7.3-15968/tests'
make[1]: Leaving directory '/home/jovyan/iphreeqc-3.7.3-15968/tests'
Making check in examples
make[1]: Entering directory '/home/jovyan/iphreeqc-3.7.3-15968/examples'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory '/home/jovyan/iphreeqc-3.7.3-15968/examples'
Making check in doc
make[1]: Entering directory '/home/jovyan/iphreeqc-3.7.3-15968/doc'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory '/home/jovyan/iphreeqc-3.7.3-15968/doc'
Making check in database
make[1]: Entering directory '/home/jovyan/iphreeqc-3.7.3-15968/database'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory '/home/jovyan/iphreeqc-3.7.3-15968/database'
Making check in gtest
make[1]: Entering directory '/home/jovyan/iphreeqc-3.7.3-15968/gtest'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory '/home/jovyan/iphreeqc-3.7.3-15968/gtest'
make[1]: Entering directory '/home/jovyan/iphreeqc-3.7.3-15968'
make[1]: Nothing to be done for 'check-am'.
make[1]: Leaving directory '/home/jovyan/iphreeqc-3.7.3-15968'
Making install in src
make[1]: Entering directory '/home/jovyan/iphreeqc-3.7.3-15968/src'
make[2]: Entering directory '/home/jovyan/iphreeqc-3.7.3-15968/src'
 /bin/mkdir -p '/usr/local/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libiphreeqc.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libiphreeqc-3.7.3.so /usr/local/lib/libiphreeqc-3.7.3.so
e[91m/usr/bin/install: cannot create regular file '/usr/local/lib/libiphreeqc-3.7.3.so'e[0me[91m: Permission denied
e[0me[91mmake[2]: *** [install-libLTLIBRARIES] Error 1
e[0mMakefile:636: recipe for target 'install-libLTLIBRARIES' failed
make[2]: Leaving directory '/home/jovyan/iphreeqc-3.7.3-15968/src'
Makefile:1169: recipe for target 'install-am' failed
e[91mmake[1]: *** [install-am] Error 2
e[0mmake[1]: Leaving directory '/home/jovyan/iphreeqc-3.7.3-15968/src'
Makefile:401: recipe for target 'install-recursive' failed
e[91mmake: *** [install-recursive] Error 1
e[0me[91m./binder/postBuild: line 9: syntax error near unexpected token `('
e[0me[91m./binder/postBuild: line 9: `phreeqc = phreeqpy.iphreeqc.phreeqc_dll.IPhreeqc('/home/jovyan/iphreeqc-3.7.3-15968/libiphreeqc.so')'
e[0mRemoving intermediate container 710e1949a0f8
The command '/bin/sh -c ./binder/postBuild' returned a non-zero code: 2Built image, launching...
Failed to connect to event stream

Can the permissions be amended by changing a setting, or is this approach fundamentally incompatible with MyBuilder?

Yeah, one of:

  • sudo make install (probably expected)
  • ./configure, make, or make install will accept a PREFIX argument, which could be pointed at, e.g. /home/jovyan/iphreeqc (more portable)

While one of these might make everything start working… it may well just reveal the next thing that isn’t happening exactly the same way as expected.

But… once we’ve figured out all the bobbins over forum posts, slowly, spending lots of your time and mybinder credits running gcc… we’ll have done enough work to have a conda-forge recipe for iphreeqc!

To that end, i did start some issue/PRs to start looking into some of these issues:

2 Likes

Note that the conda version is 0.4.0, whereas the pip version is 0.5.1.

The sudo command was not recognized

make[1]: Nothing to be done for 'check-am'.
make[1]: Leaving directory '/home/jovyan/iphreeqc-3.7.3-15968'
e[91m./binder/postBuild: line 8: sudo: command not found
e[0me[91m./binder/postBuild: line 9: syntax error near unexpected token `('
./binder/postBuild: line 9: `phreeqc = phreeqpy.iphreeqc.phreeqc_dll.IPhreeqc('/home/jovyan/iphreeqc-3.7.3-15968/libiphreeqc.so')'
e[0mRemoving intermediate container 1905a83c514d
The command '/bin/sh -c ./binder/postBuild' returned a non-zero code: 2

but the --prefix=/home/jovyan/iphreeqc argument allowed make install to complete. Thank you for the suggestions.

The process now throws an error on the last line in the postBuild file ( phreeqc = phreeqpy.iphreeqc.phreeqc_dll.IPhreeqc('/home/jovyan/iphreeqc/iphreeqc-3.7.3-15968/libiphreeqc.so') )

Making install in gtest
make[1]: Entering directory '/home/jovyan/iphreeqc-3.7.3-15968/gtest'
make[2]: Entering directory '/home/jovyan/iphreeqc-3.7.3-15968/gtest'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/jovyan/iphreeqc-3.7.3-15968/gtest'
make[1]: Leaving directory '/home/jovyan/iphreeqc-3.7.3-15968/gtest'
make[1]: Entering directory '/home/jovyan/iphreeqc-3.7.3-15968'
make[2]: Entering directory '/home/jovyan/iphreeqc-3.7.3-15968'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/jovyan/iphreeqc-3.7.3-15968'
make[1]: Leaving directory '/home/jovyan/iphreeqc-3.7.3-15968'
e[91m./binder/postBuild: line 9: syntax error near unexpected token `('
e[0me[91m./binder/postBuild: line 9: `phreeqc = phreeqpy.iphreeqc.phreeqc_dll.IPhreeqc('/home/jovyan/iphreeqc-3.7.3-15968/libiphreeqc.so')'
e[0mRemoving intermediate container 45672941d218
The command '/bin/sh -c ./binder/postBuild' returned a non-zero code: 2Built image, launching...
Failed to connect to event stream

Do you have suggestions for how this can be resolved?

The build near completion; thank you so much for your support :slight_smile:

Hello @pya ,

I encounter phreeqc: command not found after executing your Linux sequence. How can the phreeqc command be instantiated?

BTW: The aforementioned error was resolved by escaping ( & ) in phreeqc = phreeqpy.iphreeqc.phreeqc_dll.IPhreeqc('/full/path/to/libiphreeqc.so') .

Thank you :slight_smile:

1 Like