bug#24681: undefined reference to `mktime_internal' on solaris sparc

2017-03-15 Thread Christian Jullien
Hello Handy,

I'm afraid that 2.2 also suffers from the same issue:

  CCLD guile
./.libs/libguile-2.2.so: undefined reference to `mktime_internal'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:2435: guile] Error 1
make[3]: Leaving directory '/export/home/jullien/guile-2.2.0/libguile'
make[2]: *** [Makefile:2294: all] Error 2
make[2]: Leaving directory '/export/home/jullien/guile-2.2.0/libguile'
make[1]: *** [Makefile:1857: all-recursive] Error 1
make[1]: Leaving directory '/export/home/jullien/guile-2.2.0'
make: *** [Makefile:1743: all] Error 2

Regards.

-Original Message-
From: Christian Jullien [mailto:eli...@orange.fr] 
Sent: jeudi 2 mars 2017 06:20
To: 'Andy Wingo'
Cc: '24...@debbugs.gnu.org'
Subject: RE: bug#24681: undefined reference to `mktime_internal' on solaris 
sparc

Thank you Andy,

By stable-2.0 branch, if you mean guile-2.0.14.tar.gz, I'm afraid this issue is 
still there.

[jullien@pastre]~$ cd guile-2.0.14

[jullien@pastre]guile-2.0.14$ uname -a
SunOS pastre 5.10 Generic_147147-26 sun4u sparc SUNW,Ultra-5_10 Solaris

[jullien@pastre]guile-2.0.14$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/sparc-sun-solaris2.10/6.2.0/lto-wrapper
Target: sparc-sun-solaris2.10
Configured with: ../configure --with-gnu-as --with-as=/usr/local/bin/as 
--with-gnu-ld --with-ld=/usr/local/bin/ld --enable-shared --disable-lto 
--disable-nls --enable-languages=c,c++ Thread model: posix gcc version 6.2.0 
(GCC)

[jullien@pastre]PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure; time make 
...
make[2]: Entering directory '/export/home/jullien/guile-2.0.14/libguile'
make  all-am
make[3]: Entering directory '/export/home/jullien/guile-2.0.14/libguile'
  CCLD guile
./.libs/libguile-2.0.so: undefined reference to `mktime_internal'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:2327: guile] Error 1
make[3]: Leaving directory '/export/home/jullien/guile-2.0.14/libguile'
make[2]: *** [Makefile:2186: all] Error 2
make[2]: Leaving directory '/export/home/jullien/guile-2.0.14/libguile'
make[1]: *** [Makefile:1841: all-recursive] Error 1
make[1]: Leaving directory '/export/home/jullien/guile-2.0.14'
make: *** [Makefile:1727: all] Error 2

I'll be glad to help you and to make more tests (Btw I'm also a lisp compiler 
writer https://en.wikipedia.org/wiki/OpenLisp)

-Original Message-
From: Andy Wingo [mailto:wi...@pobox.com]
Sent: mercredi 1 mars 2017 13:46
To: Christian Jullien
Cc: 24...@debbugs.gnu.org
Subject: Re: bug#24681: undefined reference to `mktime_internal' on solaris 
sparc

Hi Christian,

On Thu 13 Oct 2016 08:03, "Christian Jullien"  writes:

> Trying to compile guile on solaris sparcs (I’m using gcc 6.2) I get:
>
> CC guile-guile.o
>
> CCLD guile
>
> ./.libs/libguile-2.0.so: undefined reference to `mktime_internal'
>
> collect2: error: ld returned 1 exit status

This appears to be a Gnulib problem of some kind.  See:

  https://lists.gnu.org/archive/html/guile-devel/2016-07/msg00012.html

I believe that after updating gnulib, one of the modules we pulled in added 
this mktime-internal dependency.  It should be built on platforms that require 
it, and not otherwise.  It appears that your platform requires it but is not 
building it; irritating!  

I just updated Gnulib again today; I wonder if it fixes this problem.
Are you able to build from git?  If so can you try the stable-2.0 branch?

Andy






bug#25509: FreeBSD 11.0

2017-03-15 Thread Matt Wette
HI saffron,

I have been able to get guile-2.1.8 to build on FreeBSD 11.0.

I had to “pkg install” : pkgconf, gmake, boehm-gc-threaded

Then to work around following config issue, I “pkg install autotools”
Edit autoconf.ac and find “bdw-gc”, change to “bdw-gc-threaded”
PKG_CHECK_MODULES([BDW_GC], [bdw-gc-threaded >= 7.2])

Then run autoconf, then ./configure —prefix=/usr/local, then gmake (make did 
not work for me), but takes hours.

Then “make check”.  

Matt







bug#25922: pkgsrc patches: older Darwin support

2017-03-15 Thread Thomas Klausner
On Tue, Mar 14, 2017 at 12:30:32PM +0100, Andy Wingo wrote:
> On Wed 01 Mar 2017 21:28, Thomas Klausner  writes:
> 
> > Another pkgsrc patch concerns itself with supporting older Darwin
> > releases, attached. Can you please merge it?
> >  Thomas
> >
> > $NetBSD: patch-libguile_stime.c,v 1.1 2016/10/19 14:56:17 adam Exp $
> >
> > Fix building on Darwin.
> >
> > --- libguile/stime.c.orig   2016-10-19 07:55:02.0 +
> > +++ libguile/stime.c
> > @@ -828,7 +828,7 @@ scm_init_stime()
> >if (clock_gettime (CLOCK_REALTIME, _real_time_base) == 0)
> >  get_internal_real_time = get_internal_real_time_posix_timer;
> >  
> > -#ifdef HAVE_POSIX_CPUTIME
> > +#if defined(HAVE_POSIX_CPUTIME) && defined(HAVE_CLOCK_GETCPUCLOCKID)
> >{
> >  clockid_t dummy;
> >  
> 
> I believe this was fixed in 2.1.6, so I think you can drop this one.

Confirmed fixed in 2.1.8, thanks!
 Thomas





bug#25921: pkgsrc patches: Dragonfly support

2017-03-15 Thread Thomas Klausner
On Tue, Mar 14, 2017 at 12:27:18PM +0100, Andy Wingo wrote:
> On Wed 01 Mar 2017 21:27, Thomas Klausner  writes:
> 
> > $NetBSD: patch-lib_signal.in.h,v 1.1 2016/12/03 03:15:33 marino Exp $
> >
> > DragonFly support.
> >
> > --- lib/signal.in.h.orig2016-06-29 09:12:27 UTC
> > +++ lib/signal.in.h
> > @@ -61,6 +61,7 @@
> >  #if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
> >  && ((defined __APPLE__ && defined __MACH__) \
> >  || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \
> > +|| defined __DragonFly__ \
> >  || defined __sun || defined __ANDROID__) \
> >  && ! defined __GLIBC__
> >  # include 
> >
> 
> This file comes from gnulib.  Can you send this patch there?
> bug-gnu...@gnu.org.  That way you will fix it once and reap the benefits
> many places.

I sent this upstream and learned that it's probably unnecessary, so
I've removed it from pkgsrc.

> > $NetBSD: patch-libguile_threads.c,v 1.1 2016/12/03 03:15:33 marino Exp $
> >
> > DragonFly support.
> >
> > --- libguile/threads.c.orig 2016-06-20 20:35:06 UTC
> > +++ libguile/threads.c
> > @@ -2252,7 +2252,7 @@ scm_ia64_ar_bsp (const void *opaque)
> >return (void *) ctx->uc_mcontext.sc_ar_bsp;
> >  }
> >  # endif /* linux */
> > -# ifdef __FreeBSD__
> > +# if defined __FreeBSD__ || defined __DragonFly__
> >  #  include 
> >  void *
> 
> This is for ia64 support which AFAIU DragonFly doesn't do; I think you
> can drop this one.

Ok, removed too.

Thanks for the feedback!
 Thomas





bug#24002: configure: missing call to AC_C_FLEXIBLE_ARRAY_MEMBER

2017-03-15 Thread Thomas Klausner
On Wed, Mar 01, 2017 at 09:26:52AM +0100, Andy Wingo wrote:
> Hi Thomas,
> 
> On Sat 16 Jul 2016 11:13, Thomas Klausner  writes:
> 
> > On NetBSD, the build of guile-2.0.12 breaks early because
> > FLEXIBLE_ARRAY_MEMBER is not defined:
> >
> > In file included from strftime.c:33:0:
> > time-internal.h:48:14: error: 'FLEXIBLE_ARRAY_MEMBER' undeclared here (not 
> > in a function)
> >char abbrs[FLEXIBLE_ARRAY_MEMBER];
> 
> I just pulled in an updated Gnulib which I hope fixes this problem.  If
> you build from Git then you should be able to verify the fix, or wait
> until we have another release.

I just tried the 2.1.8 release (from March 10, so after your mail),
and the problem still exists.

Cheers,
 Thomas





bug#26107: Inaccurate location info for unbound-variable errors

2017-03-15 Thread Ludovic Courtès
Hi!

In 2.1.8/2.2.0, walking up the stack to find the origin of an unbound
variable error yields inaccurate location info.  Consider this:

--8<---cut here---start->8---
(list 'a
  (symbol->string 'b)
  (symbol->string 'c)  ;← unbound variable error reported here
  (FOO 'bar)   ;… instead of here
  3
  4)
--8<---cut here---end--->8---

We get:

--8<---cut here---start->8---
$ guild compile -t value t.scm
Backtrace:
  18 (apply-smob/1 #)
In ice-9/boot-9.scm:
710:2 17 (call-with-prompt _ _ #)
In ice-9/eval.scm:
619:8 16 (_ #(#(#)))
In /gnu/store/4xir0dlzxl7h5v7va9rz8x3mvarlv2fd-profile/bin/guild:
72:17 15 (main _)
In srfi/srfi-1.scm:
640:9 14 (for-each # ("t.scm"))
In scripts/compile.scm:
   251:26 13 (_ _)
In system/base/target.scm:
 57:6 12 (with-target _ _)
In system/base/compile.scm:
152:6 11 (compile-file "t.scm" #:output-file _ #:from _ #:to _ #:env _ 
#:opts _ #:canonicalization _)
 43:4 10 (call-once _)
In ice-9/boot-9.scm:
846:4  9 (with-throw-handler _ _ _)
In system/base/compile.scm:
59:11  8 (_)
   155:11  7 (_ #)
   224:14  6 (read-and-compile _ #:from _ #:to _ #:env _ #:opts _)
255:6  5 (compile _ #:from _ #:to _ #:env _ #:opts _)
   183:32  4 (compile-fold _ #string) (const b)) (call (toplevel symbol->string) (const c)) 
(call (toplevel FO…> …)
In ice-9/boot-9.scm:
   2309:4  3 (save-module-excursion #)
In language/bytecode/spec.scm:
35:19  2 (_)
In t.scm:
  3:6  1 (_)   ;← incorrect line number! (expected line 4)
In ice-9/boot-9.scm:
   757:25  0 (dispatch-exception _ _ _)

ice-9/boot-9.scm:757:25: In procedure dispatch-exception:
ice-9/boot-9.scm:757:25: In procedure module-lookup: Unbound variable: FOO
--8<---cut here---end--->8---

It Would Be Nice if we could get the right location info here, though I
understand this is a corner case.

Thoughts?

Ludo’.





bug#26106: Defining a method named '-' with one parameter

2017-03-15 Thread Alejandro Sanchez
If I define a method named ‘-‘ which only takes in one parameter, the 
expression ‘(- v)’ gets rewritten to ‘(- 0 v)’. Here is a minimal example:

(use-modules (oop goops))

(define-class  ()
  (x #:init-value 0 #:getter get-x #:init-keyword #:x)
  (y #:init-value 0 #:getter get-y #:init-keyword #:y))

(define-method (* (n ) (v ))
  (make  #:x (* n (get-x v)) #:y (* n (get-y v

(define-method (- (v ))
  (* -1 v))

(define v (make  #:x 1 #:y 2))
(* -1 v)  ; Works fine
(- v)  ; Throws error

Here is the error message:

scheme@(guile-user)> (- v)
ERROR: In procedure scm-error:
ERROR: No applicable method for #< - (2)> in call (- 0 
#< 10a8e4020>)

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,bt
In current input:
 23:0  2 (_)
In oop/goops.scm:
   1438:4  1 (cache-miss 0 #< 10a8e4020>)
In unknown file:
   0 (scm-error goops-error #f "No applicable method for ~S in 
call ~S" (#< - (2)> (- 0 #<)) #)