No package 'sqlite3' found - sqlite3 already installed - sqlite

I am trying to build an open source software using cMake and Visual Studio 2017 on Windows 10.
Came across this error:
Checking for module 'sqlite3'
No package 'sqlite3' found
I have already downloaded and installed sqlite3:
sqlite3 --version
3.28.0 2019-04-16 19:49:53 884b4b7e502b4e991677b53971277adfaf0a04a284f8e483e2553d0f83156b50
Folder containing these files are added as well in the PATH and PKG_CONFIG_PATH (and already did a restart):
sqlite3.dll
sqlite3.def
sqlite3.exe
even have sqldiff.exe, sqlite3_analyzer in the same folder.
What should I do?? Or perhaps is there a way to force cmake to use the one in my local rather than still looking for the package in pkg-config??
All other references online are only referring to Linux :(

Related

Error installing XML packege in R (libxml2)

I am trying to install the mlr3 library in R. THe XML library (one of the dependencies) gives me problems since it returns the following error:
You are trying to use a version 2.* edition of libxml
but an incompatible library. The header files and library seem to be
mismatched. If you have specified LIBXML_INCDIR, make certain to also
specify an appropriate LIBXML_LIBDIR if the libxml2 library is not in the default
directories.
I already tried to uninstall and re-install (via brew) libxml2 but nothing changes.
What should I try?
I am working in RStudio on a MacBook with Catalina installed.

Compiling third party libraries with Qt

I've been using OpenCV and Marble libraries compiled and linked with Qt. Every time I do it I have problems running cmake to make these libraries. it seems paths in the qt cmake files to other qt cmake files are incorrect. I get errors like:
CMake Error at CMakeLists.txt:67 (find_package):
By not providing "FindQt5DBus.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5DBus", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5DBus" with any
of the following names:
Qt5DBusConfig.cmake
qt5dbus-config.cmake
Add the installation prefix of "Qt5DBus" to CMAKE_PREFIX_PATH or set
"Qt5DBus_DIR" to a directory containing one of the above files. If
"Qt5DBus" provides a separate development package or SDK, be sure it has
been installed.
I can fix this in Ubuntu by running
sudo apt-get install qt5-default
This is fine in Ubuntu, but now I am trying to compile these libraries on mac and windows now. Anyone know a way to get a Qt with all of these paths already correct? tried the installer on windows and mac, and brew on mac. I don't really have time to play with fixing each one of these errors one by one
At least Qt 5.5 on Windows (using the Qt installer) should work out of the box. It has DBus included. Which Qt version are you using currently?

ArrayFire is missing LAPACK - but I have it

I just downloaded the latest release of ArrayFire (3.3.1), and am trying to build it. I'm stuck at cmake . though. I installed a bunch of missing libraries, reran it, and now I get:
-- Could NOT find LAPACK (missing: LAPACK_LIBRARIES)
CMake Warning at src/backend/opencl/CMakeLists.txt:38 (MESSAGE):
LAPACK not found. Functionality will be disabled
and
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:
GLEWmxd_LIBRARY
linked by target "afcpu" in directory /home/joeuser/src/arrayfire-full-3.3.1/src/backend/cpu
linked by target "afcuda" in directory /home/joeuser/src/arrayfire-full-3.3.1/src/backend/cuda
linked by target "afopencl" in directory /home/joeuser/src/arrayfire-full-3.3.1/src/backend/opencl
I have installed lapack, and it's at /usr/lib/liblapack.so (that's an alternatives symlink, but it's not broken). Also installed lapacke.
ArrayFire requires the LAPACKE library (On Ubuntu, liblapacke-dev, and the graphics part requires GLEW-MX (on Ubuntu, libglewmx-dev).

installing RSRuby in Ubuntu 10.04

I'm trying to install RSRuby on Ubuntu 10.04. I barely even know what error messages to report as the relevant ones; I've just been googling around for several hours and none of the commands I try solve the problem.
Here are a few sample error messages:
$ sudo gem install rsruby -- --with-R-dir=/usr/lib/R
Building native extensions. This could take a while...
ERROR: Error installing rsruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb --with-R-dir=/usr/lib/R
checking for main() in -lR... yes
checking for R.h... no
ERROR: Cannot find the R header, aborting.
Gem files will remain installed in /var/lib/gems/1.8/gems/rsruby-0.5.1.1 for inspection.
Results logged to /var/lib/gems/1.8/gems/rsruby-0.5.1.1/ext/gem_make.out
or doing it with apt-get:
$ sudo gem install rsruby --include-dependencies -- --with-R-dir=/usr/lib/R/lib64/R --with-R-lib=/usr/lib/R/lib64/R/bin --with-R-include=/usr/lib/R/lib64/R/include
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Building native extensions. This could take a while...
ERROR: Error installing rsruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb --with-R-dir=/usr/lib/R/lib64/R --with-R-lib=/usr/lib/R/lib64/R/bin --with-R-include=/usr/lib/R/lib64/R/include
checking for main() in -lR... no
ERROR: Cannot find the R library, aborting.
Gem files will remain installed in /var/lib/gems/1.8/gems/rsruby-0.5.1.1 for inspection.
Results logged to /var/lib/gems/1.8/gems/rsruby-0.5.1.1/ext/gem_make.out
I also got the latest RSRuby from GitHub and following the instructions from its 2006 PDF manual:
$ ruby setup.rb config -- --with-R-dir=/usr/lib/R
---> lib
---> lib/rsruby
<--- lib/rsruby
<--- lib
---> ext
/usr/bin/ruby1.8 /home/mars/R/rsruby/ext/extconf.rb --with-R-dir=/usr/lib/R
checking for main() in -lR... yes
checking for R.h... no
ERROR: Cannot find the R header, aborting.
*** /home/mars/R/rsruby/ext/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=/home/mars/R/rsruby/ext
--curdir
--ruby=/usr/bin/ruby1.8
--with-R-dir
--with-R-include
--without-R-include=${R-dir}/include
--with-R-lib
--without-R-lib=${R-dir}/lib
--with-Rlib
--without-Rlib
setup.rb:655:in `command': system("/usr/bin/ruby1.8" "/home/mars/R/rsruby/ext/extconf.rb" "--with-R-dir=/usr/lib/R") failed (RuntimeError)
from setup.rb:660:in `ruby'
from setup.rb:1238:in `extconf'
from setup.rb:1230:in `config_dir_ext'
from setup.rb:1532:in `__send__'
from setup.rb:1532:in `traverse'
from setup.rb:1549:in `dive_into'
from setup.rb:1530:in `traverse'
from setup.rb:1524:in `exec_task_traverse'
from setup.rb:1519:in `each'
from setup.rb:1519:in `exec_task_traverse'
from setup.rb:1223:in `exec_config'
from setup.rb:991:in `exec_config'
from setup.rb:826:in `__send__'
from setup.rb:826:in `invoke'
from setup.rb:773:in `invoke'
from setup.rb:1578
and in irb:
irb(main):002:0> require 'RSRuby'
LoadError: no such file to load -- RSRuby
from (irb):2:in `require'
from (irb):2
from :0
irb(main):003:0> rsruby
NameError: undefined local variable or method `rsruby' for main:Object
from (irb):3
from :0
Sometimes I'm seemingly able to get something that looks like it works, but still can't load rsruby from the irb command line.
$ sudo gem install rsruby --include-dependencies -- --with-R-dir=/usr/lib/R --with-R-lib=/usr/lib/R --with-R-include=/usr/share/R/include/
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Building native extensions. This could take a while...
Successfully installed rsruby-0.5.1.1
1 gem installed
Installing ri documentation for rsruby-0.5.1.1...
Installing RDoc documentation for rsruby-0.5.1.1...
then
$ irb
irb(main):001:0> require 'rsruby'
LoadError: no such file to load -- rsruby
from (irb):1:in `require'
from (irb):1
from :0
Ruby is version 1.8.7, I did sudo apt-get install ruby1.8-dev today but I'm not sure if that left things worse, better, or unchanged. Or if this would be easier in ruby1.9.
R is working.
I don't read Japanese but this worked for me on Ubuntu 10.10, ruby 1.9: http://d.hatena.ne.jp/cuspos/20090520/1242825057
# gem install rsruby-0.5.1.1.gem -- --with-R-dir=/usr/lib/R --with-R-include=/usr/share/R/include
Building native extensions. This could take a while...
Successfully installed rsruby-0.5.1.1
1 gem installed
# export R_HOME=/usr/lib/R
# irb
irb(main):001:0> require 'rsruby'
=> true
irb(main):002:0>
You might want to check to see if your PATH variables or dynamic links are set up so that Ruby and friends are "looking" in the right place. Ruby appears to expect RSruby to be in /var/lib/gems/1.8/gems/rsruby-0.5.1.1/ or perhaps /usr/lib/ruby/1.8/rubygems/ or perhaps /var/lib/gems/1.8/gems/rsruby-0.5.1.1/lib/, .... while your configure report says it was installed in /usr/bin/ruby1.8 /home/chris/R/. I don't have a ton of Linux experience, but what I do have tells me that each distro is different with respect to where it expects to find installed executables.
Your attempts with apt-get and gem install suggest that the installer cannot find the R header files. I would start by fixing this problem, not try other ways of installing RSruby. The next question is why it cannot find the R headers, there are two options:
The headers are installed, but they cannot be found. Use locate R.h to find where the R header file is located, and make sure this is in your $PATH.
The headers are not installed (which I suspect is the case). Often installing header files requires a development package to be installed. Try and see if there is an R-dev package or something named similarly which would contain, among others, the R header file. Installing this R-dev can be done using apt-get. The standard version of R in ubuntu 10.04 is not really up-to-date I think. CRAN has ubuntu repositories, where the dev package is called r-base-dev. Adding this repo to your sources.list gets you the latest version of R from CRAN through apt-get.
You have successfully installed rsruby, as shown by the output from your 5th example:
Successfully installed rsruby-0.5.1.1
1 gem installed
The library did not load in irb because using Ruby 1.8.7, you need to "require rubygems" first. Try this in irb:
require 'rubygems'
require 'rsruby'

installation HDBC-SQlite3 Haskell

Im facing the problem during installation :
>>setup configure
Configuring HDBC-sqlite3-2.3.0.0...
setup: Missing dependency on a foreign library:
* Missing C library: sqlite3
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.
what should I do ?
thanks for any help
OK,
I downloaded sqlite3.dll and sqlite3.h from source zip.
then I inserted sqlite3.dll in system32 dir and in setup configure i used
--extra-lib-dirs=... --extra-include-dirs=... parameters with correct paths to header and dll.
You need to install the C library implementation and headers of SQLite.
On Ubuntu and other Debian-based Linux distros, it's simply
sudo apt-get install sqlite3 libsqlite3-dev
Other Linux distros will have similarly named packages.
On Windows, you'll have to do some more work.
On OS X, I have no idea.

Resources