Discussion:
"@GUILE@" and "Segmentation fault"
Wolfkin Chiang
2014-06-05 05:46:16 UTC
Permalink
Hi, All,

I am trying guile-gnome, I have encountered some problem, please help me.

1,
I typed command as
$ guile-gnome-2 -s /usr/share/doc/guile-gnome2-gtk/examples/hello.scm
It tells me
/usr/bin/guile-gnome-2: 58: exec: @GUILE@: not found
and
I do
# dpkg-reconfigure guile-gnome2-glib
I got the same reply.
And
$ nl -i 1 -ba /usr/bin/guile-gnome-2
1 #! /bin/sh
2
3 # Copyright (C) 2004, 2012 Free Software Foundation, Inc.
4 # Public domain.
5 # Written by Andy Wingo for guile-gnome.
6
7 # The purpose of this script is twofold. First, it serves to find
8 # `guile' in the load path instead of statically "linking" to
9 # /usr/bin/guile. Second, it will set up the guile load path and the
10 # library path such that using guile-gnome modules will Just Work.
This
11 # is necessary because we might choose to break the application
12 # interfaces in the future, so we need to allow for parallel
installs.
13
14 # Note that the proper way to make a script that will use this as the
15 # interpreter is as follows, removing `# ' on each line:
16
17 # #! /bin/sh
18 # exec guile-gnome -s $0 "$@"
19 # !#
20
21 # This will allow the shell to find `guile-gnome' in the path.
22
23 # Hack around guile-1.6's lack of /usr/local paths in its load-dir.
24 # (Otherwise a user looking for g-wrap / guile-lib installed in
25 # /usr/local will be unpleasantly surprised.)
26
localpath=/usr/local/share/guile/site:/usr/local/share/guile/1.6:/usr/local/share/guile
27
28 if test "x$GUILE_LOAD_PATH" = "x"; then
29 GUILE_LOAD_PATH="/usr/share/guile-gnome-2":$localpath
30 else
31 # Because GUILE_LOAD_PATH is essentially a user customization, allow
32 # it to have precedence over $localpath.
33
GUILE_LOAD_PATH="/usr/share/guile-gnome-2":$GUILE_LOAD_PATH:$localpath
34 fi
35
36 # Probably will always be necessary to resolve libguile-gnome-gobject
37 # link.
38 if test /usr/lib != /usr/lib -a /usr/lib != /usr/local/lib; then
39 if test "x$LD_LIBRARY_PATH" = "x"; then
40 LD_LIBRARY_PATH=/usr/lib
41 else
42 LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH
43 fi
44 fi
45
46 # Can be removed after g-wrap is fixed.
47 if test "x$LD_LIBRARY_PATH" = "x"; then
48 LD_LIBRARY_PATH=/usr/lib/guile-gnome-2
49 else
50 LD_LIBRARY_PATH=/usr/lib/guile-gnome-2:$LD_LIBRARY_PATH
51 fi
52
53 export GUILE_LOAD_PATH LD_LIBRARY_PATH
54
55 # Taken from autoconf.info, "Portable Shell"
56 case $# in
57 0) exec @GUILE@;;
58 *) exec @GUILE@ "$@";;
59 esac
I wonder why @GUILE@ is appering in here.
I installed guile-gnome by
# apt-get install ...

