configure GnuTLS - libnettle 3.4.1 was not found - OS X Lion - configure

I'm trying to build GnuTLS-3.x on my OS X Lion and here is my configure command:
./configure --prefix=/usr/local/gnutls-3.4.9 --with-included-libtasn1 --without-p11-kit
It ends up
checking for NETTLE... no
configure: error:
***
*** Libnettle 3.4.1 was not found.
though libnettle-3.4.1 is installed under /usr/local/libnettle-3.4.1 and its pkg-config file libnettle.pc is defined under /usr/local/lib/pkgconfig (I've built nettle-4.3.1 from source successfully)
I've read the stackoverflow post GnuTLS Libnettle 3.4 was not found but it didn't help a bit. All other posts on the Internet didn't help either.
I'm stuck on this error. Any help is appreciated. Thanks.

I've found the cause of the problem. It was the incorrectly defined environment variable PKG_CONFIG. It was set just to the installation directory of the pkg-config i.e. /usr/local/pkg-config-0.28
However it looks like that it must have been set to the full path plus the pkg-config command itself, like: /usr/local/pkg-config-0.28/bin/pkg-config

PKG_CONFIG should include nettle.pc and hogweed.pc, which were not copied to /usr/lib/pkgconfig/ in my build of nettle3 on Linux Ubuntu 20.04 x64, so I had to configure gnutls3 as follows:
PKG_CONFIG_PATH="$NETTLE3_ROOT:$PKG_CONFIG_PATH" ./configure --with-included-libtasn1 --with-included-unistring
where NETTLE3_ROOT is the path of nettle3 sources.

Related

./configure doesn't find Qt5Core, QT5GUI, QT5Widgets

I've recently replaced Win10 by Linux Debian 11.2 on my PC (hence I'm a newbee in Linux). Now, not all programs are available as deb-Files.
I tried to compile source code - here a synthesizer ams-2.2.0 - from a tar.gz files (after unzipping into a separate folder) with steps (as written in the INSTALL.TXT to this source, and obviously usual)
./configure
make
make install
I get a bunch of error messages for missing files, when running ./congigure most resolved by installation of missing packages, but at last it fails with error message:
checking for QTCore Qt5Gui Qt5Widgets >= 5.0... no
configure: error: cannot find Qt5 library >= 5.0
(hope to get all written correctly, because I can't copy from the terminal ... Ctrl-Shift-C doesn't seem to work)
I checked the installation in synaptics and found that Qt-Version is 5.12. So what's wrong here?
I'm afraid to have this error message everytime I try to compile different source codes.
You need to install libqtcore and libqtwidgets with development headers, they are in qtbase5-dev package.
sudo apt install build-essential qtbase5-dev qtchooser

GnuTLS Libnettle 3.4 was not found

When I try to configure GnuTLS I'm getting the error that Libnettle 3.4 was not found. I've nettle 3.4.1-1 installed and the library files are present in /usr/lib. Even when I specify the environment variable NETTLE_LIBS directly (export NETTLE_LIBS="-L/usr/lib -R/usr/lib -lnettle") it always throws out that message.
In the config.log is following more concrete message:
Package dependency requirement 'nettle >= 3.4.1' could not be satisfied.
Package 'nettle' has version '3.4', required version is '>= 3.4.1'
What I'am missing here?
gnutls requires PKG_CONFIG to include nettle.pc and hogweed.pc, which were not copied to /usr/lib/pkgconfig/ in my build of nettle3 on Linux Ubuntu 20.04 x64, so I had to configure gnutls3 as follows:
PKG_CONFIG_PATH="$NETTLE3_ROOT:$PKG_CONFIG_PATH" ./configure --with-included-libtasn1 --with-included-unistring
where NETTLE3_ROOT is the path of nettle3 sources.
when you install nettle, try to specify the install path to /usr/, otherwise it will use the default /usr/local/.
./configure --prefix=/usr/ && make && make install
gnutls will search dependent in /usr/.
This package worked for me:
sudo apt-get install nettle-dev
On my system I had to do the following:
Install the pkg-config utility, which was missing on my system
Configure the environment variable PKG_CONFIG_PATH to include the pkgconfig directory under the prefix where libnettle was installed
Configure the libnettle installation using the following configure flags: ./configure --disable-openssl --enable-shared --enable-mini-gmp (the --enable-mini-gmp flag causes libhogweed to be built)

Installing PHP7 with Homebrew on Mac

When I try to install PHP7 on Homebrew I get this error
Sorry, I cannot run apxs. Possible reasons follow:
1. Perl is not installed
2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page is displayed)
The output of /usr/sbin/apxs follows:
apxs:Error: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/local/bin/apr-1-config not found!.
configure: error: Aborting
Does any one have a solution for this, knowing that I've searching the web for a solution without any luck

GTK+ installed with brew is not found when I try to compile other applications

I installed GTK with brew install gtk+ as I need it to compile xchat from source on my Mac. When I try to install it tough, it says Cannot find GTK! Not building GTK FrontEnd.
I suspect I should've updated the environment variables once installed gtk+ but I don't know how.
iMac:xchat-2.8.8 Domenico$ brew info gtk+
gtk+: stable 2.24.20
http://gtk.org/
/usr/local/Cellar/gtk+/2.24.20 (1184 files, 52M) * // here is the path!!!
Built from source
From: https://github.com/mxcl/homebrew/commits/master/Library/Formula/gtk+.rb
==> Dependencies
Build: pkg-config, xz
Required: glib, jpeg, libtiff, gdk-pixbuf, pango, atk, cairo
Optional: jasper
==> Options
--with-jasper
Build with jasper support
The path is listed in the code above. I tried adding all kind of things related to it (e.g. /usr/local/Cellar/gtk+/2.24.20/bin or /usr/local/Cellar) to $LD_LIBRARY_PATH but it didn't work. Any ideas?
I had smiliar issues with after brew install gtk+. Specifically, I got:
Package xcb-shm was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-shm.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-shm', required by 'cairo', not found
app.c:1:10: fatal error: 'gtk/gtk.h' file not found
#include <gtk/gtk.h>
^
1 error generated.
make: *** [app] Error 1
while running make for my app and this command solved my problem:
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig
The extended answer on this problem has been already answered here: https://stackoverflow.com/a/23988317/4694621.
This might be an issue since gtk+ depends on these libraries (source):
Glib
Pango
ATK
GDK
GdkPixbuf
Cairo

Help Installing psycopg2 on snow leopard : command '/usr/bin/gcc-4.0' failed with exit status 1

This has been driving me crazy for 2 days.
I have been trying to install psycopg2 using easy_install and no matter what I try (i.e using gcc-4.0 instead of the snow leopard default one) I always get the same error:
error: Setup script exited with error: command '/usr/bin/gcc-4.0' failed with exit status 1
Please see: http://dpaste.com/hold/228252/
I have googled that error so many times and nothing I have found seem to help.
Looks like you're missing a dependency, the development files for libpq. The relevant log part is here:
In file included from psycopg/psycopgmodule.c:32In file included from psycopg/psycopgmodule.c:32:
./psycopg/psycopg.h:31:22: error: libpq-fe.h: No such file or directory
Try installing libpq development files and then rerun easy_install. You may hit another missing dependency; pay attention to the first error that GCC spits out.
Link http://dpaste.com/hold/228252/ seems to be dead, this is how I solved this problem (Mac OS X 10.6, virtualenv).
If pip fails with this message, just take a look to build folder in your virtual environment. You should edit setup.cfg file there, particularly include_dirs and library_dirs. In first one set your include folders, my option was:
include_dirs=/opt/local/include/postgresql84:/opt/local/include/postgresql84/server
and most likely you will need to set library_dirs to correct location as well:
library_dirs=/opt/local/lib/postgresql84.
probably you should install postgresql-devel first
yum -y install postgresql-devel

Resources