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

googletest, POWERSHELL_PATH-NOTFOUND and other errors on Linux #133

Open
expenses opened this issue Nov 23, 2023 · 1 comment
Open

googletest, POWERSHELL_PATH-NOTFOUND and other errors on Linux #133

expenses opened this issue Nov 23, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@expenses
Copy link

Here's what happens when I try and build this on Arch Linux:
cmake -S . -B build -G Ninja; and cmake --build build:

FAILED: GeneratedFiles/SchemaJson.h /home/ashley/projects/glTF-SDK/build/GeneratedFiles/SchemaJson.h
cd /home/ashley/projects/glTF-SDK/GLTFSDK && POWERSHELL_PATH-NOTFOUND -ExecutionPolicy Bypass /home/ashley/projects/glTF-SDK/GLTFSDK/GenerateSchemaJsonHeader.ps1 -outPath /home/ashley/projects/glTF-SDK/build/GeneratedFiles
/bin/sh: line 1: POWERSHELL_PATH-NOTFOUND: command not found
[3/55] Building CXX object googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
FAILED: googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
/usr/bin/c++  -I/home/ashley/projects/glTF-SDK/build/googletest-src/googletest/include -I/home/ashley/projects/glTF-SDK/build/googletest-src/googletest -std=c++11 -Wall -Wshadow -Werror -Wno-error=dangling-else -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -MD -MT googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o -MF googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.d -o googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o -c /home/ashley/projects/glTF-SDK/build/googletest-src/googletest/src/gtest-all.cc
In file included from /home/ashley/projects/glTF-SDK/build/googletest-src/googletest/src/gtest-all.cc:42:
/home/ashley/projects/glTF-SDK/build/googletest-src/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
/home/ashley/projects/glTF-SDK/build/googletest-src/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/home/ashley/projects/glTF-SDK/build/googletest-src/googletest/src/gtest-death-test.cc:1290:13: note: by argument 1 of type ‘const void*’ to ‘void testing::internal::StackLowerThanAddress(const void*, bool*)’ declared here
 1290 | static void StackLowerThanAddress(const void* ptr, bool* result) {
      |             ^~~~~~~~~~~~~~~~~~~~~
/home/ashley/projects/glTF-SDK/build/googletest-src/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here
 1299 |   int dummy;
      |       ^~~~~
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.

The powershell issue can be worked around by installing the powershell-bin AUR package. I'm not sure why I should need to install a special shell to build a SDK like this, but whatever. I then commented out the gtest stuff and tried to build it again:

FAILED: GLTFSDK/CMakeFiles/GLTFSDK.dir/Source/AnimationUtils.cpp.o
/usr/bin/c++  -I/home/ashley/projects/glTF-SDK/GLTFSDK/Inc -I/home/ashley/projects/glTF-SDK/Built/Int -I/home/ashley/projects/glTF-SDK/build/GeneratedFiles -I/home/ashley/projects/glTF-SDK/build/RapidJSON-src/include -O2 -g -DNDEBUG -std=gnu++14 -MD -MT GLTFSDK/CMakeFiles/GLTFSDK.dir/Source/AnimationUtils.cpp.o -MF GLTFSDK/CMakeFiles/GLTFSDK.dir/Source/AnimationUtils.cpp.o.d -o GLTFSDK/CMakeFiles/GLTFSDK.dir/Source/AnimationUtils.cpp.o -c /home/ashley/projects/glTF-SDK/GLTFSDK/Source/AnimationUtils.cpp
In file included from /home/ashley/projects/glTF-SDK/GLTFSDK/Inc/GLTFSDK/GLTFResourceReader.h:8,
                 from /home/ashley/projects/glTF-SDK/GLTFSDK/Source/AnimationUtils.cpp:7:
/home/ashley/projects/glTF-SDK/GLTFSDK/Inc/GLTFSDK/ResourceReaderUtils.h: In function ‘std::vector<unsigned char> Microsoft::glTF::GetDecodeTable()’:
/home/ashley/projects/glTF-SDK/GLTFSDK/Inc/GLTFSDK/ResourceReaderUtils.h:99:56: error: ‘numeric_limits’ is not a member of ‘std’
   99 |             std::vector<uint8_t> decodeTable(128, std::numeric_limits<uint8_t>::max());
      |                                                        ^~~~~~~~~~~~~~
/home/ashley/projects/glTF-SDK/GLTFSDK/Inc/GLTFSDK/ResourceReaderUtils.h:99:78: error: expected primary-expression before ‘>’ token
   99 |             std::vector<uint8_t> decodeTable(128, std::numeric_limits<uint8_t>::max());
      |                                                                              ^
/home/ashley/projects/glTF-SDK/GLTFSDK/Inc/GLTFSDK/ResourceReaderUtils.h:99:81: error: ‘::max’ has not been declared; did you mean ‘std::max’?
   99 |             std::vector<uint8_t> decodeTable(128, std::numeric_limits<uint8_t>::max());
      |                                                                                 ^~~
      |                                                                                 std::max
@expenses expenses changed the title googletest and POWERSHELL_PATH-NOTFOUND errors on Linux googletest, POWERSHELL_PATH-NOTFOUND and other errors on Linux Nov 23, 2023
@bghgary
Copy link
Contributor

bghgary commented Nov 29, 2023

Might be related to this PR: #86

@bghgary bghgary added enhancement New feature or request help wanted Extra attention is needed triaged labels Dec 7, 2023
@thomlucc thomlucc removed the triaged label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants