Skip to content
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

Q: Does Stack need autogenerated Autoconf artifacts checked into Git? #1543

Closed
hvr opened this issue Dec 20, 2015 · 4 comments
Closed

Q: Does Stack need autogenerated Autoconf artifacts checked into Git? #1543

hvr opened this issue Dec 20, 2015 · 4 comments
Milestone

Comments

@hvr
Copy link

hvr commented Dec 20, 2015

As I don't use Stack myself, I have to relay this question here (hope the issue tracker is a good place):

@AshleyYakeley and me aren't sure about whether Stack requires those files for build-type-configure packages to be in Git, see also

haskell/time@409d7a0#commitcomment-15084597

However, if Stack requires to violate VCS/Autoconf conventions, then I'd consider this a bug in Stack ;-)

hvr referenced this issue in haskell/time Dec 20, 2015
@AshleyYakeley I had to remove these in order to be able to update
to time-1.6 in GHC as it otherwise breaks GHC's buildsystem

GHC's buildsystem needs to regenerate those files and cause subtle but
annoying issues for users if files tracked by Git are modified everytime
GHC is built.
@mgsloan
Copy link
Contributor

mgsloan commented Dec 20, 2015

Works fine:

mgsloan@computer:~/oss/haskell$ git clone haskell/time
Cloning into 'time'...
cd remote: Counting objects: 2494, done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 2494 (delta 5), reused 0 (delta 0), pack-reused 2469
Receiving objects: 100% (2494/2494), 452.53 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1524/1524), done.
Checking connectivity... done.
mgsloan@computer:~/oss/haskell/time$ stack build
Downloaded lts-3.18 build plan.    
Caching build plan
time-1.6: configure
[1 of 1] Compiling Main             ( /home/mgsloan/oss/haskell/time/Setup.hs, /home/mgsloan/oss/haskell/time/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0/setup/Main.o )
Linking /home/mgsloan/oss/haskell/time/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0/setup/setup ...
Configuring time-1.6...
Warning: The 'build-type' is 'Configure' but there is no 'configure' script.
You probably need to run 'autoreconf -i' to generate it.
setup: configure script not found.

--  While building package time-1.6 using:
      /home/mgsloan/oss/haskell/time/.stack-work/dist/x86_64-linux/Cabal-1.22.4.0/setup/setup --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.4.0 configure --with-ghc=/usr/local/bin/ghc --with-ghc-pkg=/usr/local/bin/ghc-pkg --with-ghcjs=/home/mgsloan/.local/bin/ghcjs --with-ghcjs-pkg=/home/mgsloan/.local/bin/ghcjs-pkg --user --package-db=clear --package-db=global --package-db=/home/mgsloan/.stack/snapshots/x86_64-linux/lts-3.18/7.10.2/pkgdb --package-db=/home/mgsloan/oss/haskell/time/.stack-work/install/x86_64-linux/lts-3.18/7.10.2/pkgdb --libdir=/home/mgsloan/oss/haskell/time/.stack-work/install/x86_64-linux/lts-3.18/7.10.2/lib --bindir=/home/mgsloan/oss/haskell/time/.stack-work/install/x86_64-linux/lts-3.18/7.10.2/bin --datadir=/home/mgsloan/oss/haskell/time/.stack-work/install/x86_64-linux/lts-3.18/7.10.2/share --libexecdir=/home/mgsloan/oss/haskell/time/.stack-work/install/x86_64-linux/lts-3.18/7.10.2/libexec --sysconfdir=/home/mgsloan/oss/haskell/time/.stack-work/install/x86_64-linux/lts-3.18/7.10.2/etc --docdir=/home/mgsloan/oss/haskell/time/.stack-work/install/x86_64-linux/lts-3.18/7.10.2/doc/time-1.6 --htmldir=/home/mgsloan/oss/haskell/time/.stack-work/install/x86_64-linux/lts-3.18/7.10.2/doc/time-1.6 --haddockdir=/home/mgsloan/oss/haskell/time/.stack-work/install/x86_64-linux/lts-3.18/7.10.2/doc/time-1.6 --dependency=base=base-4.8.1.0-4f7206fd964c629946bb89db72c80011 --dependency=deepseq=deepseq-1.4.1.1-8fb9688ae42216e388cee132aef3d148 --enable-benchmarks
    Process exited with code: ExitFailure 1
mgsloan@computer:~/oss/haskell/time$ autoreconf -i
mgsloan@computer:~/oss/haskell/time$ stack build
time-1.6: configure
Configuring time-1.6...
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for gmtime_r... yes
checking for localtime_r... yes
checking for clock_gettime... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking whether time.h and sys/time.h may both be included... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking whether altzone is declared... no
configure: creating ./config.status
config.status: creating lib/include/HsTimeConfig.h
time-1.6: build
Preprocessing library time-1.6...
[ 1 of 26] Compiling Data.Time.Clock.CTimeval ( lib/Data/Time/Clock/CTimeval.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Clock/CTimeval.o )
[ 2 of 26] Compiling Data.Time.Clock.CTimespec ( .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Clock/CTimespec.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Clock/CTimespec.o )
[ 3 of 26] Compiling Data.Time.Clock.Scale ( lib/Data/Time/Clock/Scale.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Clock/Scale.o )
[ 4 of 26] Compiling Data.Time.Calendar.Private ( lib/Data/Time/Calendar/Private.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Calendar/Private.o )
[ 5 of 26] Compiling Data.Time.Calendar.MonthDay ( lib/Data/Time/Calendar/MonthDay.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Calendar/MonthDay.o )
[ 6 of 26] Compiling Data.Time.Calendar.Days ( lib/Data/Time/Calendar/Days.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Calendar/Days.o )
[ 7 of 26] Compiling Data.Time.Calendar.OrdinalDate ( lib/Data/Time/Calendar/OrdinalDate.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Calendar/OrdinalDate.o )
[ 8 of 26] Compiling Data.Time.Calendar.Gregorian ( lib/Data/Time/Calendar/Gregorian.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Calendar/Gregorian.o )
[ 9 of 26] Compiling Data.Time.Calendar.WeekDate ( lib/Data/Time/Calendar/WeekDate.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Calendar/WeekDate.o )
[10 of 26] Compiling Data.Time.Calendar.JulianYearDay ( lib/Data/Time/Calendar/JulianYearDay.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Calendar/JulianYearDay.o )
[11 of 26] Compiling Data.Time.Calendar.Julian ( lib/Data/Time/Calendar/Julian.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Calendar/Julian.o )
[12 of 26] Compiling Data.Time.Clock.UTC ( lib/Data/Time/Clock/UTC.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Clock/UTC.o )
[13 of 26] Compiling Data.Time.Clock.POSIX ( lib/Data/Time/Clock/POSIX.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Clock/POSIX.o )
[14 of 26] Compiling Data.Time.Clock.UTCDiff ( lib/Data/Time/Clock/UTCDiff.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Clock/UTCDiff.o )
[15 of 26] Compiling Data.Time.LocalTime.TimeZone ( lib/Data/Time/LocalTime/TimeZone.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/LocalTime/TimeZone.o )
[16 of 26] Compiling Data.Time.LocalTime.TimeOfDay ( lib/Data/Time/LocalTime/TimeOfDay.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/LocalTime/TimeOfDay.o )
[17 of 26] Compiling Data.Time.Format.Locale ( lib/Data/Time/Format/Locale.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Format/Locale.o )
[18 of 26] Compiling Data.Time.LocalTime.LocalTime ( lib/Data/Time/LocalTime/LocalTime.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/LocalTime/LocalTime.o )
[19 of 26] Compiling Data.Time.Format.Parse ( lib/Data/Time/Format/Parse.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Format/Parse.o )
[20 of 26] Compiling Data.Time.Format ( lib/Data/Time/Format.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Format.o )
[21 of 26] Compiling Data.Time.LocalTime ( lib/Data/Time/LocalTime.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/LocalTime.o )
[22 of 26] Compiling Data.Time.Clock  ( lib/Data/Time/Clock.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Clock.o )
[23 of 26] Compiling Data.Time.Clock.TAI ( lib/Data/Time/Clock/TAI.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Clock/TAI.o )
[24 of 26] Compiling Data.Time.Calendar ( lib/Data/Time/Calendar.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Calendar.o )
[25 of 26] Compiling Data.Time        ( lib/Data/Time.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time.o )
[26 of 26] Compiling Data.Time.Calendar.Easter ( lib/Data/Time/Calendar/Easter.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0/build/Data/Time/Calendar/Easter.o )
In-place registering time-1.6...
time-1.6: copy/register
Installing library in
/home/mgsloan/oss/haskell/time/.stack-work/install/x86_64-linux/lts-3.18/7.10.2/lib/x86_64-linux-ghc-7.10.2/time-1.6-23gEJ4FItMc6aGW9b3VnIP
Registering time-1.6...

@mgsloan mgsloan closed this as completed Dec 20, 2015
@mgsloan mgsloan added this to the Support milestone Dec 20, 2015
@mgsloan
Copy link
Contributor

mgsloan commented Oct 30, 2017

Ah, based on https://stackoverflow.com/questions/47012909/building-the-latest-version-of-process-as-a-dependency , it would probably be good to include the script.

What is cabal-install doing differently here, is calling configure the responsibility of cabal-install instead of being part of Cabal-the-library?

@mgsloan
Copy link
Contributor

mgsloan commented Oct 30, 2017

Closing in favor of tracking it by #3534

@mgsloan mgsloan closed this as completed Oct 30, 2017
@snoyberg
Copy link
Contributor

I don't see any behavior from cabal to generate the configure scripts:

$ stack exec --no-ghc-package-path -- cabal configure
Warning: The package list for 'hackage.haskell.org' is 31 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
Configuring process-1.6.2.0...
Warning: The 'build-type' is 'Configure' but there is no 'configure' script.
You probably need to run 'autoreconf -i' to generate it.
cabal: configure script not found.

I've just sent a PR that will add support for this to Stack #3598:

$ stack build

Warning: File listed in process.cabal file does not exist: configure

Warning: File listed in process.cabal file does not exist: include/HsProcessConfig.h.in
Trying to generate configure with autoreconf in /Users/michael/Documents/process/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants