unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Gmp now working, but number.c:147 isinf declared implicitly.
@ 2007-01-05 14:52 Hugh Sasse
  2007-01-12 17:37 ` Hugh Sasse
  0 siblings, 1 reply; 30+ messages in thread
From: Hugh Sasse @ 2007-01-05 14:52 UTC (permalink / raw)


I am now getting :

 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -D_REENTRANT -pthreads -g -O2 -Wall -Wmissing-prototypes -Werror -MT libguile_la-numbers.lo -MD -MP -MF .deps/libguile_la-numbers.Tpo -c numbers.c  -fPIC -DPIC -o .libs/libguile_la-numbers.o
cc1: warnings being treated as errors
numbers.c: In function 'xisinf':
numbers.c:147: warning: implicit declaration of function 'isinf'
gmake[3]: *** [libguile_la-numbers.lo] Error 1
gmake[3]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/libguile'
gmake[2]: *** [all] Error 2

$ ggrep -C 8 isinf config.log
| int
| main ()
| {
| return trunc ();
|   ;
|   return 0;
| }
configure:43674: result: no
configure:43694: checking for isinf
configure:43706: gcc -o conftest -g -O2   conftest.c -lgmp -lsocket -lnsl -lm -lltdl  >&5
configure:43712: $? = 0
configure:43719: test -z "$ac_c_werror_flag" || test ! -s conftest.err
configure:43722: $? = 0
configure:43729: test -s conftest
configure:43732: $? = 0
configure:43734: result: yes
configure:43751: checking for isnan
$
So configure knwo what it is, but I can't see how to get at this info 
to modify number.c.  Maybe I need to do something different?

        Thank you,
        Hugh


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-05 14:52 Gmp now working, but number.c:147 isinf declared implicitly Hugh Sasse
@ 2007-01-12 17:37 ` Hugh Sasse
  2007-01-12 22:59   ` Kevin Ryde
  0 siblings, 1 reply; 30+ messages in thread
From: Hugh Sasse @ 2007-01-12 17:37 UTC (permalink / raw)


On Fri, 5 Jan 2007, Hugh Sasse wrote:

> I am now getting :
> 
>  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -D_REENTRANT -pthreads -g -O2 -Wall -Wmissing-prototypes -Werror -MT libguile_la-numbers.lo -MD -MP -MF .deps/libguile_la-numbers.Tpo -c numbers.c  -fPIC -DPIC -o .libs/libguile_la-numbers.o
> cc1: warnings being treated as errors
> numbers.c: In function 'xisinf':
> numbers.c:147: warning: implicit declaration of function 'isinf'
> gmake[3]: *** [libguile_la-numbers.lo] Error 1
> gmake[3]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/libguile'
> gmake[2]: *** [all] Error 2
> 
> $ ggrep -C 8 isinf config.log
> | int
> | main ()
> | {
> | return trunc ();
> |   ;
> |   return 0;
> | }
> configure:43674: result: no
> configure:43694: checking for isinf
> configure:43706: gcc -o conftest -g -O2   conftest.c -lgmp -lsocket -lnsl -lm -lltdl  >&5
> configure:43712: $? = 0
> configure:43719: test -z "$ac_c_werror_flag" || test ! -s conftest.err
> configure:43722: $? = 0
> configure:43729: test -s conftest
> configure:43732: $? = 0
> configure:43734: result: yes
> configure:43751: checking for isnan
> $
> So configure knwo what it is, but I can't see how to get at this info 
> to modify number.c.  Maybe I need to do something different?


I have now tried a number of things.  This is on Solaris9. 
I can't get it to pickup the definition from the Sun Workshop includes.
The sun man page for isinf claims that it is available in sunmath.h
which we don't have in /usr/include.
I've tried to modify configure.in so that AC_CHECK_HEADER is called
to define HAVE_SUNMATH_H if sunmath.h exists.  Running
autoconf configure.in > configure
with 
autoconf (GNU Autoconf) 2.60
results in a corrupt configure file (in so far as it just fails when testing 
gcc)
Starting afresh and using 
autoreconf -if
similarly corrupts the configure file. Unfortunately I noramlly
never touch autoconf etc so don't know the details of their correct
usage.

I'm wondering if it is worth trying to install glibc to get around this,
but I'd rather not add too much to my system

Any ideas how to build this successfully on Solaris 9?

        Thank you,
        Hugh


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-12 17:37 ` Hugh Sasse
@ 2007-01-12 22:59   ` Kevin Ryde
  2007-01-15  9:46     ` Hugh Sasse
  0 siblings, 1 reply; 30+ messages in thread
From: Kevin Ryde @ 2007-01-12 22:59 UTC (permalink / raw)
  Cc: guile-user

Hugh Sasse <hgs@dmu.ac.uk> writes:
>
>> cc1: warnings being treated as errors

That's designed to force all users to be developers :-(.

>> numbers.c: In function 'xisinf':
>> numbers.c:147: warning: implicit declaration of function 'isinf'

You might be able to just stick in a prototype, or alternately just
"./configure --disable-error-on-warning".

> I can't get it to pickup the definition from the Sun Workshop includes.

Dunno if gcc is meant to do that, probably not.

> The sun man page for isinf claims that it is available in sunmath.h
> which we don't have in /usr/include.

We could include that (when available) if you think it'd do any good.
Otherwise if you think there's a function but no prototype we could
put a prototype in (when not otherwise provided).

Perhaps there's a c99 mode for the headers that would give isinf and
isnan, but I'd expect that to be more painful than workarounds for the
default mode.

> autoconf configure.in > configure
> with 
> autoconf (GNU Autoconf) 2.60

We're probably on 2.61 by now, though that shouldn't make a
difference.  You might check you can regenerate without any changes
before attempting some.  You probably need gnu m4, though I'd expect
autoconf to complain if it's only got the system one.

PS. bug-guile is list to use for bugs (ie. something not working).


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-12 22:59   ` Kevin Ryde
@ 2007-01-15  9:46     ` Hugh Sasse
  2007-01-15 11:58       ` Hugh Sasse
  2007-01-15 20:27       ` Kevin Ryde
  0 siblings, 2 replies; 30+ messages in thread
From: Hugh Sasse @ 2007-01-15  9:46 UTC (permalink / raw)
  Cc: guile-user

On Sat, 13 Jan 2007, Kevin Ryde wrote:

> Hugh Sasse <hgs@dmu.ac.uk> writes:
> >
> >> cc1: warnings being treated as errors
> 
> That's designed to force all users to be developers :-(.

Should that be in the *release* then?  Prior to release definitely 
makes sense.
> 
> >> numbers.c: In function 'xisinf':
> >> numbers.c:147: warning: implicit declaration of function 'isinf'
> 
> You might be able to just stick in a prototype,

Tried to do that, it still complained about it.
>                                                 or alternately just
> "./configure --disable-error-on-warning".

Hmmmm, I'll give that a go.
> 
> > I can't get it to pickup the definition from the Sun Workshop includes.
> 
> Dunno if gcc is meant to do that, probably not.

I pointed -I to the appropriate place, but no joy.
> 
> > The sun man page for isinf claims that it is available in sunmath.h
> > which we don't have in /usr/include.
> 
> We could include that (when available) if you think it'd do any good.

Well, I don't understand why it is documented in `man isinf` and yet
we don't have it.

> Otherwise if you think there's a function but no prototype we could
> put a prototype in (when not otherwise provided).

that sounds like the best approach to me.  There is a definition to 
be picked up when one is not available, so this seems sensible.
> 
> Perhaps there's a c99 mode for the headers that would give isinf and
> isnan, but I'd expect that to be more painful than workarounds for the
> default mode.

I still haven't found a good source of info for C99.  The K&R book 
was updated for ANSI C but not C99 yet.
> 
> > autoconf configure.in > configure
> > with 
> > autoconf (GNU Autoconf) 2.60
> 
> We're probably on 2.61 by now, though that shouldn't make a

I have spent two weeks updating GNU stuff.  This insistance on
the absolute latest versions of everything for a build is immensely
frustrating.  

> difference.  You might check you can regenerate without any changes
> before attempting some.  You probably need gnu m4, though I'd expect

GNU M4 1.4.8
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Written by Rene' Seindal.

> autoconf to complain if it's only got the system one.
> 
> PS. bug-guile is list to use for bugs (ie. something not working).

Yes, but I haven't actually established this is a bug yet.  I may
have missed some detailed step that I should have taken, to make the
definition come out correctly after all the macro work.

        Thank you,
        Hugh


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-15  9:46     ` Hugh Sasse
@ 2007-01-15 11:58       ` Hugh Sasse
  2007-01-15 20:31         ` Kevin Ryde
  2007-01-15 20:27       ` Kevin Ryde
  1 sibling, 1 reply; 30+ messages in thread
From: Hugh Sasse @ 2007-01-15 11:58 UTC (permalink / raw)
  Cc: guile-user

On Mon, 15 Jan 2007, Hugh Sasse wrote:

> On Sat, 13 Jan 2007, Kevin Ryde wrote:
> 
> > You might be able to just stick in a prototype,
> 
> Tried to do that, it still complained about it.
> >                                                 or alternately just
> > "./configure --disable-error-on-warning".
> 
> Hmmmm, I'll give that a go.

Right, I got this:

