Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expression of Interest (Linux) #8

Open
spannerman79 opened this issue Aug 13, 2015 · 76 comments
Open

Expression of Interest (Linux) #8

spannerman79 opened this issue Aug 13, 2015 · 76 comments

Comments

@spannerman79
Copy link

spannerman79 commented Aug 13, 2015

I would like to voice my expression of interest of a linux version so i can use your mod WebDisplays natively on linux.

I am willing to test builds for you if/when you want/need it.

My system setup;
Ubuntu 15.04, x64, 16GB ram, i7
Java JDK 8u51

Update:
Since creating this issue my system is now the following;
Arch, x64, 64GB RAM, AMD Ryzen 3900X
AdoptJDK8(LTS)

@montoyo
Copy link
Owner

montoyo commented Aug 13, 2015

Okay, I'll do it as soon as I'll be back home (in about 3 days). If I forget about it, please comment this post again ^^ thanks.

@spannerman79
Copy link
Author

Hi, just a friendly "bump" to remind you @montoyo 😄

@ajacobsen
Copy link

Just commenting to show you that there are at least two people desperately waiting for a linux build.
I already tried to do it myself but I failed to figure out what version of jcef I need to get the latest MC 1.7.10 version of mcef running.

@montoyo
Copy link
Owner

montoyo commented Aug 18, 2015

Alright guys. I'm finishing up something and I'll try to do it today. If I don't post any news tomorrow at 5am (France's time) then kill me ;)

@spannerman79
Copy link
Author

Nah no one will kill you lol

Its more to show that at least one (now two) people would be interested in linux capability for your mods thats all mate.

Usually when someone quotes a time its best if they state the time zone (UTC) they are in.

For example when you made your comment that was (approx) 8.55pm (UTC+10). If anyone else is watching this issue what @montoyo meant was 5am (UTC+2)

@montoyo
Copy link
Owner

montoyo commented Aug 19, 2015

Okay :D
I successfully compiled JCEF for linux64 today. Let me run some tests to make sure that everything is compatible with MCEF, and then compile it for linux32 too.
If everything goes fine, I'll release it tomorrow!

@spannerman79
Copy link
Author

Just a gentle "bump" to see how your getting on

@spannerman79
Copy link
Author

Is there something that I can do to help @montoyo ?

Not trying to be pushy but the last comment was 10 days ago with your success with JCEF for linux x64

@montoyo
Copy link
Owner

montoyo commented Sep 8, 2015

Hello Hello... :)
Sorry if I didn't answer, studies resumed and I have been busy moving stuff to "my new home"...
So uhm, as I said, compiling was the easy part. But there's a few problems with the linux port right now, that I need to fix:

  • You have to copy icutdl.dat in your java/bin folder, which requires admin rights (not my bug: see https://bitbucket.org/chromiumembedded/java-cef/issues/109)
  • Whenever a "web view" is destroyed, Minecraft crashes without any stacktrace or something that might help me... (I still don't know if it's my bug or JCEF's one)

Anyway, here's a little screenshot:
http://montoyo.net/ShareX/MCEF%20Linux.png

@spannerman79
Copy link
Author

You have to copy icutdl.dat in your java/bin folder, which requires admin rights

This is a little bit of a worry (only for security reasons). Couldn't minecraft (java) be executed with a "security" type flag? For example -Djava.security.policy=some.file and some.file has the required commands to allow loading of icutdl.dat from its default location?

Sorry if I didn't answer, studies resumed and I have been busy moving stuff to "my new home"...

I know exactly whats that like so I hear you

@spannerman79
Copy link
Author

Just a gentle bump as it's been a month since any sort of update

@Bricklou
Copy link

Bricklou commented Dec 9, 2015

Hello, I would like know when you will publish a version stable of JCEF.
(Excuse me for spelling and grammar ,I do not speak really good English).

@LokeYourC3PH
Copy link

Any news on this @montoyo ? Been a while.

@montoyo
Copy link
Owner

montoyo commented Jan 26, 2018

Hello, we're two years later, everything is fine :)
I'm working on porting everything to 1.12.2, and re-writing WebDisplays. I didn't forget about the Linux port and will try to do it after I updated WebDisplays.

Thanks for your very very very good patience.
P.S.: Didn't mean to close the issue, that's why I re-opened it. Sorry :/

@montoyo montoyo closed this as completed Jan 26, 2018
@montoyo montoyo reopened this Jan 26, 2018
@spannerman79
Copy link
Author

Well I am very keen on seeing about getting this working on Linux if at all possible @montoyo

If i don't have to use my Win7 VM for gaming I won't. (bit off topic but if your curious as to how google for "arch pci passthrough" and you'll see it is possible)

@ghost
Copy link

ghost commented May 10, 2018

I have gotten a 1.12.2 version to build for linux64 but I was curious if there was a way to get 1.7.10?

@Tank-Missile
Copy link

Tank-Missile commented Jun 7, 2018

He doesn't plan to support 1.7.10 since backporting from 1.12.2 to 1.7.10 would require a complete rewrite. You should make a pull request since this mod could definitely use linux support. I'm curious to know how you got it working.

@ghost
Copy link

ghost commented Jan 6, 2019

I'd also like to see Linux support.

@FunProgramer
Copy link

@montoyo Can you say my when you release mcef for Linux?
Thank you,
webdisplayfan

@FrankiMC
Copy link

FrankiMC commented May 19, 2019

Dont worry about it then Ill fine some OTHER MOD F U!!!

@spannerman79
Copy link
Author

Dont worry about it then Ill fine some OTHER MOD F U!!!

Seriously @FrankiMC ? You resort to abuse to someone that is doing this out of their own free will for others enjoyment?!

You are an immature ungrateful brat.

@Finelarme9
Copy link

FrankiMC, why did not you insult people on your Askubuntu's 1139927 post as well since you have not had an answer either ? I have reported you. Minecraft community do not want such behavior. montoyo did an incredible job, point.

@Tank-Missile
Copy link

Tank-Missile commented Jul 27, 2019

Since I'm noticing more activity on here, and the fact that @binary1230's pull request was finally closed, is it safe to assume that linux is now supported, or is close to being supported? If not, what can I do to help diagnose any remaining issues?

@montoyo
Copy link
Owner

montoyo commented Oct 18, 2019

Got MCEF working on linux 64 bits. However, there's a caveat: the user HAS to modify LD_LIBRARY_PATH on his own...

@spannerman79
Copy link
Author

So yeah... not sure what's going on

@montoyo Could you create a little guide - either as a .md or a wiki link on how to (easily) compile MCEF & WebDisplays?

The more eye balls on this to help the quicker to pin-point and shine a light on issues.

NB: I've been spoilt with yay lol

@Tank-Missile
Copy link

Tank-Missile commented Feb 14, 2020

So I compiled mcef myself and used it with the latest web displays version, but something is screwed up with cef or multimc. The .pak files can't be found. Just to be clear, the .pak files are indeed in the .minecraft folder. Also, mcefFiles.lst was generated. The exception handling needs to be fixed for that file. Here is the full log.

@spannerman79
Copy link
Author

@Tank-Missile which env vars need to be exported?

@Tank-Missile
Copy link

@spannerman79 LD_LIBRARY_PATH. The mod will display an error if it's not set. Upon setting it, however, the error in the log occurs and the game crashes.

@spannerman79
Copy link
Author

I'm going to assume you did the following;

sh -c "export LD_LIBRARY_PATH=$INST_MC_DIR;exec $INST_JAVA \"$@\"" ?

@Tank-Missile
Copy link

@spannerman79 Look at the log.

@spannerman79
Copy link
Author

That log is hastebin - MultiMC use paste.ee - see https://github.com/MultiMC/MultiMC5/blob/develop/api/logic/net/PasteUpload.cpp#L34..L50

And no - you didn't use envars that MultiMC defines. You hard pointed it which could cause an issue - expecially if you move or rename the instance.

Hence why I stated $INST_MC_DIR - see https://discordapp.com/channels/132965178051526656/546322531917758466/595522379837472779


If indeed it still doesn't work and will only work in a dev environment then it still needs work.....

@Tank-Missile
Copy link

Tank-Missile commented Feb 15, 2020

@spannerman79 That's because I copied the log to hastebin. paste.ee only lets the log stay around for a month. It might take longer than a month for @montoyo to take a look at it. I changed the wrapper command to sh -c "export LD_LIBRARY_PATH=$INST_MC_DIR;exec $INST_JAVA "$@"", but it still crashes with the same issue. I'm not sure why it's trying to look in the natives folder instead of the .minecraft folder.

@montoyo
Copy link
Owner

montoyo commented Feb 15, 2020

@spannerman79 Too busy to write the detailed instruction on how to compile the CEF native for Linux, but it looks like something like this :

  • Clone JCEF
  • Checkout the correct commit (can be found in native/README.txt)
  • Apply patches
  • cmake .
  • (You might have to fix the CMakeCache and change the python executable, because it will probably choose python 2 instead of 3, or the opposite...)
  • (You also might have an issue with gsutil, you'll have to edit the gsutil python source code and change some argument to force a specific version, google the issue and you shall find the answser)
  • If cmake suceeds, just use make and your basically done

Then to use the libraries you built, the "best" way is to actually install some kind of local HTTP server (apache2, nginx or shit like this), write your own config2.json and edit the mcef config file to use the local HTTP server you just set up.

Easier: I published the libraries I built. If you clone MCEF 1.20 (the master branch) it will download the linux binaries.

@Tank-Missile This happened to me too when using MultiMC and the official Minecraft Launcher. Turns out JCEF is dumb and uses the first directory in java.library.path (and when using MultiMC or the Minecraft launcher, it's the wrong directory!). Anyway, you can fix this by editing getJcefLibPath() in https://github.com/montoyo/mcef/blob/master/src/main/java/org/cef/CefApp.java#L552

@montoyo
Copy link
Owner

montoyo commented Feb 15, 2020

After patching getJcefLibPath(), it should be crashing.... and I don't know why :/

@Tank-Missile
Copy link

Tank-Missile commented Feb 16, 2020

@montoyo How exactly did you patch getJcefLibPath()? There's a patch from 6 years ago that attempts to fix a similar issue I think. Something as important as this should be pushed to master.

@montoyo
Copy link
Owner

montoyo commented Feb 16, 2020

For MCEF's purpose, getJcefLibPath() should return the Minecraft folder, which can be found in MCEF's ClientProxy.ROOT

@Tank-Missile
Copy link

You're right. I changed getJcefLibPath() to return ClientProxy.ROOT, and now it crashes without a stack trace. Well, at least I'm finally at this point, so I'm going to see what I can do to figure out what is going on.

@montoyo
Copy link
Owner

montoyo commented Feb 16, 2020

Yeah... and the fact that it works perfectly fine with IntellJ just kills me...

@Tank-Missile
Copy link

You may be able to use jdb to debug the JVM. I'm not exactly sure how to use it, but I did figure out how to attach it to the running JVM. Add this to your java arguments:

-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n

Launch the game, and then type this in a terminal:

jdb -attach 8000

From there, you can use the various commands jdb offers. That's about as much as I understand at the moment, so sorry if this does not help.

@ArcaneBlackwood
Copy link

[21:09:21] [Client thread/INFO] [MCEF]: Now initializing MCEF v1.20...
[21:09:21] [Client thread/INFO] [MCEF]: Selected mirror: montoyo.net (over HTTPS)
[21:09:22] [Client thread/INFO] [MCEF]: Detected platform: linux64
[21:09:22] [Client thread/INFO] [MCEF]: Checking for missing resources...
[21:09:25] [Client thread/INFO] [MCEF]: None are missing. Good.
[21:09:25] [Client thread/INFO] [MCEF]: Now adding "/home/arcane/.local/share/multimc/instances/Blep Pack/.minecraft" to java.library.path
[21:09:25] [Client thread/INFO] [MCEF]: Done without errors.
[21:09:26] [Client thread/INFO] [MCEF]: Loaded 825 mime types
[21:09:26] [Client thread/INFO] [STDOUT]: [org.cef.CefApp$2:run:407]: initialize on Thread[Client thread,10,main] with library path /home/arcane/.local/share/multimc/instances/Blep Pack/natives
Process crashed with exitcode 11.

Segmentation fault? Seems to be something from the libjcef.so library and onward. Right as it initializes it fails without stacktrace. If it is a segmentation fault, I wouldn't expect that from java itself, but something in a pre-compiled binary.

I don't know much about anything in this field, but I wouldn't be surprised if the java runtime didn't catch a severe exception from a binary file. Im not compiling it manually, just letting the mod download it itself.

@lyuben-todorov
Copy link

Any updates on this?

@TheGunk
Copy link

TheGunk commented May 29, 2020

Any updates on this? @montoyo

@xunto
Copy link

xunto commented Jun 2, 2020

I don't think constantly poking him with this question will be of any help. You can see for yourselves that there is no update in repository so there is probably no update on this issue.

We should probably accept that author lost interest to the project (or have other things to do) and try to do it ourselves.

@xunto
Copy link

xunto commented Jul 15, 2020

I tried another non-default launcher (TLauncher) and got this output.

[16:32:07] [Client thread/INFO] [MCEF]: 1 schemes registered
[0715/163207.716396:ERROR:main_delegate.cc(838)] Could not load cef.pak
[0715/163207.733099:ERROR:main_delegate.cc(855)] Could not load cef_100_percent.pak
[0715/163207.733121:ERROR:main_delegate.cc(864)] Could not load cef_200_percent.pak
[0715/163207.733362:ERROR:main_delegate.cc(874)] Could not load cef_extensions.pak
[0715/163207.807924:ERROR:main_delegate.cc(838)] Could not load cef.pak
[0715/163207.807988:ERROR:main_delegate.cc(855)] Could not load cef_100_percent.pak
[0715/163207.807996:ERROR:main_delegate.cc(864)] Could not load cef_200_percent.pak
[0715/163207.808006:ERROR:main_delegate.cc(874)] Could not load cef_extensions.pak
[0715/163209.970515:ERROR:extension_system.cc(69)] Failed to parse extension manifest.

I thought it may be the path but it's ok according to inotifywait.

$ inotifywait -m -r -e OPEN .
...
./ OPEN cef.pak
./ OPEN cef_100_percent.pak
./ OPEN cef_200_percent.pak
./ OPEN cef_extensions.pak
./ OPEN chrome-sandbox
./ OPEN devtools_resources.pak
...

Not sure if this is the same problem and this output just eaten by mojang launcher but it may be the case.

Update: Nah, tried to hardcode path and error disappeared but crash still happens.

@Jacobwasbeast
Copy link

Anything new?

@Jacobwasbeast
Copy link

For anybody wondering how to fix this with 1.11b or just a easy fix here are some steps below

  1. install wine or lutris (Tested on lutris wine)
  2. install the Windows Minecraft launcher/ Windows MultiMC
  3. install 1.12.2 Forge
  4. add mods
  5. launch
    6.Enjoy working MCEF

@Tank-Missile
Copy link

@Jacobwasbeast I think needing to run Minecraft through WINE to get MCEF working defeats the purpose of native support, which is what we've been waiting all this time for. JCEF is incredibly fragile, and debugging it is nearly impossible.

@Jacobwasbeast
Copy link

Jacobwasbeast commented Feb 17, 2021

@Tank-Missile I see what you mean and getting native support would be great but I feel until a solution is made without any crashes I think wine may be the only method for linux MCEF to work. I also made the comment to help anyone who may not be able to get MCEF to work as I was not able to when I was viewing this issue.

@JosephTech9785
Copy link

Reading this whole thing has been super helpful. it's been a while since the last comment, is there any new news as far as getting mcef to work on linux?

@ds58
Copy link

ds58 commented Jun 19, 2021

@spannerman79

Hi!

Well this issue has been open a long time. Hopefully I can put it to rest. I've forked the project and added proper Linux and macOS support. Made a PR so it hopefully gets merged at some point. Here's my release: https://github.com/Ruinscraft/mcef/releases/tag/1.12.2-1.30

I would appreciate any testing or feedback.

Thanks!

@xunto
Copy link

xunto commented Jun 20, 2021

@dextonanderson Wow, I can't believe this is happening! Good job!

@ds58
Copy link

ds58 commented Jun 20, 2021

@dextonanderson Wow, I can't believe this is happening! Good job!

Thanks!

Let me know if you run into issues.

One additional thing I am working on at the moment is releasing binary patches to add the additional proprietary codecs to CEF.

Of course, I can't host the final proprietary binaries myself because of licensing issues. My JCEF mirror has the freely licensed binaries.

My binary patches will get around the licensing because the end user will use the patches to compile the final binaries themselves (which is allowed by the license).

I will provide a Python script so you can patch your CEF binaries easily

Will post an update when I finish this project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests