Neither Cabal nor Stack provides any way to automate the running of
autoreconf, it just needs to be done manually.

On Tue, Oct 18, 2016 at 12:44 AM, Mark Fine <mark.f...@gmail.com> wrote:

> Just a quick follow-up here - the unix package has a cabal build type of
> *Configure* - when I try and build it with stack, I get the following
> error:
>
> --  While building package unix-2.7.2.0 using:
>       
> /Users/mark/repos/xxx/unix/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/setup/setup
> --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.5.0 configure
> --with-ghc=/Applications/ghc-7.10.3.app/Contents/bin/ghc
> --with-ghc-pkg=/Applications/ghc-7.10.3.app/Contents/bin/ghc-pkg --user
> --package-db=clear --package-db=global --package-db=/Users/mark/.
> stack/snapshots/x86_64-osx/lts-6.3/7.10.3/pkgdb --package-db=/Users/mark/
> repos/xxx/.stack-work/install/x86_64-osx/lts-6.3/7.10.3/pkgdb
> --libdir=/Users/mark/repos/xxx/.stack-work/install/x86_64-osx/lts-6.3/7.10.3/lib
> --bindir=/Users/mark/repos/xxx/.stack-work/install/x86_64-osx/lts-6.3/7.10.3/bin
> --datadir=/Users/mark/repos/xxx/.stack-work/install/x86_64-osx/lts-6.3/7.10.3/share
> --libexecdir=/Users/mark/repos/xxx/.stack-work/install/
> x86_64-osx/lts-6.3/7.10.3/libexec --sysconfdir=/Users/mark/
> repos/xxx/.stack-work/install/x86_64-osx/lts-6.3/7.10.3/etc
> --docdir=/Users/mark/repos/xxx/.stack-work/install/x86_
> 64-osx/lts-6.3/7.10.3/doc/unix-2.7.2.0 --htmldir=/Users/mark/repos/
> xxx/.stack-work/install/x86_64-osx/lts-6.3/7.10.3/doc/unix-2.7.2.0
> --haddockdir=/Users/mark/repos/xxx/.stack-work/install/
> x86_64-osx/lts-6.3/7.10.3/doc/unix-2.7.2.0 --dependency=base=base-4.8.2.0-
> cc43d8e06aa74e9c4c0132becc49ee25 --dependency=bytestring=
> bytestring-0.10.6.0-04b5cc1d05f993b3b016543ca2863add
> --dependency=time=time-1.5.0.1-9d583724234c876226763fdd0cb776fc
> --enable-tests --enable-benchmarks
>     Process exited with code: ExitFailure 1
>     Logs have been written to: /Users/mark/repos/xxx/.stack-
> work/logs/unix-2.7.2.0.log
>
>     Configuring unix-2.7.2.0...
>     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.
>
> When I manually run *autoreconf -i* on the unix project subdirectory, the
> issue goes away. Is there something special I need to specify to get stack
> to support this kind of cabal build type?
>
> Mark
>
> On Thu, Oct 6, 2016 at 10:31 PM, Mark Fine <mark.f...@gmail.com> wrote:
>
>> Oh wow, that totally did it - didn't realize you could use location on
>> vendored projects, but that makes total sense:
>>
>> resolver: lts-6.20
>> packages:
>> - .
>> - location: unix
>>   extra-dep: true
>> - location: serialport
>>   extra-dep: true
>> extra-deps: []
>> flags: {}
>>
>> Thanks!
>>
>> Mark
>>
>> On Thu, Oct 6, 2016 at 10:22 PM, Michael Snoyman <mich...@snoyman.com>
>> wrote:
>>
>>> I'm not a ghci expert, but perhaps marking those vendored libraries as
>>> extra-dep: true would help.
>>>
>>> On Fri, Oct 7, 2016, 8:21 AM Mark Fine <mark.f...@gmail.com> wrote:
>>>
>>>> I have a simple project that's vendoring in serialport and unix
>>>> packages:
>>>>
>>>> resolver: lts-6.20
>>>> packages:
>>>> - '.'
>>>> - './unix'
>>>> - './serialport'
>>>> extra-deps: []
>>>> flags: {}
>>>>
>>>> *stack build* works fine:
>>>>
>>>> serialport-0.4.7: unregistering (missing dependencies: unix)
>>>> unix-2.7.2.0: unregistering (local file changes: System/Posix.hs 
>>>> System/Posix/ByteString.hs System/Posix/ByteString/FilePath.hsc 
>>>> System/Posix/Dire...)
>>>> unix-2.7.2.0: configure
>>>> unix-2.7.2.0: build
>>>> unix-2.7.2.0: copy/register
>>>> serialport-0.4.7: configure
>>>> serialport-0.4.7: build
>>>> serialport-0.4.7: copy/register
>>>> serial-0.0.0: configure
>>>> serial-0.0.0: build
>>>> serial-0.0.0: copy/register
>>>> Completed 3 action(s).
>>>>
>>>> *stack ghci* has linking errors:
>>>>
>>>> Using main module: 1. Package `serial' component exe:serial with main-is 
>>>> file: /Users/mark/repos/serial/main.hs
>>>> Configuring GHCi with the following packages: serial, serialport, unix
>>>> GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
>>>> [1 of 8] Compiling System.Hardware.Serialport.Types ( 
>>>> /Users/mark/repos/serial/serialport/System/Hardware/Serialport/Types.hs, 
>>>> interpreted )
>>>> [2 of 8] Compiling System.Posix.Terminal.Common ( 
>>>> /Users/mark/repos/serial/unix/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Posix/Terminal/Common.hs,
>>>>  interpreted )
>>>>
>>>> ByteCodeLink: can't find label
>>>> During interactive linking, GHCi couldn't find the following symbol:
>>>>   ghczuwrapperZC9ZCmainZCSystemziPosixziTerminalziCommonZCcfgetispeed
>>>> This may be due to you not asking GHCi to load extra object files,
>>>> archives or DLLs needed by your current session.  Restart GHCi, specifying
>>>> the missing library using the -L/path/to/object/dir and -lmissinglibname
>>>> flags, or simply by naming the relevant files on the GHCi command line.
>>>> Alternatively, this link failure might indicate a bug in GHCi.
>>>> If you suspect the latter, please send a bug report to:
>>>>   glasgow-haskell-b...@haskell.org
>>>>
>>>> [ 2 of 42] Compiling System.Posix.Terminal.Common ( 
>>>> /Users/mark/repos/serial/unix/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Posix/Terminal/Common.hs,
>>>>  interpreted )
>>>>
>>>> ByteCodeLink: can't find label
>>>> During interactive linking, GHCi couldn't find the following symbol:
>>>>   ghczuwrapperZC19ZCmainZCSystemziPosixziTerminalziCommonZCcfgetispeed
>>>> This may be due to you not asking GHCi to load extra object files,
>>>> archives or DLLs needed by your current session.  Restart GHCi, specifying
>>>> the missing library using the -L/path/to/object/dir and -lmissinglibname
>>>> flags, or simply by naming the relevant files on the GHCi command line.
>>>> Alternatively, this link failure might indicate a bug in GHCi.
>>>> If you suspect the latter, please send a bug report to:
>>>>   glasgow-haskell-b...@haskell.org
>>>>
>>>> [ 2 of 43] Compiling System.Posix.Terminal.Common ( 
>>>> /Users/mark/repos/serial/unix/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Posix/Terminal/Common.hs,
>>>>  interpreted )
>>>>
>>>> ByteCodeLink: can't find label
>>>> During interactive linking, GHCi couldn't find the following symbol:
>>>>   ghczuwrapperZC29ZCmainZCSystemziPosixziTerminalziCommonZCcfgetispeed
>>>> This may be due to you not asking GHCi to load extra object files,
>>>> archives or DLLs needed by your current session.  Restart GHCi, specifying
>>>> the missing library using the -L/path/to/object/dir and -lmissinglibname
>>>> flags, or simply by naming the relevant files on the GHCi command line.
>>>> Alternatively, this link failure might indicate a bug in GHCi.
>>>> If you suspect the latter, please send a bug report to:
>>>>   glasgow-haskell-b...@haskell.org
>>>>
>>>>
>>>> <no location info>:
>>>>     Could not find module ‘System.Hardware.Serialport’
>>>>     It is a member of the hidden package 
>>>> ‘serialport-0.4.7@seria_6XlGeNhayTj8u1Q5vnbF3w’.
>>>> Prelude>
>>>>
>>>> I see that both vendored projects have their own .stack-work's - is
>>>> that a source of issues? Is there a workaround where I can get *stack
>>>> ghci* to behave as well as *stack build* - things run great as
>>>> executables, just can't load the code in ghci.
>>>>
>>>> Also, I'd love to be able to bring in both of these projects as git
>>>> locations - but the unix library requires running *auto**reconf -i* in
>>>> it's directory, and it's not clear how I can manage that with a git
>>>> location (instead I'm vendoring them in with git submodules).
>>>>
>>>> Any help would be greatly appreciated!
>>>>
>>>> Mark
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "haskell-stack" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to haskell-stack+unsubscr...@googlegroups.com.
>>>> To post to this group, send email to haskell-stack@googlegroups.com.
>>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>>> gid/haskell-stack/CANRZ_fkafdAjGLUiUqnjPLSTP%2BzF6rpJaHScyV2
>>>> pSgX45oCNwg%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/haskell-stack/CANRZ_fkafdAjGLUiUqnjPLSTP%2BzF6rpJaHScyV2pSgX45oCNwg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "haskell-stack" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to haskell-stack+unsubscr...@googlegroups.com.
> To post to this group, send email to haskell-stack@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/haskell-stack/CANRZ_fkTSB9tS%2BrBs_itRxucmFgzBhbQ4SQ-
> ctLPSjBMG0OhqA%40mail.gmail.com
> <https://groups.google.com/d/msgid/haskell-stack/CANRZ_fkTSB9tS%2BrBs_itRxucmFgzBhbQ4SQ-ctLPSjBMG0OhqA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to haskell-stack+unsubscr...@googlegroups.com.
To post to this group, send email to haskell-stack@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/haskell-stack/CAKA2Jg%2Bx5a8eb87O%3DpHTH1xUUkgF88NzjBT5bc4rqL%2BQSNBCJA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to