[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Hypergiant egg install fails, and some other eggs

From: Jeremy Steward
Subject: Re: [Chicken-users] Hypergiant egg install fails, and some other eggs
Date: Sun, 04 Oct 2015 10:50:24 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0

Hash: SHA1

I suppose as one of the few people who has used / uses CHICKEN on
Windows I should chime in :)

On 02/10/15 12:57 PM, Peter Bex wrote:
> On Sat, Oct 03, 2015 at 02:29:35AM +0800, Robert Herman wrote:
>> Maybe Termbox is too reliant on a linux terminal as the target,
>> but how come Blas fails, when I have the Blas libraries
>> installed, and working in other language implementations?
> Hard to say without more info.  The Blas egg is a bit of a pain to
> get working, even on *nix.  It has its own attempt at
> "auto-detection" of how it should invoke the compiler & linker,
> which is quite error-prone and probably very Linux-oriented anyway.
> The reason behind this seems to be that Blas itself is a bit of an
> old-fashioned library, and doesn't have a way to discover how to
> link against it (no pkg-config, for example).

BLAS is problematic not because it is old, but because it is made
available through multiple implementations. For example, BLAS can be
made available through Intel's MKL, ATLAS, OpenBLAS, and of course the
original reference implementation. Keep in mind BLAS is
often implemented in Fortran and then exported to C, so depending on
your implementation you might also need to expose `-lgfortran` to csc
as well.

The "auto-detection" code is more or less attempting to figure out
which BLAS library you're using, and tries to deduce which files to
link into the build process. You can, for example, try the following:

    #include <stdlib.h>
    #include <cblas.h>

    int main() {
        cblas_ddot(0, NULL, 0, NULL, 0);
        return 0;

You'll then want to compile this as follows:

    gcc test.c -o test -lm -lblas


    gcc test.c -o test -lm -lcblas

If either of those work, you should be good to go with regards to
installing BLAS automatically. Otherwise, you may need to figure out
where libblas.dll or libcblas.dll reside and you'll need to expose
those libraries in your INCLUDE path.

If you're getting weird errors with blas or atlas-lapack, you can post
here and I can try to help. I did some work with atlas-lapack earlier
this year (and I mean to do more), but I've had good success with it
on Windows thus far.

>> I will try and see why other eggs fail and look into tracing
>> them, and share what I find. I really want to be able to make
>> CHICKEN my platform on Windows.
> Don't give up!  It's just that you're charting new territory; not
> many people are currently using CHICKEN on Windows.  Most egg
> authors will be happy to patch their eggs to make things work, if
> you can inform them what is needed to make things build on
> Windows.

Agreed, please do not give up. Currently the way I use CHICKEN on
Windows is through Cygwin, because it is currently the easiest way to
install and link things (using plain MinGW64 is an exercise in
patience, IMO). Hopefully the midipix project (
picks up, which will provide a much better way to use CHICKEN (and
other C libraries / programs) on Windows.

I suppose midipix / musl-libc support should be it's own thread though.


- -- 
Jeremy Steward

Version: GnuPG v2


reply via email to

[Prev in Thread] Current Thread [Next in Thread]