unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* issue with GUILE_SITE_DIR m4 macro
@ 2009-01-25 20:44 Zeeshan Ali (Khattak)
  2009-01-25 22:04 ` Linas Vepstas
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Zeeshan Ali (Khattak) @ 2009-01-25 20:44 UTC (permalink / raw)
  To: Guile User

Hi!
  I am using GUILE_SITE_DIR m4 macro in xchat-guile to find out where
should i install my guile module. It works perfectly fine except that
`make distcheck` fails:

test -z "/usr/share/guile/site/xchat-guile" || /bin/mkdir -p
"/usr/share/guile/site/xchat-guile"
 /usr/bin/install -c '../plugin-system.scm'
'/usr/share/guile/site/xchat-guile/plugin-system.scm'
/usr/bin/install: cannot create regular file
`/usr/share/guile/site/xchat-guile/plugin-system.scm': Permission
denied
make[3]: *** [install-schemeSCRIPTS] Error 1
make[3]: Leaving directory
`/home/zeenix/downloads/xchat-guile/xchat-guile-0.2/_build'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory
`/home/zeenix/downloads/xchat-guile/xchat-guile-0.2/_build'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory
`/home/zeenix/downloads/xchat-guile/xchat-guile-0.2/_build'
make: *** [distcheck] Error 2

   I am no autotools expert but i think DESTDIR env variable is not
getting respected. Here is my Makefile.am:

http://gitorious.org/projects/xchat-guile/repos/mainline/blobs/master/Makefile.am

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: issue with GUILE_SITE_DIR m4 macro
  2009-01-25 20:44 issue with GUILE_SITE_DIR m4 macro Zeeshan Ali (Khattak)
@ 2009-01-25 22:04 ` Linas Vepstas
  2009-01-25 22:25   ` Zeeshan Ali (Khattak)
  2009-01-25 22:48 ` Ludovic Courtès
  2009-01-25 22:50 ` Mike Gran
  2 siblings, 1 reply; 6+ messages in thread
From: Linas Vepstas @ 2009-01-25 22:04 UTC (permalink / raw)
  To: Zeeshan Ali (Khattak); +Cc: Guile User

Hi,

2009/1/25 Zeeshan Ali (Khattak) <zeenix@gmail.com>:
> Hi!
>  I am using GUILE_SITE_DIR m4 macro in xchat-guile to find out where
> should i install my guile module. It works perfectly fine except that
> `make distcheck` fails:
>
> test -z "/usr/share/guile/site/xchat-guile" || /bin/mkdir -p
> "/usr/share/guile/site/xchat-guile"
>  /usr/bin/install -c '../plugin-system.scm'
> '/usr/share/guile/site/xchat-guile/plugin-system.scm'
> /usr/bin/install: cannot create regular file
> `/usr/share/guile/site/xchat-guile/plugin-system.scm': Permission
> denied

I don't quite understand what you are doing .. but ...
what is the file ownership, and file permissions,
on /usr/share/guile/site/xchat-guile and
/usr/share/guile/site/xchat-guile/plugin-system.scm

what user are you running as?

If you rm -r /usr/share/guile/site/xchat-guile
before starting the install, doe s the bug go away?

--linas




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: issue with GUILE_SITE_DIR m4 macro
  2009-01-25 22:04 ` Linas Vepstas
@ 2009-01-25 22:25   ` Zeeshan Ali (Khattak)
  2009-01-25 22:52     ` Linas Vepstas
  0 siblings, 1 reply; 6+ messages in thread
From: Zeeshan Ali (Khattak) @ 2009-01-25 22:25 UTC (permalink / raw)
  To: linasvepstas; +Cc: Guile User

Hi Linas!

On Mon, Jan 26, 2009 at 12:04 AM, Linas Vepstas <linasvepstas@gmail.com> wrote:
> Hi,
>
> 2009/1/25 Zeeshan Ali (Khattak) <zeenix@gmail.com>:
>> Hi!
>>  I am using GUILE_SITE_DIR m4 macro in xchat-guile to find out where
>> should i install my guile module. It works perfectly fine except that
>> `make distcheck` fails:
>>
>> test -z "/usr/share/guile/site/xchat-guile" || /bin/mkdir -p
>> "/usr/share/guile/site/xchat-guile"
>>  /usr/bin/install -c '../plugin-system.scm'
>> '/usr/share/guile/site/xchat-guile/plugin-system.scm'
>> /usr/bin/install: cannot create regular file
>> `/usr/share/guile/site/xchat-guile/plugin-system.scm': Permission
>> denied
>
> I don't quite understand what you are doing ..

  Running `make distcheck`.

> but ...
> what is the file ownership, and file permissions,
> on /usr/share/guile/site/xchat-guile and
> /usr/share/guile/site/xchat-guile/plugin-system.scm
>
> what user are you running as?

   The thing is that `make distcheck` is not supposed to actually
install anything anywhere, it creates a temporary directory and
installs things there afaik. I am running everything as normal user
who do not have write access to those directories but that should not
be a problem.

   If you look into the Makefile.am, i am also installing the guile
plugin file into the xchat plugin directory but that doesn't cause any
issues:

test -z "/home/zeenix/downloads/xchat-guile/xchat-guile-0.3/_inst/lib/xchat/plugins"
|| /bin/mkdir -p
"/home/zeenix/downloads/xchat-guile/xchat-guile-0.3/_inst/lib/xchat/plugins"
 /bin/sh ./libtool   --mode=install /usr/bin/install -c  'guile.la'
'/home/zeenix/downloads/xchat-guile/xchat-guile-0.3/_inst/lib/xchat/plugins/guile.la'
/usr/bin/install -c .libs/guile.so
/home/zeenix/downloads/xchat-guile/xchat-guile-0.3/_inst/lib/xchat/plugins/guile.so
/usr/bin/install -c .libs/guile.lai
/home/zeenix/downloads/xchat-guile/xchat-guile-0.3/_inst/lib/xchat/plugins/guile.la
PATH="$PATH:/sbin" ldconfig -n
/home/zeenix/downloads/xchat-guile/xchat-guile-0.3/_inst/lib/xchat/plugins

   Here are the relevant configure.ac lines:

xchatplugindir=${libdir}/xchat/plugins
AC_SUBST(xchatplugindir)

> If you rm -r /usr/share/guile/site/xchat-guile
> before starting the install, doe s the bug go away?

   No!

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: issue with GUILE_SITE_DIR m4 macro
  2009-01-25 20:44 issue with GUILE_SITE_DIR m4 macro Zeeshan Ali (Khattak)
  2009-01-25 22:04 ` Linas Vepstas
@ 2009-01-25 22:48 ` Ludovic Courtès
  2009-01-25 22:50 ` Mike Gran
  2 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2009-01-25 22:48 UTC (permalink / raw)
  To: guile-user

Hi!

"Zeeshan Ali (Khattak)" <zeenix@gmail.com> writes:

>   I am using GUILE_SITE_DIR m4 macro in xchat-guile to find out where
> should i install my guile module. It works perfectly fine except that
> `make distcheck` fails:
>
> test -z "/usr/share/guile/site/xchat-guile" || /bin/mkdir -p
> "/usr/share/guile/site/xchat-guile"
>  /usr/bin/install -c '../plugin-system.scm'
> '/usr/share/guile/site/xchat-guile/plugin-system.scm'
> /usr/bin/install: cannot create regular file
> `/usr/share/guile/site/xchat-guile/plugin-system.scm': Permission
> denied

