gtk+-3.0 not found issue - gtk

I'm writing program using Vala language. When I try to build a .deb package on Launchpad, I get this error
CMake can't find valac package gtk+-3.0. It uses valac version 0.30. Though it does find it, when I do this on my computer (use cmake to build).
This is first time I try to build .deb package, so I'm a bit confused with what to do... Can anyone tell me how to fix this?
Thanks in advance.

The error is quite clear, CMake can't find the pkg-config package named 'gtk+-3.0'.
You have to install the Ubuntu package containing the gtk+-3.0.pc file (which is libgtk-3-dev) in order to compile and link against the libgtk+-3.0 library.
In fact pkg-config is available in many Linux distributions and it always looks for the gtk+-3.0.pc file in it's search path. The package containing this file (and the development headers and libraries) may be named differently on differnt Linux distros.
While we are talking about Vala: The valac compiler also has a command line switch named --pkg (e.g. --pkg gee-0.8 --pkg gtk+-3.0) which uses the pkg-config to determine the necessary headers and libs to build against libraries that come with a .pc file.

Related

C compiler cannot create executables after installing dependencies

So I've boned my system. I'm running LFS with xfce and it has been running perfectly. I needed to install a video editing package and some dependencies (AppStream, stemmer) but they failed during the install. At the time I didn't think much about it and decided to come back to it later. Now when I run the configure, it get a message:
error: C compiler cannot create executables
I decided to create a test file that just outputs "Yo Dude!" in the terminal. When I try to compile it I get the message:
error: no include path in which to search for stdc-predef.h
It seems as if it can't find the library files, even putting the absolute path to stdio.h doesn't work. I did notice that gcc now shows as 11.2.0 but when I installed the system, I installed 12.2.0. I downloaded 12.2.0 but it won't compile. I can't compile because gcc is broke and I can't install gcc because gcc is broke. I'm trying not to re-install the system. Any suggestions on how I can get around this?

How can I get Ada GNAT gcc 7.3 for Solaris 11?

We have a Solaris 11 system with gcc 7.3, we need to install the Ada package. On Linux gcc 7 came with the Ada/GNAT as part of the gcc install:
apt install gcc
I visited AdaCore looks like Solaris (SPARC) is not longer on the list. I need to use Ada95 and we want the same compiler on both Linux and Solaris in any case.
pkg install gcc
Only installed various C++ commands and Fortran.
pkg install gcc-ada
And variants like gcc7ada, found nothing to install.
If must, we can rebuild the Ada component of GCC 7, however I haven't found a clear cood-book style "How To ..."for that (yet).
Hopefully you can point me to these items in order of preference to help us get back-on-track.
Solaris 11 gcc-ada package for gcc7/Solaris 11 spark, and the package repository.
An 'alternative' package repository were I can retrieve the GCC Ada tooling.
Pre-build GCC 7 Ada module that we can copy to the right places.
Ready-rolled Build Ada/GNAT project for Solaris and how to download and get start building.
Instructions to download and build gcc-ada with gcc 7 on Solaris (or Unix).
From th epast few days searching about on Gnu Compiler Collection, Oracle, the package manager searches, google and so forth ... It really seems like there's next to no support for CGG Ada on Solaris these days.
I very interested in other solutions beyond that list. For instance, has anyone cross-compiled from Linux to Solaris? Would that work with GDB on the Solaris machine anyway?
Looking forward to your suggestions.
I've successfully built gcc 7.50 (x86_64 native with i386 cross-compiler) with GNAT on OpenIndiana (Hipster 2020/10) using the following procedure.
Download the bootstrap compiler from Dragonlace at http://downloads.dragonlace.net/src/ada-bootstrap.x86_64.solaris.511.tar.bz2
Get the illumos gcc 7.5.0 source from https://github.com/illumos/gcc/tree/il-7_5_0
Put the bootstrap compiler's bin directory at the front of $PATH, replace /usr/bin/gcc /usr/bin/cpp /usr/bin/g++ with symlinks to their counterparts in the bootstrap compiler directory (see note below re g++ and c++)
Make sure you've got gnu-binutils and gmake; then run contrib/download_prerequisites
Configure with
--enable-languages='c ada c++' --build=x86_64-aux-solaris2.11 --enable-threads=posix --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-nls --disable-shared --disable-lto --disable-libstdcxx-pch --enable-multilib --with-gnu-as --with-as=/usr/bin/gas --without-gnu-ld --with-ld=/usr/bin/ld
gmake and then gmake install
NOTES:
This setup should be close enough to Solaris 11 to work. If it doesn't, try using the regular gcc 7.5.0 release rather than the illumos-modified branch.
If you get stuck at a linking stage, try using a gcc ld, but you should definitely try to use the Solaris ld first. The gnu as (gas) makes the build go much more smoothly. I didn't have any problems, but if you get stuck at the end of stage 1 or the beginning of stage 2, try setting $CONFIG_SHELL=/usr/bin/ksh -- I think it has been fixed, but at least with older gcc releases one needed to specify ksh because the built-in sh had some non-POSIX peculiarities that didn't work with some of the components' makefiles
I couldn't get one of the support libs for gnat to compile easily without building gcc c++ and using g++ with a full bootstrap. You might be able to figure it out, but the path of least resistance is likely to build gcc c++ and put the g++ symlink in /usr/bin, which is where the makefile wanted to find it.
Please note that I don't know much about Solaris, but a quick search on Google gave me the website OpenCSW. This website provides the packages gcc4ada and gcc5ada.
It appears that gcc5ada is build using a makefile (as found here, in particular notice line 424). A similar makefile exists for gcc7ada (as found here, in particular notice line 426). However, while it seems that the package "gcc7ada" can be created with the latter makefile, it is not published on the OpenCSW.org website (website is no longer updated?).
You could try to install gcc5ada first and then use this old GCC/GNAT compiler as a bootstrapper for compiling the required version (using the GCC 7 makefile).

