Open bpalmintier opened 2 years ago
Although this now compiles (Yay, Thanks!) It still is not working. Notably when trying to import helics into a notebook there is an error.
For example in "Introduction.ipynb" (selected from the menu that appears with the try HELICS binder loads.) We get the following:
import helics as h
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
/tmp/ipykernel_106/4070173800.py in <module>
----> 1 import helics as h
/srv/conda/envs/notebook/lib/python3.7/site-packages/helics/__init__.py in <module>
1 # -*- coding: utf-8 -*-
----> 2 from .capi import *
3 from ._version import __version__
4
5 import atexit
/srv/conda/envs/notebook/lib/python3.7/site-packages/helics/capi.py in <module>
18 pass
19
---> 20 from . import _build
21
22 lib = _build.lib
/srv/conda/envs/notebook/lib/python3.7/site-packages/helics/_build.py in <module>
99 for file in os.listdir(lib_folder):
100 if "helicsSharedLib." in file or "libhelics." in file or "libhelicsd." in file and file.endswith(".so"):
--> 101 lib = ffi.dlopen(os.path.join(PYHELICS_INSTALL, "lib", file))
102 break
103 else:
/srv/conda/envs/notebook/lib/python3.7/site-packages/cffi/api.py in dlopen(self, name, flags)
148 "or an already-opened 'void *' handle")
149 with self._lock:
--> 150 lib, function_cache = _make_ffi_library(self, name, flags)
151 self._function_caches.append(function_cache)
152 self._libraries.append(lib)
/srv/conda/envs/notebook/lib/python3.7/site-packages/cffi/api.py in _make_ffi_library(ffi, libname, flags)
830 def _make_ffi_library(ffi, libname, flags):
831 backend = ffi._backend
--> 832 backendlib = _load_backend_lib(backend, libname, flags)
833 #
834 def accessor_function(name):
/srv/conda/envs/notebook/lib/python3.7/site-packages/cffi/api.py in _load_backend_lib(backend, name, flags)
826 msg = "%s. Additionally, %s" % (first_error, msg)
827 raise OSError(msg)
--> 828 return backend.load_library(path, flags)
829
830 def _make_ffi_library(ffi, libname, flags):
OSError: cannot load library '/srv/conda/envs/notebook/lib/python3.7/site-packages/helics/install/lib/libhelics.so.3.1.0': /srv/conda/envs/notebook/lib/python3.7/site-packages/helics/install/lib/libhelics.so.3.1.0: undefined symbol: _ZNSt8ios_base4Init11_S_refcountE
I also had a 502 Bad Gateway
error, but that might have been a VPN issue.
Please double check that the example code in the notebooks work before declaring this bug fixed.
@nightlark any idea what might be going on here?
I tested the pip install on our HPC machines, and it appears to work there.
I ran another instance of binder and I'm getting the following platform from Python.
Is this glibc too old?
The released HELICS binaries should all be using glibc 2.12, which matches the manylinux2010 platform tag on PyPI.
Hmm. So what else would cause the library to fail to load then?
This is using the HELICS releases with the helics_broker
binaries btw.
Well, based on the error message it is: undefined symbol: _ZNSt8ios_base4Init11_S_refcountE
, which demangler.com turns into std::ios_base::Init::_S_refcount
.
The C++ standard library is already static linked into the HELICS binaries and shared libraries for Linux, so I think this is an issue specific to the mybinder environment (ensure it is has the latest c++ standard library, g++-multilib, etc installed). The only thing we could try is relying on the system libstdc++ instead of static linking for release binaries, but this is likely to cause more problems for users than what appears to be an isolated instance of just the mybinder environment being messed up.
If mybinder doesn't give sufficient control over the system environment, it looks like they have a way to use a Dockerfile as a fallback -- this might be the easiest way to fix it by just using a recent Ubuntu Docker image like 20.04 as the base.
Yeah, I looked into that. The issues were talking about deprecating that feature + they don't recommend it and said it is prone to breakage. They go as far as saying if there's a use case that requires Docker, we should report to them first. I guess I should open an issue on Binder's GitHub repo?
I think so. Maybe they can provide more insight into what is going on with their default environment, as this doesn't seem to be reproducible outside their container.
Describe the bug The "Try HELICS online" feature from the www.helics.org website is no longer working. Currently after a lengthy attempt to compile it errors out with "ERROR conda.core.link:_execute(698): An error occurred while installing package 'conda-forge::rise-5.5.1-py37_0'." Full log below.
It also appears that the on-line trial is still based on the now very out of date HELICS 2.2
What is the expected behavior? As one of the showcased links at the main HELICS website, this should at least work, and now that 3.x is out reflect the updated interfaces.
To Reproduce Click on "Try HELICS online" link from the https://www.helics.org
Environment (please complete the following information):
Additional context and information Full log: