Build regression on GCC 4.8 within 'cmcurl' since v3.9.0
I found a regression building CMake. Version 3.9.0 builds fine on my machine but newest 'release' and 'master' branches fail to build. I am using Ubuntu 14.04 (don't ask). With GCC 4.8. Please let me know if you need further information.
I've done a git-bisect to narrow down the commit.
The issue:
ninja -C ~/builds/cmake Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/warnless.c.o
ninja: Entering directory `/home/unapiedra/builds/cmake'
Recompacting deps...
[1/1] Re-running CMake...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/unapiedra/builds/cmake
[1/1] Building C object Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/warnless.c.o
FAILED: /usr/bin/cc -DBUILDING_LIBCURL -DCURL_STATICLIB -DHAVE_CONFIG_H -w -O3 -DNDEBUG -IUtilities -I/home/unapiedra/src/cmake/Utilities -IUtilities/cmcurl/include/curl -I/home/unapiedra/src/cmake/Utilities/cmcurl/include -IUtilities/cmcurl/lib/../include -I/home/unapiedra/src/cmake/Utilities/cmcurl/lib/.. -I/home/unapiedra/src/cmake/Utilities/cmcurl/lib/../include -IUtilities/cmcurl/lib/.. -I/home/unapiedra/src/cmake/Utilities/cmcurl/lib -IUtilities/cmcurl/lib -std=gnu99 -MMD -MT Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/warnless.c.o -MF Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/warnless.c.o.d -o Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/warnless.c.o -c /home/unapiedra/src/cmake/Utilities/cmcurl/lib/warnless.c
/home/unapiedra/src/cmake/Utilities/cmcurl/lib/warnless.c:101:4: error: #error "SIZEOF_CURL_OFF_T not defined"
# error "SIZEOF_CURL_OFF_T not defined"
^
/home/unapiedra/src/cmake/Utilities/cmcurl/lib/warnless.c: In function ‘curlx_uztoso’:
/home/unapiedra/src/cmake/Utilities/cmcurl/lib/warnless.c:192:40: error: ‘CURL_MASK_SCOFFT’ undeclared (first use in this function)
return (curl_off_t)(uznum & (size_t) CURL_MASK_SCOFFT);
^
/home/unapiedra/src/cmake/Utilities/cmcurl/lib/warnless.c:192:40: note: each undeclared identifier is reported only once for each function it appears in
ninja: build stopped: subcommand failed.
Git bisect log:
git bisect start
# bad: [269ea83eb2178e1ee1396c5eb1f0fe15585f4e4c] Merge branch 'cmake-gui-qt-static-windows' into release-3.10
git bisect bad 269ea83eb2178e1ee1396c5eb1f0fe15585f4e4c
# good: [f15cfd891d1e01247ed285320ae32b6c3182ac8f] CMake 3.9.0
git bisect good f15cfd891d1e01247ed285320ae32b6c3182ac8f
# good: [072296fc1644eee8e824522dfac431316d7dbf14] Merge topic 'gnu-to-ms-ninja-support'
git bisect good 072296fc1644eee8e824522dfac431316d7dbf14
# good: [1490466bf96a597acdae2c0e7394fd9299847731] Merge topic 'ninja-performance'
git bisect good 1490466bf96a597acdae2c0e7394fd9299847731
# good: [275b4a53eef8d10af069fbcb0d1d9bc4d0b5f6d5] Merge topic 'autogen-predefs'
git bisect good 275b4a53eef8d10af069fbcb0d1d9bc4d0b5f6d5
# bad: [165eff93821cf2860caea309a524b08179d5bc45] Merge branch 'update-curl' into release-3.10
git bisect bad 165eff93821cf2860caea309a524b08179d5bc45
# good: [7eaa964e9b6619dfe3b14ebdf80026e898a9a931] cmProcessTools: fix minor issue introduced by 595feb3
git bisect good 7eaa964e9b6619dfe3b14ebdf80026e898a9a931
# good: [9111c17767703fc4aca79adb20bc40e465c6a710] Merge branch 'FindProtobuf-doc-typo' into release-3.10
git bisect good 9111c17767703fc4aca79adb20bc40e465c6a710
# good: [f686c45d62bb32c2d7f39f0370b57cb03dcc39d9] Merge branch 'xcode-tests-ios-deployment-target' into release-3.10
git bisect good f686c45d62bb32c2d7f39f0370b57cb03dcc39d9
# good: [0a5987fa599071acd7f98bba4c0ab42289040ef0] Merge branch 'autogen-skip-ui' into release-3.10
git bisect good 0a5987fa599071acd7f98bba4c0ab42289040ef0
# bad: [9e3ef40edb6eae36e822c129bec5d4ee9de0dd57] Merge branch 'upstream-curl' into update-curl
git bisect bad 9e3ef40edb6eae36e822c129bec5d4ee9de0dd57
# good: [2fad0e20b6b2b4c3cfc177267cf9689658f50c23] curl: Update script to get curl 7.56.0
git bisect good 2fad0e20b6b2b4c3cfc177267cf9689658f50c23
# bad: [de7c21d677db1ddaeece03c19e13e448f4031511] curl 2017-10-04 (3ea76790)
git bisect bad de7c21d677db1ddaeece03c19e13e448f4031511
# first bad commit: [de7c21d677db1ddaeece03c19e13e448f4031511] curl 2017-10-04 (3ea76790)
The CMakeCache.txt
is attached. CMakeCache.txt
GCC:
❯ /usr/bin/cc --version
cc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.