2,
I do
$ sed 's#@GUILE@#/usr/bin/guile#' /usr/bin/guile-gnome-2 > guile-gnome-2
and do
$ ./guile-gnome-2 -s /usr/share/doc/guile-gnome2-gtk/examples/hello.scm
and it tells
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /usr/share/doc/guile-gnome2-gtk/examples/hello.scm
;;; compiling /usr/share/guile-gnome-2/gnome/gobject.scm
Segmentation fault
I wonder why it can not work.
The source file is
$ nl -i 1 -ba /usr/share/doc/guile-gnome2-gtk/examples/hello.scm
1 #! /bin/sh
2 # -*- scheme -*-
3 exec guile-gnome-2 -s $0 "$@"
4 !#
5 ;; guile-gnome
6 ;; Copyright (C) 2003,2004 Free Software Foundation, Inc.
7
8 ;; This program is free software; you can redistribute it and/or
9 ;; modify it under the terms of the GNU General Public License as
10 ;; published by the Free Software Foundation; either version 2 of
11 ;; the License, or (at your option) any later version.
12 ;;
13 ;; This program is distributed in the hope that it will be useful,
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;; GNU General Public License for more details.
17 ;;
18 ;; You should have received a copy of the GNU General Public License
19 ;; along with this program; if not, contact:
20 ;;
21 ;; Free Software Foundation Voice: +1-617-542-5942
22 ;; 59 Temple Place - Suite 330 Fax: +1-617-542-2652
23 ;; Boston, MA 02111-1307, USA ***@gnu.org
24
25
26 (use-modules (oop goops) (gnome gobject) (gnome gtk))
27
28 ;; define the hello as a function -- there are many other ways to do
this,
29 ;; of course...
30 (define (hello)
31 ;; we can make new widgets just like we make goops objects -- there
is
32 ;; a corresponding goops class for every GType we know about. the
33 ;; arguments to make, after the class, are interpreted as properties
34 ;; to set. in this case we make a toplevel window and a button with
35 ;; the label, "Hello, World!".
36 (let* ((window (make <gtk-window> #:type 'toplevel))
37 (button (make <gtk-button> #:label "Hello, World!")))
38
39 ;; there are scheme functions corresponding to all of the c
ones...
40 ;; and of course we don't have to cast anything.
41 (gtk-container-set-border-width window 10)
42 (gtk-container-add window button)
43
44 ;; and of course you can attach a lambda to a signal :-)
45 (gtype-instance-signal-connect button 'clicked (lambda (b)
(gtk-main-quit)))
46
47 (gtk-widget-show-all window)
48
49 ;; this will block until gtk-main-quit is called...
50 (gtk-main)))
51
52 ;; meaning this blocks until the button is clicked.
53 (hello)
This file is installed by
# apt-get install ...

3,
BTW, the system is
$ uanme -a
Linux wolfkin 3.14-1-amd64 #1 SMP Debian 3.14.4-1 (2014-05-13) x86_64
GNU/Linux

Regards,
Wolfkin
Chris Vine
2014-06-05 19:02:42 UTC
Permalink
On Thu, 5 Jun 2014 13:46:16 +0800
Post by Wolfkin Chiang
Hi, All,
I am trying guile-gnome, I have encountered some problem, please help me.
1,
I typed command as
$ guile-gnome-2
-s /usr/share/doc/guile-gnome2-gtk/examples/hello.scm It tells me
Your guile-gnome-2 file is defective and has been improperly
generated. Assuming you are using a debian binary package, you had
better take it up with the debian maintainer.

Chris
David Pirotte
2014-06-06 16:53:10 UTC
Permalink
Hello Wolfkin,
1, ...
I installed guile-gnome by
# apt-get install ...
It is rather unfortunate but guile-gnome-2 debian packages have been built and
still depend upon/install guile-1.8, which is unsupported since almost 3 years now.

You really need and want to use guile-2, which means that you'll have to manually
install guile-gnome, itself requiring guile-g-wrap and guile-cairo [and you also
won't be able to use existing debian packages for any of these 2 either].

So:
-] purge all guile-gnome packages;
-] purge guile-g-wrap;
-] purge guile-cairo;

-] install guile-2.0.11 [it's in debian testing].

Then get, configure, make and install guile-g-wrap 1.19.4, the latest guile-cairo
[from git, the latest tarball is outdated] and finally guile-gnome 2.16.2. I would
recommend you do this using git clones for all, although you may install from the
tarball for guile-g-wrap and guile-gnome, as you prefer.

I recommend you install all these form source code.

-] g-wrap

http://www.nongnu.org/g-wrap/development.html

git clone git://git.sv.gnu.org/g-wrap.git
cd g-wrap
./autogen.sh --prefix=... && make && make install

-] guile-cairo

http://www.nongnu.org/guile-cairo/dev/

git clone git://git.savannah.nongnu.org/guile-cairo.git
cd guile-cairo
./autogen.sh --prefix=... && make && make install

-] guile-gnome

http://www.gnu.org/software/guile-gnome/dev/

Caution: the 'developers' web page is out of date, there is no need to run
scripts... anymore

git clone git://git.sv.gnu.org/guile-gnome.git guile-gnome-platform
cd guile-gnome-platform
./autogen.sh --prefix=... && make && make install
2, ... examples ...
Most examples come from the very first version of guile-gnome, some still work as
is, but others need some love...


