View previous topic :: View next topic |
Author |
Message |
sao98021 Tux's lil' helper
Joined: 03 Apr 2012 Posts: 145 Location: Michigan
|
Posted: Mon Mar 05, 2018 10:45 pm Post subject: gentoo subsystem on windows 10, ask here if you need help |
|
|
for those of us stuck with windows for reasons out of our hands, ever since windows 10 linux subsystem support got released you have been able to natively use linux ontop of windows, in the first days all that was supported out of the box was ubuntu, then they opened the door to a few more distros, i think fedora and suse.
how ever, you can use whichever one you want to outside of the unsupported list, and its pretty simple. There are guides and threads already for setting gentoo up in this enviroment such as https://forums.gentoo.org/viewtopic-p-7926990.html
https://www.brad-x.com/2017/05/23/lark-gentoo-in-the-windows-subsystem-for-linux/
and also a gentoo-wsl on git https://github.com/cynede/gentoo-wsl
Code: | install/enable WSL on Windows (Using Programs and Features)
download stage3 https://www.gentoo.org/downloads/
use https://github.com/RoliSoft/WSL-Distribution-Switcher and target stage3 tarball (for example run following from console C:\Python3\Python install.py stage3-amd64-20170413.tar.bz2)
set root as default login by running lxrun /setdefaultuser root from windows powershell
after login export TERM=xterm and add it to .bashrc
switch to no-multilib profile eselect profile set default/linux/amd64/13.0/no-multilib
put sys-apps/portage -ipc into /etc/portage/profile/package.use.force it doesn't work well with ipc |
now since this is already all been covered before, my reason for posting this is just a semi-dedicated help thread for those who either didnt know, or are having issues setting it up, i have been using it for quite sometime now with no issues, flags all set properly and everything running quite well including GUI applications via exporting display to a program like VcXsrv Xserver (http://vcxsrv.sourceforge.net)
i have no idea if anyone is interested in any of this, but i thought id try to contribute and help, so ask away if needed.
i also recently setup a osx high sierra virtual enviroment with vbox that'll work ontop of any OS... if you have a use for that i can also assist, as long as your OSX is from a legitimate source. For some reason BBCode is refusing my ability to post pictures.
anyway, stay gold ponyboy |
|
Back to top |
|
|
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2297 Location: Adendorf, Germany
|
Posted: Wed Mar 07, 2018 1:11 pm Post subject: |
|
|
If you can not install, because install.py claims that "The linux subsystem is not installed", here is how to fix it:- Open a PowerShell
Code: | > lxrun /install
Warning: lxrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
Distributions can be installed by visiting the Windows Store:
https://aka.ms/wslstore | This will install the legacy WSL system and the old Ubuntu distribution.
Check the install: Code: | > wslconfig /list /all
Windows Subsystem for Linux Distributions:
Legacy (Default)
Ubuntu | It might happen, like it did to me, that Ubuntu isn't even listed any more, as their Distro is regularly installed from the app store.
Make sure the legacy distro is the default one, if it is not, set it to be the default using "wslconfig /s legacy"
Set the default user for the legacy distro to root: Code: | > lxrun /setdefaultuser root |
delete/rename folder: %localappdata%\lxss\temp (if it exists)
Now the install.py from the WSL-Distribution-Switcher should work with your stage3 tarball.
If you still can not install, because the script dies with: "Failed to extract archive: [WinError 5] Access is denied", here is how to fix it:- Use any file explorer to open the properties of ntfsea_x64.dll
- On Security->Advanced remove all lines containing type Deny
- Check your user, hit "Edit" and add execute rights to yourself
If you need a .bz2 archive, but got an .xz archive (.bz2 aren't released any more?), then this command will help you: Code: | xz -d -c stage3-latest.tar.xz | bzip2 > stage3-latest.tar.bz2 |
_________________ Edited 220,176 times by Yamakuzure |
|
Back to top |
|
|
sao98021 Tux's lil' helper
Joined: 03 Apr 2012 Posts: 145 Location: Michigan
|
Posted: Tue Mar 13, 2018 5:41 pm Post subject: |
|
|
can you do me a favor, and see what building dev-qt/qtcore-5.7.1-r4:5/5.7::gentoo yields?
Code: | * ERROR: dev-qt/qtcore-5.7.1-r4::gentoo failed (configure phase):
* configure failed
*
* Call stack:
* ebuild.sh, line 124: Called src_configure
* environment, line 2779: Called qt5-build_src_configure
* environment, line 2328: Called qt5_base_configure
* environment, line 2450: Called die
* The specific snippet of code:
* "${S}"/configure "${conf[@]}" || die "configure failed"; |
-pqv gives Code: | [ebuild N ] dev-qt/qtcore-5.7.1-r4 USE="icu -debug -systemd {-test}" |
but it doesnt matter it seems, it yeilds the same Code: | /usr/include/unicode/ustring.h:1444:10: error: ‘UChar’ does not name a type
U_STABLE UChar * U_EXPORT2
^
/usr/include/unicode/ustring.h:1478:20: error: ‘UChar’ does not name a type
const UChar *src,
^
/usr/include/unicode/ustring.h:1504:10: error: ‘UChar’ does not name a type
U_STABLE UChar* U_EXPORT2
^
/usr/include/unicode/ustring.h:1551:20: error: ‘UChar’ does not name a type
const UChar *src,
^ |
uchar errors ;/
just a hunch but im guessing i can find something in https://wiki.gentoo.org/wiki/Prefix/Cygwin/X that may help, even though cygwin/subsystem are different things
also i have a question about your cygwinonsteroids, whenever i try to bootstrap, i get downloading errors Code: | m4/m4-1.4.15.tar.bz2: Scheme missing.
!!! downloading /m4/m4-1.4.15.tar.bz2 failed!
* Fetching m4-1.4.15.tar
/distfiles/m4-1.4.15.tar: Scheme missing.
/m4/m4-1.4.15.tar: Scheme missing.
!!! downloading /m4/m4-1.4.15.tar failed! |
i cannot get around that, ive tried with both precompiled and new compiled versions of cygwin1.dlls. the only experience i have with a usable prefix is https://wiki.gentoo.org/wiki/Project:Android#Gentoo_Prefix
Last edited by sao98021 on Tue Mar 13, 2018 10:39 pm; edited 3 times in total |
|
Back to top |
|
|
ct85711 Veteran
Joined: 27 Sep 2005 Posts: 1791
|
Posted: Tue Mar 13, 2018 6:30 pm Post subject: |
|
|
I am just wondering, for those that are using the linux subsystem on windows; what is your thoughts about it? |
|
Back to top |
|
|
sao98021 Tux's lil' helper
Joined: 03 Apr 2012 Posts: 145 Location: Michigan
|
Posted: Tue Mar 13, 2018 7:46 pm Post subject: |
|
|
ct85711 wrote: | I am just wondering, for those that are using the linux subsystem on windows; what is your thoughts about it? |
well its a big step forward from nothing built in like this before, how does it compare to bootstrapping gentoo in cygwin? i cant compare at the moment, both are probably somewhat similar in usage, which is easier out of the box? possibly subsystem.
i do like it, in a non-political standpoint, but there are some things you cannot do with it because of the way it attaches it self to the windows enviroment i think |
|
Back to top |
|
|
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2297 Location: Adendorf, Germany
|
Posted: Wed Mar 14, 2018 12:57 pm Post subject: |
|
|
sao98021 wrote: | can you do me a favor, and see what building dev-qt/qtcore-5.7.1-r4:5/5.7::gentoo yields? | I am on 17.1/no-multilib profile using gcc-6.4.0: Code: | CHH0711 ~ # emerge --ask qtcore
These are the packages that would be merged, in order:
Calculating dependencies ... done!
[ebuild N ] dev-qt/qtchooser-0_p20151008::gentoo USE="{-test}" 31 KiB
[ebuild N ] dev-util/scons-2.4.1::gentoo USE="-doc" PYTHON_TARGETS="(-pypy) python2_7" 625 KiB
[ebuild N ] dev-libs/double-conversion-2.0.1:0/1::gentoo USE="-static-libs" 6,850 KiB
[ebuild N ] dev-qt/qtcore-5.7.1-r4:5/5.7::gentoo USE="-debug icu -systemd {-test}" 43,939 KiB
Total: 4 packages (4 new), Size of downloads: 51,443 KiB
Would you like to merge these packages? [Yes/No] yes
>>> Verifying ebuild manifests
>>> Emerging (1 of 4) dev-qt/qtchooser-0_p20151008::gentoo
>>> Emerging (2 of 4) dev-util/scons-2.4.1::gentoo
>>> Installing (1 of 4) dev-qt/qtchooser-0_p20151008::gentoo
>>> Installing (2 of 4) dev-util/scons-2.4.1::gentoo
>>> Emerging (3 of 4) dev-libs/double-conversion-2.0.1::gentoo
>>> Installing (3 of 4) dev-libs/double-conversion-2.0.1::gentoo
>>> Emerging (4 of 4) dev-qt/qtcore-5.7.1-r4::gentoo
>>> Installing (4 of 4) dev-qt/qtcore-5.7.1-r4::gentoo
>>> Recording dev-qt/qtcore in "world" favorites file...
>>> Jobs: 4 of 4 complete Load avg: 0.52, 0.58, 0.59
* Messages for package dev-qt/qtcore-5.7.1-r4:
* Generated gentoo-qconfig.h is empty
>>> Auto-cleaning packages...
>>> No outdated packages were found on your system.
* GNU info directory index is up-to-date.
CHH0711 ~ # | Works ootb.
No! WSL and Cygwin are completely different things!
WSL: This is just a compatibility layer. You are as much in Linux with this as you are in Windows when using wine! You build and use ELF!
Cygwin: This is a Windows environment with newlib-cygwin (instead of glibc) providing a POSIX environment. You build and use PE32+!
sao98021 wrote: | also i have a question about your cygwinonsteroids, whenever i try to bootstrap, i get downloading errors Code: | m4/m4-1.4.15.tar.bz2: Scheme missing.
!!! downloading /m4/m4-1.4.15.tar.bz2 failed!
* Fetching m4-1.4.15.tar
/distfiles/m4-1.4.15.tar: Scheme missing.
/m4/m4-1.4.15.tar: Scheme missing.
!!! downloading /m4/m4-1.4.15.tar failed! |
| That is extremely odd. The current version for prefixes is sys-devel/m4-1.4.18. Do you really have the latest bootstrap script?
However, "Scheme Missing" means, that wget can not interpret the URL. And "m4/m4-1.4.15.tar.bz2" is just plain wrong. Where's the actual address gone?
CyginOnSteroids is very dynamic at the moment. Currently I am working on getting util-linux and e2fstools to merge on Cygwin, so we do no longer need to depend on Cygwin to provide the necessary parts. It provides much more than we need, so building ourselves is better.
I am at least as far enough that "emerge kde-apps/kcalc" succeeded and kcalc actually works. So I guess it is moving forward...
sao98021 wrote: | ct85711 wrote: | I am just wondering, for those that are using the linux subsystem on windows; what is your thoughts about it? |
well its a big step forward from nothing built in like this before, how does it compare to bootstrapping gentoo in cygwin? i cant compare at the moment, both are probably somewhat similar in usage, which is easier out of the box? possibly subsystem.
i do like it, in a non-political standpoint, but there are some things you cannot do with it because of the way it attaches it self to the windows enviroment i think |
Well, WSL is very different from Cygwin. It is a nutshell that can hold a full GNU/Linux System, but can not really interact with its outside world.
Cygwin, on the other hand, is something like its own distribution. The best way to describe it would be "GNU/Cygwin" I guess. (I don't wanted to write "GNU/NT", although that would be more exact.)
Being so means that Cygwin is far better integrateable into Windows, as you can (theoretically) use all Cygwin apps from outside Cygwin, as long as your cygwin1.dll is in your PATH.
- WSL is for easier Cross-Platform Development. You can use it to develop, run and debug programs for GNU/Linux from within Visual Studio. So from this point WSL is a great thing, as cross-platform development was hilariously untidy beforehand.
But: Using GNU/Linux applications for X with WSL is ... well... possible. At least that's what I heard. - Cygwin is good for providing GNU tools for every-day use on windows. As one example, TortoiseGit is so problematic on my machine, that I do all work on our Git repositories from a MinTTY. Well, allright... bad example. But you might understand what I mean.
And: Using GNU/Linux applications for X with Cygwin is easy.
_________________ Edited 220,176 times by Yamakuzure |
|
Back to top |
|
|
sao98021 Tux's lil' helper
Joined: 03 Apr 2012 Posts: 145 Location: Michigan
|
Posted: Wed Mar 14, 2018 1:26 pm Post subject: |
|
|
well i got qtcore to build Code: | Installing (1 of 1) dev-qt/qtcore-5.7.1-r4::gentoo
* Regenerating gentoo-qconfig.h
* Updating QT_CONFIG in qconfig.pri |
as for my cygwin on steroids adventure -- i think im using the newest one? https://gitweb.gentoo.org/repo/proj/prefix.git/plain/scripts/bootstrap-prefix.sh
top of boostrap-prefix.sh pulled yesterday
Code: |
#!/usr/bin/env bash
# Copyright 2006-2018 Gentoo Foundation; Distributed under the GPL v2
trap 'exit 1' TERM KILL INT QUIT ABRT
# some basic output functions
eerror() { echo "!!! $*" 1>&2; }
einfo() { echo "* $*"; }
# RAP (libc) mode is triggered on Linux kernel and glibc.
is-rap() { [[ ${PREFIX_DISABLE_RAP} != "yes" && ${CHOST} = *linux-gnu* ]]; }
rapx() { is-rap && echo $1 || echo $2; }
# prefer gtar over tar
[[ x$(type -t gtar) == "xfile" ]] \
&& TAR="gtar" \
|| TAR="tar"
## Functions Start Here
econf() {
${CONFIG_SHELL} ./configure \
--host=${CHOST} \
--prefix="${ROOT}"/tmp/usr \
--mandir="${ROOT}"/tmp/usr/share/man \
--infodir="${ROOT}"/tmp/usr/share/info \
--datadir="${ROOT}"/tmp/usr/share \
--sysconfdir="${ROOT}"/tmp/etc \
--localstatedir="${ROOT}"/tmp/var/lib \
--build=${CHOST} \
"$@" || return 1
}
efetch() {
if [[ ! -e ${DISTDIR}/${1##*/} ]] ; then
if [[ ${OFFLINE_MODE} ]]; then
echo "I needed ${1##*/} from $1 or ${GENTOO_MIRRORS}/distfiles/${1##*/} in $DISTDIR"
read
[[ -e ${DISTDIR}/${1##*/} ]] && return 0
#Give fetch a try
fi
if [[ -z ${FETCH_COMMAND} ]] ; then
# Try to find a download manager, we only deal with wget,
# curl, FreeBSD's fetch and ftp.
if [[ x$(type -t wget) == "xfile" ]] ; then
FETCH_COMMAND="wget"
[[ $(wget -h) == *"--no-check-certificate"* ]] && FETCH_COMMAND+=" --no-check-certificate"
elif [[ x$(type -t curl) == "xfile" ]] ; then
einfo "WARNING: curl doesn't fail when downloading fails, please check its output carefully!"
FETCH_COMMAND="curl -f -L -O"
elif [[ x$(type -t fetch) == "xfile" ]] ; then
FETCH_COMMAND="fetch"
elif [[ x$(type -t ftp) == "xfile" ]] &&
[[ ${CHOST} != *-cygwin* || ! $(type -P ftp) -ef $(cygpath -S)/ftp ]] ; then
FETCH_COMMAND="ftp"
else
eerror "no suitable download manager found (need wget, curl, fetch or ftp)"
eerror "could not download ${1##*/}"
exit 1
fi
fi
mkdir -p "${DISTDIR}" >& /dev/null
einfo "Fetching ${1##*/}"
pushd "${DISTDIR}" > /dev/null
# try for mirrors first, then try given location
${FETCH_COMMAND} "${GENTOO_MIRRORS}/distfiles/${1##*/}" < /dev/null
[[ ! -f ${1##*/} && ${1} != ${GENTOO_MIRRORS}/distfiles/${1##*/} ]] \
&& ${FETCH_COMMAND} "$1" < /dev/null
if [[ ! -f ${1##*/} ]] ; then
eerror "downloading ${1} failed!"
return 1
fi
popd > /dev/null
|
and yeah using X with wsl is great, even though im mostly only using it for darktable and gimp, lots of things work.. even nodebox-opengl, as far as it not being able to mingle with the rest of the world i havent had that issue, i can modify windows stuff from the shell/vice versa, the thing is everything is stored at Code: | C:\Users\user\AppData\Local\lxss | in there you have cache data home mnt root rootfs temp. mnt is where windows resides Code: | C:\Users\user\AppData\Local\lxss\mnt\c | but you do not really alter it from windows, like you wouldnt copy and paste something in there that you'd want to modify from WSL. instead, to modify from wsl you would simply go there as where you will find your entire drive accessible, basically like a symlink to your actual C:/ directory, which is why i thought it was a bit more than just a compatibility layer, another thing a little different than wine is all your linux processes are shown in taskexplorer, individually like gcc or whichever process(s) you are running, not just the container for these processes, and you can kill them one by one without closing the wsl entirely.
for a more detailed example as to how you would access something in windows from wsl lets say you want to import a picture, or anything into an application launched from wsl, inside the application you just do the same, import from Code: | /mnt/c/users/user/pictures/picture.jpg |
(this all being said, i have not used wine since 2013 i believe, its possible its advanced a bit more since then)
if you want to use GUI stuff, you need something like https://sourceforge.net/projects/vcxsrv/ (which i have been using forever)
a working X enviroment in your wsl(i think, i have not actually tested to see wether or not it was neccesary to build and install because i just did it anyway, although i do not see why it wouldnt be needed, as far as i understand with vcxsrv)and then once per session, then just run your application as you would normally
the team behind lxss states that gui/x support is just a sideeffect of getting non-gui based support up and running and isnt the priority, but i haven't found one application that refused to open yet
Last edited by sao98021 on Wed Mar 14, 2018 2:40 pm; edited 1 time in total |
|
Back to top |
|
|
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2297 Location: Adendorf, Germany
|
Posted: Wed Mar 14, 2018 2:39 pm Post subject: |
|
|
Well, if you have the newest bootstrap script, then I have no clue from the distance. I have nothing to do with the prefix script itself...
The problems with WSL and interactions with Windows are- You can not copy anything into it. Copied files will not show up within WSL.
- WSL has no clue of Windows ACLs. So everything under /mnt/<letter> shows up as "rwxrwxrwx root:root". Not what you'd normally want...
Btw: Gimp has a Windows version. No need to use WSL for it.
I know that X with WSL is possible. With the help of MinTTY+WSLBridge you even get a nice console. With Cygwin, however, it works right ootb.
Personally I think that both tools have their uses. It only matters to choose the right one for your needs. _________________ Edited 220,176 times by Yamakuzure |
|
Back to top |
|
|
sao98021 Tux's lil' helper
Joined: 03 Apr 2012 Posts: 145 Location: Michigan
|
Posted: Wed Mar 14, 2018 2:50 pm Post subject: |
|
|
Yeah its unfortunate, but i'll get it working, its gotta be something maybe even firewall blockage but wouldnt really make sense because wget/curl work standalone.. i dont know.
as far as not being able to copy into wsl, you dont need to in a lot of cases. you dont need 2 versions one from the windows world and one copied into the wsl, you would just access it as if it were all one world. or atleast thats what i do, that being said i have had a few situations where it would be nice to do so, but unnecessary since say you have a file on your desktop anything, a text file. instead of what i first thought of doing (copying it into the wsl somewhere) you just go there from the wsl ( Code: | /mnt/c/Users/user/Desktop | ) and there your file is
but, this doesnt cover everything, say you have a ton of stuff you want in your wsl home dir, in that case.. yes it would be amazing to just copy and paste it right into. just making that clear
with ACLs.. needs some work, lots of things need work but its decent for being almost less than a year old, as far as the permissions of everything in /mnt i'm just in a position where im not worried about it so it actually hasnt even occurred to me as a problem.. yet
both gimp and darktable have windows binaries, were 2 of the first three gui applications i installed in gentoo wsl at the time it was more for a 'lets see if it actually works' scenario, worked so well i just developed the habbit of actually using them(the 3rd being xephem, no windows build D; )
going to delete everything cygwin related and start from scratch trying to get it up and running, because i would really enjoy using both |
|
Back to top |
|
|
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2297 Location: Adendorf, Germany
|
Posted: Thu Mar 15, 2018 9:01 am Post subject: |
|
|
sao98021 wrote: | Yeah its unfortunate, but i'll get it working, its gotta be something maybe even firewall blockage but wouldnt really make sense because wget/curl work standalone.. i dont know. |
If they work standalone, they should work from within the script. So that's a real riddle here...
sao98021 wrote: | with ACLs.. needs some work, lots of things need work but its decent for being almost less than a year old, as far as the permissions of everything in /mnt i'm just in a position where im not worried about it so it actually hasnt even occurred to me as a problem.. yet |
It is just a problem if you actually have to deal with outside stuff. Otherwise it is not a problem at all.
btw: Manipulating outside ACLs from the inside will never work. That is simply not wanted. See: https://github.com/Microsoft/WSL/issues/81 (<== The discussion there is really worth reading. I tells a lot.)
sao98021 wrote: | going to delete everything cygwin related and start from scratch trying to get it up and running, because i would really enjoy using both | Start with getting a Cygwin/X instance (XWin Server) up and running. The Prefix/Cygwin/X wiki page can at least tell you how to do so. _________________ Edited 220,176 times by Yamakuzure |
|
Back to top |
|
|
sao98021 Tux's lil' helper
Joined: 03 Apr 2012 Posts: 145 Location: Michigan
|
Posted: Thu Mar 15, 2018 2:45 pm Post subject: |
|
|
yikes i could see how this would be the nail in the coffin for some
Code: | sunilmut commented on Jan 8
With the DrvFS metadata support in 17063, chmod should now work (and stick) on DrvFS. | posted two months ago https://docs.microsoft.com/en-us/windows/wsl/release-notes#build-17063
does this change anything?
DrvFs supports additional Linux metadata. This allows setting the owner and mode of files using chmod/chown, and also the creation of special files such as fifos, unix sockets and device files. This is disabled by default for now since it's still experimental. Note: We fixed a bug in the metadata format used by DrvFs. While metadata works on this build for experimentation, future builds will not correctly read metadata created by this build. You might need to manually update owner for modified files and devices with a custom device ID will have to be recreated.
To enable, mount DrvFs with the metadata option (to enable it on an existing mount, you must first unmount it):
Code: | mount -t drvfs C: /mnt/c -o metadata |
Linux permissions are added as additional metadata to the file; they do not affect the Windows permissions. Remember, editing a file using a Windows editor may remove the metadata. In this case, the file will revert to its default permissions.
err now im confused
-------------------------------------------------------------------back to prefix stuff
well, now i can get the prefix to start building, but i fail with
Code: | /var/tmp/bash-4.2/bash-4.2/general.c:630: undefined reference to `cygwin_conv_to_full_posix_path'
/var/tmp/bash-4.2/bash-4.2/general.c:630:(.text+0xd09): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `cygwin_conv_to_full_posix_path'
collect2: error: ld returned 1 exit status
make: *** [Makefile:541: bash.exe] Error 1
|
does this have to do with the rebasing? coincidentally, when i did a little search i found https://stackoverflow.com/questions/30886717/compiling-grub-on-cygwin-64-bit
"It's a long time since I posted the original question but I've just found it again. Just to say that the long-term answer for me turned out to be switching away from Cygwin and I'm now using Bash on Ubuntu on Windows which has been much more successful for all the utilities I'm using."
haha |
|
Back to top |
|
|
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2297 Location: Adendorf, Germany
|
Posted: Tue May 22, 2018 8:00 am Post subject: |
|
|
@sao98021 : Good that it worked out for you.
I have installed Gentoo on Legacy WSL again to test a few things:
- sys-devel/gcc-8.1.0 successfully merged.
- 17.1 no-multilib profile works
- @world rebuilt with gcc-8.1 (No X, yet)
- emerged kcalc, kwrite and konsole (Go haywire when started as root, cannot find Cygwin/X)
So far, so good.
To make X applications find Cygwin/X, which I strongly prefer over Xming, there are only two steps needed:
- Change the XWin Server (shortcut) target to have it run: (...)"cd; startxwin -- -listen tcp (...)"
For me the full target line now reads: Code: | C:\Cygwin\bin\run.exe --quote /usr/bin/bash.exe -l -c "cd; startxwin -- -extension GLX -multiwindow -listen tcp" |
Add export DISPLAY=":0" to ~/.bashrc
However, I do not want to do everything as root, so I added a new user, gave them a user group, added them to wheel and emerged "sudo".
Then I changed the default user, using Code: | C:\>lxrun /setdefaultuser <username | from a normal CMD.
That did not work. The WSL bash.exe always logged in "root". First, really all instances of bash had to be exited before the default user changed.
Last but not least I am using some Plasma applications, and at least them need some extra configuration you have to put into your ~/.bashrc: Code: | # X is provided by Cygwin/X
export DISPLAY=":0"
# Some environmental values not set as we are in WSL
xUsr=`whoami`
mkdir -p /tmp/runtime-${xUsr}
chmod 700 /tmp/runtime-${xUsr}
# Uncomment and substitute <username> with your default user if you need this:
# cp /mnt/c/cygwin/home/<username>/.Xauthority ${HOME}/
export XDG_RUNTIME_DIR="/tmp/runtime-${xUsr}"
export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
export IMSETTINGS_INTEGRATE_DESKTOP=no
export QT_QPA_PLATFORMTHEME="qt5ct"
export XDG_MENU_PREFIX="xwin-"
export XDG_CURRENT_DESKTOP="X-Cygwin"
# Some things just do not work in Cygwin. (Does this work in WSL?)
export NO_AT_BRIDGE="1"; | After adding that, all three applications work like a charm from my normal user account. _________________ Edited 220,176 times by Yamakuzure |
|
Back to top |
|
|
sao98021 Tux's lil' helper
Joined: 03 Apr 2012 Posts: 145 Location: Michigan
|
Posted: Sun May 27, 2018 6:27 pm Post subject: |
|
|
Yamakuzure wrote: | @sao98021 : Good that it worked out for you.
I have installed Gentoo on Legacy WSL again to test a few things:
- sys-devel/gcc-8.1.0 successfully merged.
- 17.1 no-multilib profile works
- @world rebuilt with gcc-8.1 (No X, yet)
- emerged kcalc, kwrite and konsole (Go haywire when started as root, cannot find Cygwin/X)
So far, so good.
To make X applications find Cygwin/X, which I strongly prefer over Xming, there are only two steps needed:
- Change the XWin Server (shortcut) target to have it run: (...)"cd; startxwin -- -listen tcp (...)"
For me the full target line now reads: Code: | C:\Cygwin\bin\run.exe --quote /usr/bin/bash.exe -l -c "cd; startxwin -- -extension GLX -multiwindow -listen tcp" |
- Add export DISPLAY=":0" to ~/.bashrc
However, I do not want to do everything as root, so I added a new user, gave them a user group, added them to wheel and emerged "sudo".
Then I changed the default user, using Code: | C:\>lxrun /setdefaultuser <username | from a normal CMD.
That did not work. The WSL bash.exe always logged in "root". First, really all instances of bash had to be exited before the default user changed.
Last but not least I am using some Plasma applications, and at least them need some extra configuration you have to put into your ~/.bashrc: Code: | # X is provided by Cygwin/X
export DISPLAY=":0"
# Some environmental values not set as we are in WSL
xUsr=`whoami`
mkdir -p /tmp/runtime-${xUsr}
chmod 700 /tmp/runtime-${xUsr}
# Uncomment and substitute <username> with your default user if you need this:
# cp /mnt/c/cygwin/home/<username>/.Xauthority ${HOME}/
export XDG_RUNTIME_DIR="/tmp/runtime-${xUsr}"
export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
export IMSETTINGS_INTEGRATE_DESKTOP=no
export QT_QPA_PLATFORMTHEME="qt5ct"
export XDG_MENU_PREFIX="xwin-"
export XDG_CURRENT_DESKTOP="X-Cygwin"
# Some things just do not work in Cygwin. (Does this work in WSL?)
export NO_AT_BRIDGE="1"; | After adding that, all three applications work like a charm from my normal user account. |
very nice, i'm still using my gentoo wsl has been going strong for quite sometime now, the passed 3 world updates went smooth with no errors or breakages, i can ALMOST compile lineageOs 14.1 on it as well, theres only one issue(aside building flex/ijar/bison 64bit and telling the build to use that instead of the prebuilts which is a simple fix) and that is dex2oat (multi-threading causes hang), i couldnt get it to work no matter what everytime build would fail with dex2oat hanging causes the build to die, i've tried every workaround on github, every commit on gerrit to no avail. LineageOS 15.1 though is a different story, it builds fine mostly because its what people are choosing to make work flawlessly since its the current release and what everyone strives to flash on their phones.
my solution was as follows. Dont build lineage on WSL, so i made a gentoo hd ;p
wsl is great for what it is though |
|
Back to top |
|
|
kikko Apprentice
Joined: 29 Apr 2014 Posts: 276 Location: Milan, IT
|
Posted: Mon Jun 11, 2018 12:08 pm Post subject: |
|
|
Hi Guys
I'm writing here because of the post title
I have a problem with portage, began after today's update on my Gentoo on WSL (I've updated portage to 2.3.40-r1) :
Code: |
Traceback (most recent call last):
File "/usr/lib/python-exec/python3.5/portageq", line 1471, in <module>
sys.exit(main(sys.argv))
File "/usr/lib/python-exec/python3.5/portageq", line 1450, in main
retval = function(args)
File "/usr/lib/python-exec/python3.5/portageq", line 820, in envvar
value = portage.settings.get(arg)
File "/usr/lib64/python3.5/site-packages/portage/proxy/objectproxy.py", line 22, in __getattribute__
result = object.__getattribute__(self, '_get_target')()
File "/usr/lib64/python3.5/site-packages/portage/__init__.py", line 651, in _get_target
return _get_legacy_global(name)
File "/usr/lib64/python3.5/site-packages/portage/_legacy_globals.py", line 36, in _get_legacy_global
portage.db = portage.create_trees(**kwargs)
File "/usr/lib64/python3.5/site-packages/portage/__init__.py", line 541, in create_trees
env=env, sysroot=sysroot, eprefix=eprefix)
File "/usr/lib64/python3.5/site-packages/portage/proxy/objectproxy.py", line 30, in __call__
result = object.__getattribute__(self, '_get_target')()
File "/usr/lib64/python3.5/site-packages/portage/proxy/lazyimport.py", line 130, in _get_target
__import__(name)
File "/usr/lib64/python3.5/site-packages/portage/package/ebuild/config.py", line 39, in <module>
from portage.dbapi.porttree import portdbapi
File "/usr/lib64/python3.5/site-packages/portage/dbapi/porttree.py", line 92, in <module>
portage.process.atexit_register(close_portdbapi_caches)
File "/usr/lib64/python3.5/site-packages/portage/proxy/objectproxy.py", line 22, in __getattribute__
result = object.__getattribute__(self, '_get_target')()
File "/usr/lib64/python3.5/site-packages/portage/proxy/lazyimport.py", line 107, in _get_target
__import__(name)
File "/usr/lib64/python3.5/site-packages/portage/process.py", line 31, in <module>
max_fd_limit = resource.getrlimit(resource.RLIMIT_NOFILE)[0]
OSError: [Errno 38] Function not implemented
|
After the update, every portage-related command (emerge obviously, but also equery and revdep-rebuild) doesn't work anymore.
Portage USE flags are Code: | native-extensions rsync-verify xattr -build -doc -epydoc -gentoo-dev -ipc -selinux PYTHON_TARGETS="python2_7 python3_5 -pypy -python3_4 -python3_6" |
I think I have to re-deploy portage from the stage3 archive, but my question is: have you too seen such issue? _________________ Regards
root is the root of all evil |
|
Back to top |
|
|
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2297 Location: Adendorf, Germany
|
Posted: Mon Jun 11, 2018 2:32 pm Post subject: |
|
|
kikko wrote: | I think I have to re-deploy portage from the stage3 archive, but my question is: have you too seen such issue? | No, but two things come to my mind:
- You are using Python-3.5, but the default changed to 3.6 recently. I therefore have in my make.conf:
Code: | PYTHON_SINGLE_TARGET="python3_6"
PYTHON_TARGETS="python2_7 python3_6" |
According to Microsoft, IPC is not yet fully implemented. I have therefore: Code: | $ cat /etc/portage/profile/use.mask
-ipc
$ cat /etc/portage/profile/use.force
-ipc
$ grep -B 1 -A 3 IPC /etc/portage/make.conf
# =========================================================
# === IPC is not (yet) fully supported. ===
# === See: https://github.com/Microsoft/WSL/issues/1443 ===
# =========================================================
USE="${USE} -ipc" | Maybe those two changes would help you, too? _________________ Edited 220,176 times by Yamakuzure |
|
Back to top |
|
|
kikko Apprentice
Joined: 29 Apr 2014 Posts: 276 Location: Milan, IT
|
Posted: Tue Jun 12, 2018 9:06 am Post subject: |
|
|
Hi yamakuzure
thanks for the suggestions, but I haven't python 3.6 installed (it's not in the stage3 actually) and I can't emerge it
I've already excluded IPC from Portage,
Code: | [I] sys-apps/portage
Available versions: 2.3.8 2.3.13-r1 2.3.19-r1 2.3.24-r1 2.3.40-r1 **9999 {build doc epydoc gentoo-dev +ipc +native-extensions (+)rsync-verify selinux xattr PYTHON_TARGETS="pypy python2_7 python3_4 python3_5 python3_6"}
Installed versions: 2.3.40-r1(08:27:22 AM 06/11/2018)(native-extensions rsync-verify xattr -build -doc -epydoc -gentoo-dev -ipc -selinux PYTHON_TARGETS="python2_7 python3_5 -pypy -python3_4 -python3_6") Homepage: https://wiki.gentoo.org/wiki/Project:Portage
Description: Portage is the package management and distribution system for Gentoo |
(sorry for the eix output, but equery doesn't work anymore )
I have issues also with sudo! Code: |
$ sudo cat /etc/portage/make.conf
sudo: getrlimit: Function not implemented
sudo: setrlimit: Function not implemented
sudo: setrlimit: Function not implemented
sudo: pam_open_session: Critical error - immediate abort
sudo: policy plugin failed session initialization
|
Personally I suspect of glibc, 2.26-r7 emerged yesterday immediatly after portage
I've seen a patch for a previous version (https://github.com/cynede/gentoo-wsl/issues/7)
Anyway, I'm trying to figure out if this Gentoo-on-WSL is worth the effort or if I have to go with Cygwin prefix
Thanks again _________________ Regards
root is the root of all evil |
|
Back to top |
|
|
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2297 Location: Adendorf, Germany
|
Posted: Wed Jun 13, 2018 11:28 am Post subject: |
|
|
kikko wrote: | I have issues also with sudo! Code: |
$ sudo cat /etc/portage/make.conf
sudo: getrlimit: Function not implemented
sudo: setrlimit: Function not implemented
sudo: setrlimit: Function not implemented
sudo: pam_open_session: Critical error - immediate abort
sudo: policy plugin failed session initialization
|
| pam_open_session? That reminds me...
Please look into the output of "eix -e pambase", what is activated? consolekit, elogind or systemd?
You can setup WSL to use root as your default user, then you can start a terminal and are root.
The symptoms with sudo were on arch forums and the solution was to upgrade glibc.
So please, if root can use portage, than please try upgrading glibc first. I fear you have to unpack a stage3 tarball over otherwise. I have glibc-2.27-r3 installed, and everything works just fine.
For the record, my setup and USE flags from make.conf: Code: | # (Gentoo) 13:22:11 CHH0711 ~ >
emerge --info | head -n 1
Portage 2.3.40 (python 3.6.5-final-0, default/linux/amd64/17.1/no-multilib, gcc-8.1.0, glibc-2.27-r3, 4.4.0-43-Microsoft x86_64)
# (Gentoo) 13:14:44 CHH0711 ~ >
grep -A 2 -B 4 USE= /etc/portage/make.conf
#===============================
# === USE flags (Additions) ===
#===============================
USE="X alsa dbus egl eglfs elogind expat fam ffmpeg git gstreamer icu ipc jpeg kerberos nls opengl \
pcre pcre16 phonon pulseaudio qt5 sqlite unicode widgets xkb xml"
#===============================
# === USE flags (Removals) ===
#===============================
USE="${USE} -bindist -caps -consolekit -cryptsetup -display-manager -gallium gles2 \
-handbook -kwallet -libav -libinput -llvm -lvm -introspection -policykit \
-polkit -qt4 -sddm -smartcard -static-libs -systemd -udisks -upower -vlc -wayland -wireless"
--
# =========================================================
# === IPC is not (yet) fully supported. ===
# === See: https://github.com/Microsoft/WSL/issues/1443 ===
# =========================================================
USE="${USE} -ipc" |
_________________ Edited 220,176 times by Yamakuzure |
|
Back to top |
|
|
kikko Apprentice
Joined: 29 Apr 2014 Posts: 276 Location: Milan, IT
|
Posted: Wed Jun 13, 2018 7:58 pm Post subject: |
|
|
Hi
pambase is strange, none of the flags you mention is enabled
Code: | [I] sys-auth/pambase
Available versions: 20101024-r2^b 20120417-r3^b ~20140313^b 20150213^b 20150213-r1^b {consolekit +cracklib debug elogind gnome-keyring minimal mktemp +nullok pam_krb5 pam_ssh passwdqc securetty selinux +sha512 systemd}
Installed versions: 20150213-r1^b(02:26:52 AM 02/23/2018)(cracklib nullok sha512 -consolekit -debug -elogind -gnome-keyring -minimal -mktemp -pam_krb5 -pam_ssh -passwdqc -securetty -selinux -systemd)
Homepage: https://wiki.gentoo.org/wiki/Project:PAM
Description: PAM base configuration files |
I've switched (back) to root using lxrun /setdefaultuser, but result is the same, emerge is gone
I'll go for the reinstall (which is appropriate, on a Windows system ), anyway thank you for your suggestions! _________________ Regards
root is the root of all evil |
|
Back to top |
|
|
Yamakuzure Advocate
Joined: 21 Jun 2006 Posts: 2297 Location: Adendorf, Germany
|
Posted: Thu Jun 14, 2018 7:24 am Post subject: |
|
|
kikko wrote: | Hi
pambase is strange, none of the flags you mention is enabled | That is not a problem at all unless you want to install certain applications from popular DEs. I am regularly working on Konsole, and Kate is my main text editor (notepad++ simply doesn't cut it.)
Anyway, in that case I had to enable at least one session tracker, and decided to use elogind. It isn't doing anything, but I wanted to see whether you might have had systemd enabled.
kikko wrote: | I've switched (back) to root using lxrun /setdefaultuser, but result is the same, emerge is gone
I'll go for the reinstall (which is appropriate, on a Windows system ), anyway thank you for your suggestions! | Well, I thought you would have to, but it was at least worth the try. _________________ Edited 220,176 times by Yamakuzure |
|
Back to top |
|
|
undrwater Guru
Joined: 28 Jan 2003 Posts: 313 Location: Caucasia
|
Posted: Mon Sep 10, 2018 11:10 pm Post subject: |
|
|
I appreciate this thread. It has helped me already. I've got my gentoo WSL working relatively well, though I'm trying to get Kontact running. I'm running into the following problem:
https://paste.pound-python.org/show/GHVgqKsepsa6awJ7rABn/
Strange that it compiles to 100%, then fails without error. Can anyone see anything there that might help me troubleshoot?
Thanks in advance! _________________ Open-mindedness is painful... |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54599 Location: 56N 3W
|
Posted: Mon Sep 10, 2018 11:19 pm Post subject: |
|
|
undrwater,
It failed here Code: | [ 57%] [32m[1mLinking CXX executable ../../../bin/kquitapp5[0m
cd /var/tmp/portage/kde-frameworks/kdbusaddons-5.49.0/work/kdbusaddons-5.49.0_build/src/tools/kquitapp && /usr/bin/cmake -E cmake_link_script CMakeFiles/kquitapp5.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-g++ -march=native -O2 -pipe -std=c++0x -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -pedantic -Wsuggest-override -Wlogical-op -Wzero-as-null-pointer-constant -Wl,--enable-new-dtags -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,--hash-style=gnu -rdynamic CMakeFiles/kquitapp5.dir/kquitapp.cpp.o CMakeFiles/kquitapp5.dir/kquitapp5_autogen/mocs_compilation.cpp.o -o ../../../bin/kquitapp5 /usr/lib64/libQt5DBus.so.5.11.1 /usr/lib64/libQt5Core.so.5.11.1
/usr/lib64/libQt5DBus.so.5.11.1: undefined reference to `QCoreApplication::self@Qt_5'
collect2: error: ld returned 1 exit status
make[2]: *** [src/tools/kquitapp/CMakeFiles/kquitapp5.dir/build.make:99: bin/kquitapp5] Error 1
make[2]: Leaving directory '/var/tmp/portage/kde-frameworks/kdbusaddons-5.49.0/work/kdbusaddons-5.49.0_build'
make[1]: *** [CMakeFiles/Makefile2:214: src/tools/kquitapp/CMakeFiles/kquitapp5.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs... |
With an undefined reference. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
undrwater Guru
Joined: 28 Jan 2003 Posts: 313 Location: Caucasia
|
Posted: Thu Oct 04, 2018 9:18 pm Post subject: |
|
|
NeddySeagoon wrote: | undrwater,
It failed here Code: | [ 57%] [32m[1mLinking CXX executable ../../../bin/kquitapp5[0m
cd /var/tmp/portage/kde-frameworks/kdbusaddons-5.49.0/work/kdbusaddons-5.49.0_build/src/tools/kquitapp && /usr/bin/cmake -E cmake_link_script CMakeFiles/kquitapp5.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-g++ -march=native -O2 -pipe -std=c++0x -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -pedantic -Wsuggest-override -Wlogical-op -Wzero-as-null-pointer-constant -Wl,--enable-new-dtags -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,--hash-style=gnu -rdynamic CMakeFiles/kquitapp5.dir/kquitapp.cpp.o CMakeFiles/kquitapp5.dir/kquitapp5_autogen/mocs_compilation.cpp.o -o ../../../bin/kquitapp5 /usr/lib64/libQt5DBus.so.5.11.1 /usr/lib64/libQt5Core.so.5.11.1
/usr/lib64/libQt5DBus.so.5.11.1: undefined reference to `QCoreApplication::self@Qt_5'
collect2: error: ld returned 1 exit status
make[2]: *** [src/tools/kquitapp/CMakeFiles/kquitapp5.dir/build.make:99: bin/kquitapp5] Error 1
make[2]: Leaving directory '/var/tmp/portage/kde-frameworks/kdbusaddons-5.49.0/work/kdbusaddons-5.49.0_build'
make[1]: *** [CMakeFiles/Makefile2:214: src/tools/kquitapp/CMakeFiles/kquitapp5.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs... |
With an undefined reference. |
Correct. So:
Code: | equery belongs QCoreApplication |
returns:
Code: | dev-qt/qtcore-5.11.1 |
Then...
Code: |
emerge -av qtcore
* IMPORTANT: 15 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
* Last emerge --sync was 40d 17h 58m 56s ago.
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] dev-qt/qtcore-5.11.1:5/5.11::gentoo USE="icu -debug -systemd -test" 0 KiB
Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Would you like to merge these packages? [Yes/No] no
|
Also having trouble building kcoreaddons:
https://paste.pound-python.org/show/sGKBRPR3dR3SEWD47zCB/ _________________ Open-mindedness is painful... |
|
Back to top |
|
|
undrwater Guru
Joined: 28 Jan 2003 Posts: 313 Location: Caucasia
|
|
Back to top |
|
|
lquenti n00b
Joined: 10 Dec 2017 Posts: 16
|
Posted: Tue Feb 26, 2019 9:09 pm Post subject: |
|
|
Just for documentation purposes, with new installations it's needed to explicitly install Debian from the windows store to get the TheDebianProject.DebianGNULinux_76v4gfsz19hv4 folder. |
|
Back to top |
|
|
salfter Tux's lil' helper
Joined: 02 Jan 2003 Posts: 89
|
|
Back to top |
|
|
|
|
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
|
|