yes this question has been asked before. no the other answers doesn't solve my problem.
I have just built isl from source both 0.15 and 0.22.
I have isl and I know where it is and I am amazed that even though I have pointed to where the program is in configure binutils can't find it.
It did work a few months ago to do it this way.
../gitrepos/binutils/configure --prefix=/tools --with-sysroot=x86_64-w64-cygwin --with-lib-path=/tools/lib --disable-nls --disable-werror lt_cv_objdir=.libs --target=x86_64-w64-cygwin --with-isl=/home/brazg/usr/isl/0.22
I am getting the following error: required isl version is 0.15 or
later configure: error: Unable to find a usable isl. See config.log
for details.
/tmp/cc3B0zAy.s: Assembler messages:
/tmp/cc3B0zAy.s:14: Error: unknown .loc sub-directive `view'
/tmp/cc3B0zAy.s:14: Error: junk at end of line, first unrecognized character is `-'
/tmp/cc3B0zAy.s:20: Error: unknown .loc sub-directive `view'
/tmp/cc3B0zAy.s:20: Error: unknown pseudo-op: `.lvu1'
/tmp/cc3B0zAy.s:23: Error: unknown .loc sub-directive `view'
/tmp/cc3B0zAy.s:23: Error: unknown pseudo-op: `.lvu2'
configure:5079: $? = 1
configure: failed program was:
Yes I am aware that there are a whole lot of assembler errors because of the version of GCC in Cygwin. I am trying to replace it by building a more current version of gcc.
This is a common problem I have been running into. when building some source code in Cygwin. It seems one of the programs that runs into this is binutils...
I'm not sure what to do.
and yes, I could try cross compiling in Linux, no I don't want to and I'm hoping I don't have to. I'd like to do this naively to Windows if I can.
It seems to me that you are complicating yourself the life (x86_64-pc-cygwin is platform specific, not your choice) and you should start using the standard cygport tool, the same configuration already used for the binutils cygwin package and the isl 0.16.1 available. When you have problem with configure the proper config.log will provide the hint on what is going wrong.
Herebelow the a recipe to build the last released binutils 2.33.1 and create a cygwin package. For my test I am using the stable packages:
$ cygcheck -cd binutils gcc-core libisl-devel
Cygwin Package Information
Package Version
binutils 2.31.1-1
gcc-core 7.4.0-1
libisl-devel 0.16.1-1
but you can also try with the test 8.3.0-1 gcc compiler.
Download the source package and extract the binutils.cygport
$ wget http://mirrors.kernel.org/sourceware/cygwin/x86/release/binutils/binutils-2.31.1-1-src.tar.xz
$ tar -xf binutils-2.31.1-1-src.tar.xz
$ cp binutils-2.31.1-1.src/binutils.cygport .
Adjusting the cygport file to build from release 2.33.1 and not from git
$ cat binutils.cygport
TOOLCHAIN_TARGET="native"
# GIT_URI="git://sourceware.org/git/binutils-gdb.git"
# inherit toolchain git
# GIT_REV=be46fa23042ec88a7a42030476a301bf72a80e7e
# SRC_DIR=binutils-gdb
NAME="binutils"
VERSION=2.33.1
RELEASE=1
CATEGORY="Devel"
SUMMARY="GNU assembler, linker, and similar utilities"
DESCRIPTION="This directory contains various GNU compilers, assemblers, linkers,
debuggers, etc., plus their support routines, definitions, and documentation."
HOMEPAGE="http://www.gnu.org/software/binutils/"
case ${VERSION} in
*.*.[5-9][0-9])
SRC_URI="ftp://sourceware.org/pub/binutils/snapshots/binutils-${VERSION}.tar.bz2" ;;
*) SRC_URI="mirror://gnu/binutils/binutils-${VERSION}.tar.xz"
SRC_DIR=${PN}-${PV}
;;
esac
#PATCH_URI+=" 2.24.51-shared-libs.patch"
#2.24.51-ld-__dso_handle.patch
#PATCH_URI+="
#2.24.51-ld-__dso_handle.patch
#detect-rebasing-and-compute-an-address-bias.patch
#"
#PATCH_URI="e643cb45bf85fa5c8c49a89ff177de246af4212e.patch"
# gdb,etc.: https://sourceware.org/ml/binutils/2014-01/msg00341.html
# for shared libbfd/libopcodes, add:
# --enable-shared
CYGCONF_ARGS="
--enable-install-libiberty
--disable-gdb
--disable-libdecnumber
--disable-readline
--disable-sim
--enable-64-bit-bfd
"
# --enable-targets=i686-efi-pe,x86_64-efi-pe,ia64-efi-elf,x86_64-pc-cygwin,i686-pc-cygwin
src_install() {
cd ${B}
cyginstall
# for shared libbfd/libopcodes, add:
# APIs are unstable, do not allow linking against DLLs
# rm -f ${D}/usr/lib/*.dll.a
# sed -i -e '/^library_names=/d' ${D}/usr/lib/lib*.la
}
As you can note that I have NOT changed the arguments of binutils configuration. So now I can build the 2.33.1 package:
$ cygport binutils.cygport download
...
binutils-2.33.1.tar 100%[===================>] 20.50M 1.50MB/s in 15s
2020-01-04 17:07:52 (1.38 MB/s) - ‘binutils-2.33.1.tar.xz.tmp’ saved [21490848/21490848]
$ cygport binutils.cygport almostall
>>> Preparing binutils-2.33.1-1.x86_64
>>> Unpacking source binutils-2.33.1.tar.xz
>>> Preparing working source directory
...
>>> Creating source patches
0 files changed
>>> Creating source package
binutils-2.33.1-1.src/
binutils-2.33.1-1.src/binutils-2.33.1.tar.xz
binutils-2.33.1-1.src/binutils.cygport
>>> binutils requires: cygwin libgcc1
and you can also test the build:
$ cygport binutils.cygport check
=== binutils Summary ===
# of expected passes 136
# of unexpected failures 1
# of expected failures 1
# of unsupported tests 5
I notice an hang at the end of the test, but the check seems completed, co it could be to other factors that I will not investigate.
Related
I'l trying to install a package (https://github.com/SchornacklabSLCU/amfinder) that use opam to install several libraries. However, two libraries failed to install: lablgtk and cairo2-gtk.I tried to install these two directly via opam (opam install labgtk) but got the same error:
User configuration:
~/.profile is already up-to-date.
[NOTE] Make sure that ~/.profile is well sourced in your ~/.bashrc.
[ERROR] There already is an installed switch named 4.08.0
[NOTE] Package camlzip is already installed (current version is 1.11).
[NOTE] Package magic-mime is already installed (current version is 1.2.0).
[NOTE] Package cairo2 is already installed (current version is 0.6.2).
[NOTE] Package odoc is already installed (current version is 2.0.0).
[NOTE] Package dune is already installed (current version is 2.9.1).
The following actions will be performed:
∗ install lablgtk 2.18.11
∗ install cairo2-gtk 0.6.2
===== ∗ 2 =====
Do you want to continue? [Y/n] y
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved cairo2-gtk.0.6.2 (cached)
⬇ retrieved lablgtk.2.18.11 (cached)
[ERROR] The compilation of lablgtk.2.18.11 failed at "./configure --prefix /home/alr/.opam/4.08.0
LABLGLDIR=/home/alr/.opam/4.08.0/lib/lablgl".
#=== ERROR while compiling lablgtk.2.18.11 ====================================#
# context 2.1.1 | linux/x86_64 | ocaml-base-compiler.4.08.0 | https://opam.ocaml.org#03fce048
# path ~/.opam/4.08.0/.opam-switch/build/lablgtk.2.18.11
# command ~/.opam/opam-init/hooks/sandbox.sh build ./configure --prefix /home/alr/.opam/4.08.0 LABLGLDIR=/home/alr/.opam/4.08.0/lib/lablgl
# exit-code 1
# env-file ~/.opam/log/lablgtk-16902-8d49b3.env
# output-file ~/.opam/log/lablgtk-16902-8d49b3.out
### output ###
# [...]
# checking native dynlink... checking for pkg-config... /home/linuxbrew/.linuxbrew/bin/pkg-config
# checking for GTK+ - version >= 2.0.0...
# *** 'pkg-config --modversion gtk+-2.0' returned 2.24.33, but GTK+ (2.24.32)
# *** was found! If pkg-config was correct, then it is best
# *** to remove the old version of GTK+. You may also be able to fix the error
# *** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
# *** /etc/ld.so.conf. Make sure you have run ldconfig if that is
# *** required on your system.
# *** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
# *** to point to the correct configuration files
# no
# configure: error: GTK+ is required
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build lablgtk 2.18.11
└─
╶─ No changes have been performed
<><> lablgtk.2.18.11 troubleshooting ><><><><><><><><><><><><><><><><><><><><><>
=> This package requires gtk+ 2.0 development packages installed on your system
File "dune", line 4, characters 29-39:
4 | (libraries lablgtk2 cairo2 cairo2-gtk camlzip magic-mime)
^^^^^^^^^^
Error: Library "cairo2-gtk" not found.
pkg-config --modversion gtk+-2.0returns 2.24.33
echo $LD_LIBRARY_PATHreturns empty path.
echo $PKG_CONFIG_PATHreturns /home/alr/.opam/4.08.0/lib/pkgconfig:
File /etc/ld.so.conf contains the following line: include /etc/ld.so.conf.d/*.conf
I am using WSL2 on Windows10 with Ubuntu18.04. libgtk2.0-dev is already installed.
I guess there is an error in path to library but cannot figure out how to solve it.
Any help would be greatly appreciated.
Thanks
It's possible deploy bcc --> https://iovisor.github.io/bcc/
... on centos /redhat SO?
someone knows what's the problem to compile bcc tools from centos? (all dependencies are installed), but when I execute the last step:
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
Returns:
[root#ebpf build]# cmake -DCMAKE_INSTALL_PREFIX=/usr ..
-- Latest recognized Git tag is v0.3.0
-- Git HEAD is 007d28c534e1a98e6017ac9f4c8cb1c0f5244388
-- Revision is 0.3.0-007d28c5 CMake Error at CMakeLists.txt:22 (find_package): Could not find a package configuration file provided
by "LLVM" with any of the following names:
LLVMConfig.cmake
llvm-config.cmake
Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
"LLVM_DIR" to a directory containing one of the above files. If
"LLVM" provides a separate development package or SDK, be sure it
has been installed.
-- Configuring incomplete, errors occurred! See also "/root/bcc/build/CMakeFiles/CMakeOutput.log".
for llvm issue. just run below CLI:
cp /usr/share/llvm/cmake/LLVM-Config.cmake /usr/share/llvm/cmake/llvm-config.cmake
I have been working through the LLVM Kaleidoscope Tutorial for OCaml. On the third part of the tutorial, I have navigated to the example code in the folder
OCaml-Kaleidoscope\Chapter3
I am encountering an issue when compiling with
ocamlbuild toy.byte
on cygwin. This is the code given in the tutorial to compile.
The error I am getting is
''ocamlc.opt -c -o codegen.cmo codegen.ml
File "codegen.ml", line 5, characters 5-9:
Error: Unbound module Llvm
Exit code 2 while executing this command:
''ocamlc.opt -c -o codegen.cmo codegen.ml
I looked up some solutions to this issue. One solution I found was to use
ocamlbuild -use-ocamlfind toy.byte -package llvm
instead of
ocamlbuild toy.byte
However, when I tried that I received this error:
Failure: ocamlfind not found on path, but -no-ocamlfind not used.
To fix this I tried:
opam install ocamlfind
But ocamlfind is already installed.
Another solution I found was to use:
opam install llvm
This resulted in:
The following actions will be performed:
- install llvm 3.7
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[llvm: ./install.sh 3.7] Command started
[ERROR] The installation of llvm failed at "./install.sh 3.7 make
C:\\cygwin64\\home\\setup\\.opam\\system
C:\\cygwin64\\home\\setup\\.opam\\system\\lib".
[llvm: ocamlfind remove] Command started
#=== ERROR while installing llvm.3.7 ==========================================#
# opam-version 1.3.0~dev2 (d4f7e01216dbb44af4e7cc6539a1b0afa9be9d2c)
# os win32
# command bash -c ./install.sh 3.7 make C:/cygwin64/home/setup/.opa m/system C:/cygwin64/home/setup/.opam/system/lib
# path C:\cygwin64\home\setup\.opam\system\build\llvm.3.7
# exit-code 2
# env-file C:\cygwin64\home\setup\.opam\system\build\llvm.3.7\llvm-1 0768-58c514.env
# stdout-file C:\cygwin64\home\setup\.opam\system\build\llvm.3.7\llvm-1 0768-58c514.out
# stderr-file C:\cygwin64\home\setup\.opam\system\build\llvm.3.7\llvm-1 0768-58c514.err
### stdout ###
# [...]
# config.status: executing bindings/ocaml/Makefile.ocaml commands
# make: Entering directory '/home/setup/.opam/system/build/llvm.3.7/build/bindin gs'
# llvm[0]: Constructing LLVMBuild project information.
# make[1]: Entering directory '/home/setup/.opam/system/build/llvm.3.7/build/bin dings/ocaml'
# make[2]: Entering directory '/home/setup/.opam/system/build/llvm.3.7/build/bin dings/ocaml/llvm'
# llvm[2]: Compiling llvm_ocaml.c for Release+Asserts build
# /home/setup/.opam/system/build/llvm.3.7/Makefile.rules:1536: recipe for target '/home/setup/.opam/system/build/llvm.3.7/build/bindings/ocaml/llvm/Release+Asse rts/llvm_ocaml.o' failed
# make[2]: Leaving directory '/home/setup/.opam/system/build/llvm.3.7/build/bind ings/ocaml/llvm'
# /home/setup/.opam/system/build/llvm.3.7/Makefile.rules:880: recipe for target 'all' failed
# make[1]: Leaving directory '/home/setup/.opam/system/build/llvm.3.7/build/bind ings/ocaml'
# /home/setup/.opam/system/build/llvm.3.7/Makefile.rules:939: recipe for target 'ocaml/.makeall' failed
# make: Leaving directory '/home/setup/.opam/system/build/llvm.3.7/build/binding s'
### stderr ###
# [...]
# configure: WARNING: dlopen() not found - disabling plugin support
# configure: WARNING: mmap() of a fixed address required but not supported
# configure: WARNING: mmap() of files required but not found
# configure: WARNING: --enable-bindings=ocaml specified, but OUnit 2 is not inst alled. Tests will not run
# + make -C bindings all SYSTEM_LLVM_CONFIG=llvm-config
# gcc.exe: error: /home/setup/.opam/system/build/llvm.3.7/bindings/ocaml/llvm/ll vm_ocaml.c: No such file or directory
# gcc.exe: fatal error: no input files
# compilation terminated.
# /usr/bin/rm: cannot remove '/home/setup/.opam/system/build/llvm.3.7/build/bind ings/ocaml/llvm/Release+Asserts/llvm_ocaml.d.tmp': No such file or directory
# make[2]: *** [/home/setup/.opam/system/build/llvm.3.7/build/bindings/ocaml/llv m/Release+Asserts/llvm_ocaml.o] Error 1
# make[1]: *** [all] Error 1
# make: *** [ocaml/.makeall] Error 2
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions failed
- install llvm 3.7
No changes have been performed
=-=- llvm.3.7 troubleshooting -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=> This package relies on external (system) dependencies that may be missing.
`opam depext llvm.3.7' may help you find the correct installation for your
system.
I am using version 3.8.0 of llvm and version 4.02.3 of OCaml from this link.
Am I on the right track? What do I need to do to fix this?
As I have answered in your question LLVM tutorial OCaml Compilation Assembler Error, your best way is not to use Windows.
OPAM is now usable in Cygwin OCaml or even in MinGW OCaml (using Cygwin opam binary) but packages in the OPAM repository are not tested in these environments. Just avoid them unless you are experienced with OCaml program development in Windows.
If you stick to Windows, then check the build at C:\cygwin64\home\setup\.opam\system\build\llvm.3.7. There should be stdout and stderr log files which can help to understand what happend.
I tried to compile atk 2.7.91 from source. Since I am working on an older ubuntu system there are no recent packages for the required glib version. So I just downloaded glib 2.35.8 and did successfully ./configure and make for it (I don't want to install it system-wide so I didn't do make install).
Suppose this glib is in /foobar/glib-2.35.8. Now I cd to /foobar/atk-2.7.91 and export the PKG_CONFIG_PATH: export PKG_CONFIG_PATH=/foobar/glib-2.35.8:$PKG_CONFIG_PATH.
Then
pkg-config --modversion glib-2.0
tells me:
2.35.8
But when I do ./configure I get the error message:
checking for GLIB - version >= 2.31.2... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error:
*** GLIB 2.31.2 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/. If GLIB is installed
*** but not in the same location as pkg-config add the location of the file
*** glib-2.0.pc to the environment variable PKG_CONFIG_PATH.
cat config.log |grep glib gives:
configure:12143: checking for GLIB - version >= 2.31.2
configure:12258: gcc -o conftest -g -O2 -Wall -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES conftest.c -L/usr/local/lib -lgobject-2.0 -lglib-2.0 >&5
conftest.c:25:18: fatal error: glib.h: No such file or directory
| #include <glib.h>
| fclose (fopen ("conf.glibtest", "w"));
| if ((glib_major_version != 2) ||
| (glib_minor_version != 35) ||
| (glib_micro_version != 8))
| printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
| glib_major_version, glib_minor_version, glib_micro_version);
| printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
| else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
| (glib_minor_version != GLIB_MINOR_VERSION) ||
| (glib_micro_version != GLIB_MICRO_VERSION))
| printf("*** GLIB header files (version %d.%d.%d) do not match\n",
| GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
| glib_major_version, glib_minor_version, glib_micro_version);
| if ((glib_major_version > major) ||
| ((glib_major_version == major) && (glib_minor_version > minor)) ||
| ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
| printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
| glib_major_version, glib_minor_version, glib_micro_version);
| printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
| printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
| printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
configure:12304: gcc -o conftest -g -O2 -Wall -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES conftest.c -L/usr/local/lib -lgobject-2.0 -lglib-2.0 >&5
conftest.c:25:18: fatal error: glib.h: No such file or directory
| #include <glib.h>
| return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
*** GLIB 2.31.2 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/. If GLIB is installed
*** glib-2.0.pc to the environment variable PKG_CONFIG_PATH.
ac_cv_env_PKG_CONFIG_PATH_value=/foobar/glib-2.35.8/:
GLIB_CFLAGS=''
GLIB_COMPILE_RESOURCES=''
GLIB_GENMARSHAL=''
GLIB_LIBS=''
GLIB_MKENUMS=''
GLIB_PACKAGES='gobject-2.0'
GLIB_REQUIRED_VERSION='2.31.2'
PKG_CONFIG_PATH='/foobar/glib-2.35.8/:'
Any idea what's wrong here and how to fix it?
SHORT ANSWER
As (almost) always the Manual is your friend. Try taking a look at man pkg-config you'll see it's the .pc files that pkg-config needs to perform it's job. glib-2.0.pc in your case. Unfortunately it's not as easy as just pointing to the location, where it is stored, but leave that for the long answer at the end and take a look at the manual page for a while first.
pkg-config retrieves information about packages from special
metadata files. These files are named after the package, and has a
.pc extension. On most systems, pkg-config looks in and for these
files. It will additionally look in the colon-separated (on Windows,
semicolon-separated) list of directories specified by the
PKG_CONFIG_PATH environment variable.
The package name specified on the pkg-config command line is
defined to be the name of the metadata file, minus the .pc extension.
If a library can install multiple versions simultaneously, it must
give each version its own name (for example, GTK 1.2 might have
the package name "gtk+" while GTK 2.0 has "gtk+-2.0").
I hope you found the funny
On most systems, pkg-config looks in and for these files
line. The result may differ on yours system, but on mine it actually displays it that way, which is most probably a bug.
Nevertheless you can find out the compiled in standard directories by running
pkg-config --variable pc_path pkg-config which for example prints
/usr/local/lib/pkgconfig:/usr/local/lib/pkgconfig/i486-linux-gnu:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/lib/pkgconfig/i486-linux-gnu:/usr/share/pkgconfig
on my system.
LONG ANSWER
To get back to your original question, taking a look at an example .pc file might best explain why your first effort was in vain.
As an example here the contents of the glib-2.0.pc file on my system:
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
glib_genmarshal=glib-genmarshal
gobject_query=gobject-query
glib_mkenums=glib-mkenums
Name: GLib
Description: C Utility Library
Version: 2.24.2
Libs: -L${libdir} -lglib-2.0
Libs.private:
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include
As you will hopefully see the whole pathes are all hardwired. Don't get confused by ${libdir} ... and the like. Taking a closer look you will see they are all constructed from prefix=/usr in the first line.
The reason trying to just point PKG_CONFIG_PATH to the build directory of your glib won't work as the path specified in the .pc ist the installation directory and not the location of your build directory.
That's why your pkg-config --modversion test ran just fine: The .pc file was indeed found and contained the given information, but the compilation failed: the .pc file was found as in the first case, but the pathes given in the .pc file were simply wrong.
No one can forbid you to just change the directories given in the .pc to any path you like, so in fact you could make the fresh built library work in its build directory by manually fixing the pathes given in the .pc file.
At least if the library itself doesn't contain any hardwired pathes, but that would only be a problem at runtime not while linking.
To even solve the last puzzle - how the the hell could the .pc file know where it is going to be installed to give the right prefix?
Just take a look at your source directory.
Acompanying your glib-2.0.pc file you'll find a file called glib-2.0.pc.in there, with content like that given below:
prefix=#prefix#
exec_prefix=#exec_prefix#
libdir=#libdir#
includedir=#includedir#
glib_genmarshal=glib-genmarshal
gobject_query=gobject-query
glib_mkenums=glib-mkenums
Name: GLib
Description: C Utility Library
Version: #VERSION#
Requires.private: #PCRE_REQUIRES#
Libs: -L${libdir} -lglib-2.0 #INTLLIBS#
Libs.private: #G_THREAD_LIBS# #G_LIBS_EXTRA# #PCRE_LIBS# #INTLLIBS# #ICONV_LIBS#
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include #GLIB_EXTRA_CFLAGS#
The whole #....# placeholders where filled in at configure time, when you were running configure. i.e. #prefix# was filled with the argument given as --prefix= on the command line, while others like #NTLLIBS# were filled with parameters detected by the configure script.
You need to install the glib somewhere, you can't just point ATK at the Glib build directory. You can install it somewhere private like ~/install by
./configure --prefix=/home/<username>/install
(configure doesn't like ~ IIRC)
I am trying to configure the whalebot crawler with the tar file whalebot-0.02.00.tar.gz. I have extracted it correctly with:
root#Admin1:~/dls# tar xvzf whalebot-0.02.00.tar.gz
After that I want to configure it with:
root#Admin1:~/dls/whalebot# ./configure
It gives me error:
bash: ./configure: No such file or directory
also I have run the command:
root#Admin1:~/dls/whalebot# cmake ./
It gives me the following result:
root#Admin1:~/dls/whalebot# cmake ./
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Boost version: 1.44.0
-- Found the following Boost libraries:
-- filesystem
-- system
-- thread
-- program_options
-- date_time
CMake Warning (dev) at webspider/CMakeLists.txt:25 (link_directories):
This command specifies the relative path
../statsem_string/bin
as a link directory.
Policy CMP0015 is not set: link_directories() treats paths relative to the
source dir. Run "cmake --help-policy CMP0015" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at webspider/CMakeLists.txt:25 (link_directories):
This command specifies the relative path
../3dparty/google-url
as a link directory.
Policy CMP0015 is not set: link_directories() treats paths relative to the
source dir. Run "cmake --help-policy CMP0015" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
HTMLCXX_LIBRARY
linked by target "whalebot" in directory /root/dls/whalebot/webspider
-- Configuring incomplete, errors occurred!
How do I proceed?
It appears that CMake is unable to find the htmlcxx library.
In the whalebot documentation, htmlcxx is listed as a dependency.
You need to download htmlcxx, unzip it, then install it:
cd <path to unzipped htmlcxx>
./configure --enable-static=on --enable-shared=off
make
sudo make install
You may need to add #include <cstddef> to the top of html/tree.h to get it to build successfully. It will install to usr/local/ by default.
You also need icu installed if you don't already have it:
sudo apt-get install libicu-dev
Finally, you can now build and install whalebot. Again, making might fail if you have a reasonably up-to-date boost installation.
In line 57 of webspider/src/webspider_options.cpp, you need to replace boost::filesystem::initial_path().native_directory_string() with boost::filesystem::initial_path().string(). Then you should be good to build and install:
cd <path to unzipped whalebot>
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
sudo make install
This too will install to usr/local/ by default.
Check if in CMakeLists you have written find_library(..) or find_path(.), then replace it by find_package(..).
It solved the error in my case.