Re: Build failures - compiling TeXmacs under guile 2.0.5
Hello! On 05/29/12 at 03:54pm, Ludovic Courtès wrote: Hi! Jan Synacek jsyna...@redhat.com skribis: Hm, this is weird. So TeXmacs seems to bundle the same eval.scm as guile has (among others)? You mean TeXmacs ships a file called ice-9/eval.scm? If that is the case, we’re in trouble. It doesn't, sorry for the confusion. My files got all mixed up somehow. I tried to copy all the .go files from installation to /usr/share/guile/2.0 and remove those in /usr/lib64/guile/2.0/ccache, but that seems to have done nothing. Running “make install” in Guile installs everything in its right place, with the right time stamp. I recompiled guile and the problem with compiling .go files is gone. However, TeXmacs still doesn't work and I'm not sure, if it's caused by the patch, or there is something else I'm overlooking again:) Texmacs complains when started: snip Backtrace: In unknown file: ?: 7 [boot-closure #t #catch-closure 420e600 ...] ?: 6 [catch-closure] ?: 5 [boot-closure #t #catch-closure 4b59180 #catch-closure 4b59160] ?: 4 [catch-closure] ?: 3 [boot-closure #t #catch-closure 4b5ade0 #catch-closure 4b5adc0] ?: 2 [catch-closure] ?: 1 [primitive-eval (if (os-mingw?) (load kernel/boot/boot.scm) ...)] ?: 0 [primitive-load /usr/share/TeXmacs/progs/xxx] ERROR: In procedure primitive-load: ERROR: In procedure open-file: No such file or directory: /usr/share/TeXmacs/progs/xxx snip The 'xxx' in the path probably suggests that something went wrong, but I wasn't able to really track down the cause. Thanks, Ludo’. Thanks, -- Jan Synacek Software Engineer, BaseOS team Brno, Red Hat
Re: Build failures - compiling TeXmacs under guile 2.0.5
Hi, Jan Synacek jsyna...@redhat.com skribis: Texmacs complains when started: snip Backtrace: In unknown file: ?: 7 [boot-closure #t #catch-closure 420e600 ...] ?: 6 [catch-closure] ?: 5 [boot-closure #t #catch-closure 4b59180 #catch-closure 4b59160] ?: 4 [catch-closure] ?: 3 [boot-closure #t #catch-closure 4b5ade0 #catch-closure 4b5adc0] ?: 2 [catch-closure] ?: 1 [primitive-eval (if (os-mingw?) (load kernel/boot/boot.scm) ...)] ?: 0 [primitive-load /usr/share/TeXmacs/progs/xxx] ERROR: In procedure primitive-load: ERROR: In procedure open-file: No such file or directory: /usr/share/TeXmacs/progs/xxx snip The 'xxx' in the path probably suggests that something went wrong, but I wasn't able to really track down the cause. I think you’d need to find the TeXmacs code snippet that’s being evaluated here. Ludo’.
Re: Build failures - compiling TeXmacs under guile 2.0.5
Hello, On 05/29/12 at 12:29am, Ludovic Courtès wrote: Hi, Jan Synacek jsyna...@redhat.com skribis: It's a macro: #define scm_scm2str gh_scm2newstr I added additional #define gh_scm2newstr(a, b) scm_str2string((a)) This one is incorrect. You’d want ‘scm_to_locale_string’ instead, which takes an ‘SCM’ and returns a ‘char *’ (which the caller has the responsibility to free eventually.) Can you try and report back? Ok, the whole patch is actually much smaller than I thought: #include libguile/version.h #if SCM_MAJOR_VERSION 2 #include guile/gh.h #elif SCM_MAJOR_VERSION == 2 #include libguile.h #define gh_list scm_list_n #define gh_scm2newstr(a, b) scm_to_locale_string((a)) #define FN scm_t_subr inline char * gh_symbol2newstr(SCM sym, size_t *lenp) { return gh_scm2newstr (scm_symbol_to_string (sym), lenp); } #endif TeXmacs now compiles, thank you!! Unfortunately, it doesn't run well. Its window is blank after start. I captured a log [1]. Can you please take a look at it? What does ERROR: no such language objcode mean? The scheme files are there. [1] http://www.fpaste.org/okRT/ Thanks again and cheers, -- Jan Synacek Software Engineer, BaseOS team Brno, Red Hat
Re: Build failures - compiling TeXmacs under guile 2.0.5
Hi Jan, Jan Synacek jsyna...@redhat.com skribis: Unfortunately, it doesn't run well. Its window is blank after start. I captured a log [1]. Can you please take a look at it? What does ERROR: no such language objcode mean? The scheme files are there. [1] http://www.fpaste.org/okRT/ It reads this: 1. TeXmacs] With linked TrueType support 2. ;;; note: source file /usr/share/TeXmacs/progs/ice-9/eval.scm 3. ;;; newer than compiled /usr/lib64/guile/2.0/ccache/ice-9/eval.go 4. ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 5. ;;; or pass the --no-auto-compile argument to disable. 6. ;;; compiling /usr/share/guile/2.0/system/base/compile.scm 7. ;;; it seems /usr/share/guile/2.0/system/base/compile.scm 8. ;;; is part of the compiler; skipping auto-compilation This means that it’s trying to auto-compile Guile’s compiler and core modules, which indicates that it didn’t find up-to-date .go files. However, normally, /usr/share/guile/2.0 should have both .scm and .go files, with the latter having an mtime greater than that of the former. Can you check whether something went wrong with your installation of Guile? Thanks, Ludo’.
Re: Build failures - compiling TeXmacs under guile 2.0.5
On 05/29/12 at 10:50am, Ludovic Courtès wrote: Hi Jan, Jan Synacek jsyna...@redhat.com skribis: Unfortunately, it doesn't run well. Its window is blank after start. I captured a log [1]. Can you please take a look at it? What does ERROR: no such language objcode mean? The scheme files are there. [1] http://www.fpaste.org/okRT/ It reads this: 1. TeXmacs] With linked TrueType support 2. ;;; note: source file /usr/share/TeXmacs/progs/ice-9/eval.scm 3. ;;; newer than compiled /usr/lib64/guile/2.0/ccache/ice-9/eval.go 4. ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 5. ;;; or pass the --no-auto-compile argument to disable. 6. ;;; compiling /usr/share/guile/2.0/system/base/compile.scm 7. ;;; it seems /usr/share/guile/2.0/system/base/compile.scm 8. ;;; is part of the compiler; skipping auto-compilation This means that it’s trying to auto-compile Guile’s compiler and core modules, which indicates that it didn’t find up-to-date .go files. However, normally, /usr/share/guile/2.0 should have both .scm and .go files, with the latter having an mtime greater than that of the former. Can you check whether something went wrong with your installation of Guile? Hm, this is weird. So TeXmacs seems to bundle the same eval.scm as guile has (among others)? I tried to copy all the .go files from installation to /usr/share/guile/2.0 and remove those in /usr/lib64/guile/2.0/ccache, but that seems to have done nothing. I will probably have to try rebuilding guile and building TeXmacs against it. I will let you know if that changes anything. Thanks, -- Jan Synacek Software Engineer, BaseOS team Brno, Red Hat
Re: Build failures - compiling TeXmacs under guile 2.0.5
Hi! Jan Synacek jsyna...@redhat.com skribis: Hm, this is weird. So TeXmacs seems to bundle the same eval.scm as guile has (among others)? You mean TeXmacs ships a file called ice-9/eval.scm? If that is the case, we’re in trouble. I tried to copy all the .go files from installation to /usr/share/guile/2.0 and remove those in /usr/lib64/guile/2.0/ccache, but that seems to have done nothing. Running “make install” in Guile installs everything in its right place, with the right time stamp. Thanks, Ludo’.
Re: Build failures - compiling TeXmacs under guile 2.0.5
On 05/25/12 at 05:51pm, Ludovic Courtès wrote: Hi! Jan Synacek jsyna...@redhat.com skribis: Guile/Glue/glue.cpp:233:31: error: cannot convert ‘SCM {aka scm_unused_struct*}’ to ‘const char*’ for argument ‘1’ to ‘scm_unused_struct* scm_str2string(const char*)’ [...] glue.cpp:233 looks like this: char* _r= scm_scm2str (s, len_r); // my comment - s is declared as SCM Indeed, scm_str2string expects a ‘const char *’, not an ‘SCM’. But what is the definition of ‘scm_scm2str’? It must be in TeXmacs. It's a macro: #define scm_scm2str gh_scm2newstr I added additional #define gh_scm2newstr(a, b) scm_str2string((a)) to 'bridge' it. It's quite ugly I must say, plus I'm not really sure if it doesn't break anything else. And I can't make c++ to cast SCM to char *, even with reinterpret_cast, as SCM is not a pointer. Can you please suggest a way (if there is a generic one) to fix these kinds of old-new api problems? Guile/Glue/glue.cpp:1267:46: error: invalid conversion from ‘FN {aka scm_unused_struct* (*)()}’ to ‘scm_t_subr {aka void*}’ [-fpermissive] [...] scm_new_procedure (tree?, (FN) treeP, 1, 0, 0); Yes, FN should be defined like this: typedef scm_t_subr FN; or: #define FN scm_t_subr Can you check whether that solves the problem? This seems to have helped. Thanks, Ludo’. Thanks, Jan -- Jan Synacek Software Engineer, BaseOS team Brno, Red Hat
Re: Build failures - compiling TeXmacs under guile 2.0.5
() Jan Synacek jsyna...@redhat.com () Mon, 28 May 2012 09:02:13 +0200 Can you please suggest a way (if there is a generic one) to fix these kinds of old-new api problems? Guile-SDL, Guile-PG, Guile-GDBM, Guile-WWW and other packages available from http://www.gnuvola.org/software/ use Guile-BAUX and SNUGGLE (also reachable from that URL) for portability between Guile 1.4 and 1.8. See bootstrap script autogen.sh for details. Although testing for 2.0 has only begun (nothing definitive to report yet), i mention them, anyway, in hopes that they might be useful for reference (or better yet, experimental adoption / refinement) for TeXmacs. Aside from the sea of ‘#define’s that any portability framework must necessarily include, the other distinguishing feature is that the packages' .so files are installed under $(pkglibdir) instead of in $(libdir), thus moving cross-(Guile-)version management under the package maintainer's control, and making support of multiple contemporaneously installed Guile versions somewhat easier (at least in theory :-D).
Re: Build failures - compiling TeXmacs under guile 2.0.5
Hi, Jan Synacek jsyna...@redhat.com skribis: It's a macro: #define scm_scm2str gh_scm2newstr I added additional #define gh_scm2newstr(a, b) scm_str2string((a)) This one is incorrect. You’d want ‘scm_to_locale_string’ instead, which takes an ‘SCM’ and returns a ‘char *’ (which the caller has the responsibility to free eventually.) Can you try and report back? Thanks, Ludo’.
Re: Build failures - compiling TeXmacs under guile 2.0.5
On 04/16/12 at 11:41pm, Ludovic Courtès wrote: Hi Jan, Thanks for the report. Jan Synacek jsyna...@redhat.com skribis: I'm trying to build TeXmacs 1.0.7 with guile 2.0.5 and I'm getting tons of errors like these: usr/include/guile/2.0/libguile/gsubr.h:64:12: error: initializing argument 5 of ‘scm_unused_struct* scm_c_define_gsubr(const char*, int, int, int, scm_t_subr)’ [-fpermissive] Guile/Glue/glue_server.cpp:1173:56: error: invalid conversion from ‘scm_unused_struct* (*)()’ to ‘scm_t_subr {aka void*}’ [-fpermissive] Can you show the line where this occurs? Presumably the code lacks a cast to ‘scm_t_subr’, which is implicit in C but not in C++. Thanks, Ludo’. Sorry for such late response, I gave it up after a while:) But.. One more try on this: $ make snip Guile/Glue/glue.cpp:233:31: error: cannot convert ‘SCM {aka scm_unused_struct*}’ to ‘const char*’ for argument ‘1’ to ‘scm_unused_struct* scm_str2string(const char*)’ snip Guile/Glue/glue.cpp:1267:46: error: invalid conversion from ‘FN {aka scm_unused_struct* (*)()}’ to ‘scm_t_subr {aka void*}’ [-fpermissive] snip Again, tons of errors like those two above, and I expect there will be more like that. glue.cpp:233 looks like this: char* _r= scm_scm2str (s, len_r); // my comment - s is declared as SCM glue.cpp:1267: scm_new_procedure (tree?, (FN) treeP, 1, 0, 0); I'm aware that C++ is pretty strict about casting. Is there any way I could fix those? I guess that if it is possible to bend g++ to allow me to recast all those, I could use macros somehow. Thanks, -- Jan Synacek Software Engineer, BaseOS team Brno, Red Hat
Re: Build failures - compiling TeXmacs under guile 2.0.5
Hi Jan, Thanks for the report. Jan Synacek jsyna...@redhat.com skribis: I'm trying to build TeXmacs 1.0.7 with guile 2.0.5 and I'm getting tons of errors like these: usr/include/guile/2.0/libguile/gsubr.h:64:12: error: initializing argument 5 of ‘scm_unused_struct* scm_c_define_gsubr(const char*, int, int, int, scm_t_subr)’ [-fpermissive] Guile/Glue/glue_server.cpp:1173:56: error: invalid conversion from ‘scm_unused_struct* (*)()’ to ‘scm_t_subr {aka void*}’ [-fpermissive] Can you show the line where this occurs? Presumably the code lacks a cast to ‘scm_t_subr’, which is implicit in C but not in C++. Thanks, Ludo’.