help-smalltalk
[Top][All Lists]
Advanced

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

[Help-smalltalk] Build issues with 3.2.4 and Solaris 8 using GCC-4.1.0


From: Rick Flower
Subject: [Help-smalltalk] Build issues with 3.2.4 and Solaris 8 using GCC-4.1.0
Date: Wed, 31 Oct 2012 07:58:25 -0700
User-agent: Apple Webmail/0.6

So, I tried building against GCC 4.1.0 and Solaris 8 and have issues with
lrintf().. configure claims it's not available (I'd agree) but gcc
complains when building lib-src/lrintf.c complaining about conflicting
definitions for that function.

So, I invoked the compiler for just the preprocessor and below is the
output :

# 1 "lrintf.c"
# 1 "/export/home/rflower/src/lang/smalltalk/smalltalk-3.2.4/lib-src//"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "lrintf.c"
# 53 "lrintf.c"
# 1 "/usr/local/gcc-3.4.3/lib/gcc/sparc-sun-solaris2.8/3.4.3/include/float.h" 1 3 4
# 54 "lrintf.c" 2

# 1 "mathl.h" 1
# 56 "mathl.h"
extern long double acosl(long double x);
extern long double asinl (long double x);
extern long double atanl (long double x);
extern long double ceill(long double x);
extern long double cosl(long double x);
extern long double expl (long double x);
extern long double floorl(long double x);
extern long double frexpl(long double x, int *exp);
extern long double ldexpl(long double x, int exp);
extern long double logl(long double x);
extern long double sinl (long double x);
extern long double sqrtl(long double x);
extern long double tanl (long double x);
extern long double truncl(long double x);

extern double trunc(double x);
extern float truncf(float x);

extern long lrintl(long double x);
extern long lrint(double x);
extern long lrintf(float x);
# 56 "lrintf.c" 2

float
lrintf(float x)
{
  float y;
  if (x < 0.0L)
    {
      y = -(1.0L / 1.19209290e-7F - x - 1.0 / 1.19209290e-7F);
      if (y < x)
        y = y + 1.0L;
    }
  else
    {
      y = 1.0L / 1.19209290e-7F + x - 1.0 / 1.19209290e-7F;
      if (y > x)
        y = y - 1.0L;
    }

  return (long) y;
}

Notice that GST's 'mathl.h' defines lrintf() as returning a
long but the function itself is returning a float..  In light
of the fact that the last line of the lrintf() function is
returning a value converted to long care of casting, I'm going
to assume that the above function should be returning a long
and NOT a float.  Once I made that change it compiled and moved
on with other items to build...

I'm guessing some versions of GCC may be letting that slide but
newer versions are more picky about prototypes not matching better.

Now I just need to figure out why it wont build a gst.im for
some reason..




reply via email to

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