public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] [OT] Ebuild with scons and sandbox
@ 2005-08-16  9:57 Nagatoro
  2005-08-16 10:14 ` Zac Medico
  2005-08-17 11:43 ` [gentoo-user] " Andreas Fredriksson
  0 siblings, 2 replies; 7+ messages in thread
From: Nagatoro @ 2005-08-16  9:57 UTC (permalink / raw
  To: gentoo-user

Hi,

First off, I'm sorry if this is the wrong place to ask!

I'm trying to write an ebuild for linuxdcpp (a gtk port of DC++). This 
nice app uses scons and not make as the build tool. When I build it 
manually it works just fine, but when I try to build it with emerge (or 
ebuild) I get this:
Code:

scons: done building targets.
ACCESS DENIED  open_wr:   /usr/include/gtk-2.0/gtk/.scons25064
ACCESS DENIED  open_wr:   /usr/include/gtk-2.0/gtk/.sconsign
ACCESS DENIED  open_wr:   /usr/include/libglade-2.0/glade/.scons25064
ACCESS DENIED  open_wr:   /usr/include/libglade-2.0/glade/.sconsign
ACCESS DENIED  open_wr:   /usr/include/gtk-2.0/gdk/.scons25064
ACCESS DENIED  open_wr:   /usr/include/gtk-2.0/gdk/.sconsign
ACCESS DENIED  open_wr:   /usr/include/glib-2.0/.scons25064
ACCESS DENIED  open_wr:   /usr/include/glib-2.0/.sconsign
ACCESS DENIED  open_wr:   /usr/include/atk-1.0/atk/.scons25064
ACCESS DENIED  open_wr:   /usr/include/atk-1.0/atk/.sconsign
ACCESS DENIED  open_wr:   /usr/include/pango-1.0/pango/.scons25064
ACCESS DENIED  open_wr:   /usr/include/pango-1.0/pango/.sconsign
ACCESS DENIED  open_wr:   /usr/include/gtk-2.0/gdk-pixbuf/.scons25064
ACCESS DENIED  open_wr:   /usr/include/gtk-2.0/gdk-pixbuf/.sconsign
ACCESS DENIED  open_wr:   /usr/include/glib-2.0/glib/.scons25064
ACCESS DENIED  open_wr:   /usr/include/glib-2.0/glib/.sconsign
ACCESS DENIED  open_wr:   /usr/lib/gtk-2.0/include/.scons25064
ACCESS DENIED  open_wr:   /usr/lib/gtk-2.0/include/.sconsign
ACCESS DENIED  open_wr:   /usr/include/glib-2.0/gobject/.scons25064
ACCESS DENIED  open_wr:   /usr/include/glib-2.0/gobject/.sconsign
ACCESS DENIED  open_wr:   /usr/lib/glib-2.0/include/.scons25064
ACCESS DENIED  open_wr:   /usr/lib/glib-2.0/include/.sconsign
bzip2: Output file environment.bz2 already exists.
--------------------------- ACCESS VIOLATION SUMMARY 
---------------------------
LOG FILE = "/var/log/sandbox/sandbox-net-p2p_-_dcpp-0.9999-25040.log"
[...]
--------------------------------------------------------------------------------

it seems to me like scons is littering the filesystem with somesort of 
lock files but I've been unable to find any information on this. Does 
anyone know how I can prevent scons from trying to make these files or 
how I can fool scons into thinking that it could?

-- 
Naga
-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] [OT] Ebuild with scons and sandbox
  2005-08-16  9:57 [gentoo-user] [OT] Ebuild with scons and sandbox Nagatoro
@ 2005-08-16 10:14 ` Zac Medico
  2005-08-16 10:45   ` Nagatoro
  2005-08-17 11:43 ` [gentoo-user] " Andreas Fredriksson
  1 sibling, 1 reply; 7+ messages in thread
From: Zac Medico @ 2005-08-16 10:14 UTC (permalink / raw
  To: gentoo-user

Nagatoro wrote:
> Hi,
> 
> First off, I'm sorry if this is the wrong place to ask!
> 
> I'm trying to write an ebuild for linuxdcpp (a gtk port of DC++). This 
> nice app uses scons and not make as the build tool. When I build it 
> manually it works just fine, but when I try to build it with emerge (or 
> ebuild) I get this:
> Code:
> 
> scons: done building targets.
> ACCESS DENIED  open_wr:   /usr/include/gtk-2.0/gtk/.scons25064
[snip]
> 
> it seems to me like scons is littering the filesystem with somesort of 
> lock files but I've been unable to find any information on this. Does 
> anyone know how I can prevent scons from trying to make these files or 
> how I can fool scons into thinking that it could?
> 

Maybe you can configure the build so that it won't write outside of the sandbox.  If you post your ebuild then we might be able to help.

Zac
-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] [OT] Ebuild with scons and sandbox
  2005-08-16 10:14 ` Zac Medico
@ 2005-08-16 10:45   ` Nagatoro
  2005-08-16 11:25     ` Zac Medico
  0 siblings, 1 reply; 7+ messages in thread
From: Nagatoro @ 2005-08-16 10:45 UTC (permalink / raw
  To: gentoo-user

Zac Medico wrote:
> Maybe you can configure the build so that it won't write outside of the 
> sandbox.  If you post your ebuild then we might be able to help.

Here it is:
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils cvs

DESCRIPTION="A gtk port of DC++, using the unmodified DC++ core"
HOMEPAGE="linuxdcpp.berlios.de"
SRC_URI=""

LICENSE="GPL"
SLOT="0"
KEYWORDS="x86"
IUSE=""

RDEPEND="virtual/x11
	>=x11-libs/gtk+-2.4.0
	>=gnome-base/libglade-2.4.0
	sys-libs/zlib"

# Haven't found where these live yet
# pthread
# libbz2

DEPEND="${RDEPEND}
	dev-util/scons
	>=sys-devel/gcc-3.4.0"


ECVS_SERVER="cvs.linuxdcpp.berlios.de:/cvsroot/linuxdcpp"
ECVS_MODULE="linuxdcpp"

S="${WORKDIR}/linuxdcpp"

src_unpack() {
	cvs_src_unpack
}

src_compile() {
# Waring message "borrowed" from the enlightenment.eclass
# by vapier@gentoo.org
         eerror "This is a LIVE CVS ebuild."
         eerror "That means there are NO promises it will work."
         eerror "If it fails to build, FIX THE CODE YOURSELF"
         eerror "before reporting any issues."

	scons release=1 || die "scons failed"
}

src_install() {
	INTO="/usr/local/lib/dcpp"
	exeinto ${INTO}/
	doexe dcpp || die "Couldn't copy the binary"
#	docsinto ${INTO}
	dodoc *.txt
	insinto ${INTO}/pixmaps/
	doins pixmaps/* || die "Couldn't copy the icons"
	insinto ${INTO}/glade/
	doins glade/* || die
	dodir /usr/local/bin
	dosym ${INTO}/dcpp /usr/local/bin/dcpp
}


-- 
Naga
-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] [OT] Ebuild with scons and sandbox
  2005-08-16 10:45   ` Nagatoro
@ 2005-08-16 11:25     ` Zac Medico
  2005-08-16 14:01       ` Nagatoro
  0 siblings, 1 reply; 7+ messages in thread
From: Zac Medico @ 2005-08-16 11:25 UTC (permalink / raw
  To: gentoo-user

Nagatoro wrote:
> src_compile() {
> # Waring message "borrowed" from the enlightenment.eclass
> # by vapier@gentoo.org
>         eerror "This is a LIVE CVS ebuild."
>         eerror "That means there are NO promises it will work."
>         eerror "If it fails to build, FIX THE CODE YOURSELF"
>         eerror "before reporting any issues."
> 
>     scons release=1 || die "scons failed"
> }

If you run "equery depends -a scons" and read some of those ebuilds you'll see something like this:

scons DESTDIR=${D}

See the explanation of ${D} in the ebuild(5) manpage.  That helps keep you inside the sandbox.

Zac
-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] [OT] Ebuild with scons and sandbox
  2005-08-16 11:25     ` Zac Medico
@ 2005-08-16 14:01       ` Nagatoro
  2005-08-16 19:21         ` Zac Medico
  0 siblings, 1 reply; 7+ messages in thread
From: Nagatoro @ 2005-08-16 14:01 UTC (permalink / raw
  To: gentoo-user

Zac Medico wrote:
> If you run "equery depends -a scons" and read some of those ebuilds 
> you'll see something like this:
> 
> scons DESTDIR=${D}
> 
> See the explanation of ${D} in the ebuild(5) manpage.  That helps keep 
> you inside the sandbox.

Thanks for the tip. It led me to a way off getting the paths mention in 
the error message (so I can prevent them...) but the DESTDIR=${D} only 
seems to be valid for scons install and not just scons (ie the compile).

The problem now is that gtk-config and glib-config always returns the 
1.x version and not the 2.x version I need.

Here's a hackish way I managed to put together,
---
# This is a hack to be able to dynamically determine which directories
# scons will try to create .scons* files in.
get_config() {
     for lib in `grep "ParseConfig('pkg-config"  SConstruct |
         tr "'" ' ' | cut -d" " -f   5- | tr ')' ' '`; do
             echo `pkg-config --libs --cflags ${lib} | tr ' ' '\n' |
             grep -E -- '-L|-I' | cut -c 3-`
     done
}

addpredict_from_config() {
     for i in $(get_config); do
         echo "addpredict ${i}"
         addpredict ${i}
     done;
}
---

Any sugestions as to I might do this abit cleaner?

-- 
Naga
-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] [OT] Ebuild with scons and sandbox
  2005-08-16 14:01       ` Nagatoro
@ 2005-08-16 19:21         ` Zac Medico
  0 siblings, 0 replies; 7+ messages in thread
From: Zac Medico @ 2005-08-16 19:21 UTC (permalink / raw
  To: gentoo-user

Nagatoro wrote:
> 
> The problem now is that gtk-config and glib-config always returns the 
> 1.x version and not the 2.x version I need.
> 

I'm not sure about that.  Have you searched to see how it's done with other gtk/glib dependent ebuilds?  For quick questions, if you don't make too much noise, you may be able to get some help on irc.freenode.net in #gentoo-portage.

Zac
-- 
gentoo-user@gentoo.org mailing list



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

* [gentoo-user] Re: Ebuild with scons and sandbox
  2005-08-16  9:57 [gentoo-user] [OT] Ebuild with scons and sandbox Nagatoro
  2005-08-16 10:14 ` Zac Medico
@ 2005-08-17 11:43 ` Andreas Fredriksson
  1 sibling, 0 replies; 7+ messages in thread
From: Andreas Fredriksson @ 2005-08-17 11:43 UTC (permalink / raw
  To: gentoo-user

On 8/16/05, Nagatoro <nagatoro@gmail.com> wrote:
> Hi,
> 
> First off, I'm sorry if this is the wrong place to ask!
> 
> I'm trying to write an ebuild for linuxdcpp (a gtk port of DC++). This 
> nice app uses scons and not make as the build tool. When I build it 
> manually it works just fine, but when I try to build it with emerge (or 
> ebuild) I get this:
> Code:
> 
> scons: done building targets.
> ACCESS DENIED  open_wr:   /usr/include/gtk-2.0/gtk/.scons25064

[ SNIP ]

> it seems to me like scons is littering the filesystem with somesort of 
> lock files but I've been unable to find any information on this. Does 
> anyone know how I can prevent scons from trying to make these files or 
> how I can fool scons into thinking that it could?

I'm a SCons user so maybe I can shed some light on the issue. SCons
uses content signatures rather than time stamps by default, that is it
detects file changes by accumulating MD5 signatures of preprocessed
data (i.e. with dependencies).

This doesn't work very well on directories such as /usr, but SCons
suppresses these errors by default since it's a normal situation on
UNIX-like systems.

The usual way is to move the include paths from SCons' CPPPATH
construction variable to the CXXFLAGS (or CCFLAGS). This way SCons
doesn't get to see the directories and therefore ignores the files
during the dependency scan.

You can also change the target signatures method to use time stamps
ranther than content stamps.

A good resource for making these modifications would be the scons site
at www.scons.org and the wiki on the same site which has lots of
information.

Regards,
Andreas
-- 
And I hate redundancy, and having different functions for the same thing.
        - Linus Torvalds on linux-kernel

-- 
gentoo-user@gentoo.org mailing list



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

end of thread, other threads:[~2005-08-17 11:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-16  9:57 [gentoo-user] [OT] Ebuild with scons and sandbox Nagatoro
2005-08-16 10:14 ` Zac Medico
2005-08-16 10:45   ` Nagatoro
2005-08-16 11:25     ` Zac Medico
2005-08-16 14:01       ` Nagatoro
2005-08-16 19:21         ` Zac Medico
2005-08-17 11:43 ` [gentoo-user] " Andreas Fredriksson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox