How to install recent mono and monodevelop? - mono

I tried to install mono and monodevelop on centOS 6.3.
After many hours I was able to install mono but failed with monodevelop.
I'm really astonished how difficult and time consuming it is, to get a recent mono/monodevelop version on linux installed.
Is there nobody willing to write and maintain an install/compile tutorial to get the most recent mono/monodevelop/monodata/ASP.NET MVC/... version on the major linux distributions (Centos, Ubuntu, Suse, Debian) installed?
I think many people developing on Windows (with limited linux knowledge) would like to start using mono, if the boarding hurdle would be somehow lower.
It may be the most important to make Mono more used and more visible.
Please, write a tested tutorial (script) for compiling mono/monodevelop.
Thank you!

I have created a project on Open Build Service, which produces builds of the latest MonoDevelop 4.0.10 for Debian, Ubuntu, CentOS, and Fedora.
see https://build.opensuse.org/project/show/home:tpokorra:mono
For installation instructions with apt-get or yum, see:
http://software.opensuse.org/download/package?project=home:tpokorra:mono&package=monodevelop-opt
I hope this will increase the usage of MonoDevelop on Linux Desktop environments.

Monodevelop 4.
If you use any *buntu. Check this.
"You can open up the terminal and install it via the following:
1. sudo add-apt-repository ppa:keks9n/monodevelop-latest
2. sudo apt-get update
3. sudo apt-get install monodevelop-latest"
http://mono-d.alexanderbothe.com/?p=101

Xamarin should be doing a better job at publishing the linux packages in a one-click manner. I don't care what linux distro (SuSE, RHEL, CentOS, Ubuntu etc) - just pick any one as the supported one and publish for it. It seemed that it used to be SuSE but even that has old packages as seen within Zypper/YaST.
Update Mono framework
Having said that, to update the Mono framework itself, without letting go of the package managers try this. This will work as long as the project dutifully publishes the RPMs. You don't want to build from source since it's a more fickle process and the setup distracts from your real objective (i.e. develop).
Obviously, please replace the URL below to what will be latest by the time you're reading this.
mkdir mono-rpms
cd mono-rpms
wget --reject "index.html*" -nd -r -e robots=off --no-parent http://download.mono-project.com/archive/3.2.3/linux/x64/
sudo zypper install *rpm
Update MonoDevelop (the IDE)
Timotheus Pokorra's answer indicates he's filling in some of the usability void left by Xamarin (Thanks Timotheus!!). You can install MonoDevelop via
http://software.opensuse.org/download/package?project=home:tpokorra:mono&package=monodevelop-opt
Note that on SuSE I get the error
Problem: nothing provides liberation-mono-fonts needed by mono-libgdiplus-opt-3.0.12-7.1.x86_64
Solution 1: do not install monodevelop-opt-4.0.12-5.2.x86_64
Solution 2: break mono-libgdiplus-opt-3.0.12-7.1.x86_64 by ignoring some of its dependencies
I (very reluctantly) selected to break the dependency. Note that I already had liberation-fonts (via sudo zypper install liberation-fonts). I don't know if its the same/different as liberation-mono-fonts. Anyway, hope Timotheus fixes it when he has a moment.

I'm not sure if you've already seen this, but this may help:
http://www.mono-project.com/Parallel_Mono_Environments
The most common problem that new developers have when coming to Linux from systems like Windows is not properly setting up their environment variables and so when they do the standard ./configure && make && make install routine, when it involves a number of source packages (like Mono does), any package that depends on the core package won't pick up the correct location for that base package.
Your question really doesn't explain what parts you found confusing or difficult so it's hard to address those issues.
For people unfamiliar with setting up Linux systems, it may be easier if you just go with a system like Ubuntu which has fairly recent pre-built packages (although not the latest - I don't think any Linux system keeps up with Mono releases) rather than wrestling with the learning curve of how to build everything yourself.

It is confirmed that in the near future Xamarin will support Linux and provide binaries (mono and mainline applications) for Debian and Centos derivatives, and their are already packages for Debian and Centos derivatives for technical preview. So cheers and no more pain of compiling and even parallel mono installaions.It can not get more easy than this. Check here

Related

Problem running a PyQt5 project in WSLg - no application window shows up

I am running WSL2 under Windows 10.
If I type "gedit &" into the WSL console, the Gedit application window pops up. Thus I assume that WSLg properly works.
Next, I am trying to run the following PyQt5 project:
https://github.com/rafaelpadilla/review_object_detection_metrics
However, no application window pops up this time, although no error message appears either.
First of all, I do wonder whether this could work at all with WSL!?
Appendix for additional context:
I am not using conda because of licensing issues, but a combination of pyenv + poetry instead. First I had problems with a missing library (libxcb.so), which I could solve by running "sudo apt python-pyqt5". Now everything seems to work, except from no application window being shown.
UPDATE:
I tried with "/src/pyqt-official/qtdemo/qtdemo.py" from the official PyQt Examples github repository and I observed exactly the same issue.
There is no error message. Last prompt informs me that the "xcb plugin was loaded“, then nothing happens. In particular, no window is showing up.
Some related observations:
(1) I haven't yet updated my grafics card driver to support vGPUs. However, Gedit works and opens in a separate window.
(2) Unless I do "sudo apt install python3-pyqt", I receive an error message saying that it cannot find "libxcb.so". However, I am running the code in a virtual pyenv/poetry environment, which is separate from the system python installation. I don't understand why "sudo apt install python3-pyqt" makes a difference here. Shouldn't installing "PyQt5" with poetry obtain a wheel that comes with all libraries already compiled? I don't understand how all of this is playing together.
Open Questions:
Do you think the driver issue could be an explanation? I actually cannot imagine that. I thought it is only about better performance for OpenGL applications.
Can you explain observation (2)?
What else can I do?
First of all, I do wonder whether this could work at all with WSL!?
I can't tell you if that particular application will run under WSL, but my expectation is that it will. As far as I can tell in its dependencies there doesn't seem to be any reliance on GPU compute. That, to me, would be the trickiest part to configure under WSL (but is still typically possible). However, there may be other dependencies (not covered below) that you need to get running before the application can work.
What I can confirm is that PyQt works under WSL just fine. However, keep in mind that a default Ubuntu installation under WSL is based on a non-GUI Ubuntu Server distribution, rather than standard Ubuntu (with a desktop and GUI).
This means that Ubuntu Server is often missing system level libraries needed for GUI support, which appears to be the case here.
I don't understand why "sudo apt install python3-pyqt" makes a difference here. Shouldn't installing "PyQt5" with poetry obtain a wheel that comes with all libraries already compiled?
Poetry and/or Pip manage the Python library dependencies, but those Python libraries still require the native system library dependencies. That's where sudo apt install python3-pyqt5 comes in. Under a desktop Ubuntu system, most of these libraries would already be in place. However, with Ubuntu Server/WSL, they aren't.
For reference, here's my configuration. On a freshly initialized Ubuntu 22.04 WSL2 distribution:
sudo apt update && sudo apt upgrade -y
sudo apt install python3-venv python3-pyqt5
mkdir -p src/pyqt_test
cd src/pyqt_test
python3 -m venv .venv
source .venv/bin/activate
pip install pyqt5
I was then able to create and run the following, taken from Learn Python PyQt:
import sys
from PyQt5 import QtWidgets
app = QtWidgets.QApplication(sys.argv)
windows = QtWidgets.QWidget()
windows.resize(500,500)
windows.move(100,100)
windows.show()
sys.exit(app.exec_())
The window displayed correctly.

Fixing gnuradio deleted directory

I have been following this guide to install gnuradio 3.8 onto my Ubuntu 22.04.1 LTS, but I missed the instruction where it said "Ensure the "gitbranch" is maint-3.8", and mine said maint-3.10. After trying to install gr-iqbal, it gave me an error. For whatever reason, I thought that simply deleting the directory it was built in would let me reinstall it. It didn't.
I have tried using pybombs install gnuradio which gives me CMake Error: The source directory "/home/aboigoe/sdr/src/gnuradio" does not appear to contain CMakeLists.txt.
I have tried using pybombs rebuild gnuradio, but that obtains Package gnuradio is not installed into current prefix. Aborting.
To fix that, I tried using pybombs fetch gnuradio, which runs fine, but doesn't fix the previous error.
Finally, I tried pybombs remove gnuradio, but it says Package gnuradio is not installed. Aborting.
So you're working with pybombs! That makes this particular task easier: just delete the whole prefix, and start anew. The main thing you needed to build in that prefix was GNU Radio, and you built 3.10, and wanted 3.8, so that's a complete rebuild, anyways.
I assume you're following that guide (which comes, kind of, out of nowhere – GNU Radio has installation guides on their wiki, https://wiki.gnuradio.org) because you want exactly GNU Radio 3.8, with gr-osmosdr and gr-iqbal.
If you just want a working GNU Radio that can talk to your SDR hardware, um, don't follow random guides from the internet :) Instead, your whole problem boils down to a simple
sudo apt install gnuradio
and that's it – GNU Radio 3.10, as Ubuntu 22.04 ships it, contains gr-soapy, and Ubuntu's apt will install many available hardware drivers (for RTL-SDR, hackrf, mirisdr, bladerf, audio-interfaced hardware, red pitaya,…) without any need to do anything yourself. It just works.
The thing that will be different is that the blocks to inteface with your hardware will not reside under the "osmosd" category in your GRC, but in "Soapy", but I guess you'll deal with that rather than going through the rather convoluted way of installing an old (and not updated anymore) version of GNU Radio, to include an old (and not updated anymore) version of gr-osmosdr :)

How to upgrade gcc compiler to latest version

I have gcc 6.3.0 and to run tensorflow 2.11.0 along with cuda 11.2, I require gcc version 9.3.1, but I just cannot find a simple and straightforward way to do that. Some people say install mysys, other sites point to sourceforge download link, while download links on mingw site point to github repos, I just don't understand how to upgrade this thing.
It would be really helpful if someone could explain it like you are explaining it to complete newbie, step by step.
Last time, I downloaded mysys2 because someone told that it will automatically upgrade gcc to latest version, mysys2 came with a python 3.10, and I was working with python 3.9, and it created a lot of issues, later I had to reset my pc. That's way I just want to know the direct way to upgrade this thing instead of upgrading other software. I also tried by downloading mingw, but the installer available on sourceforge gives gcc 6.3.0 and not the latest gcc.
And what is this cygwin which gives unix like environment, why do i require unix like environment. Even if cygwin can do it easily, I am hesitant to download cygwin, cause i don't want another repeat of tragedy that happened due to mysys2, afterall, installing a complete set of programs that i don't know anything about and will probably never use will only create additional errors.

Configure pdf-tools in Emacs running on MacOS

I am unable to successfully utilize the pdf-tools package.
Environment:
macOS Monterey 12.0.1
Emacs 27.2
To the best of my understanding, I have followed the installation instructions as outline on https://github.com/politza/pdf-tools:
I've installed and confirmed that the installations of poppler and automake are up-to-date
Though it doesn't seem to be required for the MacOS install, I've installed and confirmed that the installations of gcc and glib are up-to-date.
I've set the PKG_CONFIG_PATH in the init.el file using setenv and confirmed its settings using getenv
(setenv "PKG_CONFIG_PATH" "/usr/local/Cellar/zlib/1.2.8/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig")
When I try to execute pdf-tools-install and select y in response to the question "Need to (re)build the epdfinfo program, do it now?" I get a compilation error which reads:
mode: compilation; default-directory: "~/.emacs.d/elpa/pdf-tools-20211110.513/build/server/"
Comint started at Thu Dec 2 09:17:05
/Users/username/.emacs.d/elpa/pdf-tools-20211110.513/build/server/autobuild -i /Users/username/.emacs.d/elpa/pdf-tools-20211110.513/
Failed to recognize this system, trying to continue.
Configuring and compiling
No such program: autoreconf
Comint exited abnormally with code 1 at Thu Dec 2 09:17:05
I have confirmed that the referenced directory exits and that autoreconf is installed and up-to-date.
For a long while, I had a working pdf-tools setup on my Mac (thank you Andreas Politz and all the other contributors for such a fabulous tool). Suddenly, I don´t really know how or why, it stopped working. I also deleted my homebrew HEAD version of pdf-tools, which made things worse, because I have never again managed to install pdf-tools from Homebrew.
I tried many tweaks, until, finally, I believe the trick that really got things running again was setting the PKG_CONFIG_PATH to everything that mattered inside the init.el file (and downloading XQuartz to get a X11 environment, with the only purpose of having renderproto in the system; it may have been available in an easier way, but it was only like this that I managed to do it).
Here are all the key steps involved in getting pdf-tools back to work in my MacOS Monterey 12.5 running Emacs 28.1 :-)
Download and install XQuartz to get X11 in your Mac (this might be unnecessary, but it helped me).
In case you haven't already, install other dependencies through homebrew:
brew install poppler automake pkg-config
Through M-x list-packages, install pdf-tools.
In your init.el file, set the PKG_CONFIG_PATH using setenv:
(setenv "PKG_CONFIG_PATH" "/usr/local/Cellar/zlib/1.2.12/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig:/usr/local/Cellar/poppler/22.06.0_1/lib/pkgconfig:/opt/x11/share/pkgconfig")
Of course, you will have to use your own version numbers and update them every time you upgrade zlib and poppler. (zlib now ships with mac OS. If like me you're on mac OS 12.6 or later--and most probably even earlier--you can use /usr/local/opt/zlib/lib/pkgconfig:, which won't have to be updated manually).
Personally, I did all this through the use-package configuration macro that helps organize the init.el file:
(use-package pdf-tools
:ensure t
:config
(setenv "PKG_CONFIG_PATH" "/usr/local/Cellar/zlib/1.2.12/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig:/usr/local/Cellar/poppler/22.06.0_1/lib/pkgconfig:/opt/x11/share/pkgconfig")
(pdf-tools-install)
(custom-set-variables
'(pdf-tools-handle-upgrades t)))
Close Emacs and and re open it in the Terminal and, type y when prompted to "(re)build the epdfinfo program". (For some reason, rebuilding the epdfinfo program seems to work better in the Terminal than in the GUI version of Emacs).
That's all it should take to get pdf-tools to work. It did for me, anyway.
try installing the package 'autoconf' the same way you installed 'automake'.

Can you make WSL interface with windows installs? [duplicate]

How do I avoid installing same programming languages both in WSL and Windows10?
I am thinking about using WSL as a dev workspace. However, I realized I will need to install Node.js, Python, create-react-app, and so on in WSL even though my windows 10 already have them installed.
It would be helpful if you could spare me some advice.
Thanks.
To some degree, it depends on what type of development you are doing. Given your example languages/tools, I'm going to assume that most of your development is platform agnostic, web-development, etc.
My recommendation is to go all-in on WSL and install the Linux versions of the tools you use (with some notable exceptions covered below).
Uninstalling the Windows versions is recommended, but not strictly necessary. I recommend uninstalling because I continue to see a number of questions across the Stack sites where it becomes apparent that the Windows version of Node or Python is getting called from inside WSL. It's likely that some tool, such as nvm or equivalent, attempted to prepend the Windows Node or Python location to the Linux path.
This causes problems, as the Windows versions Node and Python understand Windows paths and processes. When you call them from the Linux shell in WSL, the shell/OS uses, of course, the Linux versions. And Windows Python just won't understand something like /mnt/c/Projects. It needs C:\Projects. You can work around this with utilities such as wslpath (automatically installed in some WSL distributions, installable in all others), or you could just manually adjust the path. But ... why go through the hassle if you don't need to.
Just use the Linux versions, with the corresponding Linux paths and instructions. Most development tools, tutorials, instructions, etc. are going to "default" to the Linux doc. It will typically be more complete, more up-to-date, etc.
And, of course, the Linux command-line experience is (subjectively, sure) far-and-above better than PowerShell. Don't get me wrong, I like PowerShell, but I like PowerShell even better when I call it through WSL (powershell.exe or pwsh.exe), since I can take advantage of Linux niceties like less (or bat), jq, and many others.
Not to say there aren't WSL caveats that you have to get used to. Be prepared to run into a few snags here and there (lack of Systemd support, permissions, filesystems, inotify), but most everything has a workaround that you'll typically find here on Stack (Stack Overflow, Ask Ubuntu, Unix & Linux, and/or Super User) if you search.
And for those "notable exceptions" I mentioned, I recommend installing:
Windows Terminal (available in the Microsoft Store), which will provide an upgraded terminal experience for WSL.
The Windows version of Visual Studio Code -- I've seen a question from someone here who tried to install the Linux version. It's just not necessary. Microsoft has done a great job of integrating the Windows version of VSCode with WSL. Just install the "Remote Development" extension pack, which includes the "Remote - WSL" extension.