if /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I..    -g -O2 -Wall -Wmissing-prototypes -MT posix.lo -MD -MP -MF ".deps/posix.Tpo" -c -o posix.lo posix.c; \
        then mv -f ".deps/posix.Tpo" ".deps/posix.Plo"; else rm -f ".deps/posix.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -g -O2 -Wall -Wmissing-prototypes -MT posix.lo -MD -MP -MF .deps/posix.Tpo -c posix.c  -fPIC -DPIC -o .libs/posix.o
posix.c: In function 'scm_putenv':
posix.c:1332: error: 'len' undeclared (first use in this function)
posix.c:1332: error: (Each undeclared identifier is reported only once
posix.c:1332: error: for each function it appears in.)
gmake[3]: *** [posix.lo] Error 1
gmake[3]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/libguile'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/libguile'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1'
gmake: *** [all] Error 2
bash-2.05$

bash-2.05$ ggrep -n -C 2 '\<len\>' posix.c
1314-  char *c_str = scm_to_locale_string (str);
1315-#ifdef __MINGW32__
1316:  size_t len = strlen (c_str);
1317-#endif
1318-
--
1330-    environment variable 'name'. */
1331-      int e;
1332:      char *ptr = scm_malloc (len + 2);
1333-      strcpy (ptr, c_str);
1334:      strcpy (ptr+len, "=");
1335-      rv = putenv (ptr);
1336-      e = errno; free (ptr); free (c_str); errno = e;
--
1349-         because MINGW putenv copies it.  */
1350-
1351:      if (c_str[len-1] == '=')
1352-        {
1353:     char *ptr = scm_malloc (len+2);
1354-     strcpy (ptr, c_str);
1355:     strcpy (ptr+len, " ");
1356-     rv = putenv (ptr);
1357-     if (rv < 0)
--
1363-       }
1364-     /* truncate to just the name */
1365:     c_str[len-1] = '\0';
1366-     ptr = getenv (c_str);
1367-     if (ptr)
--
1592-{
1593-  static char user[256];
1594:  static unsigned long len = 256;
1595-
1596:  if (!GetUserName (user, &len))
1597-    return NULL;
1598-  return user;
--
1745-static int flock (int fd, int operation)
1746-{
1747:  long pos, len;
1748-  int ret, err;
1749-
--
1771-
1772-  /* Save current file pointer and seek to beginning. */
1773:  if ((pos = lseek (fd, 0, SEEK_CUR)) == -1 || (len = filelength (fd)) == -1)
1774-    return -1;
1775-  lseek (fd, 0L, SEEK_SET);
--
1778-  do
1779-    {
1780:      ret = _locking (fd, operation, len);
1781-    }
1782-  while (ret == -1 && errno == EDEADLOCK);
--
1871-  /* Various systems define MAXHOSTNAMELEN (including Solaris in fact).
1872-   * On GNU/Linux this doesn't include the terminating '\0', hence "+ 1".  */
1873:  const int len = MAXHOSTNAMELEN + 1;
1874:  char *const p = scm_malloc (len);
1875:  const int res = gethostname (p, len);
1876-
1877-  scm_dynwind_begin (0);
--
1882-  /* Default 256 is for Solaris, under Linux ENAMETOOLONG is returned if not
1883-   * large enough.  SUSv2 specifies 255 maximum too, apparently.  */
1884:  int len = 256;
1885-  int res;
1886-  char *p;
--
1895-    const long int n = sysconf (_SC_HOST_NAME_MAX);
1896-    if (n != -1L)
1897:      len = n;
1898-  }
1899-
1900-#  endif
1901-
1902:  p = scm_malloc (len);
1903-
1904-  scm_dynwind_begin (0);
1905-  scm_dynwind_unwind_handler (free, p, 0);
1906-
1907:  res = gethostname (p, len);
1908-  while (res == -1 && errno == ENAMETOOLONG)
1909-    {
1910:      len *= 2;
1911-
1912-      /* scm_realloc may throw an exception.  */
1913:      p = scm_realloc (p, len);
1914:      res = gethostname (p, len);
1915-    }
1916-
bash-2.05$

        Hugh


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-15  9:46     ` Hugh Sasse
  2007-01-15 11:58       ` Hugh Sasse
@ 2007-01-15 20:27       ` Kevin Ryde
  2007-01-16 10:11         ` Hugh Sasse
  1 sibling, 1 reply; 30+ messages in thread
From: Kevin Ryde @ 2007-01-15 20:27 UTC (permalink / raw)
  Cc: guile-user

Hugh Sasse <hgs@dmu.ac.uk> writes:
>
> On Sat, 13 Jan 2007, Kevin Ryde wrote:
>
>> Otherwise if you think there's a function but no prototype we could
>> put a prototype in (when not otherwise provided).
>
> that sounds like the best approach to me.  There is a definition to 
> be picked up when one is not available, so this seems sensible.

What would work?  Just

	int isnan (double);

In c99 it's a macro that adapts to the size of the input, but I'd
expect a function version to take a double.

> I still haven't found a good source of info for C99.  The K&R book 
> was updated for ANSI C but not C99 yet.

There's a draft standard kicking around the net, google for "n869", or
check

	http://anubis.dkuug.dk/JTC1/SC22/WG14/www/docs/n869/

Not tremendously helpful as such though.

> I have spent two weeks updating GNU stuff.  This insistance on
> the absolute latest versions of everything for a build is immensely
> frustrating.  

For a build it's not meant to be necessary.  For developers though
there's no virtue in bugwards compatibility to old bits.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-15 11:58       ` Hugh Sasse
@ 2007-01-15 20:31         ` Kevin Ryde
  2007-01-16 10:21           ` Hugh Sasse
  0 siblings, 1 reply; 30+ messages in thread
From: Kevin Ryde @ 2007-01-15 20:31 UTC (permalink / raw)
  Cc: guile-user

Hugh Sasse <hgs@dmu.ac.uk> writes:
>
> posix.c: In function 'scm_putenv':
> posix.c:1332: error: 'len' undeclared (first use in this function)

Thanks.  Dodgy conditionals :-(.  You can use the "len" at the start
of the function (claiming to be for mingw).

Does that mean there's no unsetenv() on solaris?  You might next have
to check if the fallback code actually works.  I've got a worrying
suspicion it ought to be putenv("FOO") but is doing putenv("FOO=") for
the benefit of DOS.  (Could need yet another configure check ...)


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-15 20:27       ` Kevin Ryde
@ 2007-01-16 10:11         ` Hugh Sasse
  2007-01-18  0:38           ` Kevin Ryde
  0 siblings, 1 reply; 30+ messages in thread
From: Hugh Sasse @ 2007-01-16 10:11 UTC (permalink / raw)
  Cc: guile-user

On Tue, 16 Jan 2007, Kevin Ryde wrote:

> Hugh Sasse <hgs@dmu.ac.uk> writes:
> >
> > On Sat, 13 Jan 2007, Kevin Ryde wrote:
> >
> >> Otherwise if you think there's a function but no prototype we could
> >> put a prototype in (when not otherwise provided).
> >
> > that sounds like the best approach to me.  There is a definition to 
> > be picked up when one is not available, so this seems sensible.
> 
> What would work?  Just
> 
> 	int isnan (double);
> 
> In c99 it's a macro that adapts to the size of the input, but I'd
> expect a function version to take a double.

I'll have a look at that.  With all the macro stuff it's difficult
to know where to insert this.
> 
> > I still haven't found a good source of info for C99.  The K&R book 
> > was updated for ANSI C but not C99 yet.
> 
> There's a draft standard kicking around the net, google for "n869", or
> check
> 
> 	http://anubis.dkuug.dk/JTC1/SC22/WG14/www/docs/n869/
> 
> Not tremendously helpful as such though.

Thanks, I'll add that link to my C information in due course.
> 
> > I have spent two weeks updating GNU stuff.  This insistance on
> > the absolute latest versions of everything for a build is immensely
> > frustrating.  
> 
> For a build it's not meant to be necessary.  For developers though

Well, I bit the bullet and built Autoconf-2.61.  It didn't make
any difference.

> there's no virtue in bugwards compatibility to old bits.

That rather depends on for whom they are developing.  Aguments in 
"Brave Gnu World" about software use in the third world where download
speeds are still limited, and 
http://www.gnu.org/software/reliability.html "free software is more
reliable" aren't helped by making the software brittle in this manner.

It seems that the GNU coding standards are silent about this aspect
of development.
http://www.gnu.org/prep/standards/html_node/index.html

        Hugh
> 



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-15 20:31         ` Kevin Ryde
@ 2007-01-16 10:21           ` Hugh Sasse
  2007-01-16 14:58             ` Hugh Sasse
  2007-01-18  0:43             ` Kevin Ryde
  0 siblings, 2 replies; 30+ messages in thread
From: Hugh Sasse @ 2007-01-16 10:21 UTC (permalink / raw)
  Cc: guile-user

On Tue, 16 Jan 2007, Kevin Ryde wrote:

> Hugh Sasse <hgs@dmu.ac.uk> writes:
> >
> > posix.c: In function 'scm_putenv':
> > posix.c:1332: error: 'len' undeclared (first use in this function)
> 
> Thanks.  Dodgy conditionals :-(.  You can use the "len" at the start
> of the function (claiming to be for mingw).

Right, I'll have a look at this.
> 
> Does that mean there's no unsetenv() on solaris?  You might next have
bash-2.05$ man -s 2 unsetenv
No entry for unsetenv in section(s) 2 of the manual.
bash-2.05$ man -s 3 unsetenv
No entry for unsetenv in section(s) 3 of the manual.
bash-2.05$ man -k unsetenv
unsetenv        set (1)         - shell built-in functions to determine the characteristics for environmental variables of the current shell and its descendents

so not callable from C directly...

> to check if the fallback code actually works.  I've got a worrying
> suspicion it ought to be putenv("FOO") but is doing putenv("FOO=") for

bash-2.05$ man -k putenv
pam_putenv      pam_putenv (3pam)   - change or add a value to the PAM environment
putenv          putenv (3c)     - change or add value to environment
Tcl_PutEnv      Tcl_PutEnv (3)  - procedures to manipulate the environment
Tcl_PutEnv      Tcl_PutEnv (3)  - procedures to manipulate the environment
bash-2.05$

The manual page says it should be of the form "name=value" and the
string should not be automatic. In a function it should be declared
static.

> the benefit of DOS.  (Could need yet another configure check ...)
> 
        HTH
        Hugh


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-16 10:21           ` Hugh Sasse
@ 2007-01-16 14:58             ` Hugh Sasse
  2007-01-19  0:37               ` Kevin Ryde
  2007-01-18  0:43             ` Kevin Ryde
  1 sibling, 1 reply; 30+ messages in thread
From: Hugh Sasse @ 2007-01-16 14:58 UTC (permalink / raw)
  Cc: guile-user

On Tue, 16 Jan 2007, Hugh Sasse wrote:

> On Tue, 16 Jan 2007, Kevin Ryde wrote:
> 
> > Hugh Sasse <hgs@dmu.ac.uk> writes:
> > >
> > > posix.c: In function 'scm_putenv':
> > > posix.c:1332: error: 'len' undeclared (first use in this function)
> > 
> > Thanks.  Dodgy conditionals :-(.  You can use the "len" at the start
> > of the function (claiming to be for mingw).
> 
> Right, I'll have a look at this.

OK, I now have:

--- /scratch/hgs/guile-1.8.1/libguile/posix.c.orig	2006-10-04 04:35:07.000000000 +0100
+++ /scratch/hgs/guile-1.8.1/libguile/posix.c	2007-01-16 12:04:53.481602000 +0000
@@ -1315,6 +1315,11 @@
 #ifdef __MINGW32__
   size_t len = strlen (c_str);
 #endif
+#ifndef HAVE_UNSETENV
+# ifndef __MINGW32__
+  size_t len = strlen (c_str);
+# endif
+#endif
 
   if (strchr (c_str, '=') == NULL)
     {


So the problem with len disappears, but I still get a failure:

(cd .libs && gcc  -I/progs/SUNWspro/WS6U2/include -c -fno-builtin "guileS.c")
rm -f .libs/guileS.c .libs/guile.nm .libs/guile.nmS .libs/guile.nmT
gcc -I/progs/SUNWspro/WS6U2/include -Wall -Wmissing-prototypes -o .libs/guile .libs/guileS.o -D_REENTRANT -pthreads guile-guile.o -Wl,--export-dynamic  ./.libs/libguile.so -lrt /usr/local/lib/libgmp.so -lsocket -lnsl -lm /usr/local/lib/libltdl.so -ldl -Wl,--rpath -Wl,/usr/local/lib
./.libs/libguile.so: undefined reference to `isinf'
collect2: ld returned 1 exit status

However, If I add 
LDFLAGS=-L/progs/SUNWspro/lib
export LDFLAGS

This doesn't help.

Having 

CFLAGS="-I/progs/SUNWspro/WS6U2/include -L/progs/SUNWspro/lib"
export CFLAGS

also fails:

gcc -I/progs/SUNWspro/WS6U2/include -Wall -Wmissing-prototypes -o .libs/guile .libs/guileS.o -D_REENTRANT -pthreads guile-guile.o -Wl,--export-dynamic  -L/progs/SUNWspro/lib ./.libs/libguile.so -lrt /usr/local/lib/libgmp.so -lsocket -lnsl -lm /usr/local/lib/libltdl.so -ldl -Wl,--rpath -Wl,/usr/local/lib
./.libs/libguile.so: undefined reference to `isinf'
collect2: ld returned 1 exit status
gmake[3]: *** [guile] Error 1
gmake[3]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/libguile'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/libguile'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1'
gmake: *** [all] Error 2


At which point I am now stuck.  After all, configure found isinf.
:r! (cd /scratch/hgs/guile-1.8.1 ; ggrep -H -C 9 isinf config.log ) 
config.log-| 
config.log-| int
config.log-| main ()
config.log-| {
config.log-| return trunc ();
config.log-|   ;
config.log-|   return 0;
config.log-| }
config.log-configure:43681: result: no
config.log:configure:43701: checking for isinf
config.log-configure:43713: gcc -o conftest -I/progs/SUNWspro/WS6U2/include -L/progs/SUNWspro/lib   conftest.c -lgmp -lsocket -lnsl -lm -lltdl  >&5
config.log-configure:43719: $? = 0
config.log-configure:43726: test -z "$ac_c_werror_flag" || test ! -s conftest.err
config.log-configure:43729: $? = 0
config.log-configure:43736: test -s conftest
config.log-configure:43739: $? = 0
config.log-configure:43741: result: yes
config.log-configure:43758: checking for isnan
config.log-configure:43770: gcc -o conftest -I/progs/SUNWspro/WS6U2/include -L/progs/SUNWspro/lib   conftest.c -lgmp -lsocket -lnsl -lm -lltdl  >&5


doing: 
mv ./configure ./configure.orig
cp ./configure.orig ./configure
autoreconf -if
(with autoconf 2.61)  I get a vastly different configure script
with spurious "-n"s sprinkled throughout:

bash-2.05$ gdiff -u configure{.orig,} | head -20
--- configure.orig      2006-10-07 04:54:24.000000000 +0100
+++ configure   2007-01-16 14:41:07.226209000 +0000
@@ -1,6 +1,8 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60a for guile 1.8.1.
+# Generated by GNU Autoconf 2.61 for -n guile
+ -n 1.8.1
+.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -33,7 +35,8 @@
 ## M4sh Initialization.  ##
 ## --------------------- ##

-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
bash-2.05$

which therefore doesn't work.  There are lots of differences, enough 
that my original commands get lost off the top of a 2000 line scroll buffer.

I think I am out of my depth now.

        Hugh


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-16 10:11         ` Hugh Sasse
@ 2007-01-18  0:38           ` Kevin Ryde
  0 siblings, 0 replies; 30+ messages in thread
From: Kevin Ryde @ 2007-01-18  0:38 UTC (permalink / raw)
  Cc: guile-user

Hugh Sasse <hgs@dmu.ac.uk> writes:
>
> That rather depends on for whom they are developing.  Aguments in 
> "Brave Gnu World" about software use in the third world where download
> speeds are still limited,

Yep, such as Australia.  The theory as I see it though is that there's
barely a dozen developers and it's reasonable to ask them to keep more
or less current, in the interests of having releases use the latest
stuff, which can be quite important when those tools have bug fixes.
There's a disturbingly large amount of tools code included in every
package :-(.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-16 10:21           ` Hugh Sasse
  2007-01-16 14:58             ` Hugh Sasse
@ 2007-01-18  0:43             ` Kevin Ryde
  2007-01-18  9:57               ` Hugh Sasse
  2007-01-18 10:43               ` Ludovic Courtès
  1 sibling, 2 replies; 30+ messages in thread
From: Kevin Ryde @ 2007-01-18  0:43 UTC (permalink / raw)
  Cc: guile-user

Hugh Sasse <hgs@dmu.ac.uk> writes:
>
> putenv          putenv (3c)     - change or add value to environment
>
> The manual page says it should be of the form "name=value" and the
> string should not be automatic. In a function it should be declared
> static.

Yep.  I believe there's a bit of variation in whether it's copied or
not.  The fleebsd extreme is to copy and then in fact never free.

For an unsetenv traditionally I think it was putenv("FOO").  We should
try to arrange to do that, somehow.  There's an autoconf portability
note that such a putenv seg faults on AIX, but presumably there's an
unsetenv on that system.

An alternative would be the gnulib portable implementations of all
these bits, which do some explict manipulation of the "environ" global
variable.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-18  0:43             ` Kevin Ryde
@ 2007-01-18  9:57               ` Hugh Sasse
  2007-01-18 12:21                 ` Hugh Sasse
  2007-01-18 10:43               ` Ludovic Courtès
  1 sibling, 1 reply; 30+ messages in thread
From: Hugh Sasse @ 2007-01-18  9:57 UTC (permalink / raw)
  Cc: guile-user

On Thu, 18 Jan 2007, Kevin Ryde wrote:

> Hugh Sasse <hgs@dmu.ac.uk> writes:
> >
> > putenv          putenv (3c)     - change or add value to environment
> >
> > The manual page says it should be of the form "name=value" and the
> > string should not be automatic. In a function it should be declared
> > static.
> 
> Yep.  I believe there's a bit of variation in whether it's copied or
> not.  The fleebsd extreme is to copy and then in fact never free.

            ^^^^^^ ! :-)                                ^^^^^ Ouch!
> 
> For an unsetenv traditionally I think it was putenv("FOO").  We should

bash-2.05$ gcc -o putenvtest putenvtest.c
bash-2.05$ ./putenvtest
PUTENVTEST is something_or_other
PUTENVTEST is something_or_other
bash-2.05$ cat putenvtest.c
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]);
void display_putenvtest_var();

