----- Original Message -----
From: "David Kastrup" <d...@gnu.org>
To: "Phil Holmes" <m...@philholmes.net>
Cc: <lilypond-devel@gnu.org>
Sent: Friday, May 22, 2015 4:04 PM
Subject: Re: Master fails to compile
Phil Holmes <m...@philholmes.net> writes:
phil@Ubuntu:~/lilypond-git$ rm -rf build
phil@Ubuntu:~/lilypond-git$ sh autogen.sh --noconfigure &> dev\null
phil@Ubuntu:~/lilypond-git$ mkdir -p build
phil@Ubuntu:~/lilypond-git$ cd build
phil@Ubuntu:~/lilypond-git/build$ ../configure &> dev\null
phil@Ubuntu:~/lilypond-git/build$ make -s -j9 &> ~/MakeFail220515.txt
On a clean build directory as above, current master fails to compile as
follows:
/lilypond-git/lily/include/listener.hh: In static member function
'static void Listener::smob_proc_init(scm_t_bits)':
/lilypond-git/lily/include/listener.hh:104: error: insufficient
contextual information to determine type
/lilypond-git/lily/include/listener.hh: In static member function
'static void Callback_wrapper::smob_proc_init(scm_t_bits)':
/lilypond-git/lily/include/listener.hh:182: error: insufficient
contextual information to determine type
I can supply the full output of make if required, this is just an
extract.
With the same commands on HEAD~2, the compile completes successfully.
Clearly issue 4400, and the lines looking like
LY_DECLARE_SMOB_PROC (&Listener::listen, 1, 0, 0)
and
LY_DECLARE_SMOB_PROC (&Callback_wrapper::call, 2, 0, 0)
The respective definition is
#define LY_DECLARE_SMOB_PROC(PMF, REQ, OPT, VAR) \
static void smob_proc_init (scm_t_bits smob_tag) \
{ \
scm_set_smob_apply (smob_tag, \
(scm_t_subr)smob_trampoline<PMF>, \
REQ, OPT, VAR); \
}
Now obviously Patchy was fine with that change, so updating g++ to the
version used by Patchy should do the trick here. However, this might
not be an option for all self-compilers.
Does it help if you move the LY_DECLARE_SMOB_PROC lines in
lily/include/listener.hh which currently are right above the
corresponding function definitions to below the corresponding function
definitions?
Not 100% certain what change was needed. Below is a patch showing what I
tried and compilation still failed.
diff --git a/lily/include/listener.hh b/lily/include/listener.hh
index d9f8aea..a547e6b 100644
--- a/lily/include/listener.hh
+++ b/lily/include/listener.hh
@@ -101,12 +101,12 @@ public:
Listener (SCM callback, SCM target)
: callback_ (callback), target_ (target) { }
- LY_DECLARE_SMOB_PROC (&Listener::listen, 1, 0, 0)
SCM listen (SCM ev)
{
scm_call_2 (callback_, target_, ev);
return SCM_UNSPECIFIED;
}
+ LY_DECLARE_SMOB_PROC (&Listener::listen, 1, 0, 0)
SCM mark_smob ()
{
@@ -179,12 +179,12 @@ class Callback_wrapper : public
Simple_smob<Callback_wrapper>
Callback_wrapper (void (*trampoline) (SCM, SCM)) : trampoline_ (trampoline)
{ } // Private constructor, use only in make_smob
public:
- LY_DECLARE_SMOB_PROC (&Callback_wrapper::call, 2, 0, 0)
SCM call (SCM target, SCM ev)
{
trampoline_ (target, ev);
return SCM_UNSPECIFIED;
}
+ LY_DECLARE_SMOB_PROC (&Callback_wrapper::call, 2, 0, 0)
// Callback wrappers are for an unchanging entity, so we do the Lisp
// creation just once on the first call of make_smob. So we only
// get a single Callback_wrapper instance for each differently
--
1.7.0.4
--
Phil Holmes
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel