-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Get trouble in compiling glog for android! #355
Comments
If you look into However, this is just the compilation of a unittest that fails due to it's reliance on |
Summary: Atul and I noticed an issue compiling glog. It was [this error](google/glog#355 (comment)), and it should've been addressed by `BUILD_TESTING`, but for some reason it wasn't. I also noticed that the issue would only consistently repro after cleaning all build artifacts. I'm still not sure why that is. To debug the issue I ran `./gradlew` with the `-i` flag. I saw this in the output: ``` evaluate library symbolize_unittest (armeabi-v7a) No CMake version was specified in build.gradle. Using default version 3.10.2. building target executable symbolize_unittest because no targets are specified. ``` This led me to realize that because we weren't specifying `targets`, Gradle was configured to separately build `glog` directly (instead of through our `CMakeLists.txt`), and that was what was causing the issue. Test Plan: Make sure Android can build after cleaning all build artifacts: ``` ./gradlew clean && rm -rf build && rm -rf app/build && rm -rf app/.cxx && ./gradlew app:installDebug -PreactNativeDevServerPort=8081 ``` Reviewers: karol-bisztyga, atul Reviewed By: atul Subscribers: KatPo, palys-swm, Adrian Differential Revision: https://phabricator.ashoat.com/D1231
Hello everybody.
before compiling, i successfully installed gflag, so there was no warning when i Configure and Generate the glog.
(compile env: win10 ndk17 CMake3.12 MinGW)
then i was met errors like this:
D:\Restor\chajian\glog-0.3.5\build>make
[ 44%] Built target glog
[ 55%] Built target utilities_unittest
[ 66%] Built target demangle_unittest
[ 72%] Building CXX object CMakeFiles/logging_unittest.dir/src/logging_unittest.cc.o
D:\Restor\chajian\glog-0.3.5\src\logging_unittest.cc:617:17: error: use of undeclared identifier 'glob'
const int r = glob(pattern.c_str(), 0, NULL, &g);
^
D:\Restor\chajian\glog-0.3.5\src\logging_unittest.cc:622:3: error: use of undeclared identifier 'globfree'
globfree(&g);
^
2 errors generated.
CMakeFiles\logging_unittest.dir\build.make:61: recipe for target 'CMakeFiles/logging_unittest.dir/src/logging_unittest.cc.o' failed
make[2]: *** [CMakeFiles/logging_unittest.dir/src/logging_unittest.cc.o] Error 1
CMakeFiles\Makefile2:1078: recipe for target 'CMakeFiles/logging_unittest.dir/all' failed
make[1]: *** [CMakeFiles/logging_unittest.dir/all] Error 2
Makefile:161: recipe for target 'all' failed
make: *** [all] Error 2
I have no idea with it.
somebody can help me ?
The text was updated successfully, but these errors were encountered: