Requested CMAKE_C*_FLAGS are not used
-DCMAKE_CXX_FLAGS="-m32" doesn't work for poppler-20.10.0 on Solaris but I believe it is platform independent. 0.87.0 worked well. This is how configure fails:
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/gcc/9/bin/gcc
-- Check for working C compiler: /usr/gcc/9/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/gcc/9/bin/g++
-- Check for working CXX compiler: /usr/gcc/9/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test GCC_HAS_AS_NEEDED
-- Performing Test GCC_HAS_AS_NEEDED - Failed
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29")
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Could NOT find Threads (missing: Threads_FOUND)
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - not found
-- Looking for stdint.h
-- Looking for stdint.h - not found
-- Looking for stddef.h
-- Looking for stddef.h - not found
-- Check size of unsigned short
-- Check size of unsigned short - failed
-- Check size of unsigned int
-- Check size of unsigned int - failed
-- Check size of unsigned long
-- Check size of unsigned long - failed
CMake Error at /usr/share/cmake-3.15/Modules/TestBigEndian.cmake:50 (message):
no suitable type found
Call Stack (most recent call first):
CMakeLists.txt:21 (test_big_endian)
And this is the particular error:
Performing C++ SOURCE FILE Test GCC_HAS_AS_NEEDED failed with the following output:
Change Dir: /builds/mrehak/workspace/poppler/components/desktop/poppler/build/i86/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/gnu/bin/make cmTC_fab48/fast && /usr/gnu/bin/make -f CMakeFiles/cmTC_fab48.dir/build.make CMakeFiles/cmTC_fab48.dir/build
make[1]: Entering directory '/builds/mrehak/workspace/poppler/components/desktop/poppler/build/i86/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_fab48.dir/src.cxx.o
/usr/gcc/9/bin/g++ -fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE -DGCC_HAS_AS_NEEDED -o CMakeFiles/cmTC_fab48.dir/src.cxx.o -c /builds/mrehak/workspace/poppler/components/desktop/poppler/build/i86/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_fab48
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_fab48.dir/link.txt --verbose=1
/usr/gcc/9/bin/g++ -fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE -DGCC_HAS_AS_NEEDED -m32 CMakeFiles/cmTC_fab48.dir/src.cxx.o -o cmTC_fab48 -Wl,--as-needed
ld: fatal: file CMakeFiles/cmTC_fab48.dir/src.cxx.o: wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_fab48.dir/build.make:87: cmTC_fab48] Error 1
make[1]: Leaving directory '/builds/mrehak/workspace/poppler/components/desktop/poppler/build/i86/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_fab48/fast] Error 2
```[00-poppler-macros.patch](/uploads/0e7ba077ae32c87d22c898134bd9b60e/00-poppler-macros.patch)
I have resolved it by attached patch. Please consider it for integration.
Thank you.