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

Linux cross-compile error, can't find .proto file, but it exists. #16650

Open
RavenGluttonous opened this issue Apr 26, 2024 · 0 comments
Open

Comments

@RavenGluttonous
Copy link

Dear Developer,

I'm encountering issues while cross-compiling for v7a, and I'd appreciate your assistance in identifying the root cause.

Compiler Version: 11.4.0
System: Linux

CMake Commands:

# For ARMv7-A
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(CMAKE_C_COMPILER  /usr/bin/arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++)
set(DCMAKE_CXX_STANDARD 14)

Terminal Error Messages:

[ 54%] Running cpp protocol buffer compiler on /home/xy/Desktop/protobuf/protobuf/src/google/protobuf/util/message_differencer_unittest_proto3.proto
gmake[2]: protobuf::protoc: No such file or directory
gmake[2]: *** [CMakeFiles/libtest_common.dir/build.make:435:google/protobuf/util/message_differencer_unittest_proto3.pb.h] Error 127
gmake[1]: *** [CMakeFiles/Makefile2:1602:CMakeFiles/libtest_common.dir/all] Error 2
gmake: *** [Makefile:146:all] Error 2

CMakeError.log Contents:

Performing C++ SOURCE FILE Test ABSL_INTERNAL_AT_LEAST_CXX20 failed with the following output:
Change Dir: /home/xy/Desktop/protobuf/protobuf/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_d8636/fast && /usr/bin/gmake -f CMakeFiles/cmTC_d8636.dir/build.make CMakeFiles/cmTC_d8636.dir/build
gmake[1]: Entering directory "/home/xy/Desktop/protobuf/protobuf/CMakeFiles/CMakeTmp"
Building CXX object CMakeFiles/cmTC_d8636.dir/src.cxx.o
/usr/bin/arm-linux-gnueabihf-g++ -DABSL_INTERNAL_AT_LEAST_CXX20  -o CMakeFiles/cmTC_d8636.dir/src.cxx.o -c /home/xy/Desktop/protobuf/protobuf/CMakeFiles/CMakeTmp/src.cxx
/home/xy/Desktop/protobuf/protobuf/CMakeFiles/CMakeTmp/src.cxx:6:4: error: #error "The compiler defaults or is configured for C++ < 20"
  6 | # error "The compiler defaults or is configured for C++ < 20"
   |  ^~~~~
gmake[1]: *** [CMakeFiles/cmTC_d8636.dir/build.make:78:CMakeFiles/cmTC_d8636.dir/src.cxx.o] Error 1
gmake[1]: Leaving directory "/home/xy/Desktop/protobuf/protobuf/CMakeFiles/CMakeTmp"
gmake: *** [Makefile:127:cmTC_d8636/fast] Error 2
Source File:

#ifdef _MSC_VER
# if _MSVC_LANG < 202002L
#  error "The compiler defaults or is configured for C++ < 20"
# endif
#elif __cplusplus < 202002L
# error "The compiler defaults or is configured for C++ < 20"
#endif
int main() { return 0; }
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

1 participant