Changing python headers directory for configure - linux

I'm trying to build gnome-weather using jhbuild, but running build process results in the following errors:
checking for python extension module directory... ${exec_prefix}/lib64/python2.7/site-packages
checking for headers required to compile python extensions... ./configure: line 14697: /usr/local/bin/python-config: No such file or directory
not found
configure: error: Python headers not found
*** Error during phase configure of gobject-introspection: ########## Error running ./autogen.sh --prefix /home/pgolinski/jhbuild/install --disable-static --disable-gtk-doc *** [7/36]
[1] Rerun phase configure
[2] Ignore error and continue to build
[3] Give up on module
[4] Start shell
[5] Reload configuration
[6] Go to phase "wipe directory and start over"
[7] Go to phase "clean"
[8] Go to phase "distclean"
Strangely the error says that Python headers were not found even though I have python-devel installed. I managed to find python-config in usr/bin so how to change its directory for configure? Or maybe the problem lies elsewhere? (I just want to build gnome-weather)

you can download the last version of gnome-weather here:
https://git.gnome.org/browse/gnome-weather/snapshot/gnome-weather-3.14.1.zip
and compile that with these command after unzip it:
libtoolize
aclocal
autoheader
autoconf
automake --add-missing --foreign
./configure
make && make install
this should work.8y3

Here's what finally worked for me if someone struggles with something similair in future:
PYTHON=/usr/bin/python jhbuild build gnome-weather

Related

Mozilla syncstorage-rs installation / make fails under RHEL8

I'm currently trying to install Mozilla syncstorage-rs on a RockyLinux machine, and step by step I could reduce the amount of errors, but now I got stuck. I found in Makefile to execute the following command in case of SSL trouble, so I did so cargo build --features grpcio/openssl
and this is fine, this finally works:
cargo build --features grpcio/openssl
Compiling syncstorage v0.10.2 (/var/www/html/syncstorage-rs)
Finished dev [unoptimized + debuginfo] target(s) in 35.59s
But when I try to now run either make run or make test or anything else, I just get:
= note: /usr/bin/ld: /var/www/html/syncstorage-rs/target/debug/deps/libopenssl-dc6f50ea1194640f.rlib(openssl-dc6f50ea1194640f.openssl.9bacb62b-cgu.1.rcgu.o): undefined reference to symbol 'OPENSSL_cipher_name##OPENSSL_1_1_1'
//usr/lib64/libssl.so.1.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
= help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
error: could not compile `syncstorage` due to previous error
make: *** [Makefile:45: test] Error 101
What am I missing? I thought after building it could be run easily.
So the answer is to use cargo clean before continuing. I don't know why, but there seemed to be some old artifacts even if I hadn't built before. However, after executing cargo clear command, the build openssl runs completely (many lines more than before) and after that, there is one more little step to do:
python3 -m venv venv # creates a virtual environment named "venv"
source venv/bin/activate # enters the virtual environment
python3 -m pip install -r requirements.txt # installs the packages
and finally make run works.
For more details, see https://github.com/mozilla-services/syncstorage-rs/issues/1241
See https://www.youtube.com/watch?v=jdtoyIW4Lec
for a step by step instruction.

Error installing nokogiri: Failed to build gem native extension

I want to execute the following command
bundle install && rake install
but an error comes up and I try to figure out whats going on. I found that i need to install nokogiri. But when I try to install it an error comes up again. Any ideas? :/
sudo gem install nokogiri -v '1.8.5'
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.5.0/gems/nokogiri-1.8.5/ext/nokogiri
/usr/bin/ruby2.5 -r ./siteconf20181210-12550-orku3c.rb extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.3.0
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)2.5
--help
--clean
--use-system-libraries
--enable-static
--disable-static
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--enable-cross-build
--disable-cross-build
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/nokogiri-1.8.5/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.5.0/gems/nokogiri-1.8.5 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/nokogiri-1.8.5/gem_make.out

`stack build --nix` results in /bin/bash: bad interpreter: No such file or directory

I've previous solved this issue, but I don't remember what I did... So thought I'd post it here to settle it.
I'm trying to build a Haskell package with stack build nix, I'm following the answer from https://stackoverflow.com/a/47110522/1663462 but it runs into an error of:
Unpacking GHC into /home/chris/.stack/programs/x86_64-linuRunning /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure --prefix=/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/ in directory /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/ exited with ExitFailure 1
checking for path to top of build tree...
/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure: utils/ghc-pwd/dist-install/build/tmp/ghc-pwd-bindist: /bin/bash: bad interpreter: No such file or directory
configure: error: cannot determine current directory
How can I solve this?
stack --nix setup results in:
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.
Running /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure --prefix=/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/ in directory /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/ exited with ExitFailure 1
checking for path to top of build tree...
/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure: utils/ghc-pwd/dist-install/build/tmp/ghc-pwd-bindist: /bin/bash: bad interpreter: No such file or directory
configure: error: cannot determine current directory
Error: Error encountered while configuring GHC with
/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure --prefix=/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/
run in /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/
The following directories may now contain files, but won't be used by stack:
- /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/
- /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/
Configuring GHC ...
nix:
enable: true
packages:
- pkgconfig
- autoconf
- gcc
- xorg.libX11
- xorg.libXext
- xorg.libXft
- xorg.libXinerama
- xorg.libXpm
- xorg.libXrandr
- xorg.libXrender
The above worked for me. I think it's just the autoconf that is needed. Answering with the full list in case it's not.

Unbound module llvm

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.

CMake Error: The following variables are used in this project, but they are set to NOTFOUND

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.

Resources