unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#40075: guile-3.0.1: --without-threads build failure on NetBSD
@ 2020-03-15 12:55 Thomas Klausner
  2020-03-18 23:47 ` bug#40075: tmpnam Matt Wette
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Thomas Klausner @ 2020-03-15 12:55 UTC (permalink / raw)
  To: 40075

Hi!

guile-2.2.7 builds fine, but when I try to build guile 3.0.1
--without-threads on NetBSD-9.99.49/amd64, I see:

  CCLD     libguile-3.0.la
ld: .libs/libguile_3.0_la-posix.o: in function `scm_tmpnam':
/scratch/wip/guile30/work/guile-3.0.1/libguile/posix.c:1605: warning: warning: tmpnam() possibly used unsafely, use mkstemp() or mkdtemp()
  CCLD     guile
ld: ./.libs/libguile-3.0.so: warning: warning: tmpnam() possibly used unsafely, use mkstemp() or mkdtemp()
ld: ./.libs/libguile-3.0.so: undefined reference to `scm_i_pthread_key_create'

Any ideas how to solve this?

Thanks,
 Thomas





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

* bug#40075: tmpnam
  2020-03-15 12:55 bug#40075: guile-3.0.1: --without-threads build failure on NetBSD Thomas Klausner
@ 2020-03-18 23:47 ` Matt Wette
  2020-03-21 14:30 ` bug#40075: oops Matt Wette
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Matt Wette @ 2020-03-18 23:47 UTC (permalink / raw)
  To: 40075

This is related to 29001 at debbugs.gnu.org





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

* bug#40075: oops
  2020-03-15 12:55 bug#40075: guile-3.0.1: --without-threads build failure on NetBSD Thomas Klausner
  2020-03-18 23:47 ` bug#40075: tmpnam Matt Wette
@ 2020-03-21 14:30 ` Matt Wette
  2020-03-21 14:37 ` bug#40075: pthreads Matt Wette
  2020-03-21 16:43 ` bug#40075: patch Matt Wette
  3 siblings, 0 replies; 6+ messages in thread
From: Matt Wette @ 2020-03-21 14:30 UTC (permalink / raw)
  To: 40075

scratch that - 29001 is about the tmpnam issue





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

* bug#40075: pthreads
  2020-03-15 12:55 bug#40075: guile-3.0.1: --without-threads build failure on NetBSD Thomas Klausner
  2020-03-18 23:47 ` bug#40075: tmpnam Matt Wette
  2020-03-21 14:30 ` bug#40075: oops Matt Wette
@ 2020-03-21 14:37 ` Matt Wette
  2020-03-21 16:43 ` bug#40075: patch Matt Wette
  3 siblings, 0 replies; 6+ messages in thread
From: Matt Wette @ 2020-03-21 14:37 UTC (permalink / raw)
  To: 40075

I have duplicated this w/ 3.0.1 on ubuntu 18.04, x86_64.

I will look into this today.

Matt






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

* bug#40075: patch
  2020-03-15 12:55 bug#40075: guile-3.0.1: --without-threads build failure on NetBSD Thomas Klausner
                   ` (2 preceding siblings ...)
  2020-03-21 14:37 ` bug#40075: pthreads Matt Wette
@ 2020-03-21 16:43 ` Matt Wette
  2020-03-21 17:28   ` Ludovic Courtès
  3 siblings, 1 reply; 6+ messages in thread
From: Matt Wette @ 2020-03-21 16:43 UTC (permalink / raw)
  To: 40075; +Cc: Ludovic Courtès

Below is a patch against guile-3.0.1.

"make" works, "make check" works.

null-threads.c was not seeing "SCM_USE_NULL_THREADS" so include 
libguile/scmconfig.h
null-threads.c was not seeing def of SCM_API so include "libguile/scm.h"
web-server.test used (if (provided? 'threads) <test>) so #undefined if 
no threads.


--- libguile/null-threads.h-orig    2020-03-21 08:12:37.852229565 -0700
+++ libguile/null-threads.h    2020-03-21 08:33:26.239759647 -0700
@@ -36,6 +36,8 @@
  #include <signal.h>
  #include <errno.h>

+#include "libguile/scm.h"
+
  /* Threads
  */
  typedef int scm_i_pthread_t;
--- libguile/null-threads.c-orig    2020-03-21 08:07:50.113439437 -0700
+++ libguile/null-threads.c    2020-03-21 08:08:32.681573253 -0700
@@ -23,6 +23,7 @@

  #include <stdlib.h>

+#include "libguile/scmconfig.h"

  #if SCM_USE_NULL_THREADS
  #include "null-threads.h"
--- test-suite/tests/web-server.test-orig    2020-03-21 
09:29:57.688813542 -0700
+++ test-suite/tests/web-server.test    2020-03-21 09:35:08.850651216 -0700
@@ -93,25 +93,25 @@
      "not found"
    (expect http-get "/does-not-exist" 404))

-(pass-if-equal "GET with keep-alive"
-    '("Hello, λ world!"
-      "Écrit comme ça en Latin-1."
-      "GNU Guile")
-  (if (provided? 'threads)
+(if (provided? 'threads)
+    (pass-if-equal "GET with keep-alive"
+      '("Hello, λ world!"
+    "Écrit comme ça en Latin-1."
+    "GNU Guile")
        (let ((port (open-socket-for-uri %server-base-uri)))
-        (define result
-          (map (lambda (path)
-                 (let-values (((response body)
-                               (http-get (string-append 
%server-base-uri path)
-                                         #:port port
-                                         #:keep-alive? #t
-                                         #:headers
-                                         '((user-agent . "GNU Guile")))))
-                   (and (= (response-code response) 200)
-                        body)))
-               '("/" "/latin1" "/user-agent")))
-        (close-port port)
-        result)))
+    (define result
+      (map (lambda (path)
+         (let-values (((response body)
+                   (http-get (string-append %server-base-uri path)
+                     #:port port
+                     #:keep-alive? #t
+                     #:headers
+                     '((user-agent . "GNU Guile")))))
+           (and (= (response-code response) 200)
+            body)))
+           '("/" "/latin1" "/user-agent")))
+    (close-port port)
+    result)))

  (pass-if-equal "POST /"
      "forbidden"






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

* bug#40075: patch
  2020-03-21 16:43 ` bug#40075: patch Matt Wette
@ 2020-03-21 17:28   ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2020-03-21 17:28 UTC (permalink / raw)
  To: Matt Wette; +Cc: 40075-done

Hi Matt,

Matt Wette <matt.wette@gmail.com> skribis:

> Below is a patch against guile-3.0.1.
>
> "make" works, "make check" works.
>
> null-threads.c was not seeing "SCM_USE_NULL_THREADS" so include
> libguile/scmconfig.h
> null-threads.c was not seeing def of SCM_API so include "libguile/scm.h"
> web-server.test used (if (provided? 'threads) <test>) so #undefined if
> no threads.

Perfect!  Pushed as 865d48058e6b1604b95a5da49334aaf80a6d6471 and
87bf38c93a7baa4f2c060c24d8e2d354f4771861 (slightly different).

Thank you!

Ludo’.





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

end of thread, other threads:[~2020-03-21 17:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-15 12:55 bug#40075: guile-3.0.1: --without-threads build failure on NetBSD Thomas Klausner
2020-03-18 23:47 ` bug#40075: tmpnam Matt Wette
2020-03-21 14:30 ` bug#40075: oops Matt Wette
2020-03-21 14:37 ` bug#40075: pthreads Matt Wette
2020-03-21 16:43 ` bug#40075: patch Matt Wette
2020-03-21 17:28   ` Ludovic Courtès

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