Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Part 3: gcc/sandbox. Paluldis equivalent of FEATURES?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Mr_Grieves
n00b
n00b


Joined: 05 Mar 2007
Posts: 23

PostPosted: Sun May 04, 2008 5:58 pm    Post subject: Part 3: gcc/sandbox. Paluldis equivalent of FEATURES? Reply with quote

I've got a couple of issues going on right now, so I'll chop these posts into parts.

Recent relevant changes to my system:
1) I've been using paludis instead of portage (not sure if this makes a difference) and
2) I recently switched profiles from i686 --> amd64 (I had set it to i686 by mistake when switching to paludis). I think it is this profile change that is causing me problems, but I don't know what I need to do to fix it.

Sandbox won't compile:

Code:

FEATURES=-sandbox paludis --install sandbox
...
>>> Starting src_compile                                                                                       
 * If configure fails with a 'cannot run C compiled programs' error, try this:                                 
 * FEATURES=-sandbox emerge sandbox                                                                             
 * Configuring sandbox for ABI=x86...                                                                           
econf: updating /var/tmp/paludis/sys-apps-sandbox-1.2.18.1-r2/work/sandbox-1.2.18.1/config.guess with /usr/share/gnuconfig/config.guess
econf: updating /var/tmp/paludis/sys-apps-sandbox-1.2.18.1-r2/work/sandbox-1.2.18.1/config.sub with /usr/share/gnuconfig/config.sub   
../sandbox-1.2.18.1//configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib32 --libdir=/usr/lib32 --enable-multilib --build=i686-pc-linux-gnu                                                       
checking for a BSD-compatible install... /usr/bin/install -c                                                                                                     
checking whether build environment is sane... yes                                                                                                               
checking for gawk... gawk                                                                                                                                       
checking whether make sets $(MAKE)... yes                                                                                                                       
checking for i686-pc-linux-gnu-gcc... no                                                                                                                         
checking for gcc... gcc                                                                                                                                         
checking for C compiler default output file name... configure: error: C compiler cannot create executables


The FEATURES option didn't help with paludis, is there an equivalent for it? GCC bails out the same way:
Code:

# FEATURES="-sandbox" paludis --install gcc
...
>>> Starting pkg_setup                                                                                         
 * Sandbox in your installed portage does not support compilation.                                             
 * of a multilib gcc.   Please set FEATURES=-sandbox and try again.                                             
 * After you have a multilib gcc, re-emerge portage to have a working sandbox.         


Any ideas?
_________________
IRC Mr_Grieves
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Sun May 04, 2008 8:54 pm    Post subject: Reply with quote

Moved from Other Things Gentoo to Unsupported Software.

Was the system using an amd64 profile prior to configuring paludis?
Back to top
View user's profile Send private message
Mr_Grieves
n00b
n00b


Joined: 05 Mar 2007
Posts: 23

PostPosted: Sun May 04, 2008 8:59 pm    Post subject: Reply with quote

Yes; with portage it was correctly set up with amd64
_________________
IRC Mr_Grieves
Back to top
View user's profile Send private message
creidiki
Apprentice
Apprentice


Joined: 23 Mar 2007
Posts: 283
Location: Varese (Italy)

PostPosted: Sun May 04, 2008 9:12 pm    Post subject: Reply with quote

I'm not sure, but I think there's info in the FAQ on how to disable sandbox.
_________________
'((eINIT) (soor overlay))
Back to top
View user's profile Send private message
Mr_Grieves
n00b
n00b


Joined: 05 Mar 2007
Posts: 23

PostPosted: Sun May 04, 2008 9:20 pm    Post subject: Reply with quote

Thanks for the tip!

The FAQ does have some info:

Quote:
Sandbox Violations when ROOT is Set

Various packages will give sandbox violations when installing to somewhere other than /.

Paludis enforces ROOT via Sandbox. However, some packages don't honour ROOT. To temporarily disable sandbox for these packages, set SANDBOX_PREDICT=/ or SANDBOX_WRITE=/ as appropriate.


Since giving a process write permission to / makes me a tad nervous, can someone confirm which variables need to be set for this situation? Or if this is the right route to take?

Dave
_________________
IRC Mr_Grieves
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3065
Location: Korea

PostPosted: Mon May 05, 2008 5:33 pm    Post subject: Reply with quote

You might work around this issue by:

Code:
paludis --uninstall --permit-unsafe-uninstalls sandbox &&
paludis -i1 gcc &&
paludis -i1 sandbox
Back to top
View user's profile Send private message
Mr_Grieves
n00b
n00b


Joined: 05 Mar 2007
Posts: 23

PostPosted: Mon May 05, 2008 7:38 pm    Post subject: Reply with quote

Tried it, got errors:

Code:

# paludis --uninstall --permit-unsafe-uninstalls sandbox &&                                                                                       
> paludis -i1 gcc &&                                                                                                                                             
> paludis -i1 sandbox                                                                                                                                           
Building unmerge list... done                                                                                                                                   

These packages will be uninstalled:

* sys-apps/sandbox-1.2.18.1-r2::installed


Total: 1 package

Updating world file

* removing sys-apps/sandbox


(1 of 1) Uninstalling sys-apps/sandbox-1.2.18.1-r2::installed

>>> Running ebuild phase killoldrm as root:root...
bunzip2 < /var/db/pkg/sys-apps/sandbox-1.2.18.1-r2/environment.bz2 > /var/tmp/paludis/environment-sys-apps-sandbox-1.2.18.1-r2-22090
ebuild_scrub_environment /var/tmp/paludis/environment-sys-apps-sandbox-1.2.18.1-r2-22090                                           
ebuild_safe_source /var/tmp/paludis/environment-sys-apps-sandbox-1.2.18.1-r2-22090                                                 
rm /var/tmp/paludis/environment-sys-apps-sandbox-1.2.18.1-r2-22090                                                                 
>>> Starting builtin_killoldrm                                                                                                     
>>> Done builtin_killoldrm                                                                                                         
>>> Completed ebuild phase killoldrm                                                                                               
>>> Running ebuild phases initrm prerm saveenv as root:root...                                                                     
bunzip2 < /var/db/pkg/sys-apps/sandbox-1.2.18.1-r2/environment.bz2 > /var/tmp/paludis/environment-sys-apps-sandbox-1.2.18.1-r2-22140
ebuild_scrub_environment /var/tmp/paludis/environment-sys-apps-sandbox-1.2.18.1-r2-22140                                           
ebuild_safe_source /var/tmp/paludis/environment-sys-apps-sandbox-1.2.18.1-r2-22140                                                 
rm /var/tmp/paludis/environment-sys-apps-sandbox-1.2.18.1-r2-22140                                                                 
>>> Starting builtin_initrm                                                                                                         
>>> Done builtin_initrm                                                                                                             
>>> Starting pkg_prerm                                                                                                             
>>> Done pkg_prerm                                                                                                                 
>>> Starting builtin_saveenv                                                                                                       
>>> Done builtin_saveenv                                                                                                           
>>> Completed ebuild phases initrm prerm saveenv                                                                                   
<<<         /var/log/sandbox/.keep_sys-apps_sandbox-0                                                                               
--- [!empt] /var/log/sandbox                                                                                                       
--- [!empt] /var/log                                                                                                               
--- [!empt] /var                                                                                                                   
<<<         /usr/share/sandbox/sandbox.bashrc                                                                                       
<<<         /usr/share/sandbox                                                                                                     
<<<         /usr/share/doc/sandbox-1.2.18.1-r2/ChangeLog                                                                           
<<<         /usr/share/doc/sandbox-1.2.18.1-r2/AUTHORS                                                                             
--- [!empt] /usr/share/doc/sandbox-1.2.18.1-r2                                                                                     
--- [!empt] /usr/share/doc                                                                                                         
--- [!empt] /usr/share                                                                                                             
<<<         /usr/lib64/libsandbox.so.0.0.0                                                                                         
<<<         /usr/lib64/libsandbox.so.0                                                                                             
<<<         /usr/lib64/libsandbox.so                                                                                               
<<<         /usr/lib64/libsandbox.la                                                                                               
<<<         /usr/lib64/debug/usr/lib/libsandbox.so.0.0.0.debug                                                                     
--- [!empt] /usr/lib64/debug/usr/lib                                                                                               
<<<         /usr/lib64/debug/usr/bin/sandbox.debug                                                                                 
--- [!empt] /usr/lib64/debug/usr/bin                                                                                               
--- [!empt] /usr/lib64/debug/usr                                                                                                   
--- [!empt] /usr/lib64/debug                                                                                                       
--- [!empt] /usr/lib64                                                                                                             
--- [!type] /usr/lib                                                                                                               
<<<         /usr/bin/sandbox                                                                                                       
--- [!empt] /usr/bin                                                                                                               
--- [!empt] /usr                                                                                                                   
>>> Running ebuild phases loadenv postrm tidyuprm as root:root...                                                                   
bunzip2 < /var/db/pkg/sys-apps/sandbox-1.2.18.1-r2/environment.bz2 > /var/tmp/paludis/environment-sys-apps-sandbox-1.2.18.1-r2-22211
ebuild_scrub_environment /var/tmp/paludis/environment-sys-apps-sandbox-1.2.18.1-r2-22211                                           
ERROR: ld.so: object '/usr/lib/libsandbox.so' from LD_PRELOAD cannot be preloaded: ignored.                                         
ebuild_safe_source /var/tmp/paludis/environment-sys-apps-sandbox-1.2.18.1-r2-22211                                                 
rm /var/tmp/paludis/environment-sys-apps-sandbox-1.2.18.1-r2-22211                                                                 
>>> Starting builtin_loadenv                                                                                                       
>>> Done builtin_loadenv                                                                                                           
>>> Starting pkg_postrm                                                                                                             
>>> Done pkg_postrm                                                                                                                 
>>> Starting builtin_tidyuprm                                                                                                       
rm -fr /var/tmp/paludis/sys-apps-sandbox-1.2.18.1-r2-uninstall                                                                     
>>> Done builtin_tidyuprm                                                                                                           
>>> Completed ebuild phases loadenv postrm tidyuprm                                                                                 

 * Regenerating environment...
Regenerating //etc/ld.so.cache...
ldconfig: /usr/lib/libnvidia-cfg.so.1 is not a symbolic link

 * Done regenerating environment

 * Checking whether the GNU info directory needs updating...
 * Updating directory //usr/share/info...                   
 * Processed 249 info files                                 

Building target list... paludis@1210011403: [WARNING e.vdb.provides.no_package] In program paludis -i1 gcc:
  ... When performing install action from command line:                                                   
  ... When adding install target 'gcc':                                                                   
  ... When disambiguating package name 'gcc':                                                             
  ... When finding category names containing package 'gcc':                                               
  ... When loading names for virtuals repository:                                                         
  ... When finding provided packages for 'installed':                                                     
  ... No package available for 'sys-fs/udev 115-r1'                                                       

Building dependency list...

These packages will be installed:

* sys-apps/sandbox [N 1.2.18.1-r2]
    "sandbox'd LD_PRELOAD hack"   
    231.21 kBytes to download     
* sys-devel/gcc :4.1 [R 4.1.2] <target>
    (-altivec) -bootstrap -build -d -doc fortran gcj -gtk (-hardened) -ip28 -ip32r10k -libffi+ mudflap (-multilib) -multislot (-n32) (-n64) nls -nocxx -objc -objc++ -objc-gc -test -vanilla                                                                                                                                     
    37.94 MBytes to download                                                                                                                                     

Total: 2 packages (1 new, 1 rebuild), at most 38.16 MBytes to download

Use flags:

* libffi:          Build the portable foreign function interface library

(1 of 2) Installing sys-apps/sandbox-1.2.18.1-r2:0::gentoo

paludis@1210011415: [WARNING e.ebuild.userpriv_disabled] In program paludis -i1 gcc:
  ... When performing install action from command line:                             
  ... When executing install task:                                                 
  ... When fetching 'sys-apps/sandbox-1.2.18.1-r2:0::gentoo':                       
  ... When checking permissions on '/usr/portage/distfiles' for userpriv:           
  ... Directory '/usr/portage/distfiles' owned by group 'portage', not 'paludisbuild', so cannot enable userpriv
Trying to fetch 'ftp://mirror.datapipe.net/gentoo/sandbox-1.2.18.1.tar.bz2' to 'sandbox-1.2.18.1.tar.bz2'...   
wget -T 30 -t 1 --continue -O /usr/portage/distfiles/sandbox-1.2.18.1.tar.bz2.-PARTIAL- ftp://mirror.datapipe.net/gentoo/sandbox-1.2.18.1.tar.bz2
--13:16:55--  ftp://mirror.datapipe.net/gentoo/sandbox-1.2.18.1.tar.bz2                                                                         
           => `/usr/portage/distfiles/sandbox-1.2.18.1.tar.bz2.-PARTIAL-'                                                                       
Resolving mirror.datapipe.net... 64.27.65.115                                                                                                   
Connecting to mirror.datapipe.net|64.27.65.115|:21... connected.                                                                                 
Logging in as anonymous ... Logged in!                                                                                                           
==> SYST ... done.    ==> PWD ... done.                                                                                                         
==> TYPE I ... done.  ==> CWD /gentoo ... done.                                                                                                 
==> PASV ... done.    ==> RETR sandbox-1.2.18.1.tar.bz2 ...                                                                                     
No such file `sandbox-1.2.18.1.tar.bz2'.                                                                                                         

Trying to fetch 'ftp://cudlug.cudenver.edu/gentoo/distfiles/sandbox-1.2.18.1.tar.bz2' to 'sandbox-1.2.18.1.tar.bz2'...
 * Not attempting resume using /usr/portage/distfiles/sandbox-1.2.18.1.tar.bz2.-PARTIAL- (too small)                 
rm -f /usr/portage/distfiles/sandbox-1.2.18.1.tar.bz2.-PARTIAL-                                                       
wget -T 30 -t 1 --continue -O /usr/portage/distfiles/sandbox-1.2.18.1.tar.bz2.-PARTIAL- ftp://cudlug.cudenver.edu/gentoo/distfiles/sandbox-1.2.18.1.tar.bz2
--13:16:56--  ftp://cudlug.cudenver.edu/gentoo/distfiles/sandbox-1.2.18.1.tar.bz2                                                                         
           => `/usr/portage/distfiles/sandbox-1.2.18.1.tar.bz2.-PARTIAL-'                                                                                 
Resolving cudlug.cudenver.edu... 132.194.22.137                                                                                                           
Connecting to cudlug.cudenver.edu|132.194.22.137|:21... connected.                                                                                         
Logging in as anonymous ... Logged in!                                                                                                                     
==> SYST ... done.    ==> PWD ... done.                                                                                                                   
==> TYPE I ... done.  ==> CWD /gentoo/distfiles ... done.                                                                                                 
==> PASV ... done.    ==> RETR sandbox-1.2.18.1.tar.bz2 ... done.                                                                                         
Length: 236,755 (231K) (unauthoritative)                                                                                                                   

100%[=====================================================================================================================>] 236,755       82.71K/s             

13:17:01 (82.48 KB/s) - `/usr/portage/distfiles/sandbox-1.2.18.1.tar.bz2.-PARTIAL-' saved [236755]

mv -f /usr/portage/distfiles/sandbox-1.2.18.1.tar.bz2.-PARTIAL- /usr/portage/distfiles/sandbox-1.2.18.1.tar.bz2
Checking 'sandbox-1.2.18.1.tar.bz2'... ok                                                                     
paludis@1210011421: [WARNING e.ebuild.userpriv_disabled] In program paludis -i1 gcc:                           
  ... When performing install action from command line:                                                       
  ... When executing install task:                                                                             
  ... When installing 'sys-apps/sandbox-1.2.18.1-r2:0::gentoo':
  ... When checking permissions on '/usr/portage/distfiles' for userpriv:
  ... Directory '/usr/portage/distfiles' owned by group 'portage', not 'paludisbuild', so cannot enable userpriv
>>> Running ebuild phase killold as root:root...
>>> Starting builtin_killold
>>> Done builtin_killold
>>> Completed ebuild phase killold
sh: sandbox: command not found

Install error:
  * In program paludis -i1 gcc:
  * When performing install action from command line:
  * When executing install task:
  * When installing 'sys-apps/sandbox-1.2.18.1-r2:0::gentoo':
  * Install error: Install failed for 'sys-apps/sandbox-1.2.18.1-r2:0::gentoo'



Summary of failures:

* sys-apps/sandbox-1.2.18.1-r2:0::gentoo: failure

Total: 2 packages, 0 successes, 0 skipped, 1 failure, 1 unreached

Resume command: paludis --log-level qa --preserve-world --install --serialised 0.25 'package;=sys-apps/sandbox-1.2.18.1-r2:0::gentoo;installed;has_all_deps;P' 'package;=sys-devel/gcc-4.1.2:4.1::gentoo;installed;has_all_deps;P'

 * No unread news items found

 * Searching for configuration files requiring action...
 * Found 10 files in /etc
 * Found files in 1 directories
 * Your action is required


I think I need to set either SANDBOX_PREDICT=/ or SANDBOX_WRITE=/ ,but I'm not really sure what either does or if it would screw things up worse...
_________________
IRC Mr_Grieves
Back to top
View user's profile Send private message
Mr_Grieves
n00b
n00b


Joined: 05 Mar 2007
Posts: 23

PostPosted: Mon May 05, 2008 9:22 pm    Post subject: Reply with quote

I've tried both, but after uninstalling sandbox I can't install anything.

Help?
_________________
IRC Mr_Grieves
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3065
Location: Korea

PostPosted: Mon May 05, 2008 11:35 pm    Post subject: Reply with quote

The easy way to get sandbox back is to go to www.funtoo.org and scroll down to the part about stage tarballs. Pick which arch you have and download an up-to-date tarball and unpack it.


