Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 564830 - Android prefix
Summary: Android prefix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-03 19:44 UTC by info
Modified: 2015-11-05 00:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description info 2015-11-03 19:44:15 UTC
On the one plus two, after copying the preface to the /data folder and executing the /startprefix the following error is received:

root@OnePlus2:/data/gentoo # ./startprefix
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Failed to find the Prefix shell, this is probably
because you didn't emerge the shell tmp-mksh
Comment 1 Benda Xu gentoo-dev 2015-11-04 07:51:45 UTC
Could you please show what is inside LD_PRELOAD?

echo $LD_PRELOAD


also try without LD_PRELOAD

unset LD_PRELOAD; ./startprefix
Comment 2 info 2015-11-04 11:41:30 UTC
echo $LD_PRELOAD:
libsigchain.so:libNimsWrap.so

unset LD_PRELOAD; ./startprefix:
Failed to find the Prefix shell, this is probably
because you didn't emerge the shell tmp-mksh

It's still not be able to find the shell.
Comment 3 info 2015-11-04 15:06:58 UTC
It seems that my phone runs a mksh shell. For what I understand the gentoo prefix does not have this shell installed and because of that. It fails. Is it possible to  launch it as an other shell.
Comment 4 Benda Xu gentoo-dev 2015-11-04 15:16:55 UTC
(In reply to info from comment #3)
> It seems that my phone runs a mksh shell. For what I understand the gentoo
> prefix does not have this shell installed and because of that. It fails. Is
> it possible to  launch it as an other shell.

saw your paste at

  http://pastie.org/pastes/9933616#4,6,8-9,87-88

+ [[ /tmp-mksh/tmp-mksh != /tmp-mksh/tmp-mksh ]]
+ SHELL=tmp-mksh
+ export SHELL=/data/gentoo/bin/tmp-mksh
+ SHELL=/data/gentoo/bin/tmp-mksh
+ [[ ! -x /data/gentoo/bin/tmp-mksh ]]
+ echo 'Failed to find the Prefix shell, this is probably'
Failed to find the Prefix shell, this is probably
+ echo 'because you didn'\''t emerge the shell tmp-mksh'
because you didn't emerge the shell tmp-mksh
+ exit -1

So what is the output of

  echo $SHELL

try,

  unset LD_PRELOAD; SHELL=/data/gentoo/bin/bash; export SHELL; ./startprefix
Comment 5 info 2015-11-04 15:22:49 UTC
echo $SHELL:
/tmp-mksh/tmp-mksh

unset LD_PRELOAD; SHELL=/data/gentoo/bin/bash; export SHELL; ./startprefix:


130|root@OnePlus2:/data/gentoo # cd /data/gentoo/                              
 unset LD_PRELOAD; SHELL=/data/gentoo/bin/bash; export SHELL; ./startprefix:
You appear to be in prefix already (SHELL=/data/gentoo/bin/bash)

Then he complains that I'm already am in the shell (no big surprise, i just switched to it). 

My phone does not have bash installed. It's not in the /system/bin/. Maybe that has something to do with it.
Comment 6 info 2015-11-04 15:26:19 UTC
When I first switch manual to the shell and then execute:

 [[ -n ${PROFILEREAD} ]] && DOPROFILEREAD="PROFILEREAD=${PROFILEREAD}"
/data/gentoo/usr/bin/env -i HOME=$HOME TERM=$TERM USER=$USER SHELL=$SHELL $DOPROFILEREAD $SHELL -l 


gentoo is launched but I'm not sure if everything is working. When I try to emerge vim I get:

!!! Repository 'x-portage' is missing masters attribute in '/data/gentoo/usr/portage/metadata/layout.conf'
!!! Set 'masters = gentoo_prefix' in this file for future compatibility
!!! Unable to parse profile: '/data/gentoo/etc/portage/make.profile'
!!! ParseError: Parent '/data/gentoo/usr/portage/profiles/default/linux/arm/13.0/armv7a' not found: '/data/gentoo/var/lib/layman/heroxbd/profiles/default/linux/arm/13.0/armv7a/rap/parent'
!!! Your current profile is invalid. If you have just changed your profile
!!! configuration, you should revert back to the previous configuration.
!!! Allowed actions are limited to --help, --info, --search, --sync, and
!!! --version.
Comment 7 info 2015-11-04 15:26:40 UTC
When I first switch manual to the shell and then execute:

 [[ -n ${PROFILEREAD} ]] && DOPROFILEREAD="PROFILEREAD=${PROFILEREAD}"
/data/gentoo/usr/bin/env -i HOME=$HOME TERM=$TERM USER=$USER SHELL=$SHELL $DOPROFILEREAD $SHELL -l 


gentoo is launched but I'm not sure if everything is working. When I try to emerge vim I get:

!!! Repository 'x-portage' is missing masters attribute in '/data/gentoo/usr/portage/metadata/layout.conf'
!!! Set 'masters = gentoo_prefix' in this file for future compatibility
!!! Unable to parse profile: '/data/gentoo/etc/portage/make.profile'
!!! ParseError: Parent '/data/gentoo/usr/portage/profiles/default/linux/arm/13.0/armv7a' not found: '/data/gentoo/var/lib/layman/heroxbd/profiles/default/linux/arm/13.0/armv7a/rap/parent'
!!! Your current profile is invalid. If you have just changed your profile
!!! configuration, you should revert back to the previous configuration.
!!! Allowed actions are limited to --help, --info, --search, --sync, and
!!! --version.
Comment 8 info 2015-11-04 15:31:45 UTC
woops forgot to sync.
now it works.

But anyways. This leaves us with a complicated way to start the prefix. I don't quite understand why the prefix tries to search for the same shell as you're currently in. Is this really necessary?
Comment 9 info 2015-11-04 15:57:26 UTC
Another thing is. I cant execute passwd and shutdown commands. -bash: shutdown: command not found.
Is this normal?
Comment 10 info 2015-11-04 16:06:46 UTC
Another issue I'm running into is that some software could not be run because it can't find /bin/bash which is logical because my phone does not run  bash.
Comment 11 info 2015-11-04 16:17:28 UTC
I managed to install bash and now the ./startprefix works normally. Only thing that still bothers me is that I can't execute passwd and shutdown. Any sugestions
Comment 12 Fabian Groffen gentoo-dev 2015-11-04 16:56:00 UTC
(In reply to info from comment #8)
> But anyways. This leaves us with a complicated way to start the prefix. I
> don't quite understand why the prefix tries to search for the same shell as
> you're currently in. Is this really necessary?

If you don't want this, you could hack the startprefix script (it's one-time copied) or export SHELL=theshellofyourchoiceavailableinyourprefix.
Comment 13 Fabian Groffen gentoo-dev 2015-11-04 16:57:03 UTC
(In reply to info from comment #9)
> Another thing is. I cant execute passwd and shutdown commands. -bash:
> shutdown: command not found.
> Is this normal?

Yes, for it isn't in your $PATH.  If you want that, add it in your $SHELLINIT file.
Comment 14 Benda Xu gentoo-dev 2015-11-05 00:45:47 UTC
(In reply to info from comment #11)
> I managed to install bash and now the ./startprefix works normally. Only
> thing that still bothers me is that I can't execute passwd and shutdown. Any
> sugestions

For passwd, I just added an FAQ entry:

https://wiki.gentoo.org/wiki/Project:Android/FAQ#I_want_to_use_passwd.2C_but_it_isn.27t_there.

For shutdown, I also made an FAQ entry:

https://wiki.gentoo.org/wiki/Project:Android/FAQ#How_can_I_reboot_or_shutdown_my_phone_from_the_Gentoo_shell.3F