forio / julia-studio

An IDE for the Julia Language
forio.com/products/julia-studio
GNU General Public License v3.0
223 stars 48 forks source link

Install on Ubuntu 14.04 with System Qt Libraries #227

Open tedsteiner opened 10 years ago

tedsteiner commented 10 years ago

I wasn't a huge fan of having two versions of the qt libraries on my system, so I decided to try installing using Ubuntu 14.04's system qt libraries. After a little finagling and adding a few non-standard-install qt libraries, I was able to get it to work, and it now seems to run great. (I also used Ubuntu's package for Julia.)

The only code modification I made is available in my fork of the julia-studio repository, and matches a commit to the qtcreator repository (I can issue a pull request, if desired). I think the modification means that qmlpuppet is not compiled. I could not figure out exactly what this is, but my guess is that it's not important because Julia doesn't use QML (right?).

To get qmake to run, I had to add the following libraries:

apt-get install libqt5webkit5-dev
apt-get install qtscript5-dev
apt-get install qtquick1-5-dev
apt-get install libqt5help5 # (*unsure)
apt-get install qttools5-dev
apt-get install qttools5-private-dev
apt-get install qtdeclarative5-private-dev # (*unsure)
apt-get install qtscript5-private-dev 
apt-get install qtdeclarative5-dev-tools # (*unsure)
apt-get install qtbase5-private-dev 
apt-get install libqt5xmlpatterns5-dev
apt-get install qtxmlpatterns5-dev-tools
apt-get install qttools5-dev-tools

Note that I'm unsure of whether the three marked packages were required or not.

I then ran the following commands:

qmake -r
make
sudo make install

After installing, I had to add the following line to my /etc/ld.so.conf.d/julia-studio.conf file:

/lib/julia-studio

And then ran:

sudo ldconfig

I also added the symlink as described in linux-build.md.

Perhaps this was already known, but I didn't see it written anywhere. I'm posting this here mainly for others who may wish to follow the same process (hopefully more quickly than I was able to do so), and thought you might consider adding this process to the linux-build.md page (or making it a configuration script). I thought this might also be a small step towards making Julia Studio a supported Ubuntu package? Overall I'm a huge fan of the IDE.

CNOT commented 10 years ago

Thanks. Do you think I should go through all these steps, or a clean automated method would be available soon?

tedsteiner commented 10 years ago

Unfortunately, I think they are reluctant to make a package right now because they think the current size is too big (going off Issue #69). Which I agree is an admirable goal, but I don't think it would actually end up being that big.

I really like Julia Studio, so I'd suggest not waiting around for the package and just going for it. This method is actually very clean, since the only component you need to build from source is Julia Studio itself (but it will take a while to compile).

One thing I forgot to mention above was that I already had Qt Creator installed on Ubuntu (also from the standard repositories). So there are definitely more Qt libraries you'll need, but there's a good chance they're installed as dependencies. But just to be safe, I'd recommend first installing the general Qt5 library first (I'm not sure of the exact name, but can look it up if you can't find it). The libraries above are the development files that are just needed to compile from source.

tedsteiner commented 10 years ago

Sorry! The package is actually libqt5xmlpatterns5-dev But it sounds like you didn't need that? I'll edit my previous comment for others.

The problem with "Failed to start Julia" is addressed on the "linux-build.md" page. Here it is again:

cd julia-studio/bin/
ln -s /usr/bin/julia-basic julia-basic

This puts a symlink to julia-basic next to JuliaStudio so that it can find it.

CNOT commented 10 years ago

After trying few different things, I gave up. Even after doing:

cd julia-studio/bin/ 
ln -s /usr/bin/julia-basic julia-basic 

I still got the error:

Error: Failed to start Julia.
Expected location: /julia-basic
tedsteiner commented 10 years ago

I get this error if I start JuliaStudio from outside of the bin directory. Does this still happen when you do the following:

cd /path/to/julia-studio/bin/
./JuliaStudio
CNOT commented 10 years ago

I still get that error. I even tried it on another freshly installed Ubuntu 14.04 device, but the result was the same. I still get the "Error: Failed to start Julia" error.

stochasticTarget commented 10 years ago

I have a fresh new Ubuntu 14.04 and I followed https://github.com/forio/julia-studio/blob/master/linux-build.md like CNOT. The procedure fails with qmake -r which provides "qmake: could not exec '/bin/qmake': No such file or directory". I don't really understand at which time to add the above libraries. Anyway I tried, and still, qmake still does not work.

tedsteiner commented 10 years ago

I've found the directions I posted above to work twice now on Ubuntu 14.04, you could try that. That way you don't have to deal with compiling libraries. Ideally it should "just work." I still haven't been able to figure out why it isn't working for CNOT.

Also, I'll just add that I haven't found Julia Studio to add any functionality or simplicity yet that isn't already present in native Julia, and Forio hasn't updated the project in a while, so I'm not sure if more advanced functionality is coming or not. I found that gedit provides the same functionality as Julia Studio if you install and enable the file browser and terminal plugins and start the REPL in the terminal. In the REPL you can call whos() to view your workspace, typeof(var) to see it's type, and size(var) to get it's size, which gives you all the same information as the workspace pane in Julia Studio (though not as neatly). Winston graphics display in new windows whether you use Julia Studio or not. The only thing you're really missing is a big green button you can press to run your current file (although I think you could also add this with another plugin if you play around with it - it works for Python already). Personally, I'm now primarily using vim with the Julia extensions for most of my work, just because it lets me work a little faster.

I say this just in case you're trying to use Julia for the first time and feeling discouraged. Julia Studio is certainly not required to get the most out of working with Julia, but it is nice in that it makes for a smoother transition for Matlab users. Forio's Julia tutorials area really great for learning Julia, too.

stochasticTarget commented 10 years ago

I followed the directions (with sudo -ito be allowed to add the libraries). That does not work, I still obtain "qmake: could not exec '/bin/qmake': No such file or directory" when trying a qmake -rin the folder julia-studio. Do I have a problem with Qt?

I was a user of iJulia before, but I wanted an autonomous integrated environment.

tedsteiner commented 10 years ago

It sounds like you have a problem with qmake rather than Qt itself. I don't actually know anything about qmake, so unfortunately I don't know how to help you. All I can suggest is to make sure you have the right version of qmake installed to correspond with your version of Qt (most likely qmake5). There might also be a conflict between system Qt libraries and the version you manually installed.

CNOT commented 10 years ago

I worked around that error by:

sudo ln -s /usr/bin/julia /julia-basic

Now the error I get is:

QProcessPrivate::execChild() failed to chdir to /share/julia-studio/Console ERROR: could not open file /share/julia-studio/Console/Console.jl in include at ./boot.jl:245 in include_from_node1 at loading.jl:128 in process_options at ./client.jl:285 in _start at ./client.jl:354 in _start_3B_1713 at /usr/bin/../lib/x86_64-linux-gnu/julia/sys.so

stochasticTarget commented 10 years ago

I tried sudo apt-get install qt5-defaultand after that the qmake -r worked on the folder. However at the end it provided "Project ERROR: Unknown module(s) in QT: script-private declarative-private" and the make didn't work also.