[Poppler-bugs] [Bug 105852] Fix cmake call for openemebedded builds (and Fedora)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Apr 3 21:38:48 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=105852

--- Comment #6 from Andreas Müller <schnitzeltony at gmail.com> ---
Ok - I cannot point where the magic happens that cmake moves CMAKE_CXX_FLAGS to
test environment. I try by symptom:

In OE we have a toolchain.cmake file setting e.g
CMAKE_CXX_FLAGS " -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard
-mcpu=cortex-a7  --sysroot=/<path> ... <much more>

Same for CMAKE_C_FLAGS

By overwriting CMAKE_C(XX)_FLAGS all these settings are kicked out so cmake
does not know which arch it shall build for, where to find headers...

If you look at the log I added to patch: it is breaking at the very first
checks because all required information is missing:
| -- 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
/home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/poppler/0.62.0-r0/recipe-sysroot-native/usr/share/cmake-3.10/Modules/TestBigEndian.cmake:49
(message):
|   no suitable type found
| Call Stack (most recent call first):
|   CMakeLists.txt:21 (test_big_endian)

With the patch suggested sequence looks sane:
|-- Looking for pthread.h
|-- Looking for pthread.h - found
|-- Looking for pthread_create
|-- Looking for pthread_create - not found
|-- Check if compiler accepts -pthread
|-- Check if compiler accepts -pthread - yes
|-- Found Threads: TRUE  
|-- Check if the system is big endian
|-- Searching 16 bit integer
|-- Looking for sys/types.h
|-- Looking for sys/types.h - found
|-- Looking for stdint.h
|-- Looking for stdint.h - found
|-- Looking for stddef.h
|-- Looking for stddef.h - found
|-- Check size of unsigned short
|-- Check size of unsigned short - done
|-- Using unsigned short
|-- Check if the system is big endian - little endian
|-- Checking _FILE_OFFSET_BITS for large files
|-- Checking _FILE_OFFSET_BITS for large files - needed

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20180403/f4920df4/attachment.html>


More information about the Poppler-bugs mailing list