Setting to compile with glib, dbus lib in Eclipse

I'm making a program with glib and dbus libs.
However I need to guide compile this on Eclipse.
There are errors for these lines..
"Unresolved inclusion"
include <dbus/dbus.h>
include <glib.h>
What kind of options and command needed for Tool Settings(Gcc c++ compiler/gcc c++ linker) on Eclipse?
Use package config to get the libs and cflags needed
pkg-config --libs glib-2.0 dbus-1
pkg-config --cflags glib-2.0 dbus-1
and put them into according places in the Eclipse UI.
That is a common error on eclipse, it uses the system path, but the system maybe uses a library handler like pkg-config, so normally eclipse displays a lot of missing includes, but the program builds correctly (if you set pkg-config on your makefiles), because is just only eclipse how can't find the headers.
to solve this, add /usr/include/glib-2.0/ to your project include path on eclipse
or install an addon to handle the includes like Pkg-config support for Eclipse CDT 0.8.0 this one

Install GD Library on RedHat machine for twiki

My ultimate goal is to run a twiki website for my research group.
I have space on RedHat server that is running Apache, etc., but upon which I do not have root access. Since I cannot install perl modules with the current permissions, I've decided to manually install a local version of perl. Got that working no problem. The following modules are required to get twiki to work:
FreezeThaw - http://search.cpan.org/~ilyaz/FreezeThaw
CGI::Session - http://search.cpan.org/~markstos/CGI-Session
Error - http://search.cpan.org/~shlomif/Error
GD - http://search.cpan.org/~lds/GD
HTML::Tree - http://search.cpan.org/~petek/HTML-Tree
Time-modules - http://search.cpan.org/~muir/Time-modules
I have installed FreezeThaw, CGI, Error, and it fails on GD with the following error:
UNRECOVERABLE ERROR Could not find gdlib-config in the search path.
Please install libgd 2.0.28 or higher. If you want to try to
compile anyway, please rerun this script with the option --ignore_missing_gd.
In searching for how to get around this newest obstacle, I found a previous SO question: How to install GD library with Strawberry Perl asked about installing this and the top answer suggested manually compiling gdlib. You'll note, however, that that link is broken. The base site: http://www.libgd.org/ is basically down saying to go to the project's bitbucket page.
So I got the tarball from that page and am trying to install it. The following problems occur when I follow the instructions included. README.TXT says: "If the sources have been fetched from CVS, run bootstrap.sh [options]."
Running bootstrap.sh yields:
configure.ac:64: warning: macro `AM_ICONV' not found in library
configure.ac:10: required directory ./config does not exist cp: cannot
create regular file `config/config.guess': No such file or directory
configure.ac:11: installing `config/config.guess' configure.ac:11:
error while copying cp: cannot create regular file
`config/config.sub': No such file or directory configure.ac:11:
installing `config/config.sub' configure.ac:11: error while
copying cp: cannot create regular file `config/install-sh': No such
file or directory configure.ac:28: installing `config/install-sh'
configure.ac:28: error while copying cp: cannot create regular
file `config/missing': No such file or directory configure.ac:28:
installing `config/missing' configure.ac:28: error while copying
configure.ac:577: required file `config/Makefile.in' not found
configure.ac:577: required file `config/gdlib-config.in' not found
configure.ac:577: required file `test/Makefile.in' not found
Makefile.am:14: Libtool library used but `LIBTOOL' is undefined
Makefile.am:14: The usual way to define `LIBTOOL' is to add
AC_PROG_LIBTOOL' Makefile.am:14: to configure.ac' and run
aclocal' and autoconf' again. Makefile.am:14: If `AC_PROG_LIBTOOL'
is in `configure.ac', make sure Makefile.am:14: its definition is in
aclocal's search path. cp: cannot create regular file
`config/depcomp': No such file or directory Makefile.am: installing
`config/depcomp' Makefile.am: error while copying Failed
And it says I should also install the following 3rd party libraries:
zlib, available from http://www.gzip.org/zlib/
Data compression library
libpng, available from http://www.libpng.org/pub/png/
Portable Network Graphics library; requires zlib
FreeType 2.x, available from http://www.freetype.org/
Free, high-quality, and portable font engine
JPEG library, available from http://www.ijg.org/
Portable JPEG compression/decompression library
XPM, available from http://koala.ilog.fr/lehors/xpm.html
X Pixmap library
Which I am ignoring for now.
Switching to the generic instructions it says follow the advice in the INSTALL file; which says: "cd to the directory containing the package's source code and type ./configure to configure the package for your system." Which flat does not work: I've cd'ed into every directory of the tarball and running that command does nothing.
So, trying to install twiki required me to install perl, which required me to install the perl modules: FreezeThaw, CGI, Error, HTML, Time-modules, and GD -- which itself required me to install gdlib -- which further suggested I install zlib, libpng, FreeType 2.x, JPEG library, and XPM. And of course, I'm stuck at the installing gdlib stage.
My question is: what other process can possibly demean humanity to such a level? I cannot fathom the depths of cruelty that lay ahead of me as I dive ever deeper into this misery onion. Should I just end it all? Can meaning be brought from this madness? Will the sun come up tomorrow, and if so, does it even matter?
But seriously, any suggestions on what to do differently/better would be much appreciated -- I can't remember what a child's laughter sounds like anymore.
Install the package gd-devel, it contains /usr/bin/gdlib-config.
This should work:
sudo apt-get -y install libgd2-xpm-dev build-essential

how to build PoDoFo library for iOS

This may be a copy of this question How can I use the PoDoFo library for annotating PDFs on iOS? not responded yet.
i know how to use/create static libraries into xcode projects for iOS. i was looking for a free PDF library which support in memory editing of pdf documents and i came to know that PoDoFo done it very well, i tried to build this library for xcode but i really don't know how to play with CMake. can any body tell me how can i use this library into my iOS application.
thanks
This is an extract from Podofo 'Read me' file
CMake builds on Mac OS X
Mac OS X users can build PoDoFo using CMake either by generating conventional UNIX Makefiles (the "Unix Makefiles" CMake target) or generating an XCode project (the "Xcode" target). In either case the following applies.
You will need freetype and fontconfig. It's possible to omit the use of libjpeg (see the platform-independent documentation) but by default libjpeg will also be required. If you have these libraries already (say, from fink or DarwinPorts) you can skip the following section and update the CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH arguments appropriately.
Dependencies
I'll assume you're installing podofo and any required libraries into $HOME/libs . Adjust to taste, but keep it consistent.
The easiest way to get any required libraries is to use MacPorts to install the libjpeg, fontconfig, and freetype libraries. Once you've installed MacPorts, just run:
/opt/local/bin/port install fontconfig freetype jpeg tiff lua
MacPorts will automatically build the libraries and their dependencies, installing them in /opt/local.
If you want to distribute the libraries with your application, all you'll need to do is use install_name_tool to set appropriate relative paths for their linkage and include them in your application bundle - just like you do with any other libraries.
PoDoFo itself
You should be able to configure and install podofo on Mac OS X using:
cmake -G "Unix Makefiles" \
-DWANT_FONTCONFIG:BOOL=TRUE \
-DCMAKE_INSTALL_PREFIX=/opt/podofo \
-DCMAKE_INCLUDE_PATH=/opt/local/include \
-DCMAKE_LIBRARY_PATH=/opt/local/lib \
../podofo
make
sudo mkdir /opt/podofo
sudo chown $USER /opt/podofo
make install
change "Unix Makefiles" to "Xcode" if you want to build an XCode project instead, then instead of running make' andmake install' just open the project file and work as normal
Instead of using 'XCode' in the command, type 'Xcode', (c lowercase) and it should do the trick.