void display_putenvtest_var()
{
  char *value;
  if ((value = getenv("PUTENVTEST")) != NULL)
  {
    printf("PUTENVTEST is %s\n",value);
  } else {
    printf("no such environment variable as PUTENVTEST\n");
  }
}

int main(int argc, char *argv[])
{
  putenv("PUTENVTEST=something_or_other");
  display_putenvtest_var();
  putenv("PUTENVTEST");
  display_putenvtest_var();

  return(0);
}

bash-2.05$

> try to arrange to do that, somehow.  There's an autoconf portability
> note that such a putenv seg faults on AIX, but presumably there's an

I don't have access to AIX.
> unsetenv on that system.

I can't find anything about removing an environment variable in C.
> 
> An alternative would be the gnulib portable implementations of all
> these bits, which do some explict manipulation of the "environ" global
> variable.

This would introduce another dependency, I think....
> 

        Hugh


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-18  0:43             ` Kevin Ryde
  2007-01-18  9:57               ` Hugh Sasse
@ 2007-01-18 10:43               ` Ludovic Courtès
  1 sibling, 0 replies; 30+ messages in thread
From: Ludovic Courtès @ 2007-01-18 10:43 UTC (permalink / raw)
  Cc: guile-user

Hi,

Kevin Ryde <user42@zip.com.au> writes:

> An alternative would be the gnulib portable implementations of all
> these bits, which do some explict manipulation of the "environ" global
> variable.

Yes, I think `gnulib' could make our lives easier in a number of
areas...

Thanks,
Ludovic.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-18  9:57               ` Hugh Sasse
@ 2007-01-18 12:21                 ` Hugh Sasse
  0 siblings, 0 replies; 30+ messages in thread
From: Hugh Sasse @ 2007-01-18 12:21 UTC (permalink / raw)
  Cc: guile-user

I have managed to get a relatively successful build:

gmake  check-TESTS
gmake[4]: Entering directory `/export/home/Scratch/hgs/guile-1.8.1/test-suite/standalone'
PASS: test-system-cmds
PASS: test-require-extension
PASS: test-num2integral
PASS: test-round
PASS: test-gh
PASS: test-asmobs
PASS: test-list
PASS: test-unwind
PASS: test-conversion
==================
All 9 tests passed
==================
gmake[4]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/test-suite/standalone'
gmake[3]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/test-suite/standalone'
gmake[2]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/test-suite/standalone'
gmake[2]: Entering directory `/export/home/Scratch/hgs/guile-1.8.1/test-suite'
gmake[2]: Nothing to be done for `check-am'.
gmake[2]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/test-suite'
gmake[1]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/test-suite'
Making check in benchmark-suite
gmake[1]: Entering directory `/export/home/Scratch/hgs/guile-1.8.1/benchmark-suite'
gmake[1]: Nothing to be done for `check'.
gmake[1]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/benchmark-suite'
Making check in lang
gmake[1]: Entering directory `/export/home/Scratch/hgs/guile-1.8.1/lang'
Making check in elisp
gmake[2]: Entering directory `/export/home/Scratch/hgs/guile-1.8.1/lang/elisp'
Making check in internals
gmake[3]: Entering directory `/export/home/Scratch/hgs/guile-1.8.1/lang/elisp/internals'
gmake[3]: Nothing to be done for `check'.
gmake[3]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/lang/elisp/internals'
Making check in primitives
gmake[3]: Entering directory `/export/home/Scratch/hgs/guile-1.8.1/lang/elisp/primitives'
gmake[3]: Nothing to be done for `check'.
gmake[3]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/lang/elisp/primitives'
gmake[3]: Entering directory `/export/home/Scratch/hgs/guile-1.8.1/lang/elisp'
gmake[3]: Nothing to be done for `check-am'.
gmake[3]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/lang/elisp'
gmake[2]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/lang/elisp'
gmake[2]: Entering directory `/export/home/Scratch/hgs/guile-1.8.1/lang'
gmake[2]: Nothing to be done for `check-am'.
gmake[2]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/lang'
gmake[1]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/lang'
Making check in am
gmake[1]: Entering directory `/export/home/Scratch/hgs/guile-1.8.1/am'
gmake[1]: Nothing to be done for `check'.
gmake[1]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/am'
gmake[1]: Entering directory `/export/home/Scratch/hgs/guile-1.8.1'
gmake  check-TESTS
gmake[2]: Entering directory `/export/home/Scratch/hgs/guile-1.8.1'
Testing /scratch/hgs/guile-1.8.1/pre-inst-guile ...
with GUILE_LOAD_PATH=/scratch/hgs/guile-1.8.1/test-suite
Running alist.test
Running and-let-star.test
Running arbiters.test
Running bit-operations.test
Running c-api.test
Running chars.test
Running common-list.test
Running continuations.test
Running elisp.test
Running environments.test
Running eval.test
UNRESOLVED: eval.test: promises: basic promise behaviour: a forced promise does not reference its environment
Running exceptions.test
Running filesys.test
Running format.test
Running fractions.test
Running ftw.test
Running gc.test
Running getopt-long.test
Running goops.test
Running guardians.test
UNRESOLVED: guardians.test: standard guardian functionality: guarding independent objects: re-guarding non-immediates
UNRESOLVED: guardians.test: standard guardian functionality: guarding weakly referenced objects: guarded element of weak vector gets eventually removed from weak vector
Running hash.test
Running hooks.test
Running import.test
Running interp.test
Running list.test
Running load.test
Running modules.test
Running numbers.test
Running optargs.test
Running options.test
Running poe.test
Running popen.test
Running ports.test
Running posix.test
FAIL: posix.test: putenv: removing
FAIL: posix.test: setenv: removing
FAIL: posix.test: unsetenv: something
FAIL: posix.test: unsetenv: empty
Running q.test
Running r4rs.test
Running r5rs_pitfall.test
Running ramap.test
Running reader.test
Running receive.test
Running regexp.test
Running socket.test
Running srcprop.test
Running srfi-1.test
Running srfi-10.test
Running srfi-11.test
Running srfi-13.test
Running srfi-14.test
UNRESOLVED: srfi-14.test: Latin-1 (8-bit charset): char-set:letter (membership)
UNRESOLVED: srfi-14.test: Latin-1 (8-bit charset): char-set:letter (size)
UNRESOLVED: srfi-14.test: Latin-1 (8-bit charset): char-set:lower-case (size)
UNRESOLVED: srfi-14.test: Latin-1 (8-bit charset): char-set:upper-case (size)
ERROR: srfi-14.test: Latin-1 (8-bit charset): char-set:punctuation (membership) - arguments: ((unbound-variable #f "Unbound variable: ~S" (thrown) #f))
Running srfi-19.test
Running srfi-26.test
Running srfi-31.test
Running srfi-34.test
Running srfi-39.test
Running srfi-4.test
Running srfi-6.test
Running srfi-60.test
Running srfi-9.test
Running strings.test
Running structs.test
Running symbols.test
Running syncase.test
Running syntax.test
UNRESOLVED: syntax.test: while: in empty environment: empty body
UNRESOLVED: syntax.test: while: in empty environment: initially false
UNRESOLVED: syntax.test: while: in empty environment: iterating
Running threads.test
Running time.test
Running unif.test
Running version.test
Running weaks.test

Totals for this test run:
passes:                 11744
failures:               4
unexpected passes:      0
expected failures:      25
unresolved test cases:  10
untested test cases:    0
unsupported test cases: 13
errors:                 1

FAIL: check-guile
===================
1 of 1 tests failed
===================
gmake[2]: *** [check-TESTS] Error 1
gmake[2]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1'
gmake[1]: *** [check-am] Error 2
gmake[1]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1'
gmake: *** [check-recursive] Error 1
You have new mail in /var/mail/hgs
bash-2.05$


So the failure is that putenv test where there seems to be no way 
to remove an environment variable using C under Solaris.  Which 
seems bizarre.  I have looked through `man -s 3 intro` and can see
the putenv() & getenv() functions, but nothing to remove an environment
variable.

We are not the only ones banging into this problem:

http://gollem.science.uva.nl/SWI-Prolog/mailinglist/archive/2006/q1/0155.html

makes pretty disturbing reading.  Given this a basic requirement of
shells, I don't understand this lack of an unsetenv() function.

And there's this:

http://www.gnu.org/software/autoconf/manual/html_node/Function-Portability.html

which doesn't really give a solution either.

Despite:

http://bugs.netmrg.net/view.php?id=400

I find
bash-2.05$ man clearenv
No manual entry for clearenv.
You have new mail in /var/mail/hgs
bash-2.05$ man -s 3 clearenv
No entry for clearenv in section(s) 3 of the manual.
bash-2.05$


How did I get to a relatively successful build?

Well, I applied the patches:

--- /scratch/hgs/guile-1.8.1/libguile/posix.c   2006-10-04 04:35:07.000000000 +0100
+++ /scratch/hgs/guile-1.8.1/libguile/posix.c   2007-01-16 12:04:53.481602000 +0000
@@ -1315,6 +1315,11 @@
 #ifdef __MINGW32__
   size_t len = strlen (c_str);
 #endif
+#ifndef HAVE_UNSETENV
+# ifndef __MINGW32__
+  size_t len = strlen (c_str);
+# endif
+#endif

   if (strchr (c_str, '=') == NULL)
     {


and


--- guile-1.8.1/libguile/c-tokenize.c.orig	2003-08-23 18:35:14.000000000 +0100
+++ guile-1.8.1/libguile/c-tokenize.c	2007-01-18 11:20:43.256310000 +0000
@@ -20,7 +20,12 @@
 #include <string.h>
 #include <errno.h>
 #include <stdlib.h>
+#ifdef HAVE_STDINT_H
 #include <stdint.h> /* May break IA64 test-noansi-r */
+#endif
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h> 
+#endif
 
 /* end standard C headers. */
 

And I used
gcc (GCC) 3.4.6
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Which I built after all the hassles with gcc-4.

And I used --disable-error-on-warning

OK, so what about gcc-4?

gcc (GCC) 4.1.0
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gives me, using the same build script:

(cd .libs && gcc  -g -O2 -c -fno-builtin "guileS.c")
rm -f .libs/guileS.c .libs/guile.nm .libs/guile.nmS .libs/guile.nmT
gcc -g -O2 -Wall -Wmissing-prototypes -o .libs/guile .libs/guileS.o -D_REENTRANT -pthreads guile-guile.o -Wl,--export-dynamic  ./.libs/libguile.so -lrt /usr/local/lib/libgmp.so -lsocket -lnsl -lm /usr/local/lib/libltdl.so -ldl -Wl,--rpath -Wl,/usr/local/lib
./.libs/libguile.so: undefined reference to `isinf'
collect2: ld returned 1 exit status
gmake[3]: *** [guile] Error 1
gmake[3]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/libguile'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1/libguile'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/export/home/Scratch/hgs/guile-1.8.1'
gmake: *** [all] Error 2


I'm not sure what to make of this difference in behaviour.

So, is there anything else you would find it helpful to know?
And have you any advice about my GCC-4.1.0 (which would be off-topic,
but you can just say "no". :-))

        Hugh


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-16 14:58             ` Hugh Sasse
@ 2007-01-19  0:37               ` Kevin Ryde
  2007-01-19 10:02                 ` Hugh Sasse
  2007-01-19 15:43                 ` Hugh Sasse
  0 siblings, 2 replies; 30+ messages in thread
From: Kevin Ryde @ 2007-01-19  0:37 UTC (permalink / raw)
  Cc: guile-user

Hugh Sasse <hgs@dmu.ac.uk> writes:
>
> ./.libs/libguile.so: undefined reference to `isinf'
>
> At which point I am now stuck.  After all, configure found isinf.

You might be able to stick something in to save the conftest.c used.
Or maybe it's no more than

	#include <math.h>
	int main () { return (isinf(0.0) != 0); }

In any case if you want to advise what should or shouldn't be tested
or done ...

> autoreconf -if
> (with autoconf 2.61)  I get a vastly different configure script
> with spurious "-n"s sprinkled throughout:
>
> bash-2.05$ gdiff -u configure{.orig,} | head -20
> --- configure.orig      2006-10-07 04:54:24.000000000 +0100
> +++ configure   2007-01-16 14:41:07.226209000 +0000
> @@ -1,6 +1,8 @@
>  #! /bin/sh
>  # Guess values for system-dependent variables and create Makefiles.
> -# Generated by GNU Autoconf 2.60a for guile 1.8.1.
> +# Generated by GNU Autoconf 2.61 for -n guile
> + -n 1.8.1
> +.

Ahh, thanks.  "echo -n" used in configure.in is not portable :(.  In
the AC_INIT you should be able to replace the m4_esyscmd with some
hard coded numbers.  I'll try to do something that strips the newline
using m4.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-19  0:37               ` Kevin Ryde
@ 2007-01-19 10:02                 ` Hugh Sasse
  2007-01-21 23:27                   ` Kevin Ryde
  2007-01-19 15:43                 ` Hugh Sasse
  1 sibling, 1 reply; 30+ messages in thread
From: Hugh Sasse @ 2007-01-19 10:02 UTC (permalink / raw)
  Cc: guile-user

On Fri, 19 Jan 2007, Kevin Ryde wrote:

> Hugh Sasse <hgs@dmu.ac.uk> writes:
> >
> > ./.libs/libguile.so: undefined reference to `isinf'
> >
> > At which point I am now stuck.  After all, configure found isinf.
> 
> You might be able to stick something in to save the conftest.c used.

Possibly.  I'm not familiar enough with autoconf to be confident about
that.  Indeed, I'm a bit stuck as to how to get into understanding that
whole area.  There used to be just autoconf, now there's automake, autotools
and I'm really unsure where to start afresh to learn this, despite
googling, blundering around gnu.org in search of something, etc....

> Or maybe it's no more than
> 
> 	#include <math.h>
> 	int main () { return (isinf(0.0) != 0); }

bash-2.05$ cat isinf.c
#include <stdio.h>
#include <math.h>
int main(void);
int main (void) {
  printf ("isinf(0.0) gives %d\n",isinf(0.0));
  printf ("(isinf(0.0) != 0) gives %d\n",(isinf(0.0) != 0));
  return (0);
}

bash-2.05$ gcc -o isinf isinf.c
bash-2.05$ ./isinf
isinf(0.0) gives 0
(isinf(0.0) != 0) gives 0
bash-2.05$

> 
> In any case if you want to advise what should or shouldn't be tested
> or done ...
> 
> > autoreconf -if
> > (with autoconf 2.61)  I get a vastly different configure script
> > with spurious "-n"s sprinkled throughout:
> >
> > bash-2.05$ gdiff -u configure{.orig,} | head -20
> > --- configure.orig      2006-10-07 04:54:24.000000000 +0100
> > +++ configure   2007-01-16 14:41:07.226209000 +0000
> > @@ -1,6 +1,8 @@
> >  #! /bin/sh
> >  # Guess values for system-dependent variables and create Makefiles.
> > -# Generated by GNU Autoconf 2.60a for guile 1.8.1.
> > +# Generated by GNU Autoconf 2.61 for -n guile
> > + -n 1.8.1
> > +.
> 
> Ahh, thanks.  "echo -n" used in configure.in is not portable :(.  In

No. I've seen all sorts of tests in config files to figure this out.
I think it is even mentioned in Perls (non-autoconf) configure dialogue.

> the AC_INIT you should be able to replace the m4_esyscmd with some
> hard coded numbers.  I'll try to do something that strips the newline
> using m4.

I'll see if it makes any sense to me, but I expect you'll get there first.
> 

        Hugh


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-19  0:37               ` Kevin Ryde
  2007-01-19 10:02                 ` Hugh Sasse
@ 2007-01-19 15:43                 ` Hugh Sasse
  2007-01-21 21:08                   ` Kevin Ryde
  2007-01-21 23:22                   ` Kevin Ryde
  1 sibling, 2 replies; 30+ messages in thread
From: Hugh Sasse @ 2007-01-19 15:43 UTC (permalink / raw)
  Cc: guile-user

[-- Attachment #1: Type: TEXT/PLAIN, Size: 6859 bytes --]

On Fri, 19 Jan 2007, Kevin Ryde wrote:

> Hugh Sasse <hgs@dmu.ac.uk> writes:
> > autoreconf -if
> > (with autoconf 2.61)  I get a vastly different configure script
> > with spurious "-n"s sprinkled throughout:
> >
> > bash-2.05$ gdiff -u configure{.orig,} | head -20
> > --- configure.orig      2006-10-07 04:54:24.000000000 +0100
> > +++ configure   2007-01-16 14:41:07.226209000 +0000
> > @@ -1,6 +1,8 @@
> >  #! /bin/sh
> >  # Guess values for system-dependent variables and create Makefiles.
> > -# Generated by GNU Autoconf 2.60a for guile 1.8.1.
> > +# Generated by GNU Autoconf 2.61 for -n guile
> > + -n 1.8.1
> > +.
> 
> Ahh, thanks.  "echo -n" used in configure.in is not portable :(.  In
> the AC_INIT you should be able to replace the m4_esyscmd with some
> hard coded numbers.  I'll try to do something that strips the newline
> using m4.

I have this now, but aclocal hangs.

bash-2.05$ gdiff -u configure.in.orig configure.in
--- configure.in.orig   2006-10-05 20:19:40.000000000 +0100
+++ configure.in        2007-01-19 15:36:41.702496000 +0000
@@ -27,8 +27,17 @@

 AC_PREREQ(2.53)

-AC_INIT(m4_esyscmd(. ./GUILE-VERSION && echo -n ${PACKAGE}),
-        m4_esyscmd(. ./GUILE-VERSION && echo -n ${GUILE_VERSION}))
+define(GUILE_PACKAGE_NAME,m4_esyscmd(. ./GUILE-VERSION && ${ECHO_N} ${PACKAGE}))
+define(GUILE_PACKAGE_VERSION,m4_esyscmd(. ./GUILE-VERSION && ${ECHO_N} ${GUILE_VERSION}))
+# AC_MESSAGE_NOTICE('[[GUILE_PACKAGE_NAME]] is GUILE_PACKAGE_NAME')
+# AC_MESSAGE_NOTICE('[[GUILE_PACKAGE_VERSION]] is GUILE_PACKAGE_VERSION')
+# AC_INIT(GUILE_PACKAGE_NAME,GUILE_PACKAGE_VERSION)
+
+AC_INIT(m4_esyscmd(. ./GUILE-VERSION && ${ECHO_N} ${PACKAGE}),
+        m4_esyscmd(. ./GUILE-VERSION && ${ECHO_N} ${GUILE_VERSION}),
+        guile-bugs@gnu.org)
+
+# AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
 AC_CONFIG_AUX_DIR([.])
 AC_CONFIG_SRCDIR(GUILE-VERSION)
 AM_INIT_AUTOMAKE([no-define])
bash-2.05$


While turning things on and off I managed to get it to spit out a
configure without -ns in it, so I'm pretty confident about the ${ECHO_N}
which seems to come from AC_PREREQ(...)

I can't figure out why aclocal is hanging...

bash-2.05$ autoconf -v
autoconf: running /usr/local/bin/autom4te -v --language=autoconf --output=configure configure.in
autom4te: the trace request object is:
autom4te: $VAR1 = bless( [
autom4te:                  '0',
autom4te:                  0,
autom4te:                  [
autom4te:                    '/usr/local/share/autoconf'
autom4te:                  ],
autom4te:                  [
autom4te:                    '/usr/local/share/autoconf/autoconf/autoconf.m4f',
autom4te:                    'aclocal.m4',
autom4te:                    'configure.in'
autom4te:                  ],
autom4te:                  {
autom4te:                    '_LT_AC_TAGCONFIG' => 1,
autom4te:                    'AM_PROG_F77_C_O' => 1,
autom4te:                    'AC_INIT' => 1,
autom4te:                    'm4_pattern_forbid' => 1,
autom4te:                    'AC_CANONICAL_TARGET' => 1,
autom4te:                    'AC_SUBST' => 1,
autom4te:                    'AC_CONFIG_LIBOBJ_DIR' => 1,
autom4te:                    'AC_FC_SRCEXT' => 1,
autom4te:                    'AC_CANONICAL_HOST' => 1,
autom4te:                    'AC_PROG_LIBTOOL' => 1,
autom4te:                    'AM_INIT_AUTOMAKE' => 1,
autom4te:                    'AC_CONFIG_SUBDIRS' => 1,
autom4te:                    'AM_AUTOMAKE_VERSION' => 1,
autom4te:                    'LT_CONFIG_LTDL_DIR' => 1,
autom4te:                    'AC_REQUIRE_AUX_FILE' => 1,
autom4te:                    'AC_CONFIG_LINKS' => 1,
autom4te:                    'm4_sinclude' => 1,
autom4te:                    'LT_SUPPORTED_TAG' => 1,
autom4te:                    'AM_MAINTAINER_MODE' => 1,
autom4te:                    'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
autom4te:                    '_m4_warn' => 1,
autom4te:                    'AM_PROG_CXX_C_O' => 1,
autom4te:                    'AM_ENABLE_MULTILIB' => 1,
autom4te:                    'AC_CONFIG_FILES' => 1,
autom4te:                    'include' => 1,
autom4te:                    'LT_INIT' => 1,
autom4te:                    'AM_GNU_GETTEXT' => 1,
autom4te:                    'AC_LIBSOURCE' => 1,
autom4te:                    'AM_PROG_FC_C_O' => 1,
autom4te:                    'AC_CANONICAL_BUILD' => 1,
autom4te:                    'AC_FC_FREEFORM' => 1,
autom4te:                    'AH_OUTPUT' => 1,
autom4te:                    '_AM_SUBST_NOTMAKE' => 1,
autom4te:                    'AC_CONFIG_AUX_DIR' => 1,
autom4te:                    'sinclude' => 1,
autom4te:                    'm4_pattern_allow' => 1,
autom4te:                    'AM_PROG_CC_C_O' => 1,
autom4te:                    'AC_CANONICAL_SYSTEM' => 1,
autom4te:                    'AM_CONDITIONAL' => 1,
autom4te:                    'AC_CONFIG_HEADERS' => 1,
autom4te:                    'AC_DEFINE_TRACE_LITERAL' => 1,
autom4te:                    'm4_include' => 1,
autom4te:                    'AC_SUBST_TRACE' => 1
autom4te:                  }
autom4te:                ], 'Autom4te::Request' );
autom4te: running: /usr/local/bin/gm4 --nesting-limit=1024 --include=/usr/local/share/autoconf --debug=aflq --fatal-warning --debugfile=autom4te.cache/traces.0t --trace=AC_CANONICAL_BUILD --trace=AC_CANONICAL_HOST --trace=AC_CANONICAL_SYSTEM --trace=AC_CANONICAL_TARGET --trace=AC_CONFIG_AUX_DIR --trace=AC_CONFIG_FILES --trace=AC_CONFIG_HEADERS --trace=AC_CONFIG_LIBOBJ_DIR --trace=AC_CONFIG_LINKS --trace=AC_CONFIG_SUBDIRS --trace=AC_DEFINE_TRACE_LITERAL --trace=AC_FC_FREEFORM --trace=AC_FC_SRCEXT --trace=AC_INIT --trace=AC_LIBSOURCE --trace=AC_PROG_LIBTOOL --trace=AC_REQUIRE_AUX_FILE --trace=AC_SUBST --trace=AC_SUBST_TRACE --trace=AH_OUTPUT --trace=AM_AUTOMAKE_VERSION --trace=AM_CONDITIONAL --trace=AM_ENABLE_MULTILIB --trace=AM_GNU_GETTEXT --trace=AM_GNU_GETTEXT_INTL_SUBDIR --trace=AM_INIT_AUTOMAKE --trace=AM_MAINTAINER_MODE --trace=AM_PROG_CC_C_O --trace=AM_PROG_CXX_C_O --trace=AM_PROG_F77_C_O --trace=AM_PROG_FC_C_O --trace=LT_CONFIG_LTDL_DIR --trace=LT_INIT --trace=LT_SUPPORTED_TAG --trace=_AM_SUBST_NOTMAKE --trace=_LT_AC_TAGCONFIG --trace=_m4_warn --trace=include --trace=m4_include --trace=m4_pattern_allow --trace=m4_pattern_forbid --trace=m4_sinclude --trace=sinclude --reload-state=/usr/local/share/autoconf/autoconf/autoconf.m4f aclocal.m4 configure.in >autom4te.cache/output.0t
^CERROR: User interrupt
ABORT: (signal)
autom4te: /usr/local/bin/gm4 failed with exit status: 130
bash-2.05$ ERROR: In procedure fport_fill_input:
ERROR: I/O error
ABORT: (system-error)

bash-2.05$ Broken Pipe

bash-2.05$ 
> 

Oh well, I know more about m4 than I expected to this week.

        Hugh

[-- Attachment #2: Type: text/plain, Size: 140 bytes --]

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user

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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-19 15:43                 ` Hugh Sasse
@ 2007-01-21 21:08                   ` Kevin Ryde
  2007-01-21 23:22                   ` Kevin Ryde
  1 sibling, 0 replies; 30+ messages in thread
From: Kevin Ryde @ 2007-01-21 21:08 UTC (permalink / raw)
  Cc: guile-user

Hugh Sasse <hgs@dmu.ac.uk> writes:
>
> -AC_INIT(m4_esyscmd(. ./GUILE-VERSION && echo -n ${PACKAGE}),
> -        m4_esyscmd(. ./GUILE-VERSION && echo -n ${GUILE_VERSION}))
> +define(GUILE_PACKAGE_NAME,m4_esyscmd(. ./GUILE-VERSION && ${ECHO_N} ${PACKAGE}))
> +define(GUILE_PACKAGE_VERSION,m4_esyscmd(. ./GUILE-VERSION && ${ECHO_N} ${GUILE_VERSION}))

Alas, no, it's too soon in the crunching to use $ECHO_N.  I made the
same mistake :), which is why I suggested hard coding it.

(The "./GUILE-VERSION" is happening at m4 macro expansion time, and at
that point all you've got is raw /bin/sh and the various m4 features.
$ECHO_N is only part of the text output from m4.)


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-19 15:43                 ` Hugh Sasse
  2007-01-21 21:08                   ` Kevin Ryde
@ 2007-01-21 23:22                   ` Kevin Ryde
  2007-01-22 12:08                     ` Hugh Sasse
  1 sibling, 1 reply; 30+ messages in thread
From: Kevin Ryde @ 2007-01-21 23:22 UTC (permalink / raw)
  Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 21 bytes --]

I made this change:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: configure.in.echo-n.diff --]
[-- Type: text/x-diff, Size: 784 bytes --]

--- configure.in.~1.268.2.28.~	2006-12-27 10:32:04.000000000 +1100
+++ configure.in	2007-01-22 10:03:13.000000000 +1100
@@ -27,8 +27,15 @@
 
 AC_PREREQ(2.53)
 
-AC_INIT(m4_esyscmd(. ./GUILE-VERSION && echo -n ${PACKAGE}),
-        m4_esyscmd(. ./GUILE-VERSION && echo -n ${GUILE_VERSION}),
+dnl  `patsubst' here deletes the newline which "echo" prints.  We can't use
+dnl  "echo -n" since -n is not portable (see autoconf manual "Limitations of
+dnl  Builtins"), in particular on solaris it results in a literal "-n" in
+dnl  the output.
+dnl
+AC_INIT(patsubst(m4_esyscmd(. ./GUILE-VERSION && echo ${PACKAGE}),[
+]),
+        patsubst(m4_esyscmd(. ./GUILE-VERSION && echo ${GUILE_VERSION}),[
+]),
         [bug-guile@gnu.org])
 AC_CONFIG_AUX_DIR([.])
 AC_CONFIG_SRCDIR(GUILE-VERSION)

[-- Attachment #3: Type: text/plain, Size: 140 bytes --]

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user

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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-19 10:02                 ` Hugh Sasse
@ 2007-01-21 23:27                   ` Kevin Ryde
  2007-01-22 11:53                     ` Hugh Sasse
  0 siblings, 1 reply; 30+ messages in thread
From: Kevin Ryde @ 2007-01-21 23:27 UTC (permalink / raw)
  Cc: guile-user

Hugh Sasse <hgs@dmu.ac.uk> writes:
>
>> You might be able to stick something in to save the conftest.c used.
>
> Possibly.  I'm not familiar enough with autoconf to be confident about
> that.

Oh, what I meant was if you edit the generated configure to do a cp of
conftest.c at the right spot.  The autoconf side is pretty wild, but
it comes out just as extremely ugly shell script ...

> bash-2.05$ gcc -o isinf isinf.c

I think you'll have to see what actually comes out.  Add "-S" to see
the asm code, or add "-c" and look with nm at the .o file, to see if
there's an actual reference to an isinf.  Perhaps gcc has optimized it
out.

Or if it looks ok in the test program then do the same with numbers.c
to see what comes out there.  (The .o created, or adding -S to the gcc
invocation as printed by libtool.)


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-21 23:27                   ` Kevin Ryde
@ 2007-01-22 11:53                     ` Hugh Sasse
  2007-01-22 21:11                       ` Kevin Ryde
  0 siblings, 1 reply; 30+ messages in thread
From: Hugh Sasse @ 2007-01-22 11:53 UTC (permalink / raw)
  Cc: guile-user

On Mon, 22 Jan 2007, Kevin Ryde wrote:

> Hugh Sasse <hgs@dmu.ac.uk> writes:
> >
> >> You might be able to stick something in to save the conftest.c used.
> >
> > Possibly.  I'm not familiar enough with autoconf to be confident about
> > that.
> 
> Oh, what I meant was if you edit the generated configure to do a cp of
> conftest.c at the right spot.  The autoconf side is pretty wild, but
> it comes out just as extremely ugly shell script ...

OK, well, I'll look at this bit first:
> 
> > bash-2.05$ gcc -o isinf isinf.c
> 
> I think you'll have to see what actually comes out.  Add "-S" to see

bash-2.05$ gcc -S -o isinf isinf.c
bash-2.05$ cat isinf.c
#include <stdio.h>
#include <math.h>
int main(void);
int main (void) {
  printf ("isinf(0.0) gives %d\n",isinf(0.0));
  printf ("(isinf(0.0) != 0) gives %d\n",(isinf(0.0) != 0));
  return (0);
}

bash-2.05$ cat isinf
        .file   "isinf.c"
        .section        ".rodata"
        .align 8
.LLC0:
        .asciz  "isinf(0.0) gives %d\n"
        .align 8
.LLC1:
        .asciz  "(isinf(0.0) != 0) gives %d\n"
        .section        ".text"
        .align 4
        .global main
        .type   main, #function
        .proc   04
main:
        save    %sp, -112, %sp
        sethi   %hi(.LLC0), %g1
        or      %g1, %lo(.LLC0), %o0
        mov     0, %o1
        call    printf, 0
         nop
        sethi   %hi(.LLC1), %g1
        or      %g1, %lo(.LLC1), %o0
        mov     0, %o1
        call    printf, 0
         nop
        mov     0, %g1
        mov     %g1, %i0
        restore
        jmp     %o7+8
         nop
        .size   main, .-main
        .ident  "GCC: (GNU) 4.1.1"
bash-2.05$

I've never done sparc assembler, so  I don't understand this, but
there seems to be no call to anything that could be isinf...

> the asm code, or add "-c" and look with nm at the .o file, to see if

bash-2.05$ gcc -c -o isinf isinf.c
bash-2.05$ nm --synthetic --special-syms isinf
00000000 T main
         U printf
bash-2.05$


> there's an actual reference to an isinf.  Perhaps gcc has optimized it
> out.
> 
> Or if it looks ok in the test program then do the same with numbers.c

I don't think it looks OK....
> to see what comes out there.  (The .o created, or adding -S to the gcc
> invocation as printed by libtool.)
> 

        Thank you,
        Hugh


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-21 23:22                   ` Kevin Ryde
@ 2007-01-22 12:08                     ` Hugh Sasse
  2007-01-22 21:05                       ` Kevin Ryde
  0 siblings, 1 reply; 30+ messages in thread
From: Hugh Sasse @ 2007-01-22 12:08 UTC (permalink / raw)
  Cc: guile-user

On Mon, 22 Jan 2007, Kevin Ryde wrote:

> I made this change:
> 

bash-2.05$ /bin/rm -rf guile-1.8.1
bash-2.05$ gtar -zxf guile-1.8.1.tar.gz
bash-2.05$ cd guile-1.8.1
bash-2.05$ gpatch < ../guile-configure.in.echo-n.diff
patching file configure.in
Hunk #1 FAILED at 27.
1 out of 1 hunk FAILED -- saving rejects to file configure.in.rej
bash-2.05$ gpatch --version
patch 2.5.4
Copyright 1984-1988 Larry Wall
Copyright 1989-1999 Free Software Foundation, Inc.

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

written by Larry Wall and Paul Eggert
bash-2.05$ more configure.in.rej
***************
*** 27,34 ****

  AC_PREREQ(2.53)

- AC_INIT(m4_esyscmd(. ./GUILE-VERSION && echo -n ${PACKAGE}),
-         m4_esyscmd(. ./GUILE-VERSION && echo -n ${GUILE_VERSION}),
          [bug-guile@gnu.org])
  AC_CONFIG_AUX_DIR([.])
  AC_CONFIG_SRCDIR(GUILE-VERSION)
--- 27,41 ----

  AC_PREREQ(2.53)

+ dnl  `patsubst' here deletes the newline which "echo" prints.  We can't use
+ dnl  "echo -n" since -n is not portable (see autoconf manual "Limitations of
+ dnl  Builtins"), in particular on solaris it results in a literal "-n" in
+ dnl  the output.
+ dnl
+ AC_INIT(patsubst(m4_esyscmd(. ./GUILE-VERSION && echo ${PACKAGE}),[
+ ]),
+         patsubst(m4_esyscmd(. ./GUILE-VERSION && echo ${GUILE_VERSION}),[
+ ]),
          [bug-guile@gnu.org])
  AC_CONFIG_AUX_DIR([.])
  AC_CONFIG_SRCDIR(GUILE-VERSION)
bash-2.05$
bash-2.05$


Hmm, I don't understand why that failed... I shouldn't need a -p0
given the paths...

bash-2.05$ gpatch -p0 < ../guile-configure.in.echo-n.diff
patching file configure.in
Hunk #1 FAILED at 27.
1 out of 1 hunk FAILED -- saving rejects to file configure.in.rej
bash-2.05$ gpatch -p1 < ../guile-configure.in.echo-n.diff
missing header for unified diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- configure.in.~1.268.2.28.~ 2006-12-27 10:32:04.000000000 +1100
|+++ configure.in       2007-01-22 10:03:13.000000000 +1100
--------------------------
File to patch: configure.in
patching file configure.in
Hunk #1 FAILED at 27.
1 out of 1 hunk FAILED -- saving rejects to file configure.in.rej
bash-2.05$


I'm stumped.  And sun's native patch implementation chokes on this.
        Hugh


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-22 12:08                     ` Hugh Sasse
@ 2007-01-22 21:05                       ` Kevin Ryde
  2007-01-23 11:01                         ` Hugh Sasse
  0 siblings, 1 reply; 30+ messages in thread
From: Kevin Ryde @ 2007-01-22 21:05 UTC (permalink / raw)
  Cc: guile-user

Hugh Sasse <hgs@dmu.ac.uk> writes:
>
> I'm stumped.  And sun's native patch implementation chokes on this.

Should have been ok.  Change the lines manually, or checkout the cvs
"branch_release-1-8" if you're brave.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-22 11:53                     ` Hugh Sasse
@ 2007-01-22 21:11                       ` Kevin Ryde
  2007-01-23 10:27                         ` Hugh Sasse
  0 siblings, 1 reply; 30+ messages in thread
From: Kevin Ryde @ 2007-01-22 21:11 UTC (permalink / raw)
  Cc: guile-user

Hugh Sasse <hgs@dmu.ac.uk> writes:
>
>         mov     0, %o1
>         call    printf, 0

Ah dear, thanks, gcc has optimized it out.  I'll change the test
program to something like

	#include <math.h>
	volatile double x = 0.0;
	int main () { return (isinf(x) != 0); }

probably adding a check for "volatile" as well though.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-22 21:11                       ` Kevin Ryde
@ 2007-01-23 10:27                         ` Hugh Sasse
  0 siblings, 0 replies; 30+ messages in thread
From: Hugh Sasse @ 2007-01-23 10:27 UTC (permalink / raw)
  Cc: guile-user

On Tue, 23 Jan 2007, Kevin Ryde wrote:

> Hugh Sasse <hgs@dmu.ac.uk> writes:
> >
> >         mov     0, %o1
> >         call    printf, 0
> 
> Ah dear, thanks, gcc has optimized it out.  I'll change the test
> program to something like
> 
> 	#include <math.h>
> 	volatile double x = 0.0;
> 	int main () { return (isinf(x) != 0); }
> 
> probably adding a check for "volatile" as well though.
> 
bash-2.05$ cat isinf.c
#include <stdio.h>
#include <math.h>
int main(void);
int main (void) {
  volatile double x = 0.0;
  printf ("isinf(0.0) gives %d\n",isinf(x));
  printf ("(isinf(0.0) != 0) gives %d\n",(isinf(x) != 0));
  return (0);
}

bash-2.05$ gcc -S -o isinf isinf.c
bash-2.05$ cat isinf
        .file   "isinf.c"
        .section        ".rodata"
        .align 8
.LLC1:
        .asciz  "isinf(0.0) gives %d\n"
        .align 8
.LLC2:
        .asciz  "(isinf(0.0) != 0) gives %d\n"
        .align 8
.LLC0:
        .long   0
        .long   0
        .section        ".text"
        .align 4
        .global main
        .type   main, #function
        .proc   04
main:
        save    %sp, -120, %sp
        sethi   %hi(.LLC0), %g1
        or      %g1, %lo(.LLC0), %g1
        ldd     [%g1], %f8
        std     %f8, [%fp-24]
        ldd     [%fp-24], %f8
        std     %f8, [%fp-16]
        ldd     [%fp-16], %o0
        call    isinf, 0
         nop
        mov     %o0, %g2
        sethi   %hi(.LLC1), %g1
        or      %g1, %lo(.LLC1), %o0
        mov     %g2, %o1
        call    printf, 0
         nop
        ldd     [%fp-24], %f8
        std     %f8, [%fp-16]
        ldd     [%fp-16], %o0
        call    isinf, 0
         nop
        mov     %o0, %g1
        xor     %g1, 0, %g1
        subcc   %g0, %g1, %g0
        addx    %g0, 0, %g2
        sethi   %hi(.LLC2), %g1
        or      %g1, %lo(.LLC2), %o0
        mov     %g2, %o1
        call    printf, 0
         nop
        mov     0, %g1
        mov     %g1, %i0
        restore
        jmp     %o7+8
         nop
        .size   main, .-main
        .ident  "GCC: (GNU) 4.1.1"
bash-2.05$

        Hugh


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-22 21:05                       ` Kevin Ryde
@ 2007-01-23 11:01                         ` Hugh Sasse
  2007-01-24 21:23                           ` Kevin Ryde
  0 siblings, 1 reply; 30+ messages in thread
From: Hugh Sasse @ 2007-01-23 11:01 UTC (permalink / raw)
  Cc: guile-user

On Tue, 23 Jan 2007, Kevin Ryde wrote:

> Hugh Sasse <hgs@dmu.ac.uk> writes:
> >
> > I'm stumped.  And sun's native patch implementation chokes on this.
> 
> Should have been ok.  Change the lines manually, or checkout the cvs
> "branch_release-1-8" if you're brave.

bash-2.05$ cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/guile co -r branch_release-1-8 guile
 
seems to have got the correct stuff, looking at guile-core/configure.in...

bash-2.05$ autoconf
configure.in:42: error: possibly undefined macro: AM_INIT_AUTOMAKE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.in:49: error: possibly undefined macro: AM_MAINTAINER_MODE
configure.in:50: error: possibly undefined macro: AM_CONFIG_HEADER
configure.in:65: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
configure.in:76: error: possibly undefined macro: AM_PROG_CC_STDC
configure.in:78: error: possibly undefined macro: AM_PROG_CC_C_O
configure.in:80: error: possibly undefined macro: AC_LIBTOOL_DLOPEN
configure.in:81: error: possibly undefined macro: AC_PROG_LIBTOOL
configure.in:82: error: possibly undefined macro: AC_CHECK_LIB
configure.in:88: error: possibly undefined macro: AM_CONDITIONAL
configure.in:90: error: possibly undefined macro: AM_PATH_LISPDIR
configure.in:198: error: possibly undefined macro: AC_LIBOBJ
configure.in:715: error: possibly undefined macro: AM_GNU_GETTEXT
bash-2.05$ pwd
/scratch/hgs/guile/guile/guile-core
bash-2.05$sh-2.05$ autconf --version; automake --version
bash: autconf: command not found
automake (GNU automake) 1.9.6
Written by Tom Tromey <tromey@redhat.com>.

Copyright 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
bash-2.05$

bash-2.05$ : for completeness...
bash-2.05$ ggrep -C 4 AC_INIT ./configure.in
dnl  "echo -n" since -n is not portable (see autoconf manual "Limitations of
dnl  Builtins"), in particular on solaris it results in a literal "-n" in
dnl  the output.
dnl
AC_INIT(patsubst(m4_esyscmd(. ./GUILE-VERSION && echo ${PACKAGE}),[
]),
        patsubst(m4_esyscmd(. ./GUILE-VERSION && echo ${GUILE_VERSION}),[
]),
        [bug-guile@gnu.org])
bash-2.05$


So I think I've picked up the correct thing.

        Hugh


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-23 11:01                         ` Hugh Sasse
@ 2007-01-24 21:23                           ` Kevin Ryde
  2007-01-25 10:27                             ` Hugh Sasse
  0 siblings, 1 reply; 30+ messages in thread
From: Kevin Ryde @ 2007-01-24 21:23 UTC (permalink / raw)
  To: Hugh Sasse; +Cc: guile-user

Hugh Sasse <hgs@dmu.ac.uk> writes:
>
> automake (GNU automake) 1.9.6

You might have to check where it's .m4 macros are installed.  If
they're not in a known place you can run

	aclocal -I /my/automake/dir/share/aclocal

or wherever.

You might not have to run aclocal, but I've never known the aclocal.m4
mechanism to do much good.  It's usually best not to argue with what
it thinks needs to run.  Though setting the date of configure.in to
something old then running autoconf just once might work, maybe.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-24 21:23                           ` Kevin Ryde
@ 2007-01-25 10:27                             ` Hugh Sasse
  2007-01-26 22:24                               ` Kevin Ryde
  0 siblings, 1 reply; 30+ messages in thread
From: Hugh Sasse @ 2007-01-25 10:27 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: guile-user

On Thu, 25 Jan 2007, Kevin Ryde wrote:

> Hugh Sasse <hgs@dmu.ac.uk> writes:
> >
> > automake (GNU automake) 1.9.6
> 
> You might have to check where it's .m4 macros are installed.  If
> they're not in a known place you can run

I didn't invoke automake myself, I was just disclosing the toolset.
Does it get fired off by autoreconf?
> 
> 	aclocal -I /my/automake/dir/share/aclocal
> 
> or wherever.

        Hugh


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

* Re: Gmp now working, but number.c:147 isinf declared implicitly.
  2007-01-25 10:27                             ` Hugh Sasse
@ 2007-01-26 22:24                               ` Kevin Ryde
  0 siblings, 0 replies; 30+ messages in thread
From: Kevin Ryde @ 2007-01-26 22:24 UTC (permalink / raw)
  To: Hugh Sasse; +Cc: guile-user

Hugh Sasse <hgs@dmu.ac.uk> writes:
>
> I didn't invoke automake myself, I was just disclosing the toolset.
> Does it get fired off by autoreconf?

It provides some of the macros used in generating the configure
script.


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


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

end of thread, other threads:[~2007-01-26 22:24 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-05 14:52 Gmp now working, but number.c:147 isinf declared implicitly Hugh Sasse
2007-01-12 17:37 ` Hugh Sasse
2007-01-12 22:59   ` Kevin Ryde
2007-01-15  9:46     ` Hugh Sasse
2007-01-15 11:58       ` Hugh Sasse
2007-01-15 20:31         ` Kevin Ryde
2007-01-16 10:21           ` Hugh Sasse
2007-01-16 14:58             ` Hugh Sasse
2007-01-19  0:37               ` Kevin Ryde
2007-01-19 10:02                 ` Hugh Sasse
2007-01-21 23:27                   ` Kevin Ryde
2007-01-22 11:53                     ` Hugh Sasse
2007-01-22 21:11                       ` Kevin Ryde
2007-01-23 10:27                         ` Hugh Sasse
2007-01-19 15:43                 ` Hugh Sasse
2007-01-21 21:08                   ` Kevin Ryde
2007-01-21 23:22                   ` Kevin Ryde
2007-01-22 12:08                     ` Hugh Sasse
2007-01-22 21:05                       ` Kevin Ryde
2007-01-23 11:01                         ` Hugh Sasse
2007-01-24 21:23                           ` Kevin Ryde
2007-01-25 10:27                             ` Hugh Sasse
2007-01-26 22:24                               ` Kevin Ryde
2007-01-18  0:43             ` Kevin Ryde
2007-01-18  9:57               ` Hugh Sasse
2007-01-18 12:21                 ` Hugh Sasse
2007-01-18 10:43               ` Ludovic Courtès
2007-01-15 20:27       ` Kevin Ryde
2007-01-16 10:11         ` Hugh Sasse
2007-01-18  0:38           ` Kevin Ryde

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).