overte icon indicating copy to clipboard operation
overte copied to clipboard

:rocket: Replace vcpkg with conan

Open AnotherFoxGuy opened this issue 1 year ago • 32 comments

This PR is still a work in progress, but the interface should built and run on both Windows and Linux

TODO

  • [x] Fix broken avatars
  • [x] Replace cmake/externals with conan packages
  • [x] Update GitHub actions to use conan
  • [x] Fix other components
  • [x] Fix Debug build
  • [x] Fix tests build
  • [x] Fix manual tests build
  • [x] Fix tools build
  • [x] Fix and test WebRTC

How to build on Windows with conan Add the remote conan remote add overte https://git.anotherfoxguy.com/api/packages/overte/conan Install the deps with conan conan install . -b missing -pr:b=tools/conan-profiles/vs-19-release -pr=tools/conan-profiles/vs-19-release -of build Generate the VS project files cmake --preset conan-default (Note: Currently only the Release build can be built)

How to build on Linux with conan Let conan detect the build environment conan profile detect Add the remote conan remote add overte https://git.anotherfoxguy.com/api/packages/overte/conan Install the deps with conan conan install . -s build_type=Release -b missing -of build Generate the make files cmake --preset conan-default Build the interface cd build && make

AnotherFoxGuy avatar Sep 24 '23 14:09 AnotherFoxGuy

For some reason avatars are broken in this build, no idea why Screenshot_20240213_223335

AnotherFoxGuy avatar Sep 24 '23 15:09 AnotherFoxGuy

A comment on building this on Linux: Since Conan is not available as a distribution package (at least not on Debian), but rather a pip package, the installation procedure is not that trivial.

# Install python3 virtual environment
sudo apt install python3-venv
# Create a virtual environment in the Overte codebase
python3 -m venv .venv
# Install pip dependencies
.venv/bin/pip3 install conan
# Now one can run conan
.venv/bin/conan profile detect

JulianGro avatar Oct 01 '23 05:10 JulianGro

Gave this a test and it currently fails on a version conflict:

juliangro@x299-desktop:~/git/overte$ .venv/bin/conan install .  -s build_type=Release -b missing  -of build

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux


