
My linux build is broken. See below. Help! Simon libraries/time/ghc.mk:4: libraries/time/dist-install/build/.depend-v-dyn.haskell: No such file or directory "rm" -f libraries/time/dist-install/build/.depend-v-dyn.haskell.tmp "inplace/bin/ghc-stage1" -M -static -O0 -H64m -Wall -fllvm-fill-undef-with-garbage -Werror -Wcpp-undef -this-unit-id time-1.8.0.1 -hide-all-packages -i -ilibraries/time/lib -ilibraries/time/dist-install/build -Ilibraries/time/dist-install/build -ilibraries/time/dist-install/build/./autogen -Ilibraries/time/dist-install/build/./autogen -Ilibraries/time/lib/include -optP-DLANGUAGE_Rank2Types -optP-DLANGUAGE_DeriveDataTypeable -optP-DLANGUAGE_StandaloneDeriving -optP-include -optPlibraries/time/dist-install/build/./autogen/cabal_macros.h -package-id base-4.10.0.0 -package-id deepseq-1.4.3.0 -Wall -fwarn-tabs -XHaskell2010 -XCPP -XRank2Types -XDeriveDataTypeable -XStandaloneDeriving -O -dcore-lint -dno-debug-output -ticky -no-user-package-db -rtsopts -Wno-deprecated-flags -Wnoncanonical-monad-instances -odir libraries/time/dist-install/build -hidir libraries/time/dist-install/build -stubdir libraries/time/dist-install/build -dep-makefile libraries/time/dist-install/build/.depend-v-dyn.haskell.tmp -dep-suffix "" -dep-suffix "dyn_" -include-pkg-deps libraries/time/lib/Data/Time/Calendar.hs libraries/time/lib/Data/Time/Calendar/MonthDay.hs libraries/time/lib/Data/Time/Calendar/OrdinalDate.hs libraries/time/lib/Data/Time/Calendar/WeekDate.hs libraries/time/lib/Data/Time/Calendar/Julian.hs libraries/time/lib/Data/Time/Calendar/Easter.hs libraries/time/lib/Data/Time/Clock.hs libraries/time/lib/Data/Time/Clock/System.hs libraries/time/lib/Data/Time/Clock/POSIX.hs libraries/time/lib/Data/Time/Clock/TAI.hs libraries/time/lib/Data/Time/LocalTime.hs libraries/time/lib/Data/Time/Format.hs libraries/time/lib/Data/Time.hs libraries/time/lib/Data/Time/Calendar/Private.hs libraries/time/lib/Data/Time/Calendar/Days.hs libraries/time/lib/Data/Time/Calendar/Gregorian.hs libraries/time/lib/Data/Time/Calendar/JulianYearDay.hs libraries/time/lib/Data/Time/Clock/Internal/DiffTime.hs libraries/time/lib/Data/Time/Clock/Internal/AbsoluteTime.hs libraries/time/lib/Data/Time/Clock/Internal/NominalDiffTime.hs libraries/time/lib/Data/Time/Clock/Internal/POSIXTime.hs libraries/time/lib/Data/Time/Clock/Internal/UniversalTime.hs libraries/time/lib/Data/Time/Clock/Internal/SystemTime.hs libraries/time/lib/Data/Time/Clock/Internal/UTCTime.hs libraries/time/lib/Data/Time/Clock/Internal/CTimeval.hs libraries/time/dist-install/build/Data/Time/Clock/Internal/CTimespec.hs libraries/time/lib/Data/Time/Clock/Internal/UTCDiff.hs libraries/time/lib/Data/Time/LocalTime/Internal/TimeZone.hs libraries/time/lib/Data/Time/LocalTime/Internal/TimeOfDay.hs libraries/time/lib/Data/Time/LocalTime/Internal/LocalTime.hs libraries/time/lib/Data/Time/LocalTime/Internal/ZonedTime.hs libraries/time/lib/Data/Time/Format/Parse.hs libraries/time/lib/Data/Time/Format/Locale.hs libraries/time/lib/Data/Time/Clock/Internal/SystemTime.hs:22:0: error: error: "HAVE_CLOCK_GETTIME" is not defined [-Werror=undef] | 22 | #elif HAVE_CLOCK_GETTIME | ^ libraries/time/lib/Data/Time/Clock/Internal/SystemTime.hs:70:0: error: error: "HAVE_CLOCK_GETTIME" is not defined [-Werror=undef] | 70 | #elif HAVE_CLOCK_GETTIME | ^ cc1: all warnings being treated as errors `gcc' failed in phase `C pre-processor'. (Exit code: 1) make[1]: *** [libraries/time/dist-install/build/.depend-v-dyn.haskell] Error 1 make: *** [all] Error 2 simonpj@cam-05-unx:~/5builds/HEAD-5$

