Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7178233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:52:45+00:00 2026-05-28T16:52:45+00:00

I’m attempting to install the following Haskell package on Windows using Cygwin: HaskellCuda You

  • 0

I’m attempting to install the following Haskell package on Windows using Cygwin: HaskellCuda

You can install the package using “cabal install cuda”.

Here is the output I get (you may have to “cuda install c2hs” first):

$ cabal install
Configuring cuda-0.4.0.2...
checking for gcc... C:\Haskell\2011.4.0.0\mingw\bin\gcc.exe
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
Resolving dependencies...
cabal.exe: Error: some packages failed to install:
cuda-0.4.0.2 failed during the configure step. The exception was:
ExitFailure 77

The relevant part from the log file is:

configure:1758: checking for gcc
configure:1785: result: C:\Haskell\2011.4.0.0\mingw\bin\gcc.exe
configure:2022: checking for C compiler version
configure:2029: C:\Haskell\2011.4.0.0\mingw\bin\gcc.exe --version >&5
configure: line 2030: C:\Haskell\2011.4.0.0\mingw\bin\gcc.exe: command not found
configure:2035: $? = 127
configure:2042: C:\Haskell\2011.4.0.0\mingw\bin\gcc.exe -v >&5
configure: line 2043: C:\Haskell\2011.4.0.0\mingw\bin\gcc.exe: command not found
configure:2045: $? = 127
configure:2052: C:\Haskell\2011.4.0.0\mingw\bin\gcc.exe -V >&5
configure: line 2053: C:\Haskell\2011.4.0.0\mingw\bin\gcc.exe: command not found
configure:2055: $? = 127
configure:2078: checking for C compiler default output file name
configure:2105: C:\Haskell\2011.4.0.0\mingw\bin\gcc.exe -fno-stack-protector   conftest.c  >&5
configure: line 2106: C:\Haskell\2011.4.0.0\mingw\bin\gcc.exe: command not found
configure:2108: $? = 127
configure:2146: result: 
configure: failed program was: [source elided]

If I go to Cygwin and type

gcc --version

I get something reasonable. The problem appears to be more with the path I guess, but I’m not sure what/how to fix it. I should also note that using “cabal install cuda-0.2.2”, an older version of this package, I get past this step (but get a different error later).

To replicate, make sure you install the Haskell Platform in a path without spaces, otherwise you will probably get a different error. That’s the only thing I’ve figured out so far.

Any help with this would be GREATLY appreciated, I’ve spent about a week so far and haven’t gotten anywhere.

EDIT:

$PATH = C:\Haskell\2011.4.0.0\mingw\bin;
C:\Haskell\2011.4.0.0\lib\extralibs\bin;
C:\Haskell\2011.4.0.0\bin;
C:\CUDA\v4.0\bin\;
C:\cygwin\bin\;
...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:52:46+00:00Added an answer on May 28, 2026 at 4:52 pm

    I managed to get it to install, but it isn’t pretty and I don’t really understand why it won’t work out of the “autoconf” box.

    For starters, rather than installing with “cabal install” (using a local copy), I used the sequence

    >runhaskell Setup.hs configure
    >runhaskell Setup.hs build
    >runhaskell Setup.hs install
    

    The main reason for this is because it is simple to change the $CC variable in the configure script using the argument in Setup.hs. I suspected the $CC was the variable giving me the problem. I changed:

    [("CC",       ccProg)
    

    to

    [("CC",       "/cygdrive/c/cygwin/bin/gcc.exe")
    

    in Setup.hs, which is the gcc that comes with Cygwin. My initial suspicion was that autoconf didn’t like the Windows-style path to gcc, which it was using based on the log file above. I also discovered though that of the multiple copies of gcc on my computer (one in Haskell/mingw, one in a separate installation of mingw, and whichever version $PATH was pointing to, ONLY the cygwin gcc was able to successfully compile the test file that checked for . Using the cygwin gcc, I could run

    gcc hello.c
    

    on any file that included (WITHOUT an external include directive), whereas with any other copy of gcc, even something like

    gcc -I/cygdrive/c/..../include hello.c
    

    was not able to find . No idea why.

    Just changing the $CC to the Cygwin gcc fixed almost all of the errors. The next errors occurred when “checking for library containing cudaRuntimeGetVersion/cuGetDriverVersion”.

    The file configure was trying to compile was

    #define PACKAGE_NAME "Haskell CUDA bindings"
    #define PACKAGE_TARNAME "cuda"
    #define PACKAGE_VERSION "0.4.0.0"
    #define PACKAGE_STRING "Haskell CUDA bindings 0.4.0.0"
    #define PACKAGE_BUGREPORT "tmcdonell@cse.unsw.edu.au"
    #define STDC_HEADERS 1
    #define HAVE_SYS_TYPES_H 1
    #define HAVE_SYS_STAT_H 1
    #define HAVE_STDLIB_H 1
    #define HAVE_STRING_H 1
    #define HAVE_MEMORY_H 1
    #define HAVE_STRINGS_H 1
    #define HAVE_INTTYPES_H 1
    #define HAVE_STDINT_H 1
    #define HAVE_UNISTD_H 1
    #define HAVE_CUDA_H 1
    #define HAVE_CUDA_RUNTIME_API_H 1
    /* end confdefs.h.  */
    
    /* Override any GCC internal prototype to avoid an error.
       Use char because int might match the return type of a GCC
       builtin and then its argument prototype would still apply.  */
    #ifdef __cplusplus
    extern "C"
    #endif
    char cudaRuntimeGetVersion ();
    int main ()
    {
     return cudaRuntimeGetVersion ();
     ;
     return 0;
    }
    

    using the command:

    /cygdrive/c/cygwin/bin/gcc.exe -o conftest.exe -fno-stack-protector  
    -I/cygdrive/c/CUDA/v4.0/include   -L/cygdrive/c/CUDA/v4.0/lib  conftest.c -lcudart
    

    The error (from the log file) is

    /cygdrive/c/Users/crockeea/AppData/Local/Temp/ccKMQJiq.o:conftest.c:(.text+0xc):
    undefined reference to `_cudaRuntimeGetVersion'
    

    I’m a little rusty on my C, but it seems like they aren’t include the appropriate header file here. That probably isn’t right because the same file works on Unix based systems when running configure, but it’s my best guess. Also, editing configure to make this file include cuda.h just results in a different error about multiple definitions of cudaRuntimeGetVersion. So my hack was to comment out the lines in the configure file with references to cudaRuntimeGetVersion/cuGetDriverVersion. I put C-comments into the C files that the configure file was going to compile (it is easy enough to find the source code for these in the configure file based on line numbers from the log file). I don’t know the consequences of modifying the configure file in this way.

    This allowed me to get past the ‘build’ phase. More comments if I run into any other issues.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.