======== Computing dependency graph ========
bullet3/3.25: Not found in local cache, looking in remotes...
bullet3/3.25: Checking remote: conancenter
bullet3/3.25: Downloaded recipe revision 370bb7ce7faf0310d53fea75de351248
draco/1.3.5: Not found in local cache, looking in remotes...
draco/1.3.5: Checking remote: conancenter
draco/1.3.5: Downloaded recipe revision 0f9bb06e7f72693bf3832b49307329c6
etc2comp/cci.20170424: Not found in local cache, looking in remotes...
etc2comp/cci.20170424: Checking remote: conancenter
etc2comp/cci.20170424: Downloaded recipe revision e3d3390ef897b6117c85654fcfa8fad9
glad/0.1.36: Not found in local cache, looking in remotes...
glad/0.1.36: Checking remote: conancenter
glad/0.1.36: Downloaded recipe revision c926453afdd9d5f72cc4ee6a8fff7d73
gli/cci.20210515: Not found in local cache, looking in remotes...
gli/cci.20210515: Checking remote: conancenter
gli/cci.20210515: Downloaded recipe revision 160c0f1da05559878ed4378e838395b4
glm/cci.20230113: Not found in local cache, looking in remotes...
glm/cci.20230113: Checking remote: conancenter
glm/cci.20230113: Downloaded recipe revision 3e19f4607c4d22cee611b572ce677479
glslang/11.7.0: Not found in local cache, looking in remotes...
glslang/11.7.0: Checking remote: conancenter
glslang/11.7.0: Downloaded recipe revision 48f276cb78ef05fdbcac7d17a4760bae
spirv-tools/2021.4: Not found in local cache, looking in remotes...
spirv-tools/2021.4: Checking remote: conancenter
spirv-tools/2021.4: Downloaded recipe revision f320c0462dfb5fa5c1d0db1c59ffc2ee
spirv-headers/1.2.198.0: Not found in local cache, looking in remotes...
spirv-headers/1.2.198.0: Checking remote: conancenter
spirv-headers/1.2.198.0: Downloaded recipe revision f52f903c6ce574ef71c0d24b99e21159
liblo/0.30@overte/stable: Not found in local cache, looking in remotes...
liblo/0.30@overte/stable: Checking remote: conancenter
liblo/0.30@overte/stable: Checking remote: overte
liblo/0.30@overte/stable: Downloaded recipe revision c14a8325a7183cab6a17dddb9eea66df
libnode/18.17.1@overte/stable: Not found in local cache, looking in remotes...
libnode/18.17.1@overte/stable: Checking remote: conancenter
libnode/18.17.1@overte/stable: Checking remote: overte
libnode/18.17.1@overte/stable: Downloaded recipe revision 3f64db70f2fba395a11099869df6c9ae
brotli/1.1.0: Not found in local cache, looking in remotes...
brotli/1.1.0: Checking remote: conancenter
brotli/1.1.0: Downloaded recipe revision 15adcd238ffeed7f7a39c179e7b9b631
llhttp/6.0.6: Not found in local cache, looking in remotes...
llhttp/6.0.6: Checking remote: conancenter
llhttp/6.0.6: Downloaded recipe revision 3989468ec8fa14cbdee9ae1c04495525
openssl/1.1.1w: Not found in local cache, looking in remotes...
openssl/1.1.1w: Checking remote: conancenter
openssl/1.1.1w: Downloaded recipe revision 48acccc156e0cd9d775a2ebb4f0aa0ba
zlib/1.2.13: Not found in local cache, looking in remotes...
zlib/1.2.13: Checking remote: conancenter
zlib/1.2.13: Downloaded recipe revision 97d5730b529b4224045fe7090592d4c1
nasm/2.15.05: Not found in local cache, looking in remotes...
nasm/2.15.05: Checking remote: conancenter
nasm/2.15.05: Downloaded recipe revision ca1c14c2060af0ec151048b54ced9262
nlohmann_json/3.11.2: Not found in local cache, looking in remotes...
nlohmann_json/3.11.2: Checking remote: conancenter
nlohmann_json/3.11.2: Downloaded recipe revision a35423bb6e1eb8f931423557e282c7ed
nvidia-texture-tools/2023.01@overte/stable: Not found in local cache, looking in remotes...
nvidia-texture-tools/2023.01@overte/stable: Checking remote: conancenter
nvidia-texture-tools/2023.01@overte/stable: Checking remote: overte
nvidia-texture-tools/2023.01@overte/stable: Downloaded recipe revision 34d3ed6415bfd722a67e580b4844f55f
openexr/2.5.7: Not found in local cache, looking in remotes...
openexr/2.5.7: Checking remote: conancenter
openexr/2.5.7: Downloaded recipe revision 76c9ca690b7176e1e5535380556bb2a4
openvr/1.26.7@overte/stable: Not found in local cache, looking in remotes...
openvr/1.26.7@overte/stable: Checking remote: conancenter
openvr/1.26.7@overte/stable: Checking remote: overte
openvr/1.26.7@overte/stable: Downloaded recipe revision 76f2b443214a70485a3d46d31ba2da2e
jsoncpp/1.9.4: Not found in local cache, looking in remotes...
jsoncpp/1.9.4: Checking remote: conancenter
jsoncpp/1.9.4: Downloaded recipe revision d4072284f4c7db5538e6a82e2fe9fff8
opus/1.3.1: Not found in local cache, looking in remotes...
opus/1.3.1: Checking remote: conancenter
opus/1.3.1: Downloaded recipe revision 9215b71ae0360515fffc660a7b153ddd
polyvox/0.2.1@overte/stable: Not found in local cache, looking in remotes...
polyvox/0.2.1@overte/stable: Checking remote: conancenter
polyvox/0.2.1@overte/stable: Checking remote: overte
polyvox/0.2.1@overte/stable: Downloaded recipe revision c02cf11d3d340ff30bc1d69ae1b7bb5e
quazip/1.4@overte/stable: Not found in local cache, looking in remotes...
quazip/1.4@overte/stable: Checking remote: conancenter
quazip/1.4@overte/stable: Checking remote: overte
quazip/1.4@overte/stable: Downloaded recipe revision 6281c6ef20e75e13c748961ce9ac431d
bzip2/1.0.8: Not found in local cache, looking in remotes...
bzip2/1.0.8: Checking remote: conancenter
bzip2/1.0.8: Downloaded recipe revision 411fc05e80d47a89045edc1ee6f23c1d
sdl/2.26.5: Not found in local cache, looking in remotes...
sdl/2.26.5: Checking remote: conancenter
sdl/2.26.5: Downloaded recipe revision e034848d4c66df2eaf93675c43f0505f
libiconv/1.17: Not found in local cache, looking in remotes...
libiconv/1.17: Checking remote: conancenter
libiconv/1.17: Downloaded recipe revision fa54397801cd96911a8294bc5fc76335
libalsa/1.2.7.2: Not found in local cache, looking in remotes...
libalsa/1.2.7.2: Checking remote: conancenter
libalsa/1.2.7.2: Downloaded recipe revision a309f03299c0b19b0d39c81ec4b93f5f
libtool/2.4.7: Not found in local cache, looking in remotes...
libtool/2.4.7: Checking remote: conancenter
libtool/2.4.7: Downloaded recipe revision d55a3c2435c19e830fa77aa5c6c19350
automake/1.16.5: Not found in local cache, looking in remotes...
automake/1.16.5: Checking remote: conancenter
automake/1.16.5: Downloaded recipe revision 058bda3e21c36c9aa8425daf3c1faf50
autoconf/2.71: Not found in local cache, looking in remotes...
autoconf/2.71: Checking remote: conancenter
autoconf/2.71: Downloaded recipe revision 53be95d228b2dcb30dc199cb84262d8f
m4/1.4.19: Not found in local cache, looking in remotes...
m4/1.4.19: Checking remote: conancenter
m4/1.4.19: Downloaded recipe revision c1c4b1ee919e34630bb9b50046253d3c
gnu-config/cci.20210814: Not found in local cache, looking in remotes...
gnu-config/cci.20210814: Checking remote: conancenter
gnu-config/cci.20210814: Downloaded recipe revision 15c3bf7dfdb743977b84d0321534ad90
pulseaudio/14.2: Not found in local cache, looking in remotes...
pulseaudio/14.2: Checking remote: conancenter
pulseaudio/14.2: Downloaded recipe revision f4018b35756b60d36d8d336901620e02
libsndfile/1.2.2: Not found in local cache, looking in remotes...
libsndfile/1.2.2: Checking remote: conancenter
libsndfile/1.2.2: Downloaded recipe revision a5a93fb8f35fb5fba00552b2b3144db7
ogg/1.3.5: Not found in local cache, looking in remotes...
ogg/1.3.5: Checking remote: conancenter
ogg/1.3.5: Downloaded recipe revision 062626875f5c8c59f069f76f148098ef
vorbis/1.3.7: Not found in local cache, looking in remotes...
vorbis/1.3.7: Checking remote: conancenter
vorbis/1.3.7: Downloaded recipe revision d936fd8c850f0c7c4021e24e55e6352c
flac/1.4.2: Not found in local cache, looking in remotes...
flac/1.4.2: Checking remote: conancenter
flac/1.4.2: Downloaded recipe revision 5f7bfc8579a458e0a8bc36595c48106f
Graph root
    conanfile.py (Overte/None): /home/juliangro/git/overte/conanfile.py
Requirements
    brotli/1.1.0#15adcd238ffeed7f7a39c179e7b9b631 - Downloaded (conancenter)
    bullet3/3.25#370bb7ce7faf0310d53fea75de351248 - Downloaded (conancenter)
    bzip2/1.0.8#411fc05e80d47a89045edc1ee6f23c1d - Downloaded (conancenter)
    draco/1.3.5#0f9bb06e7f72693bf3832b49307329c6 - Downloaded (conancenter)
    etc2comp/cci.20170424#e3d3390ef897b6117c85654fcfa8fad9 - Downloaded (conancenter)
    flac/1.4.2#5f7bfc8579a458e0a8bc36595c48106f - Downloaded (conancenter)
    glad/0.1.36#c926453afdd9d5f72cc4ee6a8fff7d73 - Downloaded (conancenter)
    gli/cci.20210515#160c0f1da05559878ed4378e838395b4 - Downloaded (conancenter)
    glm/cci.20230113#3e19f4607c4d22cee611b572ce677479 - Downloaded (conancenter)
    glslang/11.7.0#48f276cb78ef05fdbcac7d17a4760bae - Downloaded (conancenter)
    jsoncpp/1.9.4#d4072284f4c7db5538e6a82e2fe9fff8 - Downloaded (conancenter)
    libalsa/1.2.7.2#a309f03299c0b19b0d39c81ec4b93f5f - Downloaded (conancenter)
    libiconv/1.17#fa54397801cd96911a8294bc5fc76335 - Downloaded (conancenter)
    liblo/0.30@overte/stable#c14a8325a7183cab6a17dddb9eea66df - Downloaded (overte)
    libnode/18.17.1@overte/stable#3f64db70f2fba395a11099869df6c9ae - Downloaded (overte)
    libsndfile/1.2.2#a5a93fb8f35fb5fba00552b2b3144db7 - Downloaded (conancenter)
    llhttp/6.0.6#3989468ec8fa14cbdee9ae1c04495525 - Downloaded (conancenter)
    nlohmann_json/3.11.2#a35423bb6e1eb8f931423557e282c7ed - Downloaded (conancenter)
    nvidia-texture-tools/2023.01@overte/stable#34d3ed6415bfd722a67e580b4844f55f - Downloaded (overte)
    ogg/1.3.5#062626875f5c8c59f069f76f148098ef - Downloaded (conancenter)
    openexr/2.5.7#76c9ca690b7176e1e5535380556bb2a4 - Downloaded (conancenter)
    openssl/1.1.1w#48acccc156e0cd9d775a2ebb4f0aa0ba - Downloaded (conancenter)
    openvr/1.26.7@overte/stable#76f2b443214a70485a3d46d31ba2da2e - Downloaded (overte)
    opus/1.3.1#9215b71ae0360515fffc660a7b153ddd - Downloaded (conancenter)
    polyvox/0.2.1@overte/stable#c02cf11d3d340ff30bc1d69ae1b7bb5e - Downloaded (overte)
    pulseaudio/14.2#f4018b35756b60d36d8d336901620e02 - Downloaded (conancenter)
    quazip/1.4@overte/stable#6281c6ef20e75e13c748961ce9ac431d - Downloaded (overte)
    sdl/2.26.5#e034848d4c66df2eaf93675c43f0505f - Downloaded (conancenter)
    spirv-headers/1.2.198.0#f52f903c6ce574ef71c0d24b99e21159 - Downloaded (conancenter)
    spirv-tools/2021.4#f320c0462dfb5fa5c1d0db1c59ffc2ee - Downloaded (conancenter)
    vorbis/1.3.7#d936fd8c850f0c7c4021e24e55e6352c - Downloaded (conancenter)
    zlib/1.2.13#97d5730b529b4224045fe7090592d4c1 - Downloaded (conancenter)
Build requirements
    autoconf/2.71#53be95d228b2dcb30dc199cb84262d8f - Downloaded (conancenter)
    automake/1.16.5#058bda3e21c36c9aa8425daf3c1faf50 - Downloaded (conancenter)
    gnu-config/cci.20210814#15c3bf7dfdb743977b84d0321534ad90 - Downloaded (conancenter)
    libtool/2.4.7#d55a3c2435c19e830fa77aa5c6c19350 - Downloaded (conancenter)
    m4/1.4.19#c1c4b1ee919e34630bb9b50046253d3c - Downloaded (conancenter)
    nasm/2.15.05#ca1c14c2060af0ec151048b54ced9262 - Downloaded (conancenter)
Resolved version ranges
    brotli/[>1.0 <1.2]: brotli/1.1.0
    llhttp/[>6.0 <7.0]: llhttp/6.0.6
ERROR: Version conflict: libsndfile/1.2.2->opus/1.4, Overte/None->opus/1.3.1.
juliangro@x299-desktop:~/git/overte$ 

Trying to fix this, I always end up in dependency hell, with packages that don't appear to be normally required like pulseaudio. This is on Debian Testing, with all build and runtime dependencies installed (that weren't supplied via VCPKG before).

JulianGro avatar Oct 01 '23 06:10 JulianGro

Gave this a test and it currently fails on a version conflict:

The libsndfile package was updated yesterday with updated dependencies. You can prevent these kinds of issues with a Lockfile, but I haven't set that up yet.

I always end up in dependency hell, with packages that don't appear to be normally required like PulseAudio

PulseAudio has always been a dependency of SDL2, the only difference is that conan now lists it explicitly as a dependency.

AnotherFoxGuy avatar Oct 01 '23 09:10 AnotherFoxGuy

Am I understanding it right that Conan is supposed to only get dependencies of its own if the system doesn't already provide them? If yes, we should probably always depend on a version range, from the oldest version that we know works, to the newest version that we know works. With libopus we would get version 1.3.1 from the system on Ubuntu 20.04. Or does Conan "only" provide the tools for us to conditionally use system packages on our own?

JulianGro avatar Oct 01 '23 16:10 JulianGro

Am I understanding it right that Conan is supposed to only get dependencies of its own if the system doesn't already provide them?

That is really dependent on how the conan recipes are written. The recipes provided by the conan-center are always using conan packages to make packaging easier and more reproducible. But it is possible to script conan to install system packages, for example the xorg recipe just installs the appropriate system packages https://github.com/conan-io/conan-center-index/blob/master/recipes/xorg/all/conanfile.py#L26

AnotherFoxGuy avatar Oct 01 '23 17:10 AnotherFoxGuy

The nodejs package uses python instead of python3. (I will work around it on my end for now to be able to test further.)

libnode/18.17.1@overte/stable: Calling source() in /home/juliangro/.conan2/p/libno5c3fe147b7143/s
libnode/18.17.1@overte/stable: Downloading 86.0MB node-v18.17.1.tar.gz

-------- Installing package libnode/18.17.1@overte/stable (30 of 39) --------
libnode/18.17.1@overte/stable: Building from source
libnode/18.17.1@overte/stable: Package libnode/18.17.1@overte/stable:51ae0db13113e36055d6d85984e203dd5c1a2bcb
libnode/18.17.1@overte/stable: Copying sources to build folder
libnode/18.17.1@overte/stable: Building your package in /home/juliangro/.conan2/p/b/libno57d5b58e88bf2/b
libnode/18.17.1@overte/stable: Calling generate()
libnode/18.17.1@overte/stable: Generators folder: /home/juliangro/.conan2/p/b/libno57d5b58e88bf2/b
libnode/18.17.1@overte/stable: Generating aggregated env files
libnode/18.17.1@overte/stable: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
libnode/18.17.1@overte/stable: Calling build()
libnode/18.17.1@overte/stable: RUN: python configure.py --shared --without-npm --without-corepack --without-intl --v8-enable-object-print --prefix=/home/juliangro/.conan2/p/b/libno57d5b58e88bf2/p --shared-brotli --shared-brotli-includes=/home/juliangro/.conan2/p/b/brotla20acd0207315/p/include --shared-brotli-libname=brotlicommon,brotlidec,brotlienc,m --shared-brotli-libpath=/home/juliangro/.conan2/p/b/brotla20acd0207315/p/lib --shared-http-parser --shared-http-parser-includes=/home/juliangro/.conan2/p/b/llhtt906e080855b68/p/include --shared-http-parser-libname=llhttp --shared-http-parser-libpath=/home/juliangro/.conan2/p/b/llhtt906e080855b68/p/lib --shared-openssl --shared-openssl-includes=/home/juliangro/.conan2/p/b/opens7d8671f5514b7/p/include --shared-openssl-libname=crypto,dl,rt,pthread,ssl,dl,pthread --shared-openssl-libpath=/home/juliangro/.conan2/p/b/opens7d8671f5514b7/p/lib --shared-zlib --shared-zlib-includes=/home/juliangro/.conan2/p/b/zlib6b32e57f239b2/p/include --shared-zlib-libname=z --shared-zlib-libpath=/home/juliangro/.conan2/p/b/zlib6b32e57f239b2/p/lib  --dest-cpu=x86_64 --gdb
/bin/sh: 1: python: not found

libnode/18.17.1@overte/stable: ERROR: 
Package '51ae0db13113e36055d6d85984e203dd5c1a2bcb' build failed
libnode/18.17.1@overte/stable: WARN: Build folder /home/juliangro/.conan2/p/b/libno57d5b58e88bf2/b
*********************************************************
Recipe 'libnode/18.17.1@overte/stable' cannot build its binary
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter, report it at https://github.com/conan-io/conan-center-index/issues
If it is your recipe, check if it is updated to 2.0
*********************************************************

ERROR: libnode/18.17.1@overte/stable: Error in build() method, line 109
	self.run(
	ConanException: Error 127 while executing
juliangro@x299-desktop:~/git/overte$ 

JulianGro avatar Oct 02 '23 07:10 JulianGro

It would be nice if you could put a README into the conan-recipes directory on how to consume those and how to update them.

It seems like I can build node for example using a command like

../../.venv/bin/conan create all/conanfile.py --version 18.17.1

JulianGro avatar Oct 02 '23 08:10 JulianGro

The next issue in line seems to be with OpenEXR. Maybe the package doesn't play well with such a relatively new compiler?

openexr/2.5.7: Calling source() in /home/juliangro/.conan2/p/openeb22abb7dffb1e/s/src
openexr/2.5.7: Downloading 27.5MB v2.5.7.tar.gz

-------- Installing package openexr/2.5.7 (32 of 39) --------
openexr/2.5.7: Building from source
openexr/2.5.7: Package openexr/2.5.7:482cc1204418670010a0a999935298e9eccc0e14
openexr/2.5.7: Copying sources to build folder
openexr/2.5.7: Building your package in /home/juliangro/.conan2/p/b/openeb4cf8470b3579/b
openexr/2.5.7: Calling generate()
openexr/2.5.7: Generators folder: /home/juliangro/.conan2/p/b/openeb4cf8470b3579/b/build/Release/generators
openexr/2.5.7: CMakeToolchain generated: conan_toolchain.cmake
openexr/2.5.7: CMakeToolchain generated: CMakePresets.json
openexr/2.5.7: CMakeToolchain generated: ../../../src/CMakeUserPresets.json
openexr/2.5.7: Generating aggregated env files
openexr/2.5.7: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
openexr/2.5.7: Calling build()
openexr/2.5.7: Running CMake.configure()
openexr/2.5.7: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/juliangro/.conan2/p/b/openeb4cf8470b3579/b/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/juliangro/.conan2/p/b/openeb4cf8470b3579/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/juliangro/.conan2/p/b/openeb4cf8470b3579/b/src"
-- Using Conan toolchain: /home/juliangro/.conan2/p/b/openeb4cf8470b3579/b/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: C++ Standard 17 with extensions ON
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/ccache/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configure ILMBASE Version: 2.5.7 Lib API: 25.0.6
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Looking for include file ucontext.h
-- Looking for include file ucontext.h - found
-- Performing Test ILMBASE_HAVE_CONTROL_REGISTER_SUPPORT
-- Performing Test ILMBASE_HAVE_CONTROL_REGISTER_SUPPORT - Success
-- Looking for include file semaphore.h
-- Looking for include file semaphore.h - found
-- Looking for sem_init in pthread
-- Looking for sem_init in pthread - found
-- Configure OpenEXR Version: 2.5.7 Lib API: 25.0.6
-- Conan: Target declared 'ZLIB::ZLIB'
-- Performing Test OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN
-- Performing Test OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN - Success
-- Performing Test OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX
-- Performing Test OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX - Success
-- clang-format not found.
-- Configuring done (1.7s)
-- Generating done (0.0s)
-- Build files have been written to: /home/juliangro/.conan2/p/b/openeb4cf8470b3579/b/build/Release

openexr/2.5.7: Running CMake.build()
openexr/2.5.7: RUN: cmake --build "/home/juliangro/.conan2/p/b/openeb4cf8470b3579/b/build/Release" -- -j12
[  1%] Building CXX object IlmBase/Half/CMakeFiles/Half.dir/half.cpp.o
[  1%] Building CXX object IlmBase/Iex/CMakeFiles/Iex.dir/IexBaseExc.cpp.o
[  2%] Building CXX object IlmBase/Iex/CMakeFiles/Iex.dir/IexThrowErrnoExc.cpp.o
[  3%] Linking CXX static library libHalf-2_5.a
[  3%] Built target Half
[  3%] Linking CXX static library libIex-2_5.a
[  3%] Built target Iex
[  7%] Building CXX object IlmBase/IlmThread/CMakeFiles/IlmThread.dir/IlmThread.cpp.o
[  6%] Building CXX object IlmBase/IexMath/CMakeFiles/IexMath.dir/IexMathFpu.cpp.o
[  6%] Building CXX object IlmBase/IlmThread/CMakeFiles/IlmThread.dir/IlmThreadPool.cpp.o
[  7%] Building CXX object IlmBase/IlmThread/CMakeFiles/IlmThread.dir/IlmThreadMutexPosix.cpp.o
[  7%] Building CXX object IlmBase/IexMath/CMakeFiles/IexMath.dir/IexMathFloatExc.cpp.o
[  8%] Building CXX object IlmBase/IlmThread/CMakeFiles/IlmThread.dir/IlmThreadMutex.cpp.o
[  9%] Building CXX object IlmBase/IlmThread/CMakeFiles/IlmThread.dir/IlmThreadPosix.cpp.o
[ 10%] Building CXX object IlmBase/IlmThread/CMakeFiles/IlmThread.dir/IlmThreadSemaphore.cpp.o
[ 11%] Building CXX object IlmBase/IlmThread/CMakeFiles/IlmThread.dir/IlmThreadSemaphoreOSX.cpp.o
[ 12%] Building CXX object IlmBase/IlmThread/CMakeFiles/IlmThread.dir/IlmThreadMutexWin32.cpp.o
[ 13%] Building CXX object IlmBase/IlmThread/CMakeFiles/IlmThread.dir/IlmThreadSemaphorePosixCompat.cpp.o
[ 13%] Building CXX object IlmBase/IlmThread/CMakeFiles/IlmThread.dir/IlmThreadSemaphorePosix.cpp.o
[ 14%] Building CXX object IlmBase/IlmThread/CMakeFiles/IlmThread.dir/IlmThreadSemaphoreWin32.cpp.o
[ 14%] Building CXX object IlmBase/IlmThread/CMakeFiles/IlmThread.dir/IlmThreadWin32.cpp.o
[ 15%] Linking CXX static library libIexMath-2_5.a
[ 15%] Built target IexMath
[ 16%] Building CXX object IlmBase/Imath/CMakeFiles/Imath.dir/ImathFun.cpp.o
[ 16%] Building CXX object IlmBase/Imath/CMakeFiles/Imath.dir/ImathColorAlgo.cpp.o
[ 17%] Building CXX object IlmBase/Imath/CMakeFiles/Imath.dir/ImathRandom.cpp.o
[ 20%] Building CXX object IlmBase/Imath/CMakeFiles/Imath.dir/ImathVec.cpp.o
[ 20%] Building CXX object IlmBase/Imath/CMakeFiles/Imath.dir/ImathMatrixAlgo.cpp.o
[ 20%] Building CXX object IlmBase/Imath/CMakeFiles/Imath.dir/ImathExc.cpp.o
[ 21%] Linking CXX static library libIlmThread-2_5.a
[ 21%] Built target IlmThread
[ 22%] Linking CXX static library libImath-2_5.a
[ 22%] Built target Imath
[ 25%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfCRgbaFile.cpp.o
[ 25%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfBoxAttribute.cpp.o
[ 23%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfChannelListAttribute.cpp.o
[ 25%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfChannelList.cpp.o
[ 23%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfAttribute.cpp.o
[ 26%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfFrameBuffer.cpp.o
[ 27%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfFloatAttribute.cpp.o
[ 28%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfHeader.cpp.o
[ 28%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfIO.cpp.o
[ 29%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfIntAttribute.cpp.o
[ 30%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfLineOrderAttribute.cpp.o
[ 31%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfInputFile.cpp.o
[ 31%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfMatrixAttribute.cpp.o
[ 32%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfOpaqueAttribute.cpp.o
[ 33%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfOutputFile.cpp.o
[ 34%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfRgbaFile.cpp.o
[ 34%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfStringAttribute.cpp.o
[ 35%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfVecAttribute.cpp.o
[ 36%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfHuf.cpp.o
[ 37%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfThreading.cpp.o
[ 37%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfWav.cpp.o
[ 38%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfLut.cpp.o
[ 39%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfCompressor.cpp.o
[ 40%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfRleCompressor.cpp.o
[ 40%] Building CXX object OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfZipCompressor.cpp.o
/home/juliangro/.conan2/p/b/openeb4cf8470b3579/b/src/OpenEXR/IlmImf/ImfHuf.cpp: In function ‘void Imf_2_5::hufUncompress(const char*, int, short unsigned int*, int)’:
/home/juliangro/.conan2/p/b/openeb4cf8470b3579/b/src/OpenEXR/IlmImf/ImfHuf.cpp:1105:5: error: ‘uint64_t’ was not declared in this scope
 1105 |     uint64_t nBytes = (static_cast<uint64_t>(nBits)+7) / 8 ;
      |     ^~~~~~~~
/home/juliangro/.conan2/p/b/openeb4cf8470b3579/b/src/OpenEXR/IlmImf/ImfHuf.cpp:56:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   55 | #include <algorithm>
  +++ |+#include <cstdint>
   56 | 
/home/juliangro/.conan2/p/b/openeb4cf8470b3579/b/src/OpenEXR/IlmImf/ImfHuf.cpp:1107:16: error: ‘nBytes’ was not declared in this scope; did you mean ‘nBits’?
 1107 |     if ( ptr + nBytes > compressed+nCompressed)
      |                ^~~~~~
      |                nBits
/home/juliangro/.conan2/p/b/openeb4cf8470b3579/b/src/OpenEXR/IlmImf/ImfHuf.cpp:1124:31: error: ‘nBytes’ was not declared in this scope; did you mean ‘nBits’?
 1124 |         if( ptr-compressed  + nBytes > nCompressed)
      |                               ^~~~~~
      |                               nBits
gmake[2]: *** [OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/build.make:328: OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfHuf.cpp.o] Fehler 1
gmake[2]: *** Es wird auf noch nicht beendete Prozesse gewartet....
gmake[1]: *** [CMakeFiles/Makefile2:408: OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/all] Fehler 2
gmake: *** [Makefile:136: all] Fehler 2

openexr/2.5.7: ERROR: 
Package '482cc1204418670010a0a999935298e9eccc0e14' build failed
openexr/2.5.7: WARN: Build folder /home/juliangro/.conan2/p/b/openeb4cf8470b3579/b/build/Release
*********************************************************
Recipe 'openexr/2.5.7' cannot build its binary
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter, report it at https://github.com/conan-io/conan-center-index/issues
If it is your recipe, check if it is updated to 2.0
*********************************************************

ERROR: openexr/2.5.7: Error in build() method, line 96
	cmake.build()
	ConanException: Error 2 while executing
juliangro@x299-desktop:~/git/overte$ 

OpenEXR 2.3.0 from VCPKG comes with a patch that touches a similar component. Not sure if this is related though.

diff --git a/OpenEXR/IlmImf/CMakeLists.txt b/OpenEXR/IlmImf/CMakeLists.txt
index e1a8740..d31cf68 100644
--- a/OpenEXR/IlmImf/CMakeLists.txt
+++ b/OpenEXR/IlmImf/CMakeLists.txt
@@ -2,14 +2,6 @@
 
 SET(CMAKE_INCLUDE_CURRENT_DIR 1)
 
-IF (WIN32)
-  SET(RUNTIME_DIR ${OPENEXR_PACKAGE_PREFIX}/bin)
-  SET(WORKING_DIR ${RUNTIME_DIR})
-ELSE ()
-  SET(RUNTIME_DIR ${OPENEXR_PACKAGE_PREFIX}/lib)
-  SET(WORKING_DIR .)
-ENDIF ()
-
 SET(BUILD_B44EXPLOGTABLE OFF)
 IF (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/b44ExpLogTable.h")
   SET(BUILD_B44EXPLOGTABLE ON)

JulianGro avatar Oct 02 '23 09:10 JulianGro

Maybe the package doesn't play well with such a relatively new compiler?

Probably, we use an ancient version of openexr, the latest version is 3.2.1 while Overte needs to use 2.5.7

AnotherFoxGuy avatar Oct 02 '23 11:10 AnotherFoxGuy

Something to figure out later: The resulting binary seems to be searching for the Qt platform plugins in the wrong directory.

juliangro@x299-desktop:~/git/overte/build$ QT_DEBUG_PLUGINS=1 ./interface/interface --disable-displays "OpenVR (Vive)" --disable-inputs "OpenVR (Vive)","Sdl2" --allowMultipleInstances
[10/02 23:02:35] [DEBUG] [hifi.shared] Settings file: "/home/juliangro/.config/Overte - dev/Interface.json"
[10/02 23:02:35] [DEBUG] [settings.manager] Initializing settings write thread
[10/02 23:02:35] [WARNING] [default] QEventLoop: Cannot be used without QApplication
[10/02 23:02:35] [DEBUG] [default] UserActivityLogger is enabled: false
[10/02 23:02:35] [INFO] [default] Disabling following display plugins: ("OpenVR (Vive)")
[10/02 23:02:35] [WARNING] [default] DependencyManager::get(): No instance available for 13PluginManager
[10/02 23:02:35] [INFO] [default] Disabling following input plugins: ("OpenVR (Vive)", "Sdl2")
[10/02 23:02:35] [WARNING] [default] DependencyManager::get(): No instance available for 13PluginManager
[10/02 23:02:35] [DEBUG] [default] QFactoryLoader::QFactoryLoader() checking directory path "/home/juliangro/git/overte/build/interface/platforms" ...
[10/02 23:02:35] [WARNING] [qt.qpa.plugin] Could not find the Qt platform plugin "xcb" in ""
[10/02 23:02:35] [FATAL] [default] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
[10/02 23:02:35] [FATAL] [default] 
Abgebrochen (Speicherabzug geschrieben)
juliangro@x299-desktop:~/git/overte/build$ 

JulianGro avatar Oct 02 '23 21:10 JulianGro

Building libnode through conan fails on Ubuntu 20.04. profile detect seems to have chosen C++14, while libnode seems to require C++17 or higher to build. Log: https://bin.linux.pizza/?3ad49c3deaebf232#5NxEbsMUNagxtaMvnFJxm3dpWXTt2Ja5CJQrYio89wAR

JulianGro avatar Oct 02 '23 21:10 JulianGro

Just tried on aarch64 postmarketOS. (I cannot select text or pipe it to file for some reason.) Screenshot_20231007_202237 It looks like it is trying to install gl through the Alpine Package manager, which is not a valid package name. Unfortunately, Conan Center is having issues, so I don't know how to take a look at the source code.

JulianGro avatar Oct 07 '23 18:10 JulianGro

I don't know how to take a look at the source code.

The source for the package is here: https://github.com/conan-io/conan-center-index/blob/master/recipes/opengl/all/conanfile.py

AnotherFoxGuy avatar Oct 07 '23 18:10 AnotherFoxGuy

Installing a bunch of packages fixed the gl issue. Screenshot_20231007_221300

JulianGro avatar Oct 07 '23 20:10 JulianGro

Fixed the issue that caused the avatars to break, at some point the quaternion component order got changed in GLM So downgrading GLM fixes it for now

AnotherFoxGuy avatar Mar 19 '24 00:03 AnotherFoxGuy

Currently segfaults on startup on Linux

Thread 1 "interface" received signal SIGSEGV, Segmentation fault.
0x00007ffff7b22f73 in btCompoundShape::addChildShape(btTransform const&, btCollisionShape*) ()
   from /home/anotherfoxguy/Documents/github/overte/build/libraries/physics/libphysics.so
(gdb) bt
#0  0x00007ffff7b22f73 in btCompoundShape::addChildShape(btTransform const&, btCollisionShape*) ()
    at /home/anotherfoxguy/Documents/github/overte/build/libraries/physics/libphysics.so
#1  0x00007ffff7ac76b0 in ShapeFactory::createShapeFromInfo (info=...) at /home/anotherfoxguy/Documents/github/overte/libraries/physics/src/ShapeFactory.cpp:419
#2  0x00007ffff7ac9dc3 in ShapeManager::getShape (this=0x7fffffffb180, info=...) at /home/anotherfoxguy/Documents/github/overte/libraries/physics/src/ShapeManager.cpp:76
#3  0x00007ffff7ab2ab2 in PhysicalEntitySimulation::buildMotionStatesForEntitiesThatNeedThem (this=this@entry=0x7fffc6bfb3d0)
    at /home/anotherfoxguy/Documents/github/overte/libraries/physics/src/PhysicalEntitySimulation.cpp:375
#4  0x00007ffff7ab33c6 in PhysicalEntitySimulation::buildPhysicsTransaction (this=0x7fffc6bfb3d0, transaction=...)
    at /home/anotherfoxguy/Documents/github/overte/libraries/physics/src/PhysicalEntitySimulation.cpp:414
#5  0x00005555558becc4 in Application::update (this=this@entry=0x7fffffffb040, deltaTime=0.0106306132) at /usr/include/c++/14.1.1/bits/shared_ptr_base.h:1666
#6  0x00005555558c223c in Application::idle (this=this@entry=0x7fffffffb040) at /home/anotherfoxguy/Documents/github/overte/interface/src/Application.cpp:5393
#7  0x00005555558d6708 in Application::event (this=0x7fffffffb040, event=0x7fff1cabade0) at /home/anotherfoxguy/Documents/github/overte/interface/src/Application.cpp:4328
#8  0x00007fffe7156331 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#9  0x00007ffff6eab968 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#10 0x00007ffff6eac406 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#11 0x00007ffff6ef62e0 in ??? () at /usr/lib/libQt5Core.so.5
#12 0x00007fffe5114a89 in g_main_dispatch (context=0x7fffd1bdad40) at ../glib/glib/gmain.c:3344
#13 0x00007fffe51769b7 in g_main_context_dispatch_unlocked (context=0x7fffd1bdad40) at ../glib/glib/gmain.c:4152
#14 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7fffd1bdad40, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at ../glib/glib/gmain.c:4217
#15 0x00007fffe5113f95 in g_main_context_iteration (context=0x7fffd1bdad40, may_block=1) at ../glib/glib/gmain.c:4282
#16 0x00007ffff6efa27f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#17 0x00007ffff6ea372c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#18 0x00007ffff6eafafd in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#19 0x000055555574b17f in main (argc=<optimized out>, argv=<optimized out>) at /home/anotherfoxguy/Documents/github/overte/interface/src/main.cpp:776

AnotherFoxGuy avatar Jun 01 '24 20:06 AnotherFoxGuy

Built, doesn't start. Gets stuck on:

[06/01 23:34:30] [CRITICAL] [hifi.networking] PAGE: Failed to lookup address of STUN server stun1.l.google.com
[06/01 23:34:30] [WARNING] [hifi.networking] PAGE: Failed to lookup public address via STUN server at stun1.l.google.com:19302 (likely a critical error for auto-networking).
[06/01 23:34:30] [DEBUG] [hifi.networking] LimitedNodeList public socket will be set with local port and null QHostAddress.

daleglass avatar Jun 01 '24 21:06 daleglass

Okay, interesting. We already have a suitable test. Build with cmake -DBUILD_TESTS=ON, make all-tests

Run the test in tests/networking/networking-PacketTests

Here's from master:

********* Start testing of PacketTests *********
Config: Using QtTest library 5.15.13, Qt 5.15.13 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 14.1.1 20240507 (Red Hat 14.1.1-1)), fedora 40
PASS   : PacketTests::initTestCase()
PASS   : PacketTests::emptyPacketTest()
PASS   : PacketTests::writeTest()
PASS   : PacketTests::readTest()
PASS   : PacketTests::writePastCapacityTest()
PASS   : PacketTests::primitiveTest()
PASS   : PacketTests::packetTypeTest()
PASS   : PacketTests::cleanupTestCase()
Totals: 8 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms
********* Finished testing of PacketTests *********

And here's from conan branch:

********* Start testing of PacketTests *********
Config: Using QtTest library 5.15.13, Qt 5.15.13 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 14.1.1 20240507 (Red Hat 14.1.1-1)), fedora 40
PASS   : PacketTests::initTestCase()
PASS   : PacketTests::emptyPacketTest()
PASS   : PacketTests::writeTest()
PASS   : PacketTests::readTest()
QFATAL : PacketTests::writePastCapacityTest() ASSERT failure in BasePacket::writeData: "not enough space for write", file /home/dale/git/overte/libraries/networking/src/udt/BasePacket.cpp, line 175
FAIL!  : PacketTests::writePastCapacityTest() Received a fatal error.
   Loc: [Unknown file(0)]
Totals: 4 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms
********* Finished testing of PacketTests *********
zsh: IOT instruction (core dumped)  ./networking-PacketTests

daleglass avatar Jun 01 '24 22:06 daleglass

False alarm, it's an assertion triggered by a test. Fixed in #993

daleglass avatar Jun 02 '24 08:06 daleglass

After #994, test networking-ResourceTests works, and resolves the lookup correctly. Hm.

QDEBUG : ResourceTests::downloadFirst() hifi.networking: QHostInfo lookup result for "stun1.l.google.com" with lookup ID 1 is "74.125.250.129"
QDEBUG : ResourceTests::downloadFirst() hifi.networking: Sending initial stun request to stun1.l.google.co

daleglass avatar Jun 02 '24 18:06 daleglass

Okay, I finally appear to be getting somewhere.

Lookups actually work. The problem is that the code never receives the answer, because the interface thread gets stuck. It gets stuck in QSslSocketPrivate::setDefaultSupportedCiphers, on QMutexLocker locker(&globalData()->mutex);.

Since it deadlocks there for some reason, that stops any event processing on the thread.

daleglass avatar Jun 02 '24 21:06 daleglass

It gets stuck on this:

#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007fffacab8010 in __cxxabiv1::__cxa_guard_acquire
    (g=0x7ffff43ff660 <guard variable for (anonymous namespace)::Q_QGS_globalData::innerFunction()::holder>)
    at ../../../../libstdc++-v3/libsupc++/guard.cc:348
#2  0x00007ffff437834f in (anonymous namespace)::Q_QGS_globalData::innerFunction () at ssl/qsslsocket.cpp:387
#3  QGlobalStatic<QSslSocketGlobalData, (anonymous namespace)::Q_QGS_globalData::innerFunction, (anonymous namespace)::Q_QGS_globalData::guard>::operator() (this=<optimized out>)
    at ../../include/QtCore/../../src/corelib/global/qglobalstatic.h:138
#4  0x00007ffff437c7ba in QSslSocketPrivate::setDefaultSupportedCiphers (ciphers=...) at ssl/qsslsocket.cpp:2311
#5  0x00007ffff438fa24 in QSslSocketPrivate::resetDefaultCiphers () at ssl/qsslsocket_openssl.cpp:855
#6  0x00007ffff4390d50 in QSslSocketPrivate::ensureCiphersAndCertsLoaded () at ssl/qsslsocket_openssl.cpp:2095
#7  0x00007ffff43910c7 in QSslSocketPrivate::ensureInitialized () at ssl/qsslsocket_openssl.cpp:803
#8  0x00007ffff436bfce in QSslCertificatePrivate::QSslCertificatePrivate (this=0x507004c78540)
    at ssl/qsslcertificate_p.h:93
#9  QSslCertificate::QSslCertificate (this=this@entry=0x50f00098c238, data=..., format=format@entry=QSsl::Pem)
    at ssl/qsslcertificate.cpp:187
#10 0x00007ffff43783aa in QSslConfigurationPrivate::QSslConfigurationPrivate (this=0x50f00098c230)
    at ssl/qsslconfiguration_p.h:97
#11 QSslSocketGlobalData::QSslSocketGlobalData
    (this=0x7ffff43ff680 <(anonymous namespace)::Q_QGS_globalData::innerFunction()::holder>)
    at ssl/qsslsocket.cpp:373
#12 Holder::Holder (this=0x7ffff43ff680 <(anonymous namespace)::Q_QGS_globalData::innerFunction()::holder>)
    at ssl/qsslsocket.cpp:387
#13 (anonymous namespace)::Q_QGS_globalData::innerFunction () at ssl/qsslsocket.cpp:387
#14 QGlobalStatic<QSslSocketGlobalData, (anonymous namespace)::Q_QGS_globalData::innerFunction, (anonymous namespace)::Q_QGS_globalData::guard>::operator() (this=<optimized out>)
    at ../../include/QtCore/../../src/corelib/global/qglobalstatic.h:138
#15 0x00007ffff4379ad8 in QSslConfigurationPrivate::defaultConfiguration () at ssl/qsslsocket.cpp:2439
#16 0x00007ffff436fef2 in QSslConfiguration::defaultConfiguration () at ssl/qsslconfiguration.cpp:1105
#17 0x00007ffff42b36be in QNetworkRequest::sslConfiguration (this=this@entry=0x7fffffff4e50)
    at access/qnetworkrequest.cpp:747
#18 0x00007ffff4315bec in QNetworkReplyHttpImpl::QNetworkReplyHttpImpl
    (this=this@entry=0x502000468150, manager=manager@entry=0x502000681bb0, request=..., operation=@0x7fffffff4e2c: QNetworkAccessManager::PutOperation, outgoingData=outgoingData@entry=0x5020003f46d0)
    at access/qnetworkreplyhttpimpl.cpp:199
#19 0x00007ffff42a3913 in QNetworkAccessManager::createRequest
    (this=0x502000681bb0, op=<optimized out>, originalReq=<optimized out>, outgoingData=0x5020003f46d0)
    at access/qnetworkaccessmanager.cpp:1501
#20 0x00007ffff42a04f2 in QNetworkAccessManager::put
    (this=this@entry=0x502000681bb0, request=..., data=data@entry=0x5020003f46d0)
    at access/qnetworkaccessmanager.cpp:962
#21 0x00007ffff42a0566 in QNetworkAccessManager::put (this=this@entry=0x502000681bb0, request=..., data=...)
    at access/qnetworkaccessmanager.cpp:977
--Type <RET> for more, q to quit, c to continue without paging--
#22 0x00007fffb1cfd859 in AccountManager::sendRequest (this=<optimized out>, path=..., authType=<optimized out>, 
    authType@entry=AccountManagerAuth::Optional, operation=<optimized out>, 
    operation@entry=QNetworkAccessManager::PutOperation, callbackParams=..., dataByteArray=..., dataMultiPart=<optimized out>, propertyMap=<optimized out>)
    at /home/dale/git/overte/libraries/networking/src/AccountManager.cpp:325
#23 0x000000000139e998 in DiscoverabilityManager::updateLocation (this=0x50d00015d640)
    at /home/dale/git/overte/interface/src/DiscoverabilityManager.cpp:127
#24 0x0000000000fc2d30 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (DiscoverabilityManager::*)()>::call(void (DiscoverabilityManager::*)(), DiscoverabilityManager*, void**)
    (f=<optimized out>, o=<optimized out>, arg=0x7fffffff6250) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:151
#25 QtPrivate::FunctionPointer<void (DiscoverabilityManager::*)()>::call<QtPrivate::List<>, void>(void (DiscoverabilityManager::*)(), DiscoverabilityManager*, void**) (f=<optimized out>, o=<optimized out>, arg=0x7fffffff6250)
    at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#26 QtPrivate::QSlotObject<void (DiscoverabilityManager::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=<optimized out>, this_=<optimized out>, r=<optimized out>, a=0x7fffffff6250, ret=<optimized out>)
    at /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
#27 0x00007fffe66e8dbe in QtPrivate::QSlotObjectBase::call
    (this=0x50300023bc00, r=0x50d00015d640, a=0x7fffffff6250)
    at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#28 doActivate<false> (sender=0xa09b240 <locationUpdateTimer>, signal_index=3, argv=0x7fffffff6250)
    at kernel/qobject.cpp:3925
#29 0x00007fffe66e2a67 in QMetaObject::activate
    (sender=<optimized out>, m=m@entry=0x7fffe696b540 <QTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffffff6250) at kernel/qobject.cpp:3985
#30 0x00007fffe66ed36d in QTimer::timeout (this=<optimized out>, _t1=...) at .moc/moc_qtimer.cpp:205
#31 0x00007fffe66e0c2f in QObject::event (this=0xa09b240 <locationUpdateTimer>, e=0x7fffffff64c0)
    at kernel/qobject.cpp:1369
#32 0x00007fffb518cbc5 in QApplicationPrivate::notify_helper
    (this=this@entry=0x7fffffff6250, receiver=receiver@entry=0xa09b240 <locationUpdateTimer>, e=0x7fffffff64c0, 
    e@entry=0x50e0000ac5b0) at kernel/qapplication.cpp:3640
#33 0x00007fffb5193e4b in QApplication::notify
    (this=this@entry=0x7fffa770d1b0, receiver=receiver@entry=0xa09b240 <locationUpdateTimer>, e=0x50e0000ac5b0, 
    e@entry=0x7fffffff64c0) at kernel/qapplication.cpp:3386
#34 0x0000000000f95b71 in Application::notify (this=0x7fffa770d1b0, object=<optimized out>, event=<optimized out>)
    at /home/dale/git/overte/interface/src/Application.cpp:4292
#35 0x00007fffe66b4688 in QCoreApplication::notifyInternal2
    (receiver=0xa09b240 <locationUpdateTimer>, event=0x7fffffff64c0) at kernel/qcoreapplication.cpp:1064
#36 0x00007fffe66b48b2 in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>)
    at kernel/qcoreapplication.cpp:1462
#37 0x00007fffe670787e in QTimerInfoList::activateTimers (this=0x50f000028f00) at kernel/qtimerinfo_unix.cpp:643
#38 0x00007fffe6708209 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:183
#39 0x00007fffd990f6ac in g_main_dispatch (context=0x510000001540) at ../glib/gmain.c:3344
--Type <RET> for more, q to quit, c to continue without paging--
#40 g_main_context_dispatch_unlocked (context=0x510000001540) at ../glib/gmain.c:4152
#41 0x00007fffd9970708 in g_main_context_iterate_unlocked.isra.0
    (context=context@entry=0x510000001540, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at ../glib/gmain.c:4217
#42 0x00007fffd9910b23 in g_main_context_iteration (context=0x510000001540, may_block=1) at ../glib/gmain.c:4282
#43 0x00007fffe67085cd in QEventDispatcherGlib::processEvents (this=0x50300064dc20, flags=...)
    at kernel/qeventdispatcher_glib.cpp:423
#44 0x00007fffe66b303b in QEventLoop::exec (this=this@entry=0x7fffffff6780, flags=..., flags@entry=...)
    at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#45 0x00007fffe66bb406 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#46 0x00007fffcbf5044d in QGuiApplication::exec () at kernel/qguiapplication.cpp:1863
#47 0x00007fffb518cb39 in QApplication::exec () at kernel/qapplication.cpp:2832
#48 0x000000000078a540 in main (argc=<optimized out>, argv=<optimized out>)
    at /home/dale/git/overte/interface/src/main.cpp:776

And does so predictably. Originally this happened from Application.cpp:1371, so I tried hacking it out to see if it would help. It indeed gets things unstuck, but it hangs again later here.

daleglass avatar Jun 02 '24 22:06 daleglass

Right. PR #996 when applied to the conan branch reproduces the problem. Second test just hangs.

There's something very wrong here given that this runs just Qt's own functionality.

daleglass avatar Jun 02 '24 23:06 daleglass

Which version of OpenSSL do you have installed on your system?

AnotherFoxGuy avatar Jun 03 '24 08:06 AnotherFoxGuy

Which version of OpenSSL do you have installed on your system?

It appears to be some sort of Qt internal initialization bug and you can actually fix it by asking Qt for the SSL library's version!

I submitted a PR to your branch. That gets the interface to start.

daleglass avatar Jun 03 '24 21:06 daleglass

I added a new dependency (artery-font-format) here: https://github.com/overte-org/overte/pull/937

let me know if I can help migrate it for this

HifiExperiments avatar Jun 10 '24 23:06 HifiExperiments

I added a new dependency (artery-font-format) here: #937

There is already a package for artery-font-format, is version 1.0.1 OK to use? https://conan.io/center/recipes/artery-font-format?version=1.0.1

AnotherFoxGuy avatar Jun 11 '24 08:06 AnotherFoxGuy

I believe that’s the version I used, but I did have to apply a patch

HifiExperiments avatar Jun 11 '24 08:06 HifiExperiments

I just tried building on Windows 10 Pro 22H2 with Microsoft Visual Studio Community 2022 (64-bit) - Version 17.11.0. The dependencies all seemed to compile fine without errors. But when I loaded the solution into the VS IDE and tried to build, very bad, no good things happened.

A tab separated values file follows:

VS22_Build_Errors-20240818.tsv.txt

MarcusLlewellyn avatar Aug 18 '24 23:08 MarcusLlewellyn