public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* IRIX installation problems
@ 2002-12-09 11:42 Gabriel Soubies
  2002-12-09 13:36 ` Steve ROBBINS
  0 siblings, 1 reply; 4+ messages in thread
From: Gabriel Soubies @ 2002-12-09 11:42 UTC (permalink / raw)
  To: gsl-discuss

Hi all!
I've been trying to compile GSL 1.2 on my IRIX 6.5 for the las two days.
Step after step, I managed to correct some mistakes the configure script
made.
My compiler is MipsProC++ 7.3, and it seems that the INSTALL file deserves
some clarifications concerning this compiler.
Here are the remarks I can make so far:
1/ There are problems with enums. For example, I had problems with fp_rnd.
typedef	enum	fp_rnd {
    FP_RN = 0,	/* round to nearest representable number, tie -> even */
    FP_RZ = 1,	/* round toward zero (truncate)			      */
    FP_RP = 2,  /* round toward plus infinity                         */
    FP_RM = 3   /* round toward minus infinity                        */
    } fp_rnd;

fp_rnd	aVariable = 0; // not accepted by MipProC++ 7.3
fp_rnd	aVariable = FP_RN; // not accepted by MipProC++ 7.3

2/ Configure defined the "const" as "". I don't know why it did not
recognize const, but I changed it in the config.h to #define const const and
it worked.

3/ Configure did not find that I has stdc headers in /usr/include. I had to
set HAVE_STDC_HEADERS manually in config.h.

4/ The compiler doesn't convert const void* to cont float* (it's an
example). I had to edit a source file to make the cast explicit.

5/ the files in utils/ have old C style function declaration, that the
compiler doesn't understand by default. You have to give the -anach options
to CC. I think it should be specified in the INSTALL file.



Now I have another cast problem that I didn't manage to resolve.
Here are some extracts from my make log:
============================================================================
===
cc-1282 CC: ERROR File = poly.c, Line = 143
  More than one instance of overloaded function "pow" matches the argument
list.

            Function symbol function "pow(double, double)" is ambiguous by
                      inheritance.
            Function symbol function "pow(double, int)" is ambiguous by
                      inheritance.
            The argument types are:  (double, unsigned int).
        sum += state->coeff[i] * (pow (b, i + 1) - pow (a, i + 1)) / (i +
1.0);

============================================================================
===
cc-1282 CC: ERROR File = exp.c, Line = 472
  More than one instance of overloaded function "log" matches the argument
list.

            Function symbol function "log(double)" is ambiguous by
inheritance.
            Function symbol function "log(float)" is ambiguous by
inheritance.
            Function symbol function "log(long double)" is ambiguous by
                      inheritance.
            The argument types are:  (const int).
        lg_N  = lnf_N.val - log(N);       /* log(Gamma(N)) */

As you can see, there are some serious cast problems, and theses occur in
almost every file in specfuncs/
Can someone tell me how to get rid of these?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: IRIX installation problems
  2002-12-09 11:42 IRIX installation problems Gabriel Soubies
@ 2002-12-09 13:36 ` Steve ROBBINS
  2002-12-10  9:39   ` Gabriel Soubies
  0 siblings, 1 reply; 4+ messages in thread
From: Steve ROBBINS @ 2002-12-09 13:36 UTC (permalink / raw)
  To: Gabriel Soubies; +Cc: gsl-discuss

On Mon, Dec 09, 2002 at 02:45:44PM +0100, Gabriel Soubies wrote:

> My compiler is MipsProC++ 7.3, and it seems that the INSTALL file deserves
> some clarifications concerning this compiler.

Why do you compile GSL with the C++ compiler?  

Using the C compiler works much better: on my IRIX 6.5 system, only the
HAVE_STDC_HEADERS problem exists.  And I'm not sure that we have the compiler
correctly installed, so that might not be a universal problem.


> 3/ Configure did not find that I has stdc headers in /usr/include. I had to
> set HAVE_STDC_HEADERS manually in config.h.

-S

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: IRIX installation problems
  2002-12-09 13:36 ` Steve ROBBINS
@ 2002-12-10  9:39   ` Gabriel Soubies
  2002-12-10 13:23     ` Steve ROBBINS
  0 siblings, 1 reply; 4+ messages in thread
From: Gabriel Soubies @ 2002-12-10  9:39 UTC (permalink / raw)
  To: Steve ROBBINS; +Cc: gsl-discuss

I finally managed to compile it!
I forced compilation with the C compiler as Steve Robbins suggested.

If it can be of any help to anybody in the future, here are the flags I used
to compile it:
setenv CFLAGS '-x c -LANG:std=off -OPT:IEEE_NaN_inf=ON -anach'

The flag that changed my life is -LANG:std=off.
No casting problem anymore.

Anyway, I had to edit some files that contained mallocs that were not
explicitly cast to the type of variable to which they were assigned.
Example:
float *pFloat = malloc(......); // not accepted
float *pFloat = (float*)malloc(......); // accepted
I didn't find a way to make it accept to MipsPro 7.3.

I think it deserved to be noted.

Thanks again to everybody that helped me!


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: IRIX installation problems
  2002-12-10  9:39   ` Gabriel Soubies
@ 2002-12-10 13:23     ` Steve ROBBINS
  0 siblings, 0 replies; 4+ messages in thread
From: Steve ROBBINS @ 2002-12-10 13:23 UTC (permalink / raw)
  To: Gabriel Soubies; +Cc: gsl-discuss

On Tue, Dec 10, 2002 at 03:55:43PM +0100, Gabriel Soubies wrote:
> I finally managed to compile it!
> I forced compilation with the C compiler as Steve Robbins suggested.

I still don't understand why you had to "force" anything.  What's wrong
with simple

    ./configure
    make

??

If it's because it picks up GCC and you'd rather the vendor compiler, then

    setenv CC=cc
    ./configure
    make

-S

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-12-10 17:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-09 11:42 IRIX installation problems Gabriel Soubies
2002-12-09 13:36 ` Steve ROBBINS
2002-12-10  9:39   ` Gabriel Soubies
2002-12-10 13:23     ` Steve ROBBINS

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).