-
Notifications
You must be signed in to change notification settings - Fork 67
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
Failed compilation Windows VSCode & Ubuntu - missing files (bake_transform.cpp bake_transform.hpp) #144
Comments
Hi, thanks for the bug report. |
At least some of the errors you list may still be present. This is (most likely) due to different (older) compiler version; I mostly test only with quite recent versions of MSVC, gcc and clang, and there may be issues with older compiler versions. If you are able to update to newer GCC, or use clang instead, that might help. |
I pushed some more fixes, now it compiles in WSL Ubuntu 22.04 with gcc 11. |
Thanks for quick response. You fixed the error. /home/o/Downloads/GUI_EXPERIMENTS_COMPILE/erhe/build/_deps/joltphysics-src/Build/../Jolt/Core/UnorderedMap.h:41:27: note: ‘index’ was declared here sudo add-apt-repository ppa:ubuntu-toolchain-r/test cd ~/Downloads/GUI_EXPERIMENTS_COMPILE/erhe sed -i 's/size_type index;/size_type index = 0;/' make -j$(nproc) VERBOSE=1 cd ~/Downloads/GUI_EXPERIMENTS_COMPILE/erhe/src/editor/ |
I was able to reproduce the issue, by using the steps you documented. Normally, I use VSCode with C++ and cmake extensions, and I use cmake presets, and using that build method, the issue does not show up. I have made some fixes, but the issue is not yet fully resolved. Meanwhile, if you install clang I will try to make the GCC compiler work as well. |
You could you try these commands (they work for me)
|
The missing code was the major problem. I don't know if any other these other experiences are of interest to you, but there's some partial solutions to work with.
TBF This was my second compilation, so I may have made overlooked some things / fixes. But i'll let you decide. The bake_transform is real though. It's just not there.
Very sad i wasn't able to get this running.
gcc --version
g++ --version
gcc (Ubuntu 11.4.0-1ubuntu1
22.04) 11.4.022.04) 11.4.0g++ (Ubuntu 11.4.0-1ubuntu1
Ubuntu 22.04.5 LTS (Jammy Jellyfish)
Wasn't able to get this compiled on VSCODE either. Latest error was the bake_transform.cpp not existing (both OS)
CMake Error at cmake/functions.cmake:54 (target_sources):
Cannot find source file:
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
.ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
.f95 .f03 .hip .ispc
Call Stack (most recent call first):
src/erhe/geometry/CMakeLists.txt:4 (erhe_target_sources_grouped)
bake_transform.hpp and bake_transform.cpp dont exist afaik
one does not simply remove these without causing a lot of knock on errors.
it's definitely not where it's supposed to be
~/Downloads/GUI_EXPERIMENTS_COMPILE/erhe-main-3D-stuff/erhe-main/src/erhe/geometry/erhe_geometry/operation$ ls
ambo.cpp gyro.hpp repair.hpp
ambo.hpp intersection.cpp reverse.cpp
catmull_clark_subdivision.cpp intersection.hpp reverse.hpp
catmull_clark_subdivision.hpp join.cpp sqrt3_subdivision.cpp
clone.cpp join.hpp sqrt3_subdivision.hpp
clone.hpp kis.cpp subdivide.cpp
difference.cpp kis.hpp subdivide.hpp
difference.hpp meta.cpp triangulate.cpp
dual.cpp meta.hpp triangulate.hpp
dual.hpp normalize.cpp truncate.cpp
geometry_operation.cpp normalize.hpp truncate.hpp
geometry_operation.hpp octree.hpp union.cpp
gyro.cpp repair.cpp union.hpp
/erhe-main-3D-stuff/erhe-main/src/erhe/gltf/erhe_gltf/gltf_fastgltf.cpp:365:24: error: ‘from_chars’ is not a member of ‘std’
365 | auto result = std::from_chars(number_part.data(), number_part.data() + number_part.size(), integer_value);
| ^~~~~~~~~~
make[2]: *** [src/erhe/gltf/CMakeFiles/erhe_gltf.dir/build.make:104: src/erhe/gltf/CMakeFiles/erhe_gltf.dir/erhe_gltf/gltf_fastgltf.cpp.o] Error 1
Looks like it's solved with this (attached)
gltf_fastgltf_NEW VERSION v1.txt
Linux problem, wasn't a problem on Windows VSCODE, although I was just doing it from BASH at this point.
CMake Error at CMakeLists.txt:339 (add_subdirectory):
add_subdirectory given source
"/home/o/Downloads/GUI_EXPERIMENTS_COMPILE/erhe-main-3D-stuff/erhe-main/build/_deps/joltphysics-src/build"
which is not an existing directory.
cd ~/Downloads/GUI_EXPERIMENTS_COMPILE/erhe-main-3D-stuff/erhe-main/build/_deps && ls
bvh-build glm-subbuild
bvh-src harfbuzz-build
bvh-subbuild harfbuzz-src
concurrentqueue-build harfbuzz-subbuild
concurrentqueue-src joltphysics-build
concurrentqueue-subbuild joltphysics-src
cxxopts-build joltphysics-subbuild
Edit CMakeLists.txt
The New Jolt Error: index is used uninitialized (-Werror=uninitialized)
/home/o/Downloads/JoltPhysics/Build/../Jolt/Core/HashTable.h: In member function ‘void JPH::DebugRendererPlayback::Parse(JPH::StreamIn&)’:
/home/o/Downloads/JoltPhysics/Build/../Jolt/Core/HashTable.h:227:30: error: ‘index’ is used uninitialized [-Werror=uninitialized]
227 | return mData[inIndex];
This means your compiler sees a path in Jolt’s code where a variable named index might not be assigned before use. Because all warnings are being treated as errors (-Werror), it aborts compilation.
suppressed with this
cd ~/Downloads/GUI_EXPERIMENTS_COMPILE/erhe-main-3D-stuff/erhe-main
mkdir build
cd build
cmake ..
-DCMAKE_BUILD_TYPE=Release
-DVORPALINE_PLATFORM=Linux64-gcc
-DHERHE_PHYSICS_LIBRARY=jolt
-DCMAKE_CXX_FLAGS="-Wno-error=uninitialized"
Actually dont know if this is a reproducible error - it's probably me being lazy
Didnt test installing dependencies (so that probably woudld've worked)
CMake Error at C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.29/Modules/FetchContent.cmake:1714 (message):
Build step for harfbuzz failed: 1
Call Stack (most recent call first):
C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.29/Modules/FetchContent.cmake:1854:EVAL:2 (__FetchContent_directPopulate)
C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.29/Modules/FetchContent.cmake:1854 (cmake_language)
out/build/Configure Empty/cmake/CPM_0.40.5.cmake:1133 (FetchContent_Populate)
out/build/Configure Empty/cmake/CPM_0.40.5.cmake:911 (cpm_fetch_package)
CMakeLists.txt:295 (CPMAddPackage)
I just changed it to -DERHE_TEXT_LAYOUT_LIBRARY=freetype ^
Your project tries to fetch and build freetype or harfbuzz (for text layout/font rasterization). The logs show:
Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
Could NOT find PNG ...
Could NOT find BZip2 ...
Could NOT find BrotliDec ...
scripts\configure_vs2022.bat
this configure script worked better for me, the other one wasn't looking for makefile
in the right directory on repeated builds
:: Remove the old build folder if it exists
if exist build (
rmdir build /s /q
)
:: Create the new build folder
mkdir build
cd build
cmake ^
-G "Visual Studio 17 2022" ^
-A x64 ^
-S .. ^
-B . ^
The text was updated successfully, but these errors were encountered: