Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test conda installation #279

Open
diegoferigo opened this issue Dec 10, 2020 · 20 comments
Open

Test conda installation #279

diegoferigo opened this issue Dec 10, 2020 · 20 comments

Comments

@diegoferigo
Copy link
Member

diegoferigo commented Dec 10, 2020

Using conda and particularly the conda-forge channel could introduce many benefits to our project:

  • Possibly prevent the problems of the interaction between protobuf / tensorflow and ign-gazebo
  • Provide a cross-platform installation that uses binary packages
  • Enable the creation of development environments that can be precisely reproduced in other machines and OSs

About 1), for the sake of testing, manually compiling ign-gazebo with colcon and using the conda environment for the dependencies should suffice.

On conda-forge there are already many of the ign-gazebo dependencies, but few of them are still missing. As soon as the entire ignition distribution will be included in the channel, we'll be able to bypass the manual installation of ign-gazebo from Open Robotics' PPA.


Edit: some preliminary conda instructions have been recently added upstream: https://github.com/ignitionrobotics/docs/blob/master/citadel/install_windows_src.md. The process is for windows, but it can used also on other OSs.

@diegoferigo
Copy link
Member Author

diegoferigo commented Feb 7, 2021

I am giving conda a try. I did the following in a plain ubuntu:focal container:

  1. Created a conda environment with micromamba
  2. Added the conda-forge channel with strict priority
  3. Install buildchain (compilers, cmake, ...)
  4. Install dart from sources (I need this for other reasons, this shouldn't affect the following)
  5. Install OpenGL stack with mesa-libgl-devel-cos7-x86_64 libglu libxrandr-devel-cos7-x86_64 xorg-libxrandr
  6. Install ogre 1.9 from sources installing into the conda environment (the ogre package seems too old in conda) See discussion below.
  7. Install Ignition Dome from colcon (after the above, all projects build correctly)
  8. Build idyntree from sources and installing into the conda environment
  9. Build gym-ignition from sources and installing into the conda environment
  10. Install tensorflow-gpu

After these steps, I hoped that the tensorflow problems related to protobuf would be solved. Sadly, they are not. If tensorflow is imported after scenario, tensorflow will segfault.

segfault
$ PYTHONFAULTHANDLER=1 python
Python 3.8.0 | packaged by conda-forge | (default, Nov 22 2019, 19:11:38)                                                                   
[GCC 7.3.0] :: Anaconda, Inc. on linux                                                                                                      
Type "help", "copyright", "credits" or "license" for more information.                                                                      
>>> import faulthandler; faulthandler.enable()                                                                                              
>>> from scenario import gazebo                                                                                                             
>>> import tensorflow                                                                                                                       
Fatal Python error: Segmentation fault

Current thread 0x00007f4cc2ddb740 (most recent call first):
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1101 in create_module
  File "<frozen importlib._bootstrap>", line 556 in module_from_spec
  File "<frozen importlib._bootstrap>", line 657 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 702 in _load
  File "/conda/lib/python3.8/imp.py", line 342 in load_dynamic
  File "/conda/lib/python3.8/imp.py", line 242 in load_module
  File "/conda/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24 in swig_import_helper
  File "/conda/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/conda/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1042 in _handle_fromlist
  File "/conda/lib/python3.8/site-packages/tensorflow/python/__init__.py", line 50 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 961 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "/conda/lib/python3.8/site-packages/tensorflow/__init__.py", line 41 in <module>
  File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 783 in exec_module
  File "<frozen importlib._bootstrap>", line 671 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 991 in _find_and_load
  File "<stdin>", line 1 in <module>
Segmentation fault (core dumped)

The problem is the libtensorflow_framework.so.2 library that can be found in the tensorflow python package. Loading only that library with ctypes("/path/to/libtensorflow_framework.so.2") results to the segfault.

At this point, I tried to avoid altering the dlopen flags when loading scenario.bindings.gazebo (done here) and the import situation seems solved. However, we need this tweak to make singletons works (unless gazebosim/gz-sim#248 get implemented somehow), so this is a solution we cannot use. Even though the dlopen flags are restored after the import, tensorflow doesn't like it.

I think at this point the best workaround that fixes both conda and non-conda environments is detecting if tensorflow is installed and, if found, open the problematic shared library, similarly to apache/arrow#2210. This should be done by scenario, and it would result to tensorflow loaded even if the application does not use it. tensorflow/tensorflow#2903 is another related issue.

cc @traversaro

@traversaro
Copy link
Member

Install ogre 1.9 from sources installing into the conda environment (the ogre package seems too old in conda)

Strange, conda-forge should contain ogre version that works fine with ignition-rendering, see conda-forge/staged-recipes#13677 .

Install tensorflow-gpu

How did you install tensorflow-gpu ? If via the wheel installed by pip, then the problem with the vendored protobuf I guess should be the same that you have when installing gym-ignition dependencies via apt. The protobuf problem would be avoided it a tensorflow-gpu build (that used the conda-forge protobuf) was available in conda-forge, but unfortunatly tensorflow for several reasons is quite complicated to package (see conda-forge/tensorflow-feedstock#110, conda-forge/tensorflow-feedstock#107 and conda-forge/tensorflow-feedstock#10).

@diegoferigo
Copy link
Member Author

diegoferigo commented Feb 7, 2021

Install ogre 1.9 from sources installing into the conda environment (the ogre package seems too old in conda)

Strange, conda-forge should contain ogre version that works fine with ignition-rendering, see conda-forge/staged-recipes#13677 .

That is what I thought. Maybe there was something strange in my setup (even though it is a plain docker image), but I got compilation errors. I didn't save the log, my fault, but I remember some failed checks to nullptr of ogre pointers. I didn't investigate much, I thought it was just an outdated version of ogre, and moved towards a source compilation of the 1.9 version, ignition rendering compiled successfully.

Install tensorflow-gpu

How did you install tensorflow-gpu ? If via the wheel installed by pip, then the problem with the vendored protobuf I guess should be the same that you have when installing gym-ignition dependencies via apt. The protobuf problem would be avoided it a tensorflow-gpu build (that used the conda-forge protobuf) was available in conda-forge, but unfortunatly tensorflow for several reasons is quite complicated to package (see conda-forge/tensorflow-feedstock#110, conda-forge/tensorflow-feedstock#107 and conda-forge/tensorflow-feedstock#10).

I installed the tensorflow-gpu conda package (not from the conda-forge channel). I followed one of the issues you posted (particularly conda-forge/tensorflow-feedstock#10) where people reported that the package from the default channel was working fine. I tried on a fresh container and indeed I've got tf with GPU support.

Now that you make me think about it, I originally thought that this tensorflow package was built against the conda-forge's protobuf, but actually since it's not coming from the conda-forge channel maybe there's still a mismatch. However, I also did try to dig into the various .so files of the tensorflow package but I didn't yet find the one that links against protobuf using ldd.

@traversaro
Copy link
Member

I installed the tensorflow-gpu conda package (not from the conda-forge channel). I followed one of the issues you posted (particularly conda-forge/tensorflow-feedstock#10) where people reported that the package from the default channel was working fine. I tried on a fresh container and indeed I've got tf with GPU support.

Interesting. I think that the tensorflow from the defaults channel is build from the recipes in https://github.com/AnacondaRecipes/tensorflow_recipes . I think it is probably building against the defaults channel protobuf, built from https://github.com/AnacondaRecipes/protobuf-feedstock . However, to double check it would be interesting to understand which packages are actually installed in your environment with conda list .

@diegoferigo
Copy link
Member Author

diegoferigo commented Feb 7, 2021

I didn't reach yet any conclusion, let's see when I find some more time to continue this experiment. Here below the current list of packages. I have some cos6 and cos7 duplicates, but I guess I'm using the cos7.

mamba list

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (0.7.12) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████

# packages in environment at /conda:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
_sysroot_linux-64_curr_repodata_hack 3                   ha9d2b57_10    conda-forge
_tflow_select             2.1.0                       gpu  
absl-py                   0.11.0           py38h578d9bd_0    conda-forge
ace                       7.0.0                h9c3ff4c_1    conda-forge
alsa-lib                  1.2.3                h516909a_0    conda-forge
ampl-mp                   3.1.0             h616b090_1004    conda-forge
asio                      1.14.1               h9c3ff4c_1    conda-forge
assimp                    5.0.1                hedfc422_5    conda-forge
astor                     0.8.1              pyh9f0ad1d_0    conda-forge
astunparse                1.6.3              pyhd8ed1ab_0    conda-forge
attrs                     20.3.0             pyhd3deb0d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.1                      py_0    conda-forge
binutils                  2.35.1               hdd6e379_2    conda-forge
binutils_impl_linux-64    2.35.1               h193b22a_2    conda-forge
binutils_linux-64         2.35                hc3fd857_29    conda-forge
blinker                   1.4                        py_1    conda-forge
boost                     1.74.0           py38hc10631b_3    conda-forge
boost-cpp                 1.74.0               h9359b55_0    conda-forge
brotlipy                  0.7.0           py38h497a2fe_1001    conda-forge
bullet                    2.89             py38h51da96c_2    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.17.1               h36c2ea0_0    conda-forge
c-compiler                1.1.3                h7f98852_0    conda-forge
ca-certificates           2020.12.5            ha878542_0    conda-forge
cachetools                4.2.1              pyhd8ed1ab_0    conda-forge
cairo                     1.16.0            h488836b_1006    conda-forge
catkin_pkg                0.4.23             pyh9f0ad1d_0    conda-forge
certifi                   2020.12.5        py38h578d9bd_1    conda-forge
cffi                      1.14.4           py38ha312104_0    conda-forge
chardet                   4.0.0            py38h578d9bd_1    conda-forge
click                     7.1.2              pyh9f0ad1d_0    conda-forge
cloudpickle               1.6.0                      py_0    conda-forge
cmake                     3.19.4               h3020d66_1    conda-forge
colcon-cmake              0.2.26                     py_0    conda-forge
colcon-common-extensions  0.2.1            py38h578d9bd_2    conda-forge
colcon-core               0.6.1            py38h578d9bd_1    conda-forge
colcon-defaults           0.2.5                      py_0    conda-forge
colcon-devtools           0.2.2                      py_0    conda-forge
colcon-library-path       0.2.1                      py_0    conda-forge
colcon-metadata           0.2.5                      py_0    conda-forge
colcon-output             0.2.12                     py_0    conda-forge
colcon-package-information 0.3.3                      py_0    conda-forge
colcon-package-selection  0.2.10                     py_0    conda-forge
colcon-parallel-executor  0.2.4                      py_0    conda-forge
colcon-pkg-config         0.1.0                      py_0    conda-forge
colcon-powershell         0.3.6                      py_0    conda-forge
colcon-python-setup-py    0.2.7                      py_0    conda-forge
colcon-recursive-crawl    0.2.1                      py_0    conda-forge
colcon-ros                0.3.21                     py_0    conda-forge
colcon-test-result        0.3.8                      py_0    conda-forge
collada-dom               2.5.0                hdced9d9_3    conda-forge
compilers                 1.1.3                ha770c72_0    conda-forge
conda                     4.9.2            py38h578d9bd_0    conda-forge
conda-package-handling    1.7.2            py38h8df0ef7_0    conda-forge
console_bridge            1.0.1                hc9558a2_0    conda-forge
coverage                  5.4              py38h497a2fe_0    conda-forge
cppzmq                    4.7.1                h118ccdd_1    conda-forge
cryptography              3.3.1            py38h2b97feb_1    conda-forge
cudatoolkit               10.1.243             h036e899_7    conda-forge
cudnn                     7.6.5.32             hc0a50b0_1    conda-forge
cupti                     10.1.168                      0  
curl                      7.71.1               he644dc0_8    conda-forge
cxx-compiler              1.1.3                h4bd325d_0    conda-forge
dbus                      1.13.6               hfdff14a_1    conda-forge
decorator                 4.4.2                      py_0    conda-forge
distlib                   0.3.1              pyh9f0ad1d_0    conda-forge
docutils                  0.16             py38h578d9bd_3    conda-forge
eigen                     3.3.9                h4bd325d_1    conda-forge
empy                      3.3.4              pyh9f0ad1d_1    conda-forge
expat                     2.2.10               h9c3ff4c_0    conda-forge
expat-cos6-x86_64         2.0.1                         0  
expat-cos7-x86_64         2.1.0             h9d98e8f_1104    conda-forge
fcl                       0.6.1                h8177940_2    conda-forge
ffmpeg                    4.3.1                hca11adc_2    conda-forge
flann                     1.9.1             h44f99b7_1008    conda-forge
fontconfig                2.13.1            hba837de_1004    conda-forge
fortran-compiler          1.1.3                h1990efc_0    conda-forge
freeglut                  3.2.1                h9c3ff4c_2    conda-forge
freeimage                 3.18.0               h6858f65_4    conda-forge
freetype                  2.10.4               h0708190_1    conda-forge
future                    0.18.2           py38h578d9bd_3    conda-forge
gast                      0.3.3                      py_0    conda-forge
gcc_impl_linux-64         9.3.0               h70c0ae5_18    conda-forge
gcc_linux-64              9.3.0               h7247604_29    conda-forge
gdb                       9.2              py38h615daac_5    conda-forge
gdbm                      1.18                 h0a1914f_2    conda-forge
gettext                   0.19.8.1          hf34092f_1004    conda-forge
gfortran_impl_linux-64    9.3.0               hc4a2995_18    conda-forge
gfortran_linux-64         9.3.0               ha1c937c_29    conda-forge
git                       2.30.0          pl5320h014a29a_0    conda-forge
glew                      2.1.0                h9c3ff4c_2    conda-forge
glfw                      3.3.2                h516909a_1    conda-forge
glib                      2.66.3               h58526e2_0    conda-forge
gmp                       6.2.1                h58526e2_0    conda-forge
gnutls                    3.6.13               h85f3911_1    conda-forge
google-auth               1.21.3                     py_0    conda-forge
google-auth-oauthlib      0.4.1                      py_2    conda-forge
google-pasta              0.2.0              pyh8c360ce_0    conda-forge
graphite2                 1.3.13            he1b5a44_1001    conda-forge
grpcio                    1.35.0           py38hdd6454d_0    conda-forge
gsl                       2.6                  he838d99_2    conda-forge
gst-plugins-base          1.14.5               h0935bb2_2    conda-forge
gstreamer                 1.14.5               h36ae1b5_2    conda-forge
gts                       0.7.6                h1fc3fae_2    conda-forge
gxx_impl_linux-64         9.3.0               hd87eabc_18    conda-forge
gxx_linux-64              9.3.0               h0d07fa4_29    conda-forge
gym                       0.18.0           py38h81c977d_0    conda-forge
h5py                      2.10.0          nompi_py38h7442b35_105    conda-forge
harfbuzz                  2.7.2                hb1ce69c_1    conda-forge
hdf5                      1.10.6          nompi_h6a2412b_1114    conda-forge
icu                       67.1                 he1b5a44_0    conda-forge
idna                      2.10               pyh9f0ad1d_0    conda-forge
ilmbase                   2.5.4                h780b84a_0    conda-forge
importlib-metadata        3.4.0            py38h578d9bd_0    conda-forge
iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
ipopt                     3.13.3               h7ede334_8    conda-forge
ipython                   7.20.0           py38h81c977d_2    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jasper                    1.900.1           h07fcdf6_1006    conda-forge
jedi                      0.18.0           py38h578d9bd_2    conda-forge
jpeg                      9d                   h516909a_0    conda-forge
jsoncpp                   1.9.4                h4bd325d_1    conda-forge
jxrlib                    1.1                  h516909a_2    conda-forge
keras-preprocessing       1.1.2              pyhd8ed1ab_0    conda-forge
kernel-headers_linux-64   3.10.0              h77966d4_10    conda-forge
krb5                      1.17.2               h926e7f8_0    conda-forge
lame                      3.100             h14c3975_1001    conda-forge
lcms2                     2.11                 hcbb858e_1    conda-forge
ld_impl_linux-64          2.35.1               hea4e1c9_2    conda-forge
libarchive                3.5.1                h3f442fb_1    conda-forge
libblas                   3.9.0                8_openblas    conda-forge
libcblas                  3.9.0                8_openblas    conda-forge
libccd                    2.1                  he1b5a44_1    conda-forge
libclang                  10.0.1          default_hde54327_1    conda-forge
libcurl                   7.71.1               hcdd3856_8    conda-forge
libdrm-cos6-x86_64        2.4.65               hd39d64f_0  
libdrm-cos7-x86_64        2.4.97            h9d98e8f_1104    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libevent                  2.1.10               hcdb4288_3    conda-forge
libffi                    3.2.1             he1b5a44_1007    conda-forge
libgcc-devel_linux-64     9.3.0               h7864c58_18    conda-forge
libgcc-ng                 9.3.0               h2828fa1_18    conda-forge
libgfortran-ng            9.3.0               hff62375_18    conda-forge
libgfortran5              9.3.0               hff62375_18    conda-forge
libglib                   2.66.3               hbe7bbb4_0    conda-forge
libglu                    9.0.0             he1b5a44_1001    conda-forge
libglvnd-cos7-x86_64      1.0.1             h9d98e8f_1104    conda-forge
libglvnd-glx-cos7-x86_64  1.0.1             h9d98e8f_1104    conda-forge
libgomp                   9.3.0               h2828fa1_18    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
libjpeg-turbo             2.0.5                h516909a_0    conda-forge
liblapack                 3.9.0                8_openblas    conda-forge
liblapacke                3.9.0                8_openblas    conda-forge
libllvm10                 10.0.1               he513fc3_3    conda-forge
libmatio                  1.5.19               h2f74573_0    conda-forge
libnghttp2                1.43.0               h812cca2_0    conda-forge
libode                    0.16.2               h9c3ff4c_3    conda-forge
libopenblas               0.3.12          pthreads_h4812303_1    conda-forge
libopencv                 4.5.1            py38h703c3c0_0    conda-forge
libpng                    1.6.37               hed695b0_2    conda-forge
libpq                     12.3                 hfd2b0eb_3    conda-forge
libprotobuf               3.14.0               h780b84a_0    conda-forge
libraw                    0.20.2               hefcb256_0    conda-forge
libselinux-cos6-x86_64    2.0.94               hc7b3062_0  
libselinux-cos7-x86_64    2.5               h9d98e8f_1104    conda-forge
libsepol-cos6-x86_64      2.0.41               h6e2433f_0  
libsepol-cos7-x86_64      2.5               h9d98e8f_1104    conda-forge
libsodium                 1.0.18               h516909a_1    conda-forge
libsolv                   0.7.17               h780b84a_0    conda-forge
libssh2                   1.9.0                hab1572f_5    conda-forge
libstdcxx-devel_linux-64  9.3.0               hb016644_18    conda-forge
libstdcxx-ng              9.3.0               h6de172a_18    conda-forge
libtiff                   4.2.0                hdc55705_0    conda-forge
libuuid                   2.32.1            h14c3975_1000    conda-forge
libuv                     1.40.0               hd18ef5c_0    conda-forge
libwebp-base              1.2.0                h7f98852_0    conda-forge
libx11-common-cos6-x86_64 1.6.4                h023ea50_0  
libx11-common-cos7-x86_64 1.6.7             h9d98e8f_1104    conda-forge
libx11-cos6-x86_64        1.6.4                h64a1553_0  
libx11-cos7-x86_64        1.6.7             h9d98e8f_1104    conda-forge
libxau-cos6-x86_64        1.0.6                h4888106_0  
libxau-cos7-x86_64        1.0.8             h9d98e8f_1104    conda-forge
libxcb                    1.13              h7f98852_1003    conda-forge
libxcb-cos6-x86_64        1.12                 h6fd0490_0  
libxcb-cos7-x86_64        1.13              h9d98e8f_1104    conda-forge
libxdamage-cos6-x86_64    1.1.3                h8e310ee_0  
libxext-cos6-x86_64       1.3.3                hc47956f_0  
libxext-cos7-x86_64       1.3.3             h9d98e8f_1104    conda-forge
libxfixes-cos6-x86_64     5.0.3                h3a64028_0  
libxfixes-cos7-x86_64     5.0.3             h9d98e8f_1104    conda-forge
libxkbcommon              0.10.0               he1b5a44_0    conda-forge
libxml2                   2.9.10               h68273f3_2    conda-forge
libxrandr-cos7-x86_64     1.5.1             h9d98e8f_1104    conda-forge
libxrandr-devel-cos7-x86_64 1.5.1             h9d98e8f_1104    conda-forge
libxslt                   1.1.33               hf705e74_1    conda-forge
libxxf86vm-cos6-x86_64    1.1.3                h3cd9653_0  
libxxf86vm-cos7-x86_64    1.1.4             h9d98e8f_1104    conda-forge
libzip                    1.7.3                he9f05b3_0    conda-forge
lxml                      4.6.2            py38hf1fe3a4_1    conda-forge
lz4-c                     1.9.3                h9c3ff4c_0    conda-forge
lzo                       2.10              h516909a_1000    conda-forge
make                      4.3                  hd18ef5c_1    conda-forge
mamba                     0.7.12           py38h2aa5da1_0    conda-forge
markdown                  3.3.3              pyh9f0ad1d_0    conda-forge
mesa-khr-devel-cos7-x86_64 18.3.4            h9d98e8f_1104    conda-forge
mesa-libgl-cos6-x86_64    11.0.7               h045e36e_0  
mesa-libgl-cos7-x86_64    18.3.4            h9d98e8f_1104    conda-forge
mesa-libgl-devel-cos7-x86_64 18.3.4            h9d98e8f_1104    conda-forge
mesa-libglapi-cos7-x86_64 18.3.4            h9d98e8f_1104    conda-forge
mesalib                   18.3.1               h590aaf7_0    conda-forge
metis                     5.1.0             he1b5a44_1006    conda-forge
more-itertools            8.6.0              pyhd8ed1ab_0    conda-forge
mumps-include             5.2.1               ha770c72_10    conda-forge
mumps-seq                 5.2.1               h47a8eb5_10    conda-forge
mysql-common              8.0.21                        2    conda-forge
mysql-libs                8.0.21               hf3661c5_2    conda-forge
ncurses                   6.2                  h58526e2_4    conda-forge
nettle                    3.6                  he412f7d_0    conda-forge
ninja                     1.10.2               h4bd325d_0    conda-forge
nlopt                     2.7.0            py38hd6d24a2_0    conda-forge
nspr                      4.29                 he1b5a44_1    conda-forge
nss                       3.61                 hb5efdd6_0    conda-forge
numpy                     1.20.0           py38h18fd61f_0    conda-forge
oauthlib                  3.0.1                      py_0    conda-forge
octomap                   1.9.5                hc9558a2_1    conda-forge
opencv                    4.5.1            py38h578d9bd_0    conda-forge
openexr                   2.5.4                hf817b99_0    conda-forge
openh264                  2.1.1                h780b84a_0    conda-forge
openjpeg                  2.3.1                hf7af979_3    conda-forge
openscenegraph            3.6.5               h605fd04_11    conda-forge
openssl                   1.1.1i               h7f98852_0    conda-forge
opt_einsum                3.3.0                      py_0    conda-forge
packaging                 20.9               pyh44b312d_0    conda-forge
parso                     0.8.1              pyhd8ed1ab_0    conda-forge
pcre                      8.44                 he1b5a44_0    conda-forge
perl                      5.32.0               h36c2ea0_0    conda-forge
pexpect                   4.8.0            py38h32f6830_1    conda-forge
pickleshare               0.7.5           py38h32f6830_1002    conda-forge
pip                       21.0.1             pyhd8ed1ab_0    conda-forge
pixman                    0.38.0            h516909a_1003    conda-forge
pkg-config                0.29.2            h516909a_1008    conda-forge
pluggy                    0.13.1           py38h578d9bd_4    conda-forge
portaudio                 19.6.0               h1398938_3    conda-forge
prompt-toolkit            3.0.14             pyha770c72_0    conda-forge
protobuf                  3.14.0           py38h709712a_1    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pugixml                   1.11.4               h9c3ff4c_0    conda-forge
py                        1.10.0             pyhd3deb0d_0    conda-forge
py-opencv                 4.5.1            py38h81c977d_0    conda-forge
pyasn1                    0.4.8                      py_0    conda-forge
pyasn1-modules            0.2.7                      py_0    conda-forge
pybind11                  2.6.2            py38h1fd1430_0    conda-forge
pybind11-global           2.6.2            py38h1fd1430_0    conda-forge
pycosat                   0.6.3           py38h497a2fe_1006    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pyglet                    1.5.14           py38h578d9bd_1    conda-forge
pygments                  2.7.4              pyhd8ed1ab_0    conda-forge
pyjwt                     2.0.1              pyhd8ed1ab_0    conda-forge
pyopenssl                 20.0.1             pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pysocks                   1.7.1            py38h578d9bd_3    conda-forge
pytest                    6.2.2            py38h578d9bd_0    conda-forge
pytest-cov                2.11.1             pyh44b312d_0    conda-forge
pytest-repeat             0.8.0                      py_0    conda-forge
pytest-rerunfailures      9.1.1                      py_0    conda-forge
pytest-runner             5.2                        py_0    conda-forge
python                    3.8.0                h357f687_5    conda-forge
python-dateutil           2.8.1                      py_0    conda-forge
python_abi                3.8                      1_cp38    conda-forge
pyyaml                    5.4.1            py38h497a2fe_0    conda-forge
qt                        5.12.9               h1f2b2cb_0    conda-forge
readline                  8.0                  he28a2e2_2    conda-forge
reproc                    14.2.1               h36c2ea0_0    conda-forge
reproc-cpp                14.2.1               h58526e2_0    conda-forge
requests                  2.25.1             pyhd3deb0d_0    conda-forge
requests-oauthlib         1.3.0              pyh9f0ad1d_0    conda-forge
rhash                     1.4.1                h7f98852_0    conda-forge
rsa                       4.7                pyhd3deb0d_0    conda-forge
ruamel_yaml               0.15.80         py38h497a2fe_1004    conda-forge
ruby                      2.7.2                h0b71e51_2    conda-forge
scipy                     1.6.0            py38hb2138dd_0    conda-forge
scotch                    6.0.9                he1efa8a_1    conda-forge
sdl                       1.2.15               he1b5a44_1    conda-forge
sdl2                      2.0.12               h58526e2_1    conda-forge
setuptools                49.6.0           py38h578d9bd_3    conda-forge
six                       1.15.0             pyh9f0ad1d_0    conda-forge
sqlite                    3.34.0               h74cdb3f_0    conda-forge
swig                      4.0.2                h9c3ff4c_1    conda-forge
sysroot_linux-64          2.17                h77966d4_10    conda-forge
tensorboard               2.4.1              pyhd8ed1ab_0    conda-forge
tensorboard-plugin-wit    1.8.0              pyh44b312d_0    conda-forge
tensorflow                2.2.0           gpu_py38hb782248_0  
tensorflow-base           2.2.0           gpu_py38h83e3d50_0  
tensorflow-estimator      2.4.0              pyh9656e83_0    conda-forge
tensorflow-gpu            2.2.0                h0d30ee6_0  
termcolor                 1.1.0                      py_2    conda-forge
tinyxml                   2.6.2                h4bd325d_2    conda-forge
tinyxml2                  8.0.0                he1b5a44_1    conda-forge
tk                        8.6.10               hed695b0_1    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tqdm                      4.56.0             pyhd8ed1ab_0    conda-forge
traitlets                 5.0.5                      py_0    conda-forge
urdfdom                   2.3.3                hc9558a2_0    conda-forge
urdfdom_headers           1.0.5                hc9558a2_2    conda-forge
urllib3                   1.26.3             pyhd8ed1ab_0    conda-forge
vcstool                   0.2.15             pyh9f0ad1d_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
werkzeug                  1.0.1              pyh9f0ad1d_0    conda-forge
wheel                     0.36.2             pyhd3deb0d_0    conda-forge
wrapt                     1.12.1           py38h497a2fe_3    conda-forge
x264                      1!161.3030           h7f98852_0    conda-forge
xorg-fixesproto           5.0               h14c3975_1002    conda-forge
xorg-inputproto           2.3.2             h14c3975_1002    conda-forge
xorg-kbproto              1.0.7             h14c3975_1002    conda-forge
xorg-libice               1.0.10               h516909a_0    conda-forge
xorg-libsm                1.2.3             h84519dc_1000    conda-forge
xorg-libx11               1.6.12               h516909a_0    conda-forge
xorg-libxau               1.0.9                h14c3975_0    conda-forge
xorg-libxaw               1.0.13            h516909a_1002    conda-forge
xorg-libxcursor           1.2.0                h516909a_0    conda-forge
xorg-libxdmcp             1.1.3                h516909a_0    conda-forge
xorg-libxext              1.3.4                h516909a_0    conda-forge
xorg-libxfixes            5.0.3             h516909a_1004    conda-forge
xorg-libxi                1.7.10               h516909a_0    conda-forge
xorg-libxinerama          1.1.4             hf484d3e_1000    conda-forge
xorg-libxmu               1.1.3                h516909a_0    conda-forge
xorg-libxpm               3.5.13               h516909a_0    conda-forge
xorg-libxrandr            1.5.2                h516909a_1    conda-forge
xorg-libxrender           0.9.10            h516909a_1002    conda-forge
xorg-libxt                1.1.5             h516909a_1003    conda-forge
xorg-randrproto           1.5.0             h516909a_1001    conda-forge
xorg-renderproto          0.11.1            h14c3975_1002    conda-forge
xorg-xextproto            7.3.0             h14c3975_1002    conda-forge
xorg-xproto               7.0.31            h14c3975_1007    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
yaml                      0.2.5                h516909a_0    conda-forge
zeromq                    4.3.4                h9c3ff4c_0    conda-forge
zipp                      3.4.0                      py_0    conda-forge
zlib                      1.2.11            h516909a_1010    conda-forge
zstd                      1.4.8                ha95c52a_1    conda-forge
zziplib                   0.13.69              hed695b0_1    conda-forge

In any case, so far this was a kind of successful experiment. Despite the few hacks, I managed to compile:

  1. Complete colcon Dome environment against conda-forge packages + dart from sources (could be maybe avoided) + ogre from sources.
  2. robotology-superbuild that includes idyntree (also python), blf (also python) and casadi (I enabled python, qpoases and osqp support). Note that conda-forge's casadi only has the ipopt interface enabled (conda install will lead to a version without solvers conda-forge/casadi-feedstock#21, adding qpoases and blocksqp conda-forge/casadi-feedstock#22).
  3. Installed tensorflow with gpu support.
  4. gym-ignition.

I also need ray and rllib, however I don't think it would be a problem. In earlier experiments I tried to install it from conda-forge together with tensorflow from conda's default channel and they seemed working fine.

@diegoferigo
Copy link
Member Author

diegoferigo commented Feb 8, 2021

I'm trying to prepare a docker image containing what I've got so far, but now I'm stuck with the following error. Comparing the conda packages inside the docker image and what posted in the comment above did not show anything relevant.

ignition-rendering4 compilation error
(/conda) root@ff903e9f5fd3:/usr/local/src/workspace/build/ignition-rendering4# ninja                                                                                       
[3/5] Building CXX object ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRenderEngine.cc.o                                                                           
FAILED: ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRenderEngine.cc.o                                                                                             
/conda/bin/x86_64-conda-linux-gnu-c++ -Dignition_rendering4_ogre_EXPORTS -DIGN_RENDERING_RESOURCE_PATH=\"/usr/local/src/workspace/install/share/ignition/ignition-rendering
4\" -DOGRE_RESOURCE_PATH=\"/conda/lib/OGRE\" -I/usr/local/src/workspace/src/ign-rendering/include -Iinclude -I/usr/local/src/workspace/src/ign-rendering/ogre/include -Iogr
e/include -Icore/include -isystem /usr/local/src/workspace/install/include/ignition/common3 -isystem /conda/include/uuid -isystem /usr/local/src/workspace/install/include/
ignition/math6 -isystem /usr/local/src/workspace/install/include/ignition/plugin1 -isystem /usr/local/src/workspace/install/include/ignition/cmake2 -isystem /conda/include
/OGRE -isystem /conda/include/OGRE/RenderSystems/GL -isystem /conda/include/OGRE/Paging -isystem /conda/include/OGRE/RTShaderSystem -isystem /conda/include/OGRE/Terrain -i
system /conda/include/OGRE/Overlay -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -
fno-plt -O2 -ffunction-sections -pipe -isystem /conda/include -O2 -g -DNDEBUG  -Wall -Wextra -Wno-long-long -Wno-unused-value -Wfloat-equal -Wshadow -Winit-self -Wswitch-d
efault -Wmissing-include-dirs -pedantic -UNDEBUG -fPIC -msse -msse2 -mfpmath=sse -msse3 -mssse3 -msse4.1 -msse4.2 -fPIC -I/conda/include/uuid -pthread -I/conda/include/OGR
E/RTShaderSystem -I/conda/include -I/conda/include/OGRE -I/conda/include/OGRE/Terrain -I/conda/include/OGRE/Paging -I/conda/include/OGRE/Overlay -MD -MT ogre/src/CMakeFile
s/ignition-rendering4-ogre.dir/OgreRenderEngine.cc.o -MF ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRenderEngine.cc.o.d -o ogre/src/CMakeFiles/ignition-rendering
4-ogre.dir/OgreRenderEngine.cc.o -c /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderEngine.cc

In file included from /conda/x86_64-conda-linux-gnu/sysroot/usr/include/GL/glx.h:333,                                                                                      
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderEngine.cc:22:                                                                          
/conda/x86_64-conda-linux-gnu/sysroot/usr/include/GL/glxext.h:522:143: error: 'GLintptr' has not been declared                                                             
  522 | typedef void ( *PFNGLXCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, 
GLintptr writeOffset, GLsizeiptr size);                                                                                                                                    
      |                                                                                                                                               ^~~~~~~~             
/conda/x86_64-conda-linux-gnu/sysroot/usr/include/GL/glxext.h:522:164: error: 'GLintptr' has not been declared                                                             
  522 | typedef void ( *PFNGLXCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, 
GLintptr writeOffset, GLsizeiptr size);                                                                                                                                    
      |                                                                                                                                                                    
^~~~~~~~                                                                                                                                                                   
/conda/x86_64-conda-linux-gnu/sysroot/usr/include/GL/glxext.h:522:186: error: 'GLsizeiptr' has not been declared                                                           
  522 | typedef void ( *PFNGLXCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);                                                                                                                                    
      |                                                                                                                                                                    
                      ^~~~~~~~~~                                                                                                                                           
/conda/x86_64-conda-linux-gnu/sysroot/usr/include/GL/glxext.h:523:148: error: 'GLintptr' has not been declared
  523 | typedef void ( *PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOff
set, GLintptr writeOffset, GLsizeiptr size);
      |                                                                                                                                                    ^~~~~~~~
/conda/x86_64-conda-linux-gnu/sysroot/usr/include/GL/glxext.h:523:169: error: 'GLintptr' has not been declared
  523 | typedef void ( *PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOff
set, GLintptr writeOffset, GLsizeiptr size);
      |                                   
     ^~~~~~~~
/conda/x86_64-conda-linux-gnu/sysroot/usr/include/GL/glxext.h:523:191: error: 'GLsizeiptr' has not been declared
  523 | typedef void ( *PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOff
set, GLintptr writeOffset, GLsizeiptr size);
      |                                   
                           ^~~~~~~~~~
In file included from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:44,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderEngine.cc:40:
/conda/include/OGRE/OgreVector3.h:2:62: note: #pragma message: /conda/include/OGRE/OgreVector3.h is deprecated, migrate to Ogre.h
    2 | #pragma message( __FILE__ " is deprecated, migrate to Ogre.h")
      |                                                              ^
ninja: build stopped: subcommand failed.

This is happening with ogre from conda-forge. I tried compiling ogre from source and install into the conda environment as I did last time but I get the same error.

@diegoferigo
Copy link
Member Author

diegoferigo commented Feb 8, 2021

Weird, it seems that commenting out the include of /conda/x86_64-conda-linux-gnu/sysroot/usr/include/GL/glx.h:333 solves the problem. The compilation succeeds. Here below the snippet:

#ifndef GLX_GLXEXT_LEGACY 

#include <GL/glxext.h>  /* This is line 333 */

#endif /* GLX_GLXEXT_LEGACY */

What I don't yet understand is what could have defined GLX_GLXEXT_LEGACY in my previous setup (I proceeded step-by-step by hand in a clean docker container) wrt my current Dockerfile.

@traversaro
Copy link
Member

Related discussion in the ignition-rendering recipe PR : conda-forge/staged-recipes#13677 (comment) .

@diegoferigo
Copy link
Member Author

Thanks for the link, the problem is the same. I didn't get if a solution was found.

In the meantime, I paste here the Dockerfile I got. I'll commit it somewhere, not sure yet where.

Dockerfile
ARG from=nvidia/cuda:11.1.1-cudnn8-runtime-ubuntu20.04
FROM ${from}

# Change default shell to bash. This is effective only in the Dockerfile.
SHELL ["/bin/bash", "-i", "-c"]

# Setup locales and timezone
ARG TZ=Europe/Rome
ARG DEBIAN_FRONTEND=noninteractive
RUN rm -f /etc/localtime &&\
    ln -s /usr/share/zoneinfo/"${TZ}" /etc/localtime &&\
    apt-get update &&\
    apt-get install -y --no-install-recommends locales locales-all tzdata &&\
    rm -rf /var/lib/apt/lists/*

# Utilities
RUN apt-get update &&\
    apt-get install -y --no-install-recommends \
        software-properties-common \
        apt-transport-https \
        apt-utils \
        wget \
        nano \
        bash-completion \
        gnupg2 \
        colordiff \
        curl \
        zip \
        unzip \
        lsof \
        net-tools \
        iputils-ping \
        strace \
        less \
        &&\
    rm -rf /var/lib/apt/lists/*

ENV CONDA_PREFIX=/conda
ARG CONDA_PYTHON_VERSION=3.8
ENV MAMBA_ROOT_PREFIX=$CONDA_PREFIX/.mamba

# Install micromamba and create conda environment
RUN cd /usr/local &&\
    wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest \
        | tar -xvj bin/micromamba &&\
    eval "$(micromamba shell hook -s bash)" &&\    
    micromamba create -y -p $CONDA_PREFIX python==$CONDA_PYTHON_VERSION mamba -c conda-forge &&\
    micromamba activate $CONDA_PREFIX &&\
    conda config --system --add channels conda-forge &&\
    conda config --system --set channel_priority strict

# Enable by default the conda environment for non-root users
RUN echo 'function activate_conda() {' >> /etc/bash.bashrc &&\
    echo '  eval "$(micromamba shell hook -s bash)"' >> /etc/bash.bashrc &&\
    echo '  micromamba activate $CONDA_PREFIX' >> /etc/bash.bashrc &&\
    #echo '  export CMAKE_PREFIX_PATH=$CONDA_PREFIX:$CMAKE_PREFIX_PATH' >> /etc/bash.bashrc &&\
    echo '}' >> /etc/bash.bashrc &&\
    echo '[[ $(id -u) -gt 0 ]] && activate_conda' >> /etc/bash.bashrc

# Install buildchain
RUN activate_conda &&\
    mamba install -y \
        compilers cmake make pkg-config ninja pybind11 git

# Default directory with sources
ARG SRC_DIR=/usr/local/src

# Install dartsim
RUN activate_conda &&\
    mamba install -y \
        eigen assimp libccd boost openscenegraph nlopt ipopt bullet libode octomap flann tinyxml2 \
        urdfdom xorg-libxi xorg-libxmu freeglut fcl &&\
    cd $SRC_DIR &&\
    git clone https://github.com/diegoferigo/dart &&\
    mkdir -p dart/build && cd dart/build &&\
    cmake .. \
        -GNinja \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
        -DHAVE_BULLET:BOOL=ON \
        -DHAVE_DOXYGEN:BOOL=OFF \
        -DHAVE_ODE:BOOL=ON \
    &&\
    ninja install

# Ignition Robotics
RUN activate_conda &&\
    mamba install -y \
        vcstool colcon-common-extensions eigen freeimage gts glib ffmpeg \
        ruby tinyxml2 tinyxml protobuf urdfdom zeromq cppzmq \
        ogre \
        jsoncpp libzip qt \
        mesa-libgl-devel-cos7-x86_64 libglu
#RUN activate_conda &&\
#    mamba install -y libxrandr-devel-cos7-x86_64 xorg-libxrandr &&\
#    cd $SRC_DIR &&\
#    git clone --depth=1 https://github.com/OGRECave/ogre &&\
#    mkdir -p ogre/build && cd ogre/build &&\
#    cmake .. \
#        -GNinja \
#        -DCMAKE_BUILD_TYPE=Release \
#        -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
#        -DOGRE_BUILD_COMPONENT_CSHARP=OFF \
#        -DOGRE_BUILD_COMPONENT_PYTHON=OFF \
#    &&\
#    ninja install
RUN activate_conda &&\
    cd $SRC_DIR &&\
    mkdir -p workspace/src && cd workspace/src &&\
    wget -q https://raw.githubusercontent.com/ignition-tooling/gazebodistro/master/collection-dome.yaml &&\
    vcs import < collection-dome.yaml &&\
    colcon graph
RUN activate_conda &&\
    sed -i "s|#include <GL/glxext.h>|//#include <GL/glxext.h>|g" /conda/x86_64-conda-linux-gnu/sysroot/usr/include/GL/glx.h &&\
    cd $SRC_DIR/workspace &&\
    colcon build \
        --merge-install \
        --cmake-args \
        -GNinja \
        -DBUILD_TESTING:BOOL=OFF \
        -DCMAKE_BUILD_TYPE=Release \
        &&\
    echo "[[ -f $SRC_DIR/workspace/install/setup.sh ]] && source $SRC_DIR/workspace/install/setup.sh" >> /etc/bash.bashrc
ENV IGN_GAZEBO_PHYSICS_ENGINE_PATH=$SRC_DIR/workspace/install/lib/ign-physics-3/engine-plugins

# Superbuild
RUN activate_conda &&\
    mamba install -y \
        ace \
        asio \
        boost \
        eigen \
        glew \
        glfw \
        gsl \
        ipopt \
        libjpeg-turbo \
        libmatio \
        libode \
        libxml2 \
        opencv \
        pkg-config \
        portaudio \
        qt \
        sdl \
        sdl2 \
        sqlite \
        tinyxml \
        jsoncpp \
        &&\
    mamba install -y \
        expat-cos7-x86_64 \
        freeglut \
        libselinux-cos7-x86_64 \
        libxau-cos7-x86_64 \
        libxcb-cos7-x86_64 \
        libxdamage-cos7-x86_64 \
        libxext-cos7-x86_64 \
        libxfixes-cos7-x86_64 \
        libxxf86vm-cos7-x86_64 \
        mesalib \
        mesa-libgl-cos7-x86_64
RUN activate_conda &&\
    cd $SRC_DIR &&\
    git clone https://github.com/robotology/robotology-superbuild &&\
    mkdir -p robotology-superbuild/build && cd robotology-superbuild/build &&\
    cmake \
          -GNinja \
          -DCMAKE_BUILD_TYPE=Release \
          -DROBOTOLOGY_ENABLE_CORE:BOOL=ON \
          -DROBOTOLOGY_ENABLE_DYNAMICS:BOOL=ON \
          -DROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS:BOOL=ON \
          -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=OFF \
          -DROBOTOLOGY_ENABLE_HUMAN_DYNAMICS:BOOL=OFF \
          -DROBOTOLOGY_USES_GAZEBO:BOOL=OFF \
          -DROBOTOLOGY_USES_PYTHON:BOOL=ON \
          -DROBOTOLOGY_USES_OCTAVE:BOOL=OFF \
          -DROBOTOLOGY_USES_MATLAB:BOOL=OFF \
          -DNON_INTERACTIVE_BUILD:BOOL=ON \
          -DBUILD_TESTING:BOOL=OFF \
          -DYCM_DISABLE_SYSTEM_PACKAGES:BOOL=ON \
          -DROBOTOLOGY_PROJECT_TAGS=Stable \
          -DYCM_EP_ADDITIONAL_CMAKE_ARGS="-DWITH_LAPACK=ON -DWITH_MUMPS=ON -DWITH_OSQP=ON -DWITH_PYTHON=ON -DWITH_PYTHON3=ON -DPYTHON_PREFIX=$SRC_DIR/robotology-superbuild/build/install/lib/python3/site-packages -DWITH_QPOASES=ON" \
          .. &&\
    ninja &&\
    sed -i 's/_object/object/g' $SRC_DIR/robotology-superbuild/build/install/lib/python3/site-packages/casadi/casadi.py &&\
    echo 'export PYTHONPATH=$PYTHONPATH:/usr/local/src/robotology-superbuild/build/install/lib/python3.8/site-packages/' >> /etc/bash.bashrc &&\
    echo "source $SRC_DIR/robotology-superbuild/build/install/share/robotology-superbuild/setup.sh" >> /etc/bash.bashrc

RUN activate_conda &&\
    mamba install -y \
        ipython \
        tensorflow-gpu \
        scipy \
        numpy \
        gym \
        lxml \
        matplotlib \
        setuptools_scm \
        ray-rllib ray-tune ray-dashboard
RUN activate_conda &&\
    cd $SRC_DIR &&\
    git clone https://github.com/robotology/gym-ignition &&\
    mkdir gym-ignition/build && cd gym-ignition/build &&\
    cmake .. \
        -GNinja \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
        &&\
    ninja install

@traversaro
Copy link
Member

Thanks for the link, the problem is the same. I didn't get if a solution was found.

No, it was just passed the -DGLX_GLXEXT_LEGACY flag to the compiler: https://github.com/conda-forge/libignition-rendering4-feedstock/blob/6f273d6430be1812e2037bb6e976b36aefd5f9ca/recipe/build.sh#L6 .

@diegoferigo
Copy link
Member Author

diegoferigo commented Feb 9, 2021

I managed to reproduce the ogre compilation error I reported above in #279 (comment):

This error occurs when ogre==1.10.12 is installed in the conda workspace. Updating ogre to 1.12.10 (the only other available version in conda-forge) does not create problems while building ign-rendering4, but I get the runtime error reported in gazebosim/gazebo-classic#2700 when opening the gui installed by igni-gui4 (from colcon).

The only alternative I didn't yet check is compiling and installing ogre 1.9.1 from sources. This should match the same configuration with ogre1 of the ignition packages provided in the osrf's ppa.

ogre compilation error
workspace/build/ignition-rendering4 via v3.19.4 via 🅒 /conda 
✦  ❯ ninja
[3/19] Building CXX object ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreMaterialSwitcher.cc.o
FAILED: ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreMaterialSwitcher.cc.o 
/conda/bin/x86_64-conda-linux-gnu-c++ -DOGRE_VERSION_LT_1_12_0 -Dignition_rendering4_ogre_EXPORTS -I/usr/local/src/workspace/src/ign-rendering/include -Iinclude -I/usr/local/src/workspace/src/ign-rendering/ogre/include -Iogre/include -Icore/include -isystem /usr/local/src/workspace/install/include/ignition/common3 -isystem /conda/include/uuid -isystem /usr/local/src/workspace/install/include/ignition/math6 -isystem /usr/local/src/workspace/install/include/ignition/plugin1 -isystem /usr/local/src/workspace/install/include/ignition/cmake2 -isystem /conda/include/OGRE -isystem /conda/include/OGRE/RenderSystems/GL -isystem /conda/include/OGRE/RTShaderSystem -isystem /conda/include/OGRE/Terrain -isystem /conda/include/OGRE/Paging -isystem /conda/include/OGRE/Overlay -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /conda/include -O3 -DNDEBUG  -Wall -Wextra -Wno-long-long -Wno-unused-value -Wfloat-equal -Wshadow -Winit-self -Wswitch-default -Wmissing-include-dirs -pedantic  -fPIC -msse -msse2 -mfpmath=sse -msse3 -mssse3 -msse4.1 -msse4.2 -fPIC -I/conda/include/uuid -pthread -I/conda/include/OGRE/RTShaderSystem -I/conda/include -I/conda/include/OGRE -I/conda/include/OGRE/Terrain -I/conda/include/OGRE/Paging -I/conda/include/OGRE/Overlay -MD -MT ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreMaterialSwitcher.cc.o -MF ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreMaterialSwitcher.cc.o.d -o ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreMaterialSwitcher.cc.o -c /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreMaterialSwitcher.cc
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreMaterialSwitcher.cc: In member function 'virtual Ogre::Technique* ignition::rendering::v4::OgreMaterialSwitcher::handleSchemeNotFound(uint16_t, const String&, Ogre::Material*, uint16_t, const Ogre::Renderable*)':
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreMaterialSwitcher.cc:86:53: error: no matching function for call to 'static_pointer_cast<Ogre::Material>(Ogre::ResourcePtr&)'
   86 |         std::static_pointer_cast<Ogre::Material>(res);
      |                                                     ^
In file included from /conda/x86_64-conda-linux-gnu/include/c++/9.3.0/bits/shared_ptr.h:52,
                 from /conda/x86_64-conda-linux-gnu/include/c++/9.3.0/memory:81,
                 from /usr/local/src/workspace/install/include/ignition/common3/ignition/common/Util.hh:21,
                 from /usr/local/src/workspace/install/include/ignition/common3/ignition/common/Console.hh:25,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreMaterialSwitcher.cc:18:
/conda/x86_64-conda-linux-gnu/include/c++/9.3.0/bits/shared_ptr_base.h:1532:5: note: candidate: 'template<class _Tp, class _Tp1, __gnu_cxx::_Lock_policy _Lp> std::__shared_ptr<_Tp1, _Lp> std::static_pointer_cast(const std::__shared_ptr<_Tp2, _Lp>&)'
 1532 |     static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
      |     ^~~~~~~~~~~~~~~~~~~
/conda/x86_64-conda-linux-gnu/include/c++/9.3.0/bits/shared_ptr_base.h:1532:5: note:   template argument deduction/substitution failed:
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreMaterialSwitcher.cc:86:53: note:   'Ogre::ResourcePtr' {aka 'Ogre::SharedPtr<Ogre::Resource>'} is not derived from 'const std::__shared_ptr<_Tp2, _Lp>'
   86 |         std::static_pointer_cast<Ogre::Material>(res);
      |                                                     ^
In file included from /conda/x86_64-conda-linux-gnu/include/c++/9.3.0/memory:81,
                 from /usr/local/src/workspace/install/include/ignition/common3/ignition/common/Util.hh:21,
                 from /usr/local/src/workspace/install/include/ignition/common3/ignition/common/Console.hh:25,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreMaterialSwitcher.cc:18:
/conda/x86_64-conda-linux-gnu/include/c++/9.3.0/bits/shared_ptr.h:491:5: note: candidate: 'template<class _Tp, class _Up> std::shared_ptr<_Tp> std::static_pointer_cast(const std::shared_ptr<_Tp>&)'
  491 |     static_pointer_cast(const shared_ptr<_Up>& __r) noexcept
      |     ^~~~~~~~~~~~~~~~~~~
/conda/x86_64-conda-linux-gnu/include/c++/9.3.0/bits/shared_ptr.h:491:5: note:   template argument deduction/substitution failed:
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreMaterialSwitcher.cc:86:53: note:   'Ogre::ResourcePtr' {aka 'Ogre::SharedPtr<Ogre::Resource>'} is not derived from 'const std::shared_ptr<_Tp>'
   86 |         std::static_pointer_cast<Ogre::Material>(res);
      |                                                     ^
[4/19] Building CXX object ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRTShaderSystem.cc.o
FAILED: ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRTShaderSystem.cc.o 
/conda/bin/x86_64-conda-linux-gnu-c++ -DOGRE_VERSION_LT_1_12_0 -Dignition_rendering4_ogre_EXPORTS -DIGN_RENDERING_RESOURCE_PATH=\"/usr/local/src/workspace/install/share/ignition/ignition-rendering4\" -DOGRE_RESOURCE_PATH=\"/conda/lib/OGRE\" -I/usr/local/src/workspace/src/ign-rendering/include -Iinclude -I/usr/local/src/workspace/src/ign-rendering/ogre/include -Iogre/include -Icore/include -isystem /usr/local/src/workspace/install/include/ignition/common3 -isystem /conda/include/uuid -isystem /usr/local/src/workspace/install/include/ignition/math6 -isystem /usr/local/src/workspace/install/include/ignition/plugin1 -isystem /usr/local/src/workspace/install/include/ignition/cmake2 -isystem /conda/include/OGRE -isystem /conda/include/OGRE/RenderSystems/GL -isystem /conda/include/OGRE/RTShaderSystem -isystem /conda/include/OGRE/Terrain -isystem /conda/include/OGRE/Paging -isystem /conda/include/OGRE/Overlay -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /conda/include -O3 -DNDEBUG  -Wall -Wextra -Wno-long-long -Wno-unused-value -Wfloat-equal -Wshadow -Winit-self -Wswitch-default -Wmissing-include-dirs -pedantic  -fPIC -msse -msse2 -mfpmath=sse -msse3 -mssse3 -msse4.1 -msse4.2 -fPIC -I/conda/include/uuid -pthread -I/conda/include/OGRE/RTShaderSystem -I/conda/include -I/conda/include/OGRE -I/conda/include/OGRE/Terrain -I/conda/include/OGRE/Paging -I/conda/include/OGRE/Overlay -MD -MT ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRTShaderSystem.cc.o -MF ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRTShaderSystem.cc.o.d -o ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRTShaderSystem.cc.o -c /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRTShaderSystem.cc
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRTShaderSystem.cc: In member function 'void ignition::rendering::v4::OgreRTShaderSystem::ApplyShadows(ignition::rendering::v4::OgreScenePtr)':
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRTShaderSystem.cc:613:32: error: no match for 'operator==' (operand types are 'Ogre::ShadowCameraSetupPtr' {aka 'Ogre::SharedPtr<Ogre::ShadowCameraSetup>'} and 'std::nullptr_t')
  613 |   if (this->dataPtr->pssmSetup == nullptr)
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from /conda/include/OGRE/OgreMemoryAllocatorConfig.h:188,
                 from /conda/include/OGRE/OgrePrerequisites.h:377,
                 from /conda/include/OGRE/Ogre.h:31,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreRenderEngine.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRTShaderSystem.cc:32:
/conda/include/OGRE/OgreMemorySTLAllocator.h:184:17: note: candidate: 'template<class T, class T2, class P> bool Ogre::operator==(const Ogre::STLAllocator<T, P>&, const Ogre::STLAllocator<T2, P>&)'
  184 |     inline bool operator==(STLAllocator<T,P> const&,
      |                 ^~~~~~~~
/conda/include/OGRE/OgreMemorySTLAllocator.h:184:17: note:   template argument deduction/substitution failed:
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRTShaderSystem.cc:613:35: note:   'Ogre::ShadowCameraSetupPtr' {aka 'Ogre::SharedPtr<Ogre::ShadowCameraSetup>'} is not derived from 'const Ogre::STLAllocator<T, P>'
  613 |   if (this->dataPtr->pssmSetup == nullptr)
      |                                   ^~~~~~~
In file included from /conda/include/OGRE/OgreMemoryAllocatorConfig.h:188,
                 from /conda/include/OGRE/OgrePrerequisites.h:377,
                 from /conda/include/OGRE/Ogre.h:31,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreRenderEngine.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRTShaderSystem.cc:32:
/conda/include/OGRE/OgreMemorySTLAllocator.h:194:17: note: candidate: 'template<class T, class P, class OtherAllocator> bool Ogre::operator==(const Ogre::STLAllocator<T, P>&, const OtherAllocator&)'
  194 |     inline bool operator==(STLAllocator<T,P> const&,
      |                 ^~~~~~~~
/conda/include/OGRE/OgreMemorySTLAllocator.h:194:17: note:   template argument deduction/substitution failed:
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRTShaderSystem.cc:613:35: note:   'Ogre::ShadowCameraSetupPtr' {aka 'Ogre::SharedPtr<Ogre::ShadowCameraSetup>'} is not derived from 'const Ogre::STLAllocator<T, P>'
  613 |   if (this->dataPtr->pssmSetup == nullptr)
      |                                   ^~~~~~~
In file included from /conda/include/OGRE/OgreHardwareVertexBuffer.h:34,
                 from /conda/include/OGRE/OgrePose.h:33,
                 from /conda/include/OGRE/OgreAnimationTrack.h:36,
                 from /conda/include/OGRE/OgreAnimation.h:34,
                 from /conda/include/OGRE/Ogre.h:33,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreRenderEngine.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRTShaderSystem.cc:32:
/conda/include/OGRE/OgreSharedPtr.h:391:44: note: candidate: 'template<class T, class U> bool Ogre::operator==(const Ogre::SharedPtr<T>&, const Ogre::SharedPtr<U>&)'
  391 |     template<class T, class U> inline bool operator==(SharedPtr<T> const& a, SharedPtr<U> const& b)
      |                                            ^~~~~~~~
/conda/include/OGRE/OgreSharedPtr.h:391:44: note:   template argument deduction/substitution failed:
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRTShaderSystem.cc:613:35: note:   mismatched types 'const Ogre::SharedPtr<U>' and 'std::nullptr_t'
  613 |   if (this->dataPtr->pssmSetup == nullptr)
      |                                   ^~~~~~~
In file included from /conda/include/OGRE/OgreSceneManager.h:46,
                 from /conda/include/OGRE/OgreSceneManagerEnumerator.h:33,
                 from /conda/include/OGRE/OgreRoot.h:34,
                 from /conda/include/OGRE/Ogre.h:105,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreRenderEngine.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRTShaderSystem.cc:32:
/conda/include/OGRE/OgreShadowTextureManager.h:65:22: note: candidate: 'bool Ogre::operator==(const Ogre::ShadowTextureConfig&, const Ogre::ShadowTextureConfig&)'
   65 |     _OgreExport bool operator== ( const ShadowTextureConfig& lhs, const ShadowTextureConfig& rhs );
      |                      ^~~~~~~~
/conda/include/OGRE/OgreShadowTextureManager.h:65:62: note:   no known conversion for argument 1 from 'Ogre::ShadowCameraSetupPtr' {aka 'Ogre::SharedPtr<Ogre::ShadowCameraSetup>'} to 'const Ogre::ShadowTextureConfig&'
   65 |     _OgreExport bool operator== ( const ShadowTextureConfig& lhs, const ShadowTextureConfig& rhs );
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /conda/include/OGRE/Overlay/OgreOverlayElement.h:34,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:79,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreRenderEngine.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRTShaderSystem.cc:32:
/conda/include/OGRE/Overlay/OgreUTFString.h:1050:17: note: candidate: 'bool Ogre::operator==(const Ogre::UTFString::_const_fwd_iterator&, const Ogre::UTFString::_const_fwd_iterator&)'
 1050 |     inline bool operator==( const UTFString::_const_fwd_iterator& left, const UTFString::_const_fwd_iterator& right ) {
      |                 ^~~~~~~~
/conda/include/OGRE/Overlay/OgreUTFString.h:1050:67: note:   no known conversion for argument 1 from 'Ogre::ShadowCameraSetupPtr' {aka 'Ogre::SharedPtr<Ogre::ShadowCameraSetup>'} to 'const Ogre::UTFString::_const_fwd_iterator&'
 1050 |     inline bool operator==( const UTFString::_const_fwd_iterator& left, const UTFString::_const_fwd_iterator& right ) {
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/conda/include/OGRE/Overlay/OgreUTFString.h:1074:17: note: candidate: 'bool Ogre::operator==(const Ogre::UTFString::_const_rev_iterator&, const Ogre::UTFString::_const_rev_iterator&)'
 1074 |     inline bool operator==( const UTFString::_const_rev_iterator& left, const UTFString::_const_rev_iterator& right ) {
      |                 ^~~~~~~~
/conda/include/OGRE/Overlay/OgreUTFString.h:1074:67: note:   no known conversion for argument 1 from 'Ogre::ShadowCameraSetupPtr' {aka 'Ogre::SharedPtr<Ogre::ShadowCameraSetup>'} to 'const Ogre::UTFString::_const_rev_iterator&'
 1074 |     inline bool operator==( const UTFString::_const_rev_iterator& left, const UTFString::_const_rev_iterator& right ) {
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
[6/19] Building CXX object ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRenderEngine.cc.o
FAILED: ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRenderEngine.cc.o 
/conda/bin/x86_64-conda-linux-gnu-c++ -DOGRE_VERSION_LT_1_12_0 -Dignition_rendering4_ogre_EXPORTS -DIGN_RENDERING_RESOURCE_PATH=\"/usr/local/src/workspace/install/share/ignition/ignition-rendering4\" -DOGRE_RESOURCE_PATH=\"/conda/lib/OGRE\" -I/usr/local/src/workspace/src/ign-rendering/include -Iinclude -I/usr/local/src/workspace/src/ign-rendering/ogre/include -Iogre/include -Icore/include -isystem /usr/local/src/workspace/install/include/ignition/common3 -isystem /conda/include/uuid -isystem /usr/local/src/workspace/install/include/ignition/math6 -isystem /usr/local/src/workspace/install/include/ignition/plugin1 -isystem /usr/local/src/workspace/install/include/ignition/cmake2 -isystem /conda/include/OGRE -isystem /conda/include/OGRE/RenderSystems/GL -isystem /conda/include/OGRE/RTShaderSystem -isystem /conda/include/OGRE/Terrain -isystem /conda/include/OGRE/Paging -isystem /conda/include/OGRE/Overlay -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /conda/include -O3 -DNDEBUG  -Wall -Wextra -Wno-long-long -Wno-unused-value -Wfloat-equal -Wshadow -Winit-self -Wswitch-default -Wmissing-include-dirs -pedantic  -fPIC -msse -msse2 -mfpmath=sse -msse3 -mssse3 -msse4.1 -msse4.2 -fPIC -I/conda/include/uuid -pthread -I/conda/include/OGRE/RTShaderSystem -I/conda/include -I/conda/include/OGRE -I/conda/include/OGRE/Terrain -I/conda/include/OGRE/Paging -I/conda/include/OGRE/Overlay -MD -MT ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRenderEngine.cc.o -MF ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRenderEngine.cc.o.d -o ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRenderEngine.cc.o -c /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderEngine.cc
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderEngine.cc: In member function 'virtual void ignition::rendering::v4::OgreRenderEngine::AddResourcePath(const string&)':
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderEngine.cc:222:38: error: no match for 'operator!=' (operand types are 'Ogre::MaterialPtr' {aka 'Ogre::SharedPtr<Ogre::Material>'} and 'std::nullptr_t')
  222 |               matPtrNotNull = matPtr != nullptr;
      |                               ~~~~~~~^~~~~~~~~~
In file included from /conda/include/OGRE/OgreMemoryAllocatorConfig.h:188,
                 from /conda/include/OGRE/OgrePrerequisites.h:377,
                 from /conda/include/OGRE/Ogre.h:31,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderEngine.cc:40:
/conda/include/OGRE/OgreMemorySTLAllocator.h:202:17: note: candidate: 'template<class T, class T2, class P> bool Ogre::operator!=(const Ogre::STLAllocator<T, P>&, const Ogre::STLAllocator<T2, P>&)'
  202 |     inline bool operator!=(STLAllocator<T,P> const&,
      |                 ^~~~~~~~
/conda/include/OGRE/OgreMemorySTLAllocator.h:202:17: note:   template argument deduction/substitution failed:
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderEngine.cc:222:41: note:   'Ogre::MaterialPtr' {aka 'Ogre::SharedPtr<Ogre::Material>'} is not derived from 'const Ogre::STLAllocator<T, P>'
  222 |               matPtrNotNull = matPtr != nullptr;
      |                                         ^~~~~~~
In file included from /conda/include/OGRE/OgreMemoryAllocatorConfig.h:188,
                 from /conda/include/OGRE/OgrePrerequisites.h:377,
                 from /conda/include/OGRE/Ogre.h:31,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderEngine.cc:40:
/conda/include/OGRE/OgreMemorySTLAllocator.h:212:17: note: candidate: 'template<class T, class P, class OtherAllocator> bool Ogre::operator!=(const Ogre::STLAllocator<T, P>&, const OtherAllocator&)'
  212 |     inline bool operator!=(STLAllocator<T,P> const&,
      |                 ^~~~~~~~
/conda/include/OGRE/OgreMemorySTLAllocator.h:212:17: note:   template argument deduction/substitution failed:
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderEngine.cc:222:41: note:   'Ogre::MaterialPtr' {aka 'Ogre::SharedPtr<Ogre::Material>'} is not derived from 'const Ogre::STLAllocator<T, P>'
  222 |               matPtrNotNull = matPtr != nullptr;
      |                                         ^~~~~~~
In file included from /conda/include/OGRE/OgreHardwareVertexBuffer.h:34,
                 from /conda/include/OGRE/OgrePose.h:33,
                 from /conda/include/OGRE/OgreAnimationTrack.h:36,
                 from /conda/include/OGRE/OgreAnimation.h:34,
                 from /conda/include/OGRE/Ogre.h:33,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderEngine.cc:40:
/conda/include/OGRE/OgreSharedPtr.h:396:44: note: candidate: 'template<class T, class U> bool Ogre::operator!=(const Ogre::SharedPtr<T>&, const Ogre::SharedPtr<U>&)'
  396 |     template<class T, class U> inline bool operator!=(SharedPtr<T> const& a, SharedPtr<U> const& b)
      |                                            ^~~~~~~~
/conda/include/OGRE/OgreSharedPtr.h:396:44: note:   template argument deduction/substitution failed:
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderEngine.cc:222:41: note:   mismatched types 'const Ogre::SharedPtr<U>' and 'std::nullptr_t'
  222 |               matPtrNotNull = matPtr != nullptr;
      |                                         ^~~~~~~
In file included from /conda/include/OGRE/OgreSceneManager.h:46,
                 from /conda/include/OGRE/OgreSceneManagerEnumerator.h:33,
                 from /conda/include/OGRE/OgreRoot.h:34,
                 from /conda/include/OGRE/Ogre.h:105,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderEngine.cc:40:
/conda/include/OGRE/OgreShadowTextureManager.h:66:22: note: candidate: 'bool Ogre::operator!=(const Ogre::ShadowTextureConfig&, const Ogre::ShadowTextureConfig&)'
   66 |     _OgreExport bool operator!= ( const ShadowTextureConfig& lhs, const ShadowTextureConfig& rhs );
      |                      ^~~~~~~~
/conda/include/OGRE/OgreShadowTextureManager.h:66:62: note:   no known conversion for argument 1 from 'Ogre::MaterialPtr' {aka 'Ogre::SharedPtr<Ogre::Material>'} to 'const Ogre::ShadowTextureConfig&'
   66 |     _OgreExport bool operator!= ( const ShadowTextureConfig& lhs, const ShadowTextureConfig& rhs );
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /conda/include/OGRE/Overlay/OgreOverlayElement.h:34,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:79,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderEngine.cc:40:
/conda/include/OGRE/Overlay/OgreUTFString.h:1053:17: note: candidate: 'bool Ogre::operator!=(const Ogre::UTFString::_const_fwd_iterator&, const Ogre::UTFString::_const_fwd_iterator&)'
 1053 |     inline bool operator!=( const UTFString::_const_fwd_iterator& left, const UTFString::_const_fwd_iterator& right ) {
      |                 ^~~~~~~~
/conda/include/OGRE/Overlay/OgreUTFString.h:1053:67: note:   no known conversion for argument 1 from 'Ogre::MaterialPtr' {aka 'Ogre::SharedPtr<Ogre::Material>'} to 'const Ogre::UTFString::_const_fwd_iterator&'
 1053 |     inline bool operator!=( const UTFString::_const_fwd_iterator& left, const UTFString::_const_fwd_iterator& right ) {
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/conda/include/OGRE/Overlay/OgreUTFString.h:1077:17: note: candidate: 'bool Ogre::operator!=(const Ogre::UTFString::_const_rev_iterator&, const Ogre::UTFString::_const_rev_iterator&)'
 1077 |     inline bool operator!=( const UTFString::_const_rev_iterator& left, const UTFString::_const_rev_iterator& right ) {
      |                 ^~~~~~~~
/conda/include/OGRE/Overlay/OgreUTFString.h:1077:67: note:   no known conversion for argument 1 from 'Ogre::MaterialPtr' {aka 'Ogre::SharedPtr<Ogre::Material>'} to 'const Ogre::UTFString::_const_rev_iterator&'
 1077 |     inline bool operator!=( const UTFString::_const_rev_iterator& left, const UTFString::_const_rev_iterator& right ) {
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
[7/19] Building CXX object ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRenderTargetMaterial.cc.o
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderTargetMaterial.cc: In member function 'virtual Ogre::Technique* ignition::rendering::v4::OgreRenderTargetMaterial::handleSchemeNotFound(uint16_t, const String&, Ogre::Material*, uint16_t, const Ogre::Renderable*)':
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderTargetMaterial.cc:68:51: warning: 'Ogre::Technique* Ogre::Material::getSupportedTechnique(short unsigned int)' is deprecated [-Wdeprecated-declarations]
   68 |     return this->material->getSupportedTechnique(0);
      |                                                   ^
In file included from /conda/include/OGRE/OgreRenderable.h:37,
                 from /conda/include/OGRE/OgreShadowCaster.h:32,
                 from /conda/include/OGRE/OgreMovableObject.h:36,
                 from /conda/include/OGRE/OgreBillboardChain.h:37,
                 from /conda/include/OGRE/Ogre.h:41,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreRenderTargetMaterial.hh:23,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderTargetMaterial.cc:19:
/conda/include/OGRE/OgreMaterial.h:254:36: note: declared here
  254 |         OGRE_DEPRECATED Technique* getSupportedTechnique(unsigned short index);
      |                                    ^~~~~~~~~~~~~~~~~~~~~
[8/19] Building CXX object ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRayQuery.cc.o
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRayQuery.cc: In member function 'virtual ignition::rendering::v4::RayQueryResult ignition::rendering::v4::OgreRayQuery::ClosestPoint()':
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRayQuery.cc:95:28: warning: 'bool Ogre::Any::isEmpty() const' is deprecated [-Wdeprecated-declarations]
   95 |       if (!userAny.isEmpty() && userAny.getType() == typeid(unsigned int) &&
      |                            ^
In file included from /conda/include/OGRE/Ogre.h:36,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRayQuery.cc:22:
/conda/include/OGRE/OgreAny.h:113:30: note: declared here
  113 |         OGRE_DEPRECATED bool isEmpty() const { return !has_value(); }
      |                              ^~~~~~~
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRayQuery.cc:95:49: warning: 'const std::type_info& Ogre::Any::getType() const' is deprecated [-Wdeprecated-declarations]
   95 |       if (!userAny.isEmpty() && userAny.getType() == typeid(unsigned int) &&
      |                                                 ^
In file included from /conda/include/OGRE/Ogre.h:36,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRayQuery.cc:22:
/conda/include/OGRE/OgreAny.h:121:47: note: declared here
  121 |         OGRE_DEPRECATED const std::type_info& getType() const { return type(); }
      |                                               ^~~~~~~
[9/19] Building CXX object ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreRenderTarget.cc.o
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderTarget.cc: In member function 'virtual void ignition::rendering::v4::OgreRenderTarget::Copy(ignition::rendering::v4::Image&) const':
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderTarget.cc:86:58: warning: 'void Ogre::RenderTarget::copyContentsToMemory(const Ogre::PixelBox&, Ogre::RenderTarget::FrameBuffer)' is deprecated [-Wdeprecated-declarations]
   86 |   this->RenderTarget()->copyContentsToMemory(ogrePixelBox);
      |                                                          ^
In file included from /conda/include/OGRE/OgreRenderTexture.h:32,
                 from /conda/include/OGRE/RenderSystems/GL/OgreGLRenderTexture.h:33,
                 from /conda/include/OGRE/RenderSystems/GL/OgreGLCopyingRenderTexture.h:33,
                 from /conda/include/OGRE/RenderSystems/GL/OgreGLFBORenderTexture.h:31,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderTarget.cc:26:
/conda/include/OGRE/OgreRenderTarget.h:347:30: note: declared here
  347 |         OGRE_DEPRECATED void copyContentsToMemory(const PixelBox &dst, FrameBuffer buffer = FB_AUTO) { copyContentsToMemory(Box(0, 0, mWidth, mHeight), dst, buffer); }
      |                              ^~~~~~~~~~~~~~~~~~~~
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderTarget.cc: In member function 'virtual void ignition::rendering::v4::OgreRenderTexture::Buffer(float*)':
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderTarget.cc:433:58: warning: 'void Ogre::RenderTarget::copyContentsToMemory(const Ogre::PixelBox&, Ogre::RenderTarget::FrameBuffer)' is deprecated [-Wdeprecated-declarations]
  433 |   this->RenderTarget()->copyContentsToMemory(ogrePixelBox);
      |                                                          ^
In file included from /conda/include/OGRE/OgreRenderTexture.h:32,
                 from /conda/include/OGRE/RenderSystems/GL/OgreGLRenderTexture.h:33,
                 from /conda/include/OGRE/RenderSystems/GL/OgreGLCopyingRenderTexture.h:33,
                 from /conda/include/OGRE/RenderSystems/GL/OgreGLFBORenderTexture.h:31,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreRenderTarget.cc:26:
/conda/include/OGRE/OgreRenderTarget.h:347:30: note: declared here
  347 |         OGRE_DEPRECATED void copyContentsToMemory(const PixelBox &dst, FrameBuffer buffer = FB_AUTO) { copyContentsToMemory(Box(0, 0, mWidth, mHeight), dst, buffer); }
      |                              ^~~~~~~~~~~~~~~~~~~~
[11/19] Building CXX object ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreSelectionBuffer.cc.o
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreSelectionBuffer.cc: In member function 'void ignition::rendering::v4::OgreSelectionBuffer::Update()':
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreSelectionBuffer.cc:111:35: warning: 'void Ogre::RenderTarget::copyContentsToMemory(const Ogre::PixelBox&, Ogre::RenderTarget::FrameBuffer)' is deprecated [-Wdeprecated-declarations]
  111 |       Ogre::RenderTarget::FB_FRONT);
      |                                   ^
In file included from /conda/include/OGRE/OgreRenderTexture.h:32,
                 from /conda/include/OGRE/Ogre.h:100,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreSelectionBuffer.cc:23:
/conda/include/OGRE/OgreRenderTarget.h:347:30: note: declared here
  347 |         OGRE_DEPRECATED void copyContentsToMemory(const PixelBox &dst, FrameBuffer buffer = FB_AUTO) { copyContentsToMemory(Box(0, 0, mWidth, mHeight), dst, buffer); }
      |                              ^~~~~~~~~~~~~~~~~~~~
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreSelectionBuffer.cc: In member function 'void ignition::rendering::v4::OgreSelectionBuffer::ShowOverlay(bool)':
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreSelectionBuffer.cc:308:50: warning: unused parameter '_show' [-Wunused-parameter]
  308 | void OgreSelectionBuffer::ShowOverlay(const bool _show)
      |                                       ~~~~~~~~~~~^~~~~
[12/19] Building CXX object ogre/src/CMakeFiles/ignition-rendering4-ogre.dir/OgreScene.cc.o
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreScene.cc: In member function 'void ignition::rendering::v4::OgreScene::CreateContext()':
/usr/local/src/workspace/src/ign-rendering/ogre/src/OgreScene.cc:614:69: warning: 'Ogre::SceneManager* Ogre::Root::createSceneManager(Ogre::SceneTypeMask, const String&)' is deprecated [-Wdeprecated-declarations]
  614 |   this->ogreSceneManager = root->createSceneManager(Ogre::ST_GENERIC);
      |                                                                     ^
In file included from /conda/include/OGRE/Ogre.h:105,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreIncludes.hh:30,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreConversions.hh:26,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/include/ignition/rendering/ogre/OgreDepthCamera.hh:32,
                 from /usr/local/src/workspace/src/ign-rendering/ogre/src/OgreScene.cc:23:
/conda/include/OGRE/OgreRoot.h:392:39: note: declared here
  392 |         OGRE_DEPRECATED SceneManager* createSceneManager(SceneTypeMask typeMask,
      |                                       ^~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.

@traversaro
Copy link
Member

Updating ogre to 1.12.10 (the only other available version in conda-forge) does not create problems while building ign-rendering4,

Ok, this make sensei as that ogre is the one used in the ignition-rendering4 official conda build.

but I get the error reported in gazebosim/gazebo-classic#2700 when opening the gui installed by igni-gui4 (from colcon).

Did you tried to add ${CONDA_PREFIX}/Media or ${CONDA_PREFIX}/Media/ShadowVolume to OGRE_RESOURCE_PATH (see https://github.com/ignitionrobotics/ign-rendering/blob/a5f00f91f507cf9cc14134f2fca0f03c4a99a7cc/ogre/src/OgreRenderEngine.cc#L83)? If that fix is the only necessary, probably we can just add an activation script to ign-rendering4 feedstock.

@traversaro
Copy link
Member

This error occurs when ogre==1.10.12 is installed in the conda workspace.

I checked a few of the compilation errors, and they seems all to be at points where there is an ifdef for compatibility between 1.9 and 1.12 , such as https://github.com/ignitionrobotics/ign-rendering/blob/ign-rendering4/ogre/src/OgreMaterialSwitcher.cc#L82 . Probably the ifdef logic needs to be change to correctly account for Ogre 1.10.12 .

@traversaro
Copy link
Member

traversaro commented Feb 9, 2021

I guess this discussion could be relevant/interesting for @JShep1 @wolfv @Tobias-Fischer .

@diegoferigo
Copy link
Member Author

Updating ogre to 1.12.10 (the only other available version in conda-forge) does not create problems while building ign-rendering4,

Ok, this make sensei as that ogre is the one used in the ignition-rendering4 official conda build.

Yep. However as reported above, this ogre version has runtime errors when opening Ignition Gazebo's GUI.

but I get the error reported in osrf/gazebo#2700 when opening the gui installed by igni-gui4 (from colcon).

Did you tried to add ${CONDA_PREFIX}/Media or ${CONDA_PREFIX}/Media/ShadowVolume to OGRE_RESOURCE_PATH (see https://github.com/ignitionrobotics/ign-rendering/blob/a5f00f91f507cf9cc14134f2fca0f03c4a99a7cc/ogre/src/OgreRenderEngine.cc#L83)? If that fix is the only necessary, probably we can just add an activation script to ign-rendering4 feedstock.

Thanks for the hint, I just tried to compile again ign-rendering4 from colcon against conda-forge's ogre==1.12.10. The folder you reported is in /conda/share/OGRE/Media. After exporting the environment variable and running the application that opens the Ignition GUI, I get the following error:

[GUI] [Err] [OgreRenderEngine.cc:465] Unable to load Ogre Plugin[/conda/share/OGRE/Media/RenderSystem_GL]. Rendering will not be possible.Make sure you have installed OGRE properly.

terminate called after throwing an instance of 'Ogre::RuntimeAssertionException'
  what():  RuntimeAssertionException: Ogre/ShadowExtrudePointLight not found. Verify that you referenced the 'ShadowVolume' folder in your resources.cfg in initialise at /home/conda/feedstock_root/build_artifacts/ogre_1611842210433/work/OgreMain/src/OgreShadowVolumeExtrudeProgram.cpp (line 70)
Aborted (core dumped)

The first line is Ignition Rendering 4 that complains about the RenderSystem_GL folder that does not exist (I guess there is a GL feature in ogre that is not enabled in the package from conda-forge). The second line is an Ogre exception.

This error occurs when ogre==1.10.12 is installed in the conda workspace.

I checked a few of the compilation errors, and they seems all to be at points where there is an ifdef for compatibility between 1.9 and 1.12 , such as https://github.com/ignitionrobotics/ign-rendering/blob/ign-rendering4/ogre/src/OgreMaterialSwitcher.cc#L82 . Probably the ifdef logic needs to be change to correctly account for Ogre 1.10.12 .

I might try to alter the compiler definition by hand, let's see if I manage to get something out of this.

@traversaro
Copy link
Member

I might try to alter the compiler definition by hand, let's see if I manage to get something out of this.

The related CMake code is https://github.com/ignitionrobotics/ign-rendering/blob/ign-rendering4/ogre/src/CMakeLists.txt#L18 .

@Tobias-Fischer
Copy link
Member

Hi @diegoferigo, could you please report on the precise version of ogre that is installed in your conda environment? We fixed the bug about the missing RenderSystem_GL one year ago (see conda-forge/ogre-feedstock#15), so I fear for some reason an outdated version is installed.

@traversaro
Copy link
Member

traversaro commented Feb 9, 2021

The first line is Ignition Rendering 4 that complains about the RenderSystem_GL folder that does not exist (I guess there is a GL feature in ogre that is not enabled in the package from conda-forge). The second line is an Ogre exception.

No, actually I think I misunderstood the role of OGRE_RESOURCE_PATH . OGRE_RESOURCE_PATH apparently is used to search for OGRE plugins, and those are in ${CONDA_PREFIX}/lib/OGRE , while you can see that is searching for the plugin in the wrong directory in the error message. We should check if there is any other env variable to inject directory in the ogre resource locator, similar to what GAZEBO_RESOURCE_PATH was in Classic Gazebo (see gazebosim/gazebo-classic#2700 (comment)).

@diegoferigo
Copy link
Member Author

diegoferigo commented Feb 9, 2021

Hi @diegoferigo, could you please report on the precise version of ogre that is installed in your conda environment? We fixed the bug about the missing RenderSystem_GL one year ago (see conda-forge/ogre-feedstock#15), so I fear for some reason an outdated version is installed.

For this test I was using ogre==1.12.10 but, as @traversaro wrote, it was caused by a wrong usage of OGRE_RESOURCE_PATH. I see RenderSystem_GL*.so files in /conda/lib/OGRE, therefore the package seems ok.

I might try to alter the compiler definition by hand, let's see if I manage to get something out of this.

The related CMake code is https://github.com/ignitionrobotics/ign-rendering/blob/ign-rendering4/ogre/src/CMakeLists.txt#L18

Interestingly, using ogre==1.10.12 and patching ign-rendering4 as follows, I get a working ogre1-based rendering stack 🎉

sed -i "s|if(OGRE_VERSION VERSION_LESS 1.10.3)|if(OGRE_VERSION VERSION_LESS 1.11.0)|g" src/ign-rendering/ogre/src/CMakeLists.txt
sed -i "s|if(OGRE_VERSION VERSION_LESS 1.10.1)|if(OGRE_VERSION VERSION_LESS 1.11.0)|g" src/ign-rendering/ogre/src/CMakeLists.txt
ignition gui

Screenshot_20210209_224357

@diegoferigo
Copy link
Member Author

It seems that the patch was applied also to the conda-forge ign-rendering recipe conda-forge/libignition-rendering4-feedstock#8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants