I'm trying to install the latest happstack-server on osx. They just added a dependency on libcryptopp, and I can't get it working.
~$ cabal install happstack-server
Resolving dependencies...
Configuring happstack-server-6.5.3...
cabal: Missing dependency on a foreign library:
* Missing C library: cryptopp
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.
cabal: Error: some packages failed to install:
happstack-server-6.5.3 failed during the configure step. The exception was:
ExitFailure 1
So, then I install libcryptopp with macports, which puts libcryptopp.a in /opt/local/lib
sudo port install libcryptopp
Then I install happstack-server again with --extra-lib-dirs
cabal install happstack-server --extra-lib-dirs=/opt/local/lib
It installs fine, everything seems to work until I actually run a happstack server.
~$ runhaskell Hello.hs
Hello.hs: <command line>: can't load .so/.DLL for: libcryptopp.dylib (dlopen(libcryptopp.dylib, 9): image not found)
What am I doing wrong? Or is this a bug with happstack? I don't even have a .dylib after installing the lib via macports, only a .a. ghc --make Hello.hs is even crazier
How about:
g++ -fpic -nostartfiles -nostdlib -shared /usr/local/Cellar/cryptopp/5.6.1/lib/libcryptopp.a -o libcryptopp.dylib
as a brute-force approach, You can disable https flag in .cabal file of happstack-server:
file: happstack-server.cabal :
Flag https
Default: False
configure/build/install happstack-server manually, them cabal install happstack.
(I use Archlinux, --extra-lib-dirs don't even work!)
Related
I've been successfully using XML::LibXML module for a while on macOS.
Now I am trying to install it on a new machine with macOS BigSur:
perl Makefile.PL
make
make test
make install
However, in "make test" I get multiple errors of the kind:
t/00-report-prereqs.t .............................. ok
t/01basic.t ........................................
Can't load '/Users/lockit/Desktop/TESTS_Irina/XML-LibXML-2.0204/blib/arch/auto/XML/LibXML/LibXML.bundle'
for module XML::LibXML: dlopen(/Users/lockit/Desktop/TESTS_Irina/XML-LibXML-2.0204/blib/arch/auto/XML/LibXML/LibXML.bundle, 0x0002):
symbol '_xmlFree' not found, expected in flat namespace by
'/Users/lockit/Desktop/TESTS_Irina/XML-LibXML-2.0204/blib/arch/auto/XML/LibXML/LibXML.bundle'
at /System/Library/Perl/5.28/darwin-thread-multi-2level/DynaLoader.pm line 197.
at /Users/lockit/Desktop/TESTS_Irina/XML-LibXML-2.0204/blib/lib/XML/LibXML.pm line 156.
BEGIN failed--compilation aborted
at /Users/lockit/Desktop/TESTS_Irina/XML-LibXML-2.0204/blib/lib/XML/LibXML.pm line 156.
Compilation failed in require at t/01basic.t line 6.
And the module cannot be installed.
Any hints what I am missing and how to fix?
Thanks,
Irina
Have you read the README for the module? It includes the following:
DEPENDENCIES
============
Prior to installation you MUST have installed the libxml2 library. You can get the
latest libxml2 version from
http://xmlsoft.org/
Without libxml2 installed this module will neither build nor run.
Also XML::LibXML requires the following packages:
o XML::SAX - base class for SAX parsers
o XML::NamespaceSupport - namespace support for SAX parsers
These packages are required. If one is missing some tests will fail.
Again, libxml2 is required to make XML::LibXML work. The library is not just required
to build XML::LibXML, it has to be accessible during run-time as well. Because of
this you need to make sure libxml2 is installed properly. To test this, run the
xmllint program on your system. xmllint is shipped with libxml2 and therefore should
be available. For building the module you will also need the header file for libxml2,
which in binary (.rpm,.deb) etc. distributions usually dwell in a package named
libxml2-devel or similar.
So you need to have libxml2 (and its development header files) installed on your system.
Looks like it's an issue with Apple's dynamic linker as described here:
https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/issues/381.
I installed the suggested ExtUtils-MakeMaker-7.58 module and this solved the initial issue.
However, now there is a new error on make:
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- LibXML.bs blib/arch/auto/XML/LibXML/LibXML.bs 644
cc -c -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -g -pipe -fno-strict-aliasing -fstack-protector-strong -DPERL_USE_SAFE_PUTENV -Wno-error=implicit-function-declaration -Os -DVERSION="2.0206" -DXS_VERSION="2.0206" "-I/System/Library/Perl/5.28/darwin-thread-multi-2level/CORE" -DHAVE_UTF8 Av_CharPtrPtr.c
Av_CharPtrPtr.c:6:10: fatal error: 'EXTERN.h' file not found
#include "EXTERN.h"
Any clue?
I recently upgraded to Big Sur and am having trouble running a code on mpi. I am running a test code with the following command:
mpif90 -o test.f90 ./test
I receive the following error:
-bash: mpif90: command not found
I have updated homebrew and macports yet am unable to solve the problem. I suspect it has something to do with an incorrect path name somewhere. Any ideas? Thank you.
#Oo.oO Thank you. When configuring the build of gcc (per the link in your comment) by the command:
../configure --prefix=$HOME/opt/usr/local/gcc/gcc-9.2.0 \
--enable-checking=release \
--enable-languages=c,c++,fortran \
--disable-multilib \
--with-sysroot=$HOME/opt/usr/local/gcc_system_root \
--program-suffix=-9.2.0
the following error occurs:
configure: error: in `$HOME/opt/src/gcc/gcc-9.2.0/build':
configure: error: C compiler cannot create executables
I have updated Xcode (Version 12.3). Any thoughts? Thank you.
The problem was there were other /bin/ directories that had older versions of gcc and openmpi. When updating, the new files from /lib/ directories needed to be trasnfered to the /Cellar/ directories. The problem is fixed when first uninstalling all old macports and compilers with incorrect files and/or paths as sudo port -fp uninstall installed, and brew uninstall openmpi, and brew uninstall gcc. Then reinstall new homebrew compilers brew install gcc, brew install openmpi. This gives the correct paths with configured files when submitting a make file, or in this case, using the mpif90 command.
I've been trying to compile the FileZilla versions 3.11 and 3.24 on Mac for a research project but when I run ../configure I get the following error:
configure: error: libgnutls 3.1.12 greater was not found. You can get it from http://gnutls.org/
However, I've installed gnutls using homebrew; when I run
brew list gnutls
I can see the library installed at /usr/local/Cellar/gnutls/3.5.8/
Any ideas to resolve the problem are appreciated. Thanks
Updated Answer
It seems that GNUtls, as installed by homebrew ships with a pkgconfig file. So, you need to install pkgconfig if you don't have it already using:
brew install pkgconfig
Then, once you have that, you can find the compiler include file settings with:
pkg-config --cflags gnutls
Sample Output
-I/usr/local/Cellar/gnutls/3.5.8/include -I/usr/local/Cellar/nettle/3.3/include -I/usr/local/Cellar/libtasn1/4.10/include -I/usr/local/Cellar/p11-kit/0.23.3/include/p11-kit-1
And the linker library settings with:
pkg-config --libs gnutls
Sample Output
-L/usr/local/Cellar/gnutls/3.5.8/lib -lgnutls
So, we (just) need to convey that information to FileZilla. So, first we run:
./configure --help | grep -i utls
Sample Output
--enable-gnutlssystemciphers
Enables the use of gnutls system ciphers.
LIBGNUTLS_CFLAGS
C compiler flags for LIBGNUTLS, overriding pkg-config
LIBGNUTLS_LIBS
linker flags for LIBGNUTLS, overriding pkg-config
So it looks like we need to do something like:
export LIBGNUTLS_CFLAGS=$(pkg-config --cflags gnutls)
export LIBGNUTLS_LIBS=$(pkg-config --libs gnutls)
./configure
Original Answer
I haven't tried this with FileZilla, but I use it with other packages, and there is nothing to lose...
If homebrew has installed your GNUtls in /usr/local/Cellar/gnutls/3.5.8/, you could try telling FileZilla that location in your configure like this:
./configure CPPFLAGS="-I/usr/local/Cellar/gnutls/3.5.8/include" LDFLAGS="-L/usr/local/Cellar/gnutls/3.5.8/lib" ... other flags
I'm trying to build a c++ project on Ubuntu 12.04 64-bit.
the project is 32-bit.
At the terminal output I receive such lines:
ibcrypto.a(bio_b64.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/x86_64-linux-
gnu/libcrypto.a(bio_asn1.o)' is incompatible with i386 output
collect2: ld returned 1 exit status
make[2]: * [linux/release_32/cesmagent] Error 1
I thought it had something to do with libssl0.9.8, but so I did "sudo apt-get install libssl0.9.8:i386" but there already was the newest version of it.
Can any one please help me here?
The linker is trying to link against the 64-bit version of libcrypto.a because it can't find a 32-bit version.
You say you have this:
$ locate libcrypto.a
/usr/lib/x86_64-linux-gnu/libcrypto.a
Whereas, you need this:
$ locate libcrypto.a
/usr/lib/i386-linux-gnu/libcrypto.a
(I thought you could have both, but it turns out, on 12.04, it's impossible to have both because the packages conflict.)
You can install the i386 library like this:
sudo apt-get install libssl-dev:i386
Basically, you probably had the run-time libraries installed correctly, but you did not have the developer libraries.
The workaround which solved my problem:
I installed 32-bit version library
sudo apt-get install libssl-dev:i386
the 64-bit library was removed by that.
in the directory /usr/lib/i386-linux-gnu I found 32-bit version libcrypto.a and put it in /usr/lib32
Then I installed 64-bit library
sudo apt-get install libssl-dev
in the directory /usr/lib/x86_64-linux-gnu I found 64-bit version libcrypto.a and put it in /usr/lib64
in the Makefile of a project I adjusted paths /usr/lib32/libcrypto.a and /usr/lib64/libcrypto.a to be dependent on the corresponding command argument.
the project builds!
When running configure it fails with
checking for leptonica... yes
checking for pixCreate in -llept... no
configure: error: leptonica library missing
But I have leptonica 1.69 built (downloaded source and ran ./configure && make install)
Edit
I think configure: error: leptonica library missing is a bit misleading, please note that it first says checking for leptonica... yes, and then fails on checking for pixCreate in -llept... no. So maybe the problem is not that the library is missing, but something else.
I finally managed to make it compile, after reading this and this thread. The proper steps for were:
./autogen.sh
export LIBLEPT_HEADERSDIR=/local/include
./configure --with-extra-libraries=/local/lib
make install
for leptonica 1.69, lib renamed to .libs, so, parameters are
export LIBLEPT_HEADERSDIR=<your_path>/leptonica-1.69/src
./autogen.sh
./configure --prefix= --with-extra-libraries=<your_path>/leptonica-1.69/src/.libs
and so on
Maybe this could solve the issue:
export LIBLEPT_HEADERSDIR=/usr-or-other/local/include
I am working on redhat linux 7.2 . None of the solution worked for me I was getting following errors in config.log. Package lept was not found in the pkg-config search path.
Perhaps you should add the directory containing `lept.pc'
to the PKG_CONFIG_PATH environment variable PKG_CONFIG_PATH
configure script uses pkg-config utility to check for packages . It was not able to find lept package ( although i had installed leptonica seperately ) By setting PKG_CONFIG_PATH pointing to the directory where lept.pc is present , i was able to resolve the issue . export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
The FAQ addresses this issue and worked for me with tesseract 3.02.02 on Mac OSX 10.6.8.
Apart from the Leptonica library, png, jpeg, tiff libraries had to passed to the configure script with CXX and CPP flags.
To run configure as non-root -
1. LIBLEPT_HEADERSDIR=; export LIBLEPT_HEADERSDIR;
2. CXXFLAGS="-ltiff -lpng -ljpeg" CPPFLAGS="-ltiff -lpng -ljpeg" ./configure --prefix= --with-extra-libraries=
In my case, this issue was caused by a missing compiler. Searching config.log revealed the following:
./configure:17287: g++ -o conftest -I/Usr/local/include/leptonica -L/usr/local/lib conftest.cpp -llept >&5
./configure: line 2040: g++ command not found
Running apt-get install g++ solved the problem. There is an issue in the tesseract issue tracker about this.
In my case (for Ubuntu/Debian) I downloaded the latest leptonica version and the error was not fixed.
To fix it I removed the package "leptonica-dev" with sudo apt-get remove libleptonica-dev and then tesseract found the leptonica version installed from the source code.
Hope it helps!
The answer is going to be slightly different for everyone, depending on the state of your system.
At a high level, the pkg-config software needs to know that leptonica is installed. It searches paths for a .pc file that has the definition for the leptonica package. That file will be in different locations for different people.
You can find it using the Linux locate utility at the command line. locate lept.pc. (If you've done some recent installing/uninstalling, you may need to refresh the locate utilities database with the command updatedb.)
Whichever directory locate finds the file in, export PKG_CONFIG_PATH as that directory (export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig for example).
Then you can continue your configure/build.
i had a similar problem with trying to compile from source, but did not experience it with
apt-get to install tesseract
sudo apt-get install tesseract-ocr
export LIBLEPT_HEADERSDIR=$dir/letonica168/include
./autogen.sh
./configure --prefix=$anotherdir --with-extra-libraries=/$dir/letonica168/lib
make
make install