Cheers,
David
Wolfkin Chiang
2014-06-15 06:00:33 UTC
Permalink
Hi, David,
Thanks for your information, these all issues have been done.
Regards,
Wolfkin
Post by David Pirotte
Hello Wolfkin,
1, ...
I installed guile-gnome by
# apt-get install ...
It is rather unfortunate but guile-gnome-2 debian packages have been built and
still depend upon/install guile-1.8, which is unsupported since almost 3 years now.
You really need and want to use guile-2, which means that you'll have to manually
install guile-gnome, itself requiring guile-g-wrap and guile-cairo [and you also
won't be able to use existing debian packages for any of these 2 either].
-] purge all guile-gnome packages;
-] purge guile-g-wrap;
-] purge guile-cairo;
-] install guile-2.0.11 [it's in debian testing].
Then get, configure, make and install guile-g-wrap 1.19.4, the latest guile-cairo
[from git, the latest tarball is outdated] and finally guile-gnome 2.16.2.
I would
recommend you do this using git clones for all, although you may install from the
tarball for guile-g-wrap and guile-gnome, as you prefer.
I recommend you install all these form source code.
-] g-wrap
http://www.nongnu.org/g-wrap/development.html
git clone git://git.sv.gnu.org/g-wrap.git
cd g-wrap
./autogen.sh --prefix=... && make && make install
-] guile-cairo
http://www.nongnu.org/guile-cairo/dev/
git clone git://git.savannah.nongnu.org/guile-cairo.git
cd guile-cairo
./autogen.sh --prefix=... && make && make install
-] guile-gnome
http://www.gnu.org/software/guile-gnome/dev/
Caution: the 'developers' web page is out of date, there is no need to run
scripts... anymore
git clone git://git.sv.gnu.org/guile-gnome.git
guile-gnome-platform
cd guile-gnome-platform
./autogen.sh --prefix=... && make && make install
2, ... examples ...
Most examples come from the very first version of guile-gnome, some still work as
is, but others need some love...
Cheers,
David
David Pirotte
2014-06-17 21:19:14 UTC
Permalink
Hi Wolfkin,
Post by Wolfkin Chiang
Thanks for your information, these all issues have been done.
Good to know, thanks for the feedback! If you are interested, while looking for
running examples, I develop and maintain Kisê, a small time keeping application
entirely written in guile... Here:

http://www.altosw.be/kise

In case you 'give it a go', feedbacks more then welcome too...

Happy hacking,
David

;; --
Post by Wolfkin Chiang
1, ...
I installed guile-gnome by
# apt-get install ...
It is rather unfortunate but guile-gnome-2 debian packages have been built and
still depend upon/install guile-1.8, which is unsupported since almost 3 years now.
You really need and want to use guile-2, which means that you'll have to manually
install guile-gnome, itself requiring guile-g-wrap and guile-cairo [and you also
won't be able to use existing debian packages for any of these 2 either].
-] purge all guile-gnome packages;
-] purge guile-g-wrap;
-] purge guile-cairo;
-] install guile-2.0.11 [it's in debian testing].
Then get, configure, make and install guile-g-wrap 1.19.4, the latest guile-cairo
[from git, the latest tarball is outdated] and finally guile-gnome 2.16.2.
I would
recommend you do this using git clones for all, although you may install from the
tarball for guile-g-wrap and guile-gnome, as you prefer.
I recommend you install all these form source code.
-] g-wrap
http://www.nongnu.org/g-wrap/development.html
git clone git://git.sv.gnu.org/g-wrap.git
cd g-wrap
./autogen.sh --prefix=... && make && make install
-] guile-cairo
http://www.nongnu.org/guile-cairo/dev/
git clone git://git.savannah.nongnu.org/guile-cairo.git
cd guile-cairo
./autogen.sh --prefix=... && make && make install
-] guile-gnome
http://www.gnu.org/software/guile-gnome/dev/
Caution: the 'developers' web page is out of date, there is no need to run
scripts... anymore
git clone git://git.sv.gnu.org/guile-gnome.git
guile-gnome-platform
cd guile-gnome-platform
./autogen.sh --prefix=... && make && make install
2, ... examples ...
Most examples come from the very first version of guile-gnome, some still work as
is, but others need some love...
Cheers,
David
Loading...