But a quicker way would be to compile/install a copy of sandbox manually Then you can use paludis to install the same new version of sandbox (and once that's done you can uninstall the one you installed manually).

So this would entail:
1) unpacking newest sources for sandbox
2) cd to the unpacked directory
3) ./configure
4) make
5) su to root
6) make install
now you should have sandbox installed but it'll be in /usr/local rather than where portage/paludis install it
7) Now do "paludis -i1 sandbox"
8) And now do "make uninstall" to remove the extra sandbox
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Tue May 06, 2008 5:21 am    Post subject: Reply with quote

slycordinator wrote:
The easy way to get sandbox back is to go to www.funtoo.org and scroll down to the part about stage tarballs. Pick which arch you have and download an up-to-date tarball and unpack it.
Do not unpack a stage tarball over an existing system, any system sufficiently broken to justify trying that approach should be reinstalled, otherwise (at very least) expect there to be files orphaned in the process.
slycordinator wrote:
But a quicker way would be to compile/install a copy of sandbox manually Then you can use paludis to install the same new version of sandbox (and once that's done you can uninstall the one you installed manually).
If portage is still present on the system, there is an even faster way to install sandbox. Download a copy from tinderbox place it in PKGDIR/All then emerge -K sys-apps/sandbox.
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3065
Location: Korea

PostPosted: Tue May 06, 2008 3:37 pm    Post subject: Reply with quote

Well if portage is still available he could just do "emerge sandbox"
Back to top
View user's profile Send private message
code933k
n00b
n00b


Joined: 30 Aug 2007
Posts: 52

PostPosted: Fri Jun 06, 2008 5:57 am    Post subject: Reply with quote

slycordinator wrote:
Well if portage is still available he could just do "emerge sandbox"


That would do a mess because of paludis lack of compatibility.
Also if he uses Paludis why should need to use emerge?

First of all: FEATURES has no parallel in paludis and isn't really needed there.
Secondly: This simple snippet at $PALUDIS_DIR/bashrc
will solve all your problems hopefully.
Code:

case "${CATEGORY}/${PN}" in
         sys-apps/sandbox )
         export SANDBOX_PREDICT=/
         ;;
 esac

That's all. Regards.
_________________
If gods were created by language then praying is an infinite loop.
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3065
Location: Korea

PostPosted: Fri Jun 06, 2008 2:02 pm    Post subject: Reply with quote

code933k wrote:
slycordinator wrote:
Well if portage is still available he could just do "emerge sandbox"


That would do a mess because of paludis lack of compatibility.


If that were true, then people wouldn't be able do it all the time.

All it usually takes (meaning all it took every time I and anyone else I've known) to use paludis after installing something inside portage is to regenerate your caches.

Quote:
Also if he uses Paludis why should need to use emerge?


Because paludis requires using sandbox (fails to install each package when it doesn't exist) whereas portage/emerge simply installs stuff without sandbox if you don't have it.
Back to top
View user's profile Send private message
code933k
n00b
n00b


Joined: 30 Aug 2007
Posts: 52

PostPosted: Sun Jun 08, 2008 9:03 am    Post subject: Reply with quote

slycordinator wrote:
code933k wrote:
slycordinator wrote:
Well if portage is still available he could just do "emerge sandbox"


That would do a mess because of paludis lack of compatibility.


If that were true, then people wouldn't be able do it all the time.

All it usually takes (meaning all it took every time I and anyone else I've known) to use paludis after installing something inside portage is to regenerate your caches.

Quote:
Also if he uses Paludis why should need to use emerge?


Because paludis requires using sandbox (fails to install each package when it doesn't exist) whereas portage/emerge simply installs stuff without sandbox if you don't have it.

I don't know what is really your point there. Anyway I do mention the cause and the solution.
And hope he can get ride of his troubles in a clean/correct way as I -personally- don't like shortcuts or workarounds.

Regards.

PS:// You are right in one thing. Paludis defaults sandbox always on and that isn't a problem in recent versions.
Indeed If I really liked no sandboxing at all I would be using Source Mage ;)
_________________
If gods were created by language then praying is an infinite loop.
Back to top
View user's profile Send private message
slycordinator
Advocate
Advocate


Joined: 31 Jan 2004
Posts: 3065
Location: Korea

PostPosted: Sun Jun 08, 2008 6:11 pm    Post subject: Reply with quote

code933k wrote:

I don't know what is really your point there. Anyway I do mention the cause and the solution.
And hope he can get ride of his troubles in a clean/correct way as I -personally- don't like shortcuts or workarounds.


My point is you were making a dubious statement in saying that using portage alongside paludis would cause "a mess" when in fact it would do little at all.

And to the OP if use code933k's solution, make sure to remove that config file entry after reinstalling sandbox. You're essentially disabling sanboxing for sandbox itself, which is what you'd want to do just this once.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum