Cannot use Cairo in Monodevelop on Debian linux - linux

I want to create my own GTK# widget, and so I need to use Cairo for custom painting. But there is a big problem - Cairo library is not recognized on my machine.
At statement using Cairo; Monodevelop says: The name 'Cairo' does not exist in the current context, and so I cannot even compile my sources. I have tried to disable source analysis, but obviously this is deeper problem.
I use Debian testing and all libmono-cairo* libraries are installed.
Is there any way how to got Cairo working on Debian linux?
Thanks

If libmono-cairo* are installed, you surely missed adding Mono.Cairo to your references:
Check Mono.Cairo to add cairo wrapper assembly to your project.
If you can't find Mono.Cairo in the Packages, go to .net Assembly Tab, and browse
/usr/lib/mono/4.0/
Or any other cli version, and add Mono.Cairo.dll to your references.
note:
I've double check why on Debian (jessie for me) Mono.Cairo doesn't appear in the reference list even if Mono-cairo.pc is present in pkgconfig directory. Launching Monodevelop as Root, it appears in the Packages list. So must there be a permission failure somewhere.

Related

problem using Haskell Stack on cygwin - missing library pcre

I am running stack Version 2.1.3, x86_64 hpack-0.31.2 on cygwin. A Haskell project that I am trying to build requires the use of regex-pcre-0.94.4 which in turn requires the pcre library. The exact message I get is:
$ stack build
regex-pcre> configure
regex-pcre> Configuring regex-pcre-0.94.4...
regex-pcre> Cabal-simple_Z6RU0evB_2.0.1.0_ghc-8.2.2.exe: Missing dependency
on a foreign library:
regex-pcre> * Missing C library: pcre
regex-pcre> This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is already
installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
There does not seem to be an easy way of obtaining a relatively recent version of pcre binaries for Windows (the ones at http://gnuwin32.sourceforge.net/packages/pcre.htm are too old for my purposes). There is a video showing how to build the binaries from source but before I go that route, there are some relatively recent precompiled binaries available at https://github.com/dragokas/PCRE but I have no idea what to do with them or where to place them. This is beginning to look like a lot of work that I am wondering if its worth it or I should just drop the idea of doing it in Windows and move to Linux. Any ideas or suggestions?
PS. I also notice that cygwin already has a pcre library (/bin/cygpcre2-16-0.dll). but as this looks like a 16-bit library I assume it won't work, and again I am not sure how to tell stack to use this.
Here I found the answer:
regex-pcre doesn't support Windows, at least the current
regex-pcre.cabal doesn't work well on Windows.
Try regex-pcre-builtin, it's the same as regex-pcre, but with
PCRE sources bundled in. I don't know why the author doesn't merge it
into regex-pcre, but creating a new package for this.
I had to change only name regex-pcre to regex-pcre-builtin (as versioning is the same) in my .cabal file that installs dependencies with stack build. (example: ./your-project-name.cabal)

Using KDE frameworks and Qt Creator installed without apt

A similar question has already been asked here Starting with KDE Frameworks 5 and Qt Creator. However, the answer still hasn't clarified my doubts. So here is the problem: on Linux (Ubuntu) there are two ways to install Qt, first is to use apt (sudo apt install qt5-default) and the other one is to download Qt from the official website. Now when you install using the first way Qt is installed by defualt /usr/lib and the second way in the home folder (or in /opt if you ran the installed with administrator privileges).
Now I would like to integrate KDE Frameworks 5 in my project so on the official website it is suggested to use:
sudo apt install framework
And then you can just include that in your project by QT += framework. The problem is I installed Qt using the second way (downloading from the website) and as a result Qt Creator always return Project ERROR: Unknown module(s) in QT: framework. This I believe is because Qt doesn't seem to be aware of the fact that the modules are in /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/ instead it probably looks for them somewhere else.
How do I solve this problem with a permanent solution? I cannot install Qt using apt because I would like to use the latest version which usually in not immediately available in the default repositories.
Ok so after a looking a lot, a solution has been suggested here https://forum.qt.io/topic/104861/how-to-use-kde-frameworks-with-qt-creator/8
Essentially Qt, if not installed through the system's repositories, is unable to find the KF5 modules. In order to fix this you can add a QMAKEPATH environment build variable to your project that tells Qt where it should look for the module, in my case this was in
/usr/lib/x86_64-linux-gnu/qt5

Get AVR with gcc running on fedora

im trying to solve this issue for a few days now and i cant find any solution.
I got myself an Atmega88A and i want to program it on fedora.
I tried to program C with gcc and that went well. But as i tried to include the avr/io.h, i always get the failure that it didnt found anything. I tried to get the new version of gcc, but that gives me an error too. Would it be enough to just download the avr/io.h library and implement it somewhere in my files? or is there any way to download this all together, including also all the other libraries that i need (e.g. util/delay.h)
You need to use a version of GCC that is specifically built to target AVR chips, you cannot just use the normal gcc executable for your system because it will produce the wrong kind of program. If you download a correctly-configured toolchain, then lines like #include <avr/io.h> should work automatically because the toolchain's default include search paths will be set up properly.
Many Linux distributions provide an avr-gcc package that you can just install with your package manager, including Fedora. You might have to install the avr-libc package to get the avr/io.h header.
If that doesn't work for some reason, you could try downloading Microchip's official AVR toolchain from this page:
http://www.microchip.com/avr-support/avr-and-arm-toolchains-(c-compilers)
What fixed this problem for me was this missing package: avr-gcc-c++. Running the command:
dnf install avr-gcc-c++
fixed it.

Port a debian package to YUM for CentOS

I have a project that runs on Debian and uses many packages provided from the Debian repositories.
Because of demand, I've looked into porting the project to CentOS, but found that many of the packages I require are completely missing - at least 10 dependencies would have to be compiled manually at install time on the users machine.
My question is, what is the best way to create an installer for the user's machine? Should I use automake tools (with the standard ./configure, make, make install), to compile the required libraries, or is this a non-standard approach. Note that my app doesn't actually need to be compiled since it is written in Python, so is it weird to do a "make", when you're not compiling your own app?
Should the configure script just warn the user that package X is missing, and let them handle the rest?
Should I roll my own dependency checker by runng pkg-config manually a few times for each library required, and exit if something is missing?
I'm quite new to this, so any tips to get me moving in the right direction are appreciated.
Edit: I am familiar with RPM and yum for red hat base distros, but CentOS is missing many multimedia packages that I require. An example of one of my package dependencies is "liquidsoap" which is a programmable audio engine: http://savonet.sourceforge.net/
This is available on Debian, but not Redhat/Centos
See this link on CentOS package management.
http://wiki.centos.org/PackageManagement/Yum
CentOS is redhat based and does not use .deb packages by default. However apt package management has been ported to tons of platforms, you may be able to use a port for centOS
If you use YUM whatever packages you need will be there for your application as redhat distros need all the same things that any other distro does.
EDIT: To get the details out of comments
Packages not available on the target platform either have to be built (possibly as a port) on the target platform and then shipped in the ported package (in this case YUM), or code needs to be modified and forked to use packages which already are available on the target platform. The choice depends on which is worse, or which is even possible given your constraints.

Installing Qt on Linux (Debian distribution)

I have Qt 4.6.3 on Debian. I need version 4.8.1.
To install it I downloaded the Qt SDK 1.2.1 from the Qt site, where is said that it contains version 4.8.1
After installation I checked Qt version and it is 4.6.3 instead of expected 4.8.1.
What I am doing wrong? And how can I install 4.8.1?
First of all I recommend getting 'official' Debian Qt upgrades by adding the testing (wheezy) repo to your package manager, this way everything on your system will be updated seamlessly in a few clicks.
If you can't do this, then:
Use your package manager to uninstall the existing Qt installation (so that's the runtime libs, plugins, and Qt Creator).
Install the SDK anywhere you like, it installs under one folder anyway.
Update your $PATH to point to the directory with qtcreator, qmake, etc., there are numerous ways of doing this, the simplest is exporting the updated $PATH in your .bashrc. (And optionally make some nice shortcuts for your DE).
Create symlinks in /usr/lib (or /usr/lib64) to point to the Qt libraries the SDK provides, or add a qt.conf file containing the path in your /etc/ld.conf.so.d/ directory and run ldconfig as root.
I'm an openSUSE user myself, so some of the above may slightly different on Debian, hopefully someone with Debian experience can chime in if I'm incorrect.

Resources