Build of Idris fails because of `libffi'

859 views
Skip to first unread message

Dirk Ullrich

unread,
Mar 23, 2013, 6:49:36 AM3/23/13
to idris...@googlegroups.com
Hello,

when I try to install the package `libffi' (by `cabal install') now
required by Idris, I always get the error:

Resolving dependencies...
Configuring libffi-0.1...
cabal: The pkg-config package libffi is required but it could not be found.
Failed to install libffi-0.1
cabal: Error: some packages failed to install:
libffi-0.1 failed during the configure step. The exception was:
ExitFailure 1

I have this problem for all GHC 7.x (7.0.4, 7.2.2, 7.4.2, 7.4.6).

Any ideas?
Dirk

Cezar Ionescu

unread,
Mar 23, 2013, 7:05:38 AM3/23/13
to idris...@googlegroups.com, Dirk Ullrich
Hi Dirk,

You'll need to install the package libffi via your standard package
manager. Same goes for pkg-config, which is the next dependency I
stumbled on.

Best,
Cezar.
> --
> You received this message because you are subscribed to the Google Groups "Idris Programming Language" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to idris-lang+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Edwin Brady

unread,
Mar 23, 2013, 12:38:00 PM3/23/13
to idris...@googlegroups.com
Hi Dirk,
I had to install pkg-config, via homebrew, then export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.11/lib/pkgconfig/

This is not ideal because it makes Idris harder to install, but on the other hand it is needed to support execution of IO programs at the REPL, which David Christiansen has recently added. Hopefully we can find a nice solution before I make the next hackage release.

Edwin.

Edwin Brady

unread,
Mar 23, 2013, 12:57:41 PM3/23/13
to idris...@googlegroups.com
Hi Dirk,
I had to install pkg-config, via homebrew, then export PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.11/lib/pkgconfig/

This is not ideal because it makes Idris harder to install, but on the other hand it is needed to support execution of IO programs at the REPL, which David Christiansen has recently added. Hopefully we can find a nice solution before I make the next hackage release.

Edwin.

On 23 Mar 2013, at 11:49, Dirk Ullrich <dirk.u...@gmail.com> wrote:

philip andrew

unread,
May 7, 2013, 9:10:32 AM5/7/13
to idris...@googlegroups.com
How do you build it?

$ make
cabal install -f Java
Resolving dependencies...
Configuring libffi-0.1...
cabal: The pkg-config package libffi is required but it could not be found.
Failed to install libffi-0.1
cabal: Error: some packages failed to install:
idris-0.9.8 depends on libffi-0.1 which failed to install.
libffi-0.1 failed during the configure step. The exception was:
ExitFailure 1
make: *** [install] Error 1

Edwin Brady

unread,
May 7, 2013, 9:13:13 AM5/7/13
to idris...@googlegroups.com
Is this a Mac? The easiest way I've found is just to install libffi from source directly, from http://sourceware.org/libffi/

Edwin.

philip andrew

unread,
May 7, 2013, 9:53:42 AM5/7/13
to idris...@googlegroups.com
Yes Apple MAC - thanks!

But now I get new errors

Edwin Brady

unread,
May 8, 2013, 4:21:21 AM5/8/13
to idris...@googlegroups.com
This is because you need to install libgmp too. There's links to both libffi and libgmp in the FAQ (http://idris-lang.org/documentation/faq)

If anyone out there knows how to make a Mac package (and indeed a windows or linux package) from a cabal distribution, that would be really useful! Particularly if you were able to script it and add it to the git repository. It would be nice if installation was as simple as possible - gmp and ffi are a bit of a pain at the minute, but necessary.

Edwin.
Reply all
Reply to author
Forward
0 new messages