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

assimp build error on ARCH #82

Open
kengregson opened this issue Jul 12, 2023 · 1 comment
Open

assimp build error on ARCH #82

kengregson opened this issue Jul 12, 2023 · 1 comment

Comments

@kengregson
Copy link

kengregson commented Jul 12, 2023

Hi,

Thanks for creating Glitter as a helping hand to us beginning OpenGL developers!
Following instructions on ARCH (EndeavourOS) results in compiler warnings (treated as errors) for assimp (in FBXParser.cpp)

While likely less than ideal, build completes with brute force override of assimp cmake OPTION via:
cmake .. -DASSIMP_WARNINGS_AS_ERRORS=OFF

Error output:
/home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp: In function ‘void Assimp::FBX::ParseVectorDataArray(std::vector<aiVector3t<float> >&, const Element&)’: /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:675:20: error: possibly dangling reference to a temporary [-Werror=dangling-reference] 675 | const Element& a = GetRequiredElement(scope,"a",&el); | ^ /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:675:42: note: the temporary was destroyed at the end of the full expression ‘Assimp::FBX::GetRequiredElement((* & scope), std::__cxx11::basic_string<char>(((const char*)"a"), std::allocator<char>()), (& el))’ 675 | const Element& a = GetRequiredElement(scope,"a",&el); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp: In function ‘void Assimp::FBX::ParseVectorDataArray(std::vector<aiColor4t<float> >&, const Element&)’: /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:755:20: error: possibly dangling reference to a temporary [-Werror=dangling-reference] 755 | const Element& a = GetRequiredElement(scope,"a",&el); | ^ /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:755:42: note: the temporary was destroyed at the end of the full expression ‘Assimp::FBX::GetRequiredElement((* & scope), std::__cxx11::basic_string<char>(((const char*)"a"), std::allocator<char>()), (& el))’ 755 | const Element& a = GetRequiredElement(scope,"a",&el); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp: In function ‘void Assimp::FBX::ParseVectorDataArray(std::vector<aiVector2t<float> >&, const Element&)’: /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:834:20: error: possibly dangling reference to a temporary [-Werror=dangling-reference] 834 | const Element& a = GetRequiredElement(scope,"a",&el); | ^ /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:834:42: note: the temporary was destroyed at the end of the full expression ‘Assimp::FBX::GetRequiredElement((* & scope), std::__cxx11::basic_string<char>(((const char*)"a"), std::allocator<char>()), (& el))’ 834 | const Element& a = GetRequiredElement(scope,"a",&el); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp: In function ‘void Assimp::FBX::ParseVectorDataArray(std::vector<int>&, const Element&)’: /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:900:20: error: possibly dangling reference to a temporary [-Werror=dangling-reference] 900 | const Element& a = GetRequiredElement(scope,"a",&el); | ^ /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:900:42: note: the temporary was destroyed at the end of the full expression ‘Assimp::FBX::GetRequiredElement((* & scope), std::__cxx11::basic_string<char>(((const char*)"a"), std::allocator<char>()), (& el))’ 900 | const Element& a = GetRequiredElement(scope,"a",&el); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp: In function ‘void Assimp::FBX::ParseVectorDataArray(std::vector<float>&, const Element&)’: /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:965:20: error: possibly dangling reference to a temporary [-Werror=dangling-reference] 965 | const Element& a = GetRequiredElement(scope,"a",&el); | ^ /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:965:42: note: the temporary was destroyed at the end of the full expression ‘Assimp::FBX::GetRequiredElement((* & scope), std::__cxx11::basic_string<char>(((const char*)"a"), std::allocator<char>()), (& el))’ 965 | const Element& a = GetRequiredElement(scope,"a",&el); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp: In function ‘void Assimp::FBX::ParseVectorDataArray(std::vector<unsigned int>&, const Element&)’: /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:1028:20: error: possibly dangling reference to a temporary [-Werror=dangling-reference] 1028 | const Element& a = GetRequiredElement(scope,"a",&el); | ^ /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:1028:42: note: the temporary was destroyed at the end of the full expression ‘Assimp::FBX::GetRequiredElement((* & scope), std::__cxx11::basic_string<char>(((const char*)"a"), std::allocator<char>()), (& el))’ 1028 | const Element& a = GetRequiredElement(scope,"a",&el); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp: In function ‘void Assimp::FBX::ParseVectorDataArray(std::vector<long unsigned int>&, const Element&)’: /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:1092:20: error: possibly dangling reference to a temporary [-Werror=dangling-reference] 1092 | const Element& a = GetRequiredElement(scope,"a",&el); | ^ /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:1092:42: note: the temporary was destroyed at the end of the full expression ‘Assimp::FBX::GetRequiredElement((* & scope), std::__cxx11::basic_string<char>(((const char*)"a"), std::allocator<char>()), (& el))’ 1092 | const Element& a = GetRequiredElement(scope,"a",&el); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp: In function ‘void Assimp::FBX::ParseVectorDataArray(std::vector<long int>&, const Element&)’: /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:1153:20: error: possibly dangling reference to a temporary [-Werror=dangling-reference] 1153 | const Element& a = GetRequiredElement(scope, "a", &el); | ^ /home/github.com/Polytonic/Glitter/Glitter/Vendor/assimp/code/AssetLib/FBX/FBXParser.cpp:1153:42: note: the temporary was destroyed at the end of the full expression ‘Assimp::FBX::GetRequiredElement((* & scope), std::__cxx11::basic_string<char>(((const char*)"a"), std::allocator<char>()), (& el))’ 1153 | const Element& a = GetRequiredElement(scope, "a", &el); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors make[2]: *** [Glitter/Vendor/assimp/code/CMakeFiles/assimp.dir/build.make:2064: Glitter/Vendor/assimp/code/CMakeFiles/assimp.dir/AssetLib/FBX/FBXParser.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [CMakeFiles/Makefile2:531: Glitter/Vendor/assimp/code/CMakeFiles/assimp.dir/all] Error 2 make: *** [Makefile:136: all] Error 2

@TimmyMcPickles
Copy link

TimmyMcPickles commented Dec 15, 2024

Did you ever get this resolved? I'm currently trying to set up glitter so I can streamline the learning process, but I get this same error when I run make in my build directory.

I first assumed that this was intended, and I just had to start writing the code from the tutorial, but it looks like the initial window making code is already there after running cmake and such to build the actual project files.

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

No branches or pull requests

2 participants