I see this too :-(
I have checked in a fix (please pull!), but libraries/time still needs
this tweak:
index 6027cdf..b87d302 100644
--- a/lib/Data/Time/Clock/Internal/SystemTime.hs
+++ b/lib/Data/Time/Clock/Internal/SystemTime.hs
@@ -19,7 +19,7 @@ import Data.Time.Clock.Internal.DiffTime
#ifdef mingw32_HOST_OS
import qualified System.Win32.Time as Win32
-#elif HAVE_CLOCK_GETTIME
+#elif defined(HAVE_CLOCK_GETTIME)
import Data.Time.Clock.Internal.CTimespec
import Foreign.C.Types (CTime(..), CLong(..))
#else
@@ -67,7 +67,7 @@ getSystemTime = do
getTime_resolution = 100E-9 -- 100ns
getTAISystemTime = Nothing
-#elif HAVE_CLOCK_GETTIME
+#elif defined(HAVE_CLOCK_GETTIME)
-- Use hi-res clock_gettime
timespecToSystemTime :: CTimespec -> SystemTime
Cheers,
Gabor
On 4/5/17, Simon Peyton Jones via ghc-devs
My linux build is broken. See below. Help! Simon
libraries/time/ghc.mk:4: libraries/time/dist-install/build/.depend-v-dyn.haskell: No such file or directory "rm" -f libraries/time/dist-install/build/.depend-v-dyn.haskell.tmp "inplace/bin/ghc-stage1" -M -static -O0 -H64m -Wall -fllvm-fill-undef-with-garbage -Werror -Wcpp-undef -this-unit-id time-1.8.0.1 -hide-all-packages -i -ilibraries/time/lib -ilibraries/time/dist-install/build -Ilibraries/time/dist-install/build -ilibraries/time/dist-install/build/./autogen -Ilibraries/time/dist-install/build/./autogen -Ilibraries/time/lib/include -optP-DLANGUAGE_Rank2Types -optP-DLANGUAGE_DeriveDataTypeable -optP-DLANGUAGE_StandaloneDeriving -optP-include -optPlibraries/time/dist-install/build/./autogen/cabal_macros.h -package-id base-4.10.0.0 -package-id deepseq-1.4.3.0 -Wall -fwarn-tabs -XHaskell2010 -XCPP -XRank2Types -XDeriveDataTypeable -XStandaloneDeriving -O -dcore-lint -dno-debug-output -ticky -no-user-package-db -rtsopts -Wno-deprecated-flags -Wnoncanonical-monad-instances -odir libraries/time/dist-install/build -hidir libraries/time/dist-install/build -stubdir libraries/time/dist-install/build -dep-makefile libraries/time/dist-install/build/.depend-v-dyn.haskell.tmp -dep-suffix "" -dep-suffix "dyn_" -include-pkg-deps libraries/time/lib/Data/Time/Calendar.hs libraries/time/lib/Data/Time/Calendar/MonthDay.hs libraries/time/lib/Data/Time/Calendar/OrdinalDate.hs libraries/time/lib/Data/Time/Calendar/WeekDate.hs libraries/time/lib/Data/Time/Calendar/Julian.hs libraries/time/lib/Data/Time/Calendar/Easter.hs libraries/time/lib/Data/Time/Clock.hs libraries/time/lib/Data/Time/Clock/System.hs libraries/time/lib/Data/Time/Clock/POSIX.hs libraries/time/lib/Data/Time/Clock/TAI.hs libraries/time/lib/Data/Time/LocalTime.hs libraries/time/lib/Data/Time/Format.hs libraries/time/lib/Data/Time.hs libraries/time/lib/Data/Time/Calendar/Private.hs libraries/time/lib/Data/Time/Calendar/Days.hs libraries/time/lib/Data/Time/Calendar/Gregorian.hs libraries/time/lib/Data/Time/Calendar/JulianYearDay.hs libraries/time/lib/Data/Time/Clock/Internal/DiffTime.hs libraries/time/lib/Data/Time/Clock/Internal/AbsoluteTime.hs libraries/time/lib/Data/Time/Clock/Internal/NominalDiffTime.hs libraries/time/lib/Data/Time/Clock/Internal/POSIXTime.hs libraries/time/lib/Data/Time/Clock/Internal/UniversalTime.hs libraries/time/lib/Data/Time/Clock/Internal/SystemTime.hs libraries/time/lib/Data/Time/Clock/Internal/UTCTime.hs libraries/time/lib/Data/Time/Clock/Internal/CTimeval.hs libraries/time/dist-install/build/Data/Time/Clock/Internal/CTimespec.hs libraries/time/lib/Data/Time/Clock/Internal/UTCDiff.hs libraries/time/lib/Data/Time/LocalTime/Internal/TimeZone.hs libraries/time/lib/Data/Time/LocalTime/Internal/TimeOfDay.hs libraries/time/lib/Data/Time/LocalTime/Internal/LocalTime.hs libraries/time/lib/Data/Time/LocalTime/Internal/ZonedTime.hs libraries/time/lib/Data/Time/Format/Parse.hs libraries/time/lib/Data/Time/Format/Locale.hs
libraries/time/lib/Data/Time/Clock/Internal/SystemTime.hs:22:0: error: error: "HAVE_CLOCK_GETTIME" is not defined [-Werror=undef] | 22 | #elif HAVE_CLOCK_GETTIME | ^
libraries/time/lib/Data/Time/Clock/Internal/SystemTime.hs:70:0: error: error: "HAVE_CLOCK_GETTIME" is not defined [-Werror=undef] | 70 | #elif HAVE_CLOCK_GETTIME | ^ cc1: all warnings being treated as errors `gcc' failed in phase `C pre-processor'. (Exit code: 1) make[1]: *** [libraries/time/dist-install/build/.depend-v-dyn.haskell] Error 1 make: *** [all] Error 2 simonpj@cam-05-unx:~/5builds/HEAD-5$

Ben,
I am compiling with a libraries/time fix now, looks good.
I have pushed it to https://github.com/ggreif/packages-time/tree/ghc
maybe you can review it and make it official somehow.
Cheers,
Gabor
On 4/5/17, Ben Gamari
Simon Peyton Jones via ghc-devs
writes: My linux build is broken. See below. Help!
All of this is due to the recent CPP cleanup, unfortunately. I think I will revert it for now and we can work out the issues elsewhere.
Cheers,
- Ben
participants (3)
-
Ben Gamari
-
Gabor Greif
-
Simon Peyton Jones