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

Add linux #11

Merged
merged 4 commits into from
Mar 13, 2020
Merged

Add linux #11

merged 4 commits into from
Mar 13, 2020

Conversation

wolfv
Copy link
Member

@wolfv wolfv commented Mar 6, 2020

Checklist

  • Used a fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@wolfv wolfv requested a review from seanyen as a code owner March 6, 2020 13:26
@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I was trying to look for recipes to lint for you, but it appears we have a merge conflict.
Please try to merge or rebase with the base branch to resolve this conflict.

Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@wolfv
Copy link
Member Author

wolfv commented Mar 6, 2020

@traversaro this build almost works -- locally -- the gzserver seems to be fine.

However, when I run gzclient it segfaults after printing:

(gazz) ~/Programs:$ gzclient --verbose
Gazebo multi-robot simulator, version 11.0.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 10.12.199.184
[Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call
[Wrn] [GuiIface.cc:119] JPEG parameter struct mismatch: library thinks size is 632, caller expects 664
Segmentation fault (core dumped)

GDB only shows this:

Thread 1 "gzclient" received signal SIGSEGV, Segmentation fault.
0x00007ffff3d034de in ____longjmp_chk () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff3d034de in ____longjmp_chk () from /lib64/libc.so.6
conda-forge/qt-feedstock#1 0x40554107a766ecb0 in ?? ()
Backtrace stopped: Cannot access memory at address 0x4dfaea878771419f

So I am not sure if the segfault is the result of the JPEG struct size mismatch or something else.
I am pretty desperate right now .. maybe you know something? I would be happy if we could merge this PR so I can test the "official" conda-forge build -- also on a computer that doesn't have a NVidia GPU.

@traversaro
Copy link
Contributor

So I am not sure if the segfault is the result of the JPEG struct size mismatch or something else.

I am not sure as well, but that warning seems to be quite serious, at it seems to hint that there is an ABI mismatch of some kind, and at least it is a lead. I suspect that for some reason the conda Gazebo is loading some system library, instead of the conda one (or equivalently is loading the conda library, but it has been compiled for some reason against the system headers of some library).
If you have a local build, could you try to run ldd gzclient and ldd libgazebo_gui.so to see which libraries are actually linked by Gazebo?

@wolfv
Copy link
Member Author

wolfv commented Mar 6, 2020

Hmm, I suspect that our copy of freeimage somehow compiles JPEG with a different config as e.g. QT?
I checked ldd a couple of times on the gzclient and gzserver binary but I can check again with libgazebo_gui.so (good idea).

Also there is a HAVE_BOOLEAN setting in the jpeg header that selectes either bool or int for the boolean parameters which might be the cause for the size mismatch.
However, I am not sure at which level this is a problem (e.g. if the problem is that QT also uses libjpeg but with a different config?)...

I also tested the OGRE samples and they're fine.

@traversaro
Copy link
Contributor

Hmm, I suspect that our copy of freeimage somehow compiles JPEG with a different config as e.g. QT?
I checked ldd a couple of times on the gzclient and gzserver binary but I can check again with libgazebo_gui.so (good idea).

How is Qt compiled in conda-forge? To avoid this problems, qt is tipically compiled with the -system-libjpeg option (see for example in vcpkg: https://github.com/microsoft/vcpkg/blob/2020.01/ports/qt5-base/portfile.cmake#L77) so that it links exactly the same libjpeg used by freeimage and transitively by Gazebo.

@traversaro
Copy link
Contributor

Unless I miss something, qt should use the indeed the system (in this case conda, I hope) libjpeg: https://github.com/conda-forge/qt-feedstock/blob/952b2000647b887c3bf23f4653aad36275a358ec/recipe/build.sh#L174 .

@traversaro
Copy link
Contributor

Perhaps conda-forge/qt-main-feedstock#124 may be related?

@wolfv
Copy link
Member Author

wolfv commented Mar 6, 2020

over on gitter @chrisburr suggested to remove _FORTIFY_SOURCE=2 from the CPPFLAGS (c preprocessor flags). I tried but locally didn't help ...

@wolfv
Copy link
Member Author

wolfv commented Mar 6, 2020

yeah that might be it. I just checked all my libraries and none links to libjpeg (including the QT ones) (also doesn't link libpng). So maybe it's accidentally statically linked ...

On my Fedora, those two libs link against libjpeg:

libQt5WebKit.so libjpeg.so.62 => /lib64/libjpeg.so.62 (0x00007fbbd57cf000)
libQt5WebKitWidgets.so libjpeg.so.62 => /lib64/libjpeg.so.62 (0x00007f7476128000)

Here is the output of ldd on libQt5WebEngineCore from conda-forge:

~/miniconda3/envs/gazz/lib:$ ldd libQt5WebEngineCore.so
	linux-vdso.so.1 (0x00007ffc7dabd000)
	libQt5Quick.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libQt5Quick.so.5 (0x00007f995f4db000)
	libQt5Gui.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libQt5Gui.so.5 (0x00007f995f0ce000)
	libQt5WebChannel.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libQt5WebChannel.so.5 (0x00007f995f0b1000)
	libQt5Qml.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libQt5Qml.so.5 (0x00007f995ed38000)
	libQt5Network.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libQt5Network.so.5 (0x00007f995ec04000)
	libQt5Positioning.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libQt5Positioning.so.5 (0x00007f995eba7000)
	libQt5Core.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libQt5Core.so.5 (0x00007f995e74d000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f995e6f1000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f995e6ea000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f995e6df000)
	libnss3.so => /home/wolfv/miniconda3/envs/gazz/lib/././libnss3.so (0x00007f995e5b9000)
	libnssutil3.so => /home/wolfv/miniconda3/envs/gazz/lib/././libnssutil3.so (0x00007f995e587000)
	libsmime3.so => /home/wolfv/miniconda3/envs/gazz/lib/././libsmime3.so (0x00007f995e55c000)
	libsoftokn3.so => /home/wolfv/miniconda3/envs/gazz/lib/././libsoftokn3.so (0x00007f995e519000)
	libplds4.so => /home/wolfv/miniconda3/envs/gazz/lib/././libplds4.so (0x00007f995e513000)
	libplc4.so => /home/wolfv/miniconda3/envs/gazz/lib/././libplc4.so (0x00007f995e50c000)
	libnspr4.so => /home/wolfv/miniconda3/envs/gazz/lib/././libnspr4.so (0x00007f995e4c1000)
	libexpat.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/././libexpat.so.1 (0x00007f995e48d000)
	libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f995e472000)
	libpng16.so.16 => /home/wolfv/miniconda3/envs/gazz/lib/././libpng16.so.16 (0x00007f995e439000)
	libz.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/././libz.so.1 (0x00007f995e41f000)
	libfreetype.so.6 => /home/wolfv/miniconda3/envs/gazz/lib/././libfreetype.so.6 (0x00007f995e36e000)
	libfontconfig.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/././libfontconfig.so.1 (0x00007f995e327000)
	libX11.so.6 => /home/wolfv/miniconda3/envs/gazz/lib/././libX11.so.6 (0x00007f995e1e4000)
	libX11-xcb.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/././libX11-xcb.so.1 (0x00007f995e1dd000)
	libxcb.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/././libxcb.so.1 (0x00007f995e1b1000)
	libXcomposite.so.1 => /lib64/libXcomposite.so.1 (0x00007f995e1ac000)
	libXcursor.so.1 => /lib64/libXcursor.so.1 (0x00007f995e19f000)
	libXdamage.so.1 => /lib64/libXdamage.so.1 (0x00007f995e19a000)
	libXext.so.6 => /home/wolfv/miniconda3/envs/gazz/lib/././libXext.so.6 (0x00007f995e185000)
	libXfixes.so.3 => /home/wolfv/miniconda3/envs/gazz/lib/././libXfixes.so.3 (0x00007f995e17b000)
	libXi.so.6 => /lib64/libXi.so.6 (0x00007f995e169000)
	libXrender.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/././libXrender.so.1 (0x00007f995e15c000)
	libXtst.so.6 => /lib64/libXtst.so.6 (0x00007f995e153000)
	libXss.so.1 => /lib64/libXss.so.1 (0x00007f995e14e000)
	libpci.so.3 => /lib64/libpci.so.3 (0x00007f995e13e000)
	libasound.so.2 => /lib64/libasound.so.2 (0x00007f995e03c000)
	libdbus-1.so.3 => /home/wolfv/miniconda3/envs/gazz/lib/././libdbus-1.so.3 (0x00007f995dfe8000)
	libGL.so.1 => /lib64/libGL.so.1 (0x00007f995df54000)
	libstdc++.so.6 => /home/wolfv/miniconda3/envs/gazz/lib/././libstdc++.so.6 (0x00007f995dde0000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f995dc9a000)
	libgcc_s.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/././libgcc_s.so.1 (0x00007f995dc86000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f995dabb000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f99652e7000)
	libicui18n.so.64 => /home/wolfv/miniconda3/envs/gazz/lib/./././libicui18n.so.64 (0x00007f995d7da000)
	libicuuc.so.64 => /home/wolfv/miniconda3/envs/gazz/lib/./././libicuuc.so.64 (0x00007f995d603000)
	libicudata.so.64 => /home/wolfv/miniconda3/envs/gazz/lib/./././libicudata.so.64 (0x00007f995bbbf000)
	libgthread-2.0.so.0 => /home/wolfv/miniconda3/envs/gazz/lib/./././libgthread-2.0.so.0 (0x00007f995bbba000)
	libglib-2.0.so.0 => /home/wolfv/miniconda3/envs/gazz/lib/./././libglib-2.0.so.0 (0x00007f995ba95000)
	libsqlite3.so.0 => /home/wolfv/miniconda3/envs/gazz/lib/./././libsqlite3.so.0 (0x00007f995b978000)
	libxml2.so.2 => /home/wolfv/miniconda3/envs/gazz/lib/./././libxml2.so.2 (0x00007f995b810000)
	libuuid.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/./././libuuid.so.1 (0x00007f995b807000)
	libXau.so.6 => /home/wolfv/miniconda3/envs/gazz/lib/./././libXau.so.6 (0x00007f995b800000)
	libXdmcp.so.6 => /home/wolfv/miniconda3/envs/gazz/lib/./././libXdmcp.so.6 (0x00007f995b7f8000)
	libGLX.so.0 => /lib64/libGLX.so.0 (0x00007f995b7c4000)
	libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 (0x00007f995b707000)
	libpcre.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/././././libpcre.so.1 (0x00007f995b6be000)
	libiconv.so.2 => /home/wolfv/miniconda3/envs/gazz/lib/././././libiconv.so.2 (0x00007f995b5d6000)
	liblzma.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/././././liblzma.so.5 (0x00007f995b5ad000)

Here is libgazebo_gui:

	linux-vdso.so.1 (0x00007ffec505d000)
	libgazebo_client.so.11 => /home/wolfv/miniconda3/envs/gazz/lib/././libgazebo_client.so.11 (0x00007fb23862e000)
	libgazebo_rendering.so.11 => /home/wolfv/miniconda3/envs/gazz/lib/././libgazebo_rendering.so.11 (0x00007fb2383d4000)
	libQt5Widgets.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libQt5Widgets.so.5 (0x00007fb237e8d000)
	libOgreRTShaderSystem.so.1.12.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libOgreRTShaderSystem.so.1.12.5 (0x00007fb237d76000)
	libOgreMain.so.1.12.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libOgreMain.so.1.12.5 (0x00007fb2378b8000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb23785c000)
	libOgreTerrain.so.1.12.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libOgreTerrain.so.1.12.5 (0x00007fb2377eb000)
	libOgrePaging.so.1.12.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libOgrePaging.so.1.12.5 (0x00007fb2377bd000)
	libOgreOverlay.so.1.12.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libOgreOverlay.so.1.12.5 (0x00007fb237697000)
	libboost_thread.so.1.72.0 => /home/wolfv/miniconda3/envs/gazz/lib/././libboost_thread.so.1.72.0 (0x00007fb237671000)
	libboost_system.so.1.72.0 => /home/wolfv/miniconda3/envs/gazz/lib/././libboost_system.so.1.72.0 (0x00007fb23766c000)
	libboost_filesystem.so.1.72.0 => /home/wolfv/miniconda3/envs/gazz/lib/././libboost_filesystem.so.1.72.0 (0x00007fb23764a000)
	libboost_program_options.so.1.72.0 => /home/wolfv/miniconda3/envs/gazz/lib/././libboost_program_options.so.1.72.0 (0x00007fb2375c7000)
	libboost_regex.so.1.72.0 => /home/wolfv/miniconda3/envs/gazz/lib/././libboost_regex.so.1.72.0 (0x00007fb2374e8000)
	libboost_iostreams.so.1.72.0 => /home/wolfv/miniconda3/envs/gazz/lib/././libboost_iostreams.so.1.72.0 (0x00007fb2374c5000)
	libboost_date_time.so.1.72.0 => /home/wolfv/miniconda3/envs/gazz/lib/././libboost_date_time.so.1.72.0 (0x00007fb2374af000)
	libtinyxml.so => /home/wolfv/miniconda3/envs/gazz/lib/././libtinyxml.so (0x00007fb237494000)
	libqwt.so.6 => /home/wolfv/miniconda3/envs/gazz/lib/././libqwt.so.6 (0x00007fb23732e000)
	libgazebo_util.so.11 => /home/wolfv/miniconda3/envs/gazz/lib/././libgazebo_util.so.11 (0x00007fb23729d000)
	libtinyxml2.so.7 => /home/wolfv/miniconda3/envs/gazz/lib/././libtinyxml2.so.7 (0x00007fb237282000)
	libgazebo_transport.so.11 => /home/wolfv/miniconda3/envs/gazz/lib/././libgazebo_transport.so.11 (0x00007fb2371ed000)
	libgazebo_msgs.so.11 => /home/wolfv/miniconda3/envs/gazz/lib/././libgazebo_msgs.so.11 (0x00007fb236fb4000)
	libgazebo_common.so.11 => /home/wolfv/miniconda3/envs/gazz/lib/././libgazebo_common.so.11 (0x00007fb236e90000)
	libcurl.so.4 => /home/wolfv/miniconda3/envs/gazz/lib/././libcurl.so.4 (0x00007fb236e09000)
	libfreeimage.so.3 => /home/wolfv/miniconda3/envs/gazz/lib/././libfreeimage.so.3 (0x00007fb236705000)
	libignition-common3-graphics.so.3 => /home/wolfv/miniconda3/envs/gazz/lib/././libignition-common3-graphics.so.3 (0x00007fb236654000)
	libignition-fuel_tools4.so.4 => /home/wolfv/miniconda3/envs/gazz/lib/././libignition-fuel_tools4.so.4 (0x00007fb2365d1000)
	libignition-common3.so.3 => /home/wolfv/miniconda3/envs/gazz/lib/././libignition-common3.so.3 (0x00007fb236580000)
	librt.so.1 => /lib64/librt.so.1 (0x00007fb236575000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fb23656e000)
	libtar.so.0 => /home/wolfv/miniconda3/envs/gazz/lib/././libtar.so.0 (0x00007fb23655e000)
	libsdformat9.so.9 => /home/wolfv/miniconda3/envs/gazz/lib/././libsdformat9.so.9 (0x00007fb2363c0000)
	libtbb.so.2 => /home/wolfv/miniconda3/envs/gazz/lib/././libtbb.so.2 (0x00007fb236378000)
	libprotobuf.so.22 => /home/wolfv/miniconda3/envs/gazz/lib/././libprotobuf.so.22 (0x00007fb2360df000)
	libignition-transport8.so.8 => /home/wolfv/miniconda3/envs/gazz/lib/././libignition-transport8.so.8 (0x00007fb236059000)
	libignition-msgs5.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libignition-msgs5.so.5 (0x00007fb235d93000)
	libignition-math6.so.6 => /home/wolfv/miniconda3/envs/gazz/lib/././libignition-math6.so.6 (0x00007fb235d54000)
	libuuid.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/././libuuid.so.1 (0x00007fb235d4b000)
	libGL.so.1 => /lib64/libGL.so.1 (0x00007fb235cb7000)
	libGLU.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/././libGLU.so.1 (0x00007fb235c46000)
	libX11.so.6 => /home/wolfv/miniconda3/envs/gazz/lib/././libX11.so.6 (0x00007fb235b03000)
	libXext.so.6 => /home/wolfv/miniconda3/envs/gazz/lib/././libXext.so.6 (0x00007fb235aee000)
	libQt5Gui.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libQt5Gui.so.5 (0x00007fb2356df000)
	libQt5Core.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/././libQt5Core.so.5 (0x00007fb235287000)
	libstdc++.so.6 => /home/wolfv/miniconda3/envs/gazz/lib/././libstdc++.so.6 (0x00007fb235113000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fb234fcd000)
	libgcc_s.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/././libgcc_s.so.1 (0x00007fb234fb9000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fb234df0000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fb239120000)
	libzzip-0.so.13 => /home/wolfv/miniconda3/envs/gazz/lib/./././libzzip-0.so.13 (0x00007fb234de4000)
	libz.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/./././libz.so.1 (0x00007fb234dca000)
	libfreetype.so.6 => /home/wolfv/miniconda3/envs/gazz/lib/./././libfreetype.so.6 (0x00007fb234d19000)
	libicudata.so.64 => /home/wolfv/miniconda3/envs/gazz/lib/./././libicudata.so.64 (0x00007fb2332d3000)
	libicui18n.so.64 => /home/wolfv/miniconda3/envs/gazz/lib/./././libicui18n.so.64 (0x00007fb232ff2000)
	libicuuc.so.64 => /home/wolfv/miniconda3/envs/gazz/lib/./././libicuuc.so.64 (0x00007fb232e1b000)
	libbz2.so.1.0 => /home/wolfv/miniconda3/envs/gazz/lib/./././libbz2.so.1.0 (0x00007fb232e07000)
	liblzma.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/./././liblzma.so.5 (0x00007fb232dde000)
	libQt5PrintSupport.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/./././libQt5PrintSupport.so.5 (0x00007fb232d78000)
	libQt5Svg.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/./././libQt5Svg.so.5 (0x00007fb232d2b000)
	libQt5OpenGL.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/./././libQt5OpenGL.so.5 (0x00007fb232cda000)
	libQt5Concurrent.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/./././libQt5Concurrent.so.5 (0x00007fb232cd3000)
	libssh2.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/./././libssh2.so.1 (0x00007fb232c9e000)
	libssl.so.1.1 => /home/wolfv/miniconda3/envs/gazz/lib/./././libssl.so.1.1 (0x00007fb232c0e000)
	libcrypto.so.1.1 => /home/wolfv/miniconda3/envs/gazz/lib/./././libcrypto.so.1.1 (0x00007fb232960000)
	libgssapi_krb5.so.2 => /home/wolfv/miniconda3/envs/gazz/lib/./././libgssapi_krb5.so.2 (0x00007fb232911000)
	libkrb5.so.3 => /home/wolfv/miniconda3/envs/gazz/lib/./././libkrb5.so.3 (0x00007fb23283a000)
	libk5crypto.so.3 => /home/wolfv/miniconda3/envs/gazz/lib/./././libk5crypto.so.3 (0x00007fb23281b000)
	libcom_err.so.3 => /home/wolfv/miniconda3/envs/gazz/lib/./././libcom_err.so.3 (0x00007fb232813000)
	libgts-0.7.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/./././libgts-0.7.so.5 (0x00007fb2327b0000)
	libglib-2.0.so.0 => /home/wolfv/miniconda3/envs/gazz/lib/./././libglib-2.0.so.0 (0x00007fb23268d000)
	libjsoncpp.so.19 => /home/wolfv/miniconda3/envs/gazz/lib/./././libjsoncpp.so.19 (0x00007fb232656000)
	libyaml-0.so.2 => /home/wolfv/miniconda3/envs/gazz/lib/./././libyaml-0.so.2 (0x00007fb232638000)
	libzip.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/./././libzip.so.5 (0x00007fb23261b000)
	liburdfdom_sensor.so.1.0 => /home/wolfv/miniconda3/envs/gazz/lib/./././liburdfdom_sensor.so.1.0 (0x00007fb232612000)
	liburdfdom_model_state.so.1.0 => /home/wolfv/miniconda3/envs/gazz/lib/./././liburdfdom_model_state.so.1.0 (0x00007fb232608000)
	liburdfdom_model.so.1.0 => /home/wolfv/miniconda3/envs/gazz/lib/./././liburdfdom_model.so.1.0 (0x00007fb2325df000)
	liburdfdom_world.so.1.0 => /home/wolfv/miniconda3/envs/gazz/lib/./././liburdfdom_world.so.1.0 (0x00007fb2325b6000)
	libconsole_bridge.so.0.4 => /home/wolfv/miniconda3/envs/gazz/lib/./././libconsole_bridge.so.0.4 (0x00007fb2325ad000)
	libzmq.so.5 => /home/wolfv/miniconda3/envs/gazz/lib/./././libzmq.so.5 (0x00007fb23251c000)
	libGLX.so.0 => /lib64/libGLX.so.0 (0x00007fb2324e8000)
	libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 (0x00007fb23242b000)
	libxcb.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/./././libxcb.so.1 (0x00007fb2323ff000)
	libpng16.so.16 => /home/wolfv/miniconda3/envs/gazz/lib/./././libpng16.so.16 (0x00007fb2323c4000)
	libgthread-2.0.so.0 => /home/wolfv/miniconda3/envs/gazz/lib/./././libgthread-2.0.so.0 (0x00007fb2323bf000)
	libkrb5support.so.0 => /home/wolfv/miniconda3/envs/gazz/lib/././././libkrb5support.so.0 (0x00007fb2323b1000)
	libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fb232398000)
	libpcre.so.1 => /home/wolfv/miniconda3/envs/gazz/lib/././././libpcre.so.1 (0x00007fb23234f000)
	libiconv.so.2 => /home/wolfv/miniconda3/envs/gazz/lib/././././libiconv.so.2 (0x00007fb232267000)
	libsodium.so.23 => /home/wolfv/miniconda3/envs/gazz/lib/././././libsodium.so.23 (0x00007fb23220d000)
	libXau.so.6 => /home/wolfv/miniconda3/envs/gazz/lib/././././libXau.so.6 (0x00007fb232208000)
	libXdmcp.so.6 => /home/wolfv/miniconda3/envs/gazz/lib/././././libXdmcp.so.6 (0x00007fb232200000)

@traversaro
Copy link
Contributor

So I am not sure if the segfault is the result of the JPEG struct size mismatch or something else.

With a quick check, at least in libjpeg-turbo that message is actually a fatal error that exits the program:

Furthermore, at least on my machine Qt links libjpeg via the plugin libqjpeg.so, for example on my Ubuntu 18.04:

straversaro@iiticublap103:~$ ldd /usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqjpeg.so | grep jpeg
	libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007fe770cb0000)

To check if jpeg is statically linked, probably you can just inspect the symbols contained in the library, in my case they are " U " i.e. undefined as jpeg is linked dynamically:

straversaro@iiticublap103:~$ nm -D  /usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqjpeg.so | grep jpeg
                 U jpeg_calc_output_dimensions
                 U jpeg_CreateCompress
                 U jpeg_CreateDecompress
                 U jpeg_destroy_compress
                 U jpeg_destroy_decompress
                 U jpeg_finish_compress
                 U jpeg_finish_decompress
                 U jpeg_read_header
                 U jpeg_read_scanlines
                 U jpeg_resync_to_restart
                 U jpeg_save_markers
                 U jpeg_set_defaults
                 U jpeg_set_quality
                 U jpeg_simple_progression
                 U jpeg_start_compress
                 U jpeg_start_decompress
                 U jpeg_std_error
                 U jpeg_write_marker
                 U jpeg_write_scanlines

recipe/meta.yaml Outdated
- qt
- ogre
- ogre 1.12.5 h6508522_2 # [linux]
- ogre 1.12.5 # [win]
Copy link
Contributor

@seanyen seanyen Mar 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wolfv @traversaro Curious about have you run into any problems on Linux with OGRE 1.12? (I mean at runtime.) At least from my testing, it seems Gazebo is not really OGRE 1.12 ready and there are more work to do to enable that. I am thinking we may want to downgrade it to 1.10 for now...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I remember, I did not run Gazebo with Ogre 1.12.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wolfv
Copy link
Member Author

