1. Summarise the issue (what were doing, what went wrong?)
Here is what I see:
> cabal configure -ftest
Resolving dependencies...
Configuring darcs-2.9.7...
checking whether to use -liconv... setup: Unable to link against the
iconv library.
However, compiling the test program with gcc works, without -liconv:
> cat i.c
#include <iconv.h>
int main(void) {
iconv_t t = iconv_open("UTF-8", "UTF-8");
return 0;
}
> gcc i.c
Looking closer (cabal configure -ftest -v) reveals that the program
is linked against libcurl, and this does indeed fail:
> gcc -lcurl i.c
/usr/bin/ld: cannot find -lcurl
collect2: error: ld returned 1 exit status
Obviously this has nothing to do with the -liconv flag.
Finally, disabling libcurl helps:
> cabal configure -ftest -f-curl
Resolving dependencies...
Configuring darcs-2.8.4...
checking whether to use -liconv... not needed.
2. What behaviour were you expecting instead?
Ideally, Setup.lhs would detect that libcurl is missing and suggest that
I should configure with -f-curl (or clear the flag on its own.)
I suppose that a minimal solution would be to filter out the curl extra
library when compiling the iconv test program.
3. What darcs version are you using? (Try: darcs --exact-version)
2.8.4 from hackage.
(This still happens with the development version as of today.)
4. What operating system are you running?
Debian Linux on x86_64. libcurl is installed, but the development package
is missing, so the linker doesn't find it:
> ls /usr/lib/x86_64-linux-gnu/libcurl.*
/usr/lib/x86_64-linux-gnu/libcurl.so.3
/usr/lib/x86_64-linux-gnu/libcurl.so.4
/usr/lib/x86_64-linux-gnu/libcurl.so.4.3.0
|