guile-gtk-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"@GUILE@" and "Segmentation fault"


From: Wolfkin Chiang
Subject: "@GUILE@" and "Segmentation fault"
Date: Thu, 5 Jun 2014 13:46:16 +0800

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 'address@hidden@#/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       address@hidden
    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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]