The problem is that `GUILE_SITE_DIR' does not honor `$prefix' (leading
to the `distcheck' failure above), so it should be avoided.

I use something along the following lines in `configure.ac':

  AC_ARG_WITH([guilemoduledir],
    [use the specified installation path for Guile modules],
    [case "x$withval" in
       xyes|xno) guilemoduledir="";;
       *)        guilemoduledir="$withval";;
     esac],
    [guilemoduledir=""])

  GUILE_SITE_DIR

  if test "$guilemoduledir" != "$GUILE_SITE"; then
   # Guile won't be able to locate the module "out of the box", so
   # warn the user.
   AC_MSG_WARN([`guilemoduledir' ($guilemoduledir) is different from `GUILE_SITE' ($GUILE_SITE).])
   AC_MSG_WARN([Make sure to adjust the `GUILE_LOAD_PATH' environment variable accordingly,])
   AC_MSG_WARN([or re-run `configure' with `--with-guilemoduledir=$GUILE_SITE'.])
  fi

And then in `Makefile.am':

  dist_guilemodule_DATA = foo.scm bar.scm

Ideally, we'd modify Autoconf so that it knows about `guilemoduledir',
just like it knows about `lispdir'.

Thanks,
Ludo'.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: issue with GUILE_SITE_DIR m4 macro
  2009-01-25 20:44 issue with GUILE_SITE_DIR m4 macro Zeeshan Ali (Khattak)
  2009-01-25 22:04 ` Linas Vepstas
  2009-01-25 22:48 ` Ludovic Courtès
@ 2009-01-25 22:50 ` Mike Gran
  2 siblings, 0 replies; 6+ messages in thread
From: Mike Gran @ 2009-01-25 22:50 UTC (permalink / raw)
  To: Guile User

> From: Zeeshan Ali (Khattak) <zeenix@gmail.com>
>   I am no autotools expert but i think DESTDIR env variable is not
> getting respected. Here is my Makefile.am:

The GUILE_SITE_DIR macro in guile.m4 doesn't search for any 
DESTDIR information.

One way to keep automake happy is to install your files something 
like this:

guile_sitedir = ${datadir}/guile/site
pkgguile_sitedir = $(guile_sitedir)/$(PACKAGENAME)
pkgguile_site_DATA = foo.scm

And then in your auto* you can then compare ${guile_sitedir} 
to GUILE_SITE_DIR.

If they are not equal, you can construct a build-time warning that
says that the path of your installed scripts needs to be added to 
the Guile path.  This would be like the warning that libtool outputs 
when you install libraries in locations that are not in LD_LOAD_PATH.

I've seen it done, but, for the moment, I can't seem to find an 
example.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: issue with GUILE_SITE_DIR m4 macro
  2009-01-25 22:25   ` Zeeshan Ali (Khattak)
@ 2009-01-25 22:52     ` Linas Vepstas
  0 siblings, 0 replies; 6+ messages in thread
From: Linas Vepstas @ 2009-01-25 22:52 UTC (permalink / raw)
  To: Zeeshan Ali (Khattak); +Cc: Guile User

2009/1/25 Zeeshan Ali (Khattak) <zeenix@gmail.com>:
> Hi Linas!
>
> On Mon, Jan 26, 2009 at 12:04 AM, Linas Vepstas <linasvepstas@gmail.com> wrote:
>> Hi,
>>
>> 2009/1/25 Zeeshan Ali (Khattak) <zeenix@gmail.com>:
>>> Hi!
>>>  I am using GUILE_SITE_DIR m4 macro in xchat-guile to find out where
>>> should i install my guile module. It works perfectly fine except that
>>> `make distcheck` fails:
>>>
>>> test -z "/usr/share/guile/site/xchat-guile" || /bin/mkdir -p
>>> "/usr/share/guile/site/xchat-guile"
>>>  /usr/bin/install -c '../plugin-system.scm'
>>> '/usr/share/guile/site/xchat-guile/plugin-system.scm'
>>> /usr/bin/install: cannot create regular file
>>> `/usr/share/guile/site/xchat-guile/plugin-system.scm': Permission
>>> denied
>>
>> I don't quite understand what you are doing ..
>
>  Running `make distcheck`.

Ahh! Sorry, I misunderstood.

looks like ludo suplied an answer.
--linas




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-25 22:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-25 20:44 issue with GUILE_SITE_DIR m4 macro Zeeshan Ali (Khattak)
2009-01-25 22:04 ` Linas Vepstas
2009-01-25 22:25   ` Zeeshan Ali (Khattak)
2009-01-25 22:52     ` Linas Vepstas
2009-01-25 22:48 ` Ludovic Courtès
2009-01-25 22:50 ` Mike Gran

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).