Linuxbrew / legacy-linuxbrew

:skull: This repository is defunct, because it has been split into https://github.com/Linuxbrew/brew and https://github.com/Linuxbrew/homebrew-core
http://linuxbrew.sh
Other
2.23k stars 296 forks source link

Linuxbrew on Windows Subsystem for Linux #1067

Closed MyCookie closed 8 years ago

MyCookie commented 8 years ago

This is on the Windows subsystem for Linux, if you don't know it's essentially reverse wine. Linux system calls are converted to Windows system calls, userland is to my knowledge the same to the application it runs on.

I understand it's really new and not enough attention can be given to it, but thought I'd try.

I tried to install python using brew install python, but could not install dependency pkg-config; it seemed that it compiles, but cannot move files.

Gist for pkg-config: https://gist.github.com/anonymous/08c73dcf00d5a01f655d2f2f7531333e

Here's a screenshot:

photo318281760266889292

As you can see, I have been able to compile pkg-config manually, but brew can't seem to find things where it expects them. I'm kind of lost where to look right now, so any help is good.

sjackman commented 8 years ago

Oh my goodness. Linuxbrew on Windows. The appocalypse has arrived. 😂

The gist looks successful: https://gist.github.com/anonymous/08c73dcf00d5a01f655d2f2f7531333e#file-04-make-L72

Please copy and paste the text of that last Invalid argument error here.

Try enable debug mode and verbose output:

brew install pkg-config -dv

Try installing a simpler formula for testing purposes.

brew install hello

Linuxbrew has had some trouble with Ruby 1.9.3. I'm not sure if it's related here. Try upgrading to Ruby 2.x if possible.

sudo apt-get install ruby2.0 ruby2.0-dev \
    && sudo ln -sf ruby2.0 /usr/bin/ruby \
    && sudo ln -sf gem2.0 /usr/bin/gem
MyCookie commented 8 years ago

Thanks for replying! I didn't expect any direct help, it's really new and honestly it's a bit of a Frankenstein's monster right now. There are things missing all over the place.

Right now by default, you run as root, I've tried adding a user and trying again, but everything on the file system is owned by root and that cannot be changed.

I've done the usual brew install python and here's the output: Error: Invalid argument - (/tmp/pkg-config20160413-3748-101xbpy/pkg-config-0.29.1/AUTHORS, /root/.linuxbrew/Cellar/pkg-config/0.29.1/AUTHORS)

brew install pkg-config -dv: https://gist.github.com/anonymous/b5d94b6fdf3e99cf3b70268d03c7e909

brew install hello: https://gist.github.com/anonymous/f8ed4cf8d1348c6420beac813f1ee5e6

Looks like the same issue, now I'm trying after installing ruby2.0.

brew install hello -dv: https://gist.github.com/anonymous/19914c11d1b16ba1020b456c815bb2cb

Oh no! It got worse! Looks like it's too hacked-together right now to be of any use, installing ruby2.0 just breaks it even more.

Thanks for the help, but I don't think it'll work anytime soon. I'll keep on trying when I remember and keep things posted here.

sjackman commented 8 years ago

Error: Invalid argument - (/tmp/pkg-config20160413-3748-101xbpy/pkg-config-0.29.1/AUTHORS, /root/.linuxbrew/Cellar/pkg-config/0.29.1/AUTHORS)

That's a Ruby function error. It's saying that some Ruby function that's been called has been passed invalid arguments. If you run the same command with -d (debug) enabled, you can then select traceback. Copy and paste the traceback, and we can try and troubleshoot it.

sjackman commented 8 years ago

Error: Unable to determine the system's glibc version https://gist.github.com/anonymous/19914c11d1b16ba1020b456c815bb2cb#file-typescript-L4

That's fixable. There's a hardcode list of locations to look for libc.so.6. The list needs to be expanded to include wherever it is on your system. See https://github.com/Linuxbrew/linuxbrew/blob/master/Library/Homebrew/requirements/glibc_requirement.rb#L16

    libc = ["/lib/x86_64-linux-gnu/libc.so.6", "/lib64/libc.so.6", "/lib/libc.so.6", "/lib/arm-linux-gnueabihf/libc.so.6"].find do |s|
MyCookie commented 8 years ago

I won't be able to try out those things for some time, have a paper due tonight that I'm working on. I'll edit this post after I head home, but it's going to be late.

Here's a quick update, really tired so I'll give more info tomorrow later today =)

screenshot 6

I wasn't very sure what you meant by choosing traceback, so here's me trying again with -d with ruby2.0.

screenshot 11

And again with ruby1.9.1.

screenshot 10

libc.so.6 is where it expects it to be, unless it's ignoring the link. Which would make sense since it didn't raise an error stating it couldn't find it: it couldn't find the version.

sjackman commented 8 years ago

I don't have a Windows device on which to test, so it's pretty low priority for me. So no fret. I am curious if it'll work without too much fuss…

MyCookie commented 8 years ago

Sorry I didn't post recently. I'm going to have to pull out of this issue, I ran into a bug that caused the system to stop responding on wake from suspend and restarting isn't solving anything. I haven't had time in-between studying for exams to find a fix, and I'm going to have to pull out of the insider builds for some time.

I'll try again when they push it to the slow ring, don't want to spend time bug fixing :sob:

sjackman commented 8 years ago

Ah, sorry to hear about your unhappy computer. I'm going to close this issue for now. Please do come back and reopen it if you want to try it again.