wolfv commented Mar 7, 2020

image

After 1 week of fighting I finally got here! Indeed I recompiled freeimage with external libjpeg and the same way of including it vs. Qt and it works!
Thanks so much for listening and chiming in!

Now I got OGRE problems :D

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.178.151
[Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call
[Wrn] [GuiIface.cc:119] Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt.
You must not let any exception whatsoever propagate through Qt code.
If that is not possible, in Qt 5 you must at least reimplement
QCoreApplication::notify() and catch all exceptions there.

[Err] [main.cc:34] Ogre Error:RuntimeAssertionException: Ogre/ShadowExtrudePointLight not found. Verify that you referenced the 'ShadowVolume' folder in your resources.cfg in initialise at /home/wolfv/miniconda3/conda-bld/ogre_1583479956049/work/OgreMain/src/OgreShadowVolumeExtrudeProgram.cpp (line 71)

@wolfv
Copy link
Member Author

wolfv commented Mar 7, 2020

I got it to work using ogre 1.10.12 🎉

Will need a PR to the feedstocks of freeimage and ogre to make gazebo work on cf :)

@traversaro
Copy link
Contributor

traversaro commented Mar 7, 2020

Now I got OGRE problems :D

For reference, this is the same error that @seanyen got on Conda on Windows, see https://bitbucket.org/osrf/gazebo/issues/2686/terrain-rendering-does-not-support-shadows and the related issue https://bitbucket.org/osrf/gazebo/issues/2700/gazebo-11-does-not-run-correctly-with-ogre .

@wolfv
Copy link
Member Author

wolfv commented Mar 12, 2020

@seanyen this is ready now! :)

recipe/meta.yaml Outdated

build:
number: 4
skip: true # [not win]
number: 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just increase the number to 5 and make the skip only on [not osx]? (and can you make this pull request editable too? I can also help on the cleanup.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is gazebo 11 so I am not sure it will build on Windows, unfortunately, and since it's a completely new version number I changed the build number back to 0.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, wait, you also have gazebo 11 🤦‍♂️

Then I will have to do your changes. sry about that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok let's hope this builds :)

recipe/meta.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@seanyen seanyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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

Successfully merging this pull request may close these issues.

4 participants