Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Whereis libm.a ?
@ 1998-03-09 20:28 Christopher Curtis
  1998-03-09 20:52 ` Christopher Curtis
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Curtis @ 1998-03-09 20:28 UTC (permalink / raw)
  To: axp-list

Hello,

I'm running RedHat 4.2 on a little Mutia.  Trying to compile MySQL, and it
reports:

[...]
checking size of char... 0
configure: error: No size for char type. A likely cause for this could be that there isn't any
static libraries installed. You can verify this by checking if you have libm.a
in /lib, /usr/lib or some other standard place.  If this is the problem,
install the static libraries and try again.  If this isn't the problem,

Indeed, I have no libm.a ... where might I find this?

Thanks,
--
Christopher Curtis               - http://www.ee.fit.edu/users/ccurtis
Florida Institute of Technology  - System Administrator, Programmer
Melbourne, Florida  USA          - http://www.lp.org/


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

* Re: Whereis libm.a ?
  1998-03-09 20:28 Whereis libm.a ? Christopher Curtis
@ 1998-03-09 20:52 ` Christopher Curtis
  1998-03-09 21:07   ` Christopher Curtis
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Christopher Curtis @ 1998-03-09 20:52 UTC (permalink / raw)
  To: axp-list

On Mon, 9 Mar 1998, Christopher Curtis wrote:

> I'm running RedHat 4.2 on a little Mutia.  Trying to compile MySQL, and it
> reports:

Multia, of course...

> checking size of char... 0
> configure: error: No size for char type. A likely cause for this could be that there isn't any
[...]

> Indeed, I have no libm.a ... where might I find this?

Doh!  It's in /usr/lib ... but the .so is in /lib ... anyhow, new problem.
Why does this program:

#line 3823 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(char));
  exit(0);
}

tell me that the sizeof(char) is 0 ?

Thanks again,
--
Christopher Curtis               - http://www.ee.fit.edu/users/ccurtis
Florida Institute of Technology  - System Administrator, Programmer
Melbourne, Florida  USA          - http://www.lp.org/


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

* Re: Whereis libm.a ?
  1998-03-09 20:52 ` Christopher Curtis
@ 1998-03-09 21:07   ` Christopher Curtis
  1998-03-09 21:36   ` Richard Hadsell
  1998-03-09 23:31   ` Michal Jaegermann
  2 siblings, 0 replies; 5+ messages in thread
From: Christopher Curtis @ 1998-03-09 21:07 UTC (permalink / raw)
  To: axp-list

On Mon, 9 Mar 1998, Christopher Curtis wrote:

Sorry for all the chatter ... it was a LinuxThreads problem.

I'll be back later, I'm sure.  :-\

--
Christopher Curtis               - http://www.ee.fit.edu/users/ccurtis
Florida Institute of Technology  - System Administrator, Programmer
Melbourne, Florida  USA          - http://www.lp.org/


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

* Re: Whereis libm.a ?
  1998-03-09 20:52 ` Christopher Curtis
  1998-03-09 21:07   ` Christopher Curtis
@ 1998-03-09 21:36   ` Richard Hadsell
  1998-03-09 23:31   ` Michal Jaegermann
  2 siblings, 0 replies; 5+ messages in thread
From: Richard Hadsell @ 1998-03-09 21:36 UTC (permalink / raw)
  To: axp-list

Christopher Curtis wrote:
> 
> Why does this program:
> 
> #line 3823 "configure"
> #include "confdefs.h"
> #include <stdio.h>
> main()
> {
>   FILE *f=fopen("conftestval", "w");
>   if (!f) exit(1);
>   fprintf(f, "%d\n", sizeof(char));
>   exit(0);
> }
> 
> tell me that the sizeof(char) is 0 ?

Perhaps size_t on your platfrom is a long, while you told fprintf to
expect an int, and long is not the same size as int?  This must make C++
programmers smile!

-- 
Dick Hadsell			914-381-8400  Fax: 914-381-9790
Reply-to:			hadsell@blueskystudios.com
Blue Sky | VIFX			http://www.blueskystudios.com
1 South Road, Harrison, NY 10528


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

* Re: Whereis libm.a ?
  1998-03-09 20:52 ` Christopher Curtis
  1998-03-09 21:07   ` Christopher Curtis
  1998-03-09 21:36   ` Richard Hadsell
@ 1998-03-09 23:31   ` Michal Jaegermann
  2 siblings, 0 replies; 5+ messages in thread
From: Michal Jaegermann @ 1998-03-09 23:31 UTC (permalink / raw)
  To: axp-list

Christopher Curtis writes:
> 
> Why does this program:
> 
> #line 3823 "configure"
> #include "confdefs.h"
> #include <stdio.h>
> main()
> {
>   FILE *f=fopen("conftestval", "w");
>   if (!f) exit(1);
>   fprintf(f, "%d\n", sizeof(char));
>   exit(0);
> }
> 
> tell me that the sizeof(char) is 0 ?

Because it is buggy.

C standard says that type returned by sizeof() operator is of an unsigned
integral type and is implementation defined ("integral type" does not
mean, of course, 'int').  But it also says that when sizeof is applied
to any object of structure, union or array then the result gives a total
number of bytes in such object, including any internal padding if present.
On 64-bit Alpha this requirement obviously makes a choice of 'unsigned
int' for a type of value of sizeof operator unfeasible.

On 32-bit machines sizeof(sizeof_t) happens to be the same as sizeof(int)
and the code above does accidentally what you expect.  If you would use
-Wall to a compiler gcc would tell you loud and clear what it thinks
about this code.

  Michal


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

end of thread, other threads:[~1998-03-09 23:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-03-09 20:28 Whereis libm.a ? Christopher Curtis
1998-03-09 20:52 ` Christopher Curtis
1998-03-09 21:07   ` Christopher Curtis
1998-03-09 21:36   ` Richard Hadsell
1998-03-09 23:31   ` Michal Jaegermann

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