Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* clapack
@ 1998-02-09  5:00 K. Nikolaj Berntsen
  1998-02-09  5:00 ` clapack -> Compiled, but buggy stdlib.h in glibc-devel-2.0.6-9 K. Nikolaj Berntsen
  0 siblings, 1 reply; 3+ messages in thread
From: K. Nikolaj Berntsen @ 1998-02-09  5:00 UTC (permalink / raw)



Dear Folks,

I have tried to install clapack from netlib (it is needed to use
lapack++, which is my ultimate goal), but I am stuck with compiling
errors have anyone succeded in installing it?

The first compile-error is:
err.c:174: structure has no member named `_flag'

and the file looks like

        p->useek=f__canseek(stderr);
#ifdef NON_UNIX_STDIO
        setbuf(stderr, (char *)malloc(BUFSIZ));
#else
        stderr->_flag &= ~_IONBF;
#endif
        p->ufmt=1;


I am about to find a g77 compiler (egcs, probably; unfortunately also,
since it is my experience that there are many bugs in the c-part).

Is this the right thing to install? Are there any better libraries for
the alpha under linux?

Happy Computing,
Nikolaj
-- 
--------------------------------------------------------------
| Ph.D. stud., cand.scient.				     |
| K. Nikolaj Berntsen					     |
| Office: Department of Structural Engineering and Materials |
|	  Technical University of Denmark		     |
|	  Building 118, room 152			     |
|	  DK-2800 Lyngby				     |
| URL:	  http://www.bkm.dtu.dk/~knb                         |
--------------------------------------------------------------



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

* Re: clapack -> Compiled, but buggy stdlib.h in glibc-devel-2.0.6-9
  1998-02-09  5:00 clapack K. Nikolaj Berntsen
@ 1998-02-09  5:00 ` K. Nikolaj Berntsen
  1998-02-09  5:00   ` Michal Jaegermann
  0 siblings, 1 reply; 3+ messages in thread
From: K. Nikolaj Berntsen @ 1998-02-09  5:00 UTC (permalink / raw)



Sorry,
I have been a litle fast here.

> The first compile-error is:
> err.c:174: structure has no member named `_flag'

There was a workaround to this one (although I do not like do:
#define NON_UNIX_STDIO
)

Thanks to 
Michal Jaegermann
for commenting on it though.

There seems to be a bigger problem though, namely that I get a
compile-error from stdlib.h:

In file included from err.c:17:
/usr/include/stdlib.h:307: parse error before `4'
/usr/include/stdlib.h:307: warning: no semicolon at end of struct or
union
/usr/include/stdlib.h:312: parse error before `}'

which looks like: (lines 299-312)


/* Seed random number generator.  */
extern void srand48 __P ((long __seedval));
extern unsigned short int *seed48 __P ((unsigned short int
__seed16v[3]));
extern void lcong48 __P ((unsigned short int __param[7]));

/* Data structure for communication with thread safe versions.  */
struct drand48_data
  {
    unsigned short int X[3];	/* Current state.  */
    unsigned short int a[3];	/* Factor in congruential formula.  */
    unsigned short int c;	/* Additive const. in congruential formula. 
*/
    unsigned short int old_X[3]; /* Old state.  */
    int init;			/* Flag for initializing.  */
  };


A grep convinces me that the files I try to compile does not need
rand48, therefore I workaround it by just making drand48_data, an empty
struct. Now it compiles fine. I do not like it, but I keep "programming"
intuitively as long as I can, to save time :-?

Happy Computing,
-- 
--------------------------------------------------------------
| Ph.D. stud., cand.scient.				     |
| K. Nikolaj Berntsen					     |
| Office: Department of Structural Engineering and Materials |
|	  Technical University of Denmark		     |
|	  Building 118, room 152			     |
|	  DK-2800 Lyngby				     |
| URL:	  http://www.bkm.dtu.dk/~knb                         |
--------------------------------------------------------------



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

* Re: clapack -> Compiled, but buggy stdlib.h in glibc-devel-2.0.6-9
  1998-02-09  5:00 ` clapack -> Compiled, but buggy stdlib.h in glibc-devel-2.0.6-9 K. Nikolaj Berntsen
@ 1998-02-09  5:00   ` Michal Jaegermann
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Jaegermann @ 1998-02-09  5:00 UTC (permalink / raw)



K. Nikolaj Berntsen (berntsen@nospam.bkm.dtu.dk) wrote:
: 
: > The first compile-error is:
: > err.c:174: structure has no member named `_flag'
: 
: There was a workaround to this one (although I do not like do:
: #define NON_UNIX_STDIO
: )
: 
: Thanks to 
: Michal Jaegermann
: for commenting on it though.

For the record - this was NOT what I was suggesting in a private
e-mail.  My advice was to fix obviously buggy original code by
using 'setvbuf()'.  Manual page has more details.

: 
: There seems to be a bigger problem though, namely that I get a
: compile-error from stdlib.h:
: 
: In file included from err.c:17:
: /usr/include/stdlib.h:307: parse error before `4'

This looks like something defines srand or drand as a macro;
this macro gets expanded in a preprocessor and compiler gets
a garbage.  What is a culprit here is it impossible to tell from
the code sample.  '-E' flag to gcc helps to resolve such matters.
Once again - documentation is your friend.

In situations like that sometimes changing an order of includes
helps to resolve a problem.

  --mj



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

end of thread, other threads:[~1998-02-09  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-02-09  5:00 clapack K. Nikolaj Berntsen
1998-02-09  5:00 ` clapack -> Compiled, but buggy stdlib.h in glibc-devel-2.0.6-9 K. Nikolaj Berntsen
1998-02-09  5:00   ` Michal Jaegermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox