From: "K.L." <k.l.lambda@gmail.com>
To: guile-devel@gnu.org
Subject: A weird problem about "define-private', need help please!
Date: Sat, 17 Oct 2020 14:12:26 +0800 [thread overview]
Message-ID: <CABLAKxc7HJO-6i-7fr=yQPrnCe3NDOsU-RNXdLA4DoKzjnNgeg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]
Hello guys.
I built myself a *libguile.so* with guile-1.8.8 source code. When running,
I got the error:
> Unbound variable: define-private
According to my debug tracing, the initialization of *scm_init_guile* has
been executed safely. And I'm sure that *boot-9.scm* has been loaded. The
error occurred at a user scm file:
(define-public (randomize-rand-seed)
> (ly:randomize-rand-seed)
> (let*
> ((t (gettimeofday))
> (seed (*
> (cdr t)
> (car t)
> (getpid))))
> (set! *random-state* (seed->random-state seed))))
>
>
I saw that the C function *getpid* has been called, then the error was
thrown.
And I noticed that the *define-private* was referenced only once in
boot-9.scm around all guile-1.8.8 assets:
> (define define-private define)
>
> (defmacro define-public args
> (define (syntax)
> (error "bad syntax" (list 'define-public args)))
> (define (defined-name n)
> (cond
> ((symbol? n) n)
> ((pair? n) (defined-name (car n)))
> (else (syntax))))
> (cond
> ((null? args)
> (syntax))
> (#t
> (let ((name (defined-name (car args))))
> `(begin
> (*define-private* ,@args)
> (eval-case ((load-toplevel) (export ,name))))))))
>
>
I tried to replace 'define-private' by 'define', and I got an error of
'Unbound variable: define'. I'm new in language Scheme and GUILE, I have no
idea what happened.
I adjusted some C building config options to adapt the Android NDK build
environment. That seems not related to this problem, but I'm not sure. Here
is my config.h
<https://gitlab.com/k.l.lambda/lilypond/-/blob/dev/kl/android-port/node-addon/android/third-party/libs/guile/x86/config.h>
.
Thanks for any help.
[-- Attachment #2: Type: text/html, Size: 4791 bytes --]
next reply other threads:[~2020-10-17 6:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-17 6:12 K.L. [this message]
2020-10-18 5:12 ` A weird problem about "define-private', need help please! K.L.
2020-10-18 6:32 ` Thien-Thi Nguyen
2020-10-18 9:04 ` K.L.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABLAKxc7HJO-6i-7fr=yQPrnCe3NDOsU-RNXdLA4DoKzjnNgeg@mail.gmail.com' \
--to=k.l.lambda@gmail.com \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).