Closed RemDelaporteMathurin closed 4 months ago
I found this post that seems related
Almost certainly related to the updates since I saw the same error during the update process. I'm not sure why you are seeing it when it was fixed in the test env, though. The build was fixed with patches to the pkgconfig files to make sure sysroot is in the library search path.
Can you tell if the conda env is fully activated in your build environment? (LDFLAGS, CFLAGS, etc. will be set)
Can you tell if the conda env is fully activated in your build environment? (LDFLAGS, CFLAGS, etc. will be set)
I'm not sure I know how to do this. Is there a way to do it/see it in RTD?
I forgot to mention that everything works fine locally
@minrk I tried to run echo
commands but didn't seem to work.
[rtd-command-info] start-time: 2024-06-24T17:58:29.212405Z, end-time: 2024-06-24T17:58:29.722207Z, duration: 0, exit-code: 0
jupyter-book config sphinx report/
Wrote conf.py to /home/docs/checkouts/readthedocs.org/user_builds/festim-vv-report/checkouts/35/report
[rtd-command-info] start-time: 2024-06-24T17:58:29.749937Z, end-time: 2024-06-24T17:58:29.811225Z, duration: 0, exit-code: 0
echo $LDFLAGS
[rtd-command-info] start-time: 2024-06-24T17:58:29.836619Z, end-time: 2024-06-24T17:58:29.898664Z, duration: 0, exit-code: 0
echo $CFLAGS
[rtd-command-info] start-time: 2024-06-24T17:58:30.251163Z, end-time: 2024-06-24T17:58:30.316216Z, duration: 0, exit-code: 0
cat report/conf.py
If echo doesn't work, you could get and print the env in your notebooks that are currently erroring via os.environ
this is the output of print(os.environ)
environ({'READTHEDOCS_CANONICAL_URL': 'https://festim-vv-report--35.org.readthedocs.build/en/35/', 'HOSTNAME': 'build-24797483-project-1052576-festim-vv-report', 'READTHEDOCS_GIT_CLONE_URL': 'https://github.com/festim-dev/V-V-report', 'HOME': '/home/docs', 'NO_COLOR': '1', 'READTHEDOCS': 'True', 'CONDA_ENVS_PATH': '/home/docs/checkouts/readthedocs.org/user_builds/festim-vv-report/conda', 'READTHEDOCS_PROJECT': 'festim-vv-report', 'READTHEDOCS_OUTPUT': '/home/docs/checkouts/readthedocs.org/user_builds/festim-vv-report/checkouts/35/_readthedocs/', 'PATH': '/home/docs/checkouts/readthedocs.org/user_builds/festim-vv-report/conda/35/bin:/home/docs/.asdf/shims:/home/docs/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'READTHEDOCS_VERSION_TYPE': 'external', 'LANG': 'C.UTF-8', 'READTHEDOCS_LANGUAGE': 'en', 'DEBIAN_FRONTEND': 'noninteractive', 'READTHEDOCS_GIT_COMMIT_HASH': '5e2a695677157167b9dd4292e08b3169d770bf5b', 'READTHEDOCS_VERSION_NAME': '35', 'CONDA_DEFAULT_ENV': '35', 'READTHEDOCS_VERSION': '35', 'PWD': '/home/docs/checkouts/readthedocs.org/user_builds/festim-vv-report/checkouts/35/report', 'READTHEDOCS_GIT_IDENTIFIER': '5e2a695677157167b9dd4292e08b3169d770bf5b', 'DOCUTILSCONFIG': '/home/docs/checkouts/readthedocs.org/user_builds/festim-vv-report/checkouts/35/report/docutils.conf', 'JPY_PARENT_PID': '2897', 'PYDEVD_USE_FRAME_EVAL': 'NO', 'TERM': 'xterm-color', 'CLICOLOR': '1', 'FORCE_COLOR': '1', 'CLICOLOR_FORCE': '1', 'PAGER': 'cat', 'GIT_PAGER': 'cat', 'MPLBACKEND': 'module://matplotlib_inline.backend_inline'})
Yeah, that means the activation script isn't running (I.e. conda activate envname).
The easiest workaround is probably to set LDFLAGS yourself, if properly activating the env is not an option, but I bet I can try to get whatever the missing one(s) in the default flags.
Does it work if you add the package gxx
to the environment? My guess is that a system compiler is used, which won't work, but the gxx
package is absent, which provides the default c++
executable.
I'm pretty confident #205 will fix this which means you should be able to fix it by adding gxx
to your environment.
I can reproduce the problem in quay.io/condaforge/miniforge3
with:
mamba create -n dolfin fenics-dolfin mpich matplotlib-base
apt-get -y update; apt-get -y install g++ # install system compiler
# add env to PATH without activating it
export PATH=/opt/conda/envs/dolfin/bin:$PATH
python3 demo_poisson.py
# fails with
/usr/bin/ld: cannot find /lib64/libpthread.so.0
/usr/bin/ld: cannot find /usr/lib64/libpthread_nonshared.a
collect2: error: ld returned 1 exit status
mamba install -n dolfin gxx
python3 demo_poisson.py # succeeds
This doesn't come up for properly activated environments because the activation scripts set $CXX, so the default c++
executable is not used.
Yes I confirm this fixed it! https://festim-vv-report--35.org.readthedocs.build/en/35/verification/mms/simple.html
Great! I'm not sure what changed that caused this to start failing, but good to know it's fixed. The next build will include the missing dependency on gxx.
Hi @minrk we have a jupyterbook project where we install fenics with conda.
Two days ago it worked fine and today we started noticing errors in the read the docs build.
It seems to be a JIT problem:
I see there have been changes recently to this repo, could this be related?
Thanks!
Full error message: