Using Ubuntu 14.04, I downloaded the Neon Frama-C distribution, and installed the required tools: labgtk, sourceview, etc. I configured Frama-C no problem, but on building got:
File "external/unz.ml", line 39, characters 10-19:
Error: Unbound module Z
make: *** [external/unz.cmo] Error 2
The problem is
let n = Z.of_bits str in
where Z denotes a module that is not imported (I guess). I do not know what Z is supposed to refer to so I have no way of trying to fix this.
Have you installed the zarith library (libzarith-ocaml-dev under Ubuntu)? Frama-C can use two libraries for arbitrary precision integers: either Bignum, which is included in OCaml distribution (although I wouldn't be surprised that Debian/Ubuntu did manage to make it a separate package ), or Zarith, a newer, more efficient implementation. unz.ml is part of the code that binds
Zarith to Frama-C, thus if you don't have Zarithinstalled, you will have some issues compiling it.
Normally, ./configure should take care of choosing the appropriate library. You can check what it has found in config.log. A possible issue is that you have package libzarith-ocaml installed but not libzarith-ocaml-dev. In this case, the library itself is installed (and presumably detected by ./configure), but not the headers needed to compile the code against it.
Related
I wish to use CTF conversion with perf. From the scarce information around, I've figured out that I need to recompile perf.
I've installed the epel repository and used yum to install
babeltrace and libbabeltrace
for the run time as well as
libunwind-devel slang-devel libbabeltrace-devel and asciidoc
for compilation.
I cloned git.kernel.org (as alternative I also tried github.com/torvalds) and used
LIBBABELTRACE=1 make
to build the perf with babeltrace support. However, I get the error:
Makefile.config:780: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev
So I try adding LIBBABELTRACE_DIR with /usr but this, too, fails. Checking out the Makefile.conf, I see that the configuration is looking in the wrong places: it is set up to use a locally compiled babeltrace with well defined subdirectories (include and lib), but these are NOT used when installing from rpm (yum). The rpm places them in /usr/include/babeltrace and /usr/lib64.
Patching the Makefile also doesn't help.
So, short of being forced to use a locally compiled babeltrace, what options do I have?
This is for a cluster of 26 nodes and I really would prefer a simple 'yum install' as this simplifies restaging nodes when the get corrupted (we do research with them and regularily corrupt stuff) and does not require setting specific environments.
ADDENDUM:
I tried compiling babeltrace from https://github.com/efficios/babeltrace.git: this, too, fails with the error:
babeltrace-cfg-cli-args.c:2390:29: error: ‘POPT_ARG_LONGLONG’ undeclared (first use in this function)
and, surely enough, popt.h does not define POPT_ARG_LONGLONG.
Thanks in advance.
To use dictionary learning and sparse coding methods, I am trying to install SPArse Modeling Software (spams) package in R. Their instruction says:
Download the .tar.gz file.
After Un-taring the file and entering the newly extracted folder, run the following command:
R CMD INSTALL --html -l \$R\_LIBS spams
In my case, I use
R CMD INSTALL --html -l /Library/Frameworks/R.framework/Resources/library spams
But I receive the following error messages:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__config:593:1: error:
templates must have C++ linkage
Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__config:594:20: error:
explicit specialization of non-template struct '__static_assert_test'
There are many other error messages which highlight some parts of the library codes (like the second error message) which seem to have the same root cause.
I am not sure if it helps but just in case, I am using Command Line Tools (OS X 10.11) Xcode 8 beta 6.
Confirmed. It's buggy code. Likely mixes C and C++ headers inside/outside of C "extern" blocks.
That uses to pass with older compilers. It does not more. You'll probably have to do some minor surgery on it -- helps if you know C(++) and R package structures.
So in short, it is not your use of R CMD INSTALL ... which is at fault here but rather the package you are trying to install. There is a reason we all prefer R software from CRAN as these issues have then been ironed out...
I've made an R package with Rcpp, to use the methods of a library I programmed in c++.
I've R running on the last version:
R version 3.2.5 (2016-04-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04 LTS
I'm executing the following instruction to install my package:
> install.packages("mypackage", repos = NULL)
The package compiles well, I have the .o files of my source code, but in the linking phase I got the error:
* installing *source* package ‘rbdd’ ...
** libs
make: No se hace nada para 'all'.
installing to /home/sergio/R/x86_64-pc-linux-gnu-library/3.2/mypackage/libs
** R
** preparing package for lazy loading
** help
Warning: /home/sergio/R/mypackage/man/mypackage-package.Rd:27: All text must be in a section
Warning: /home/sergio/R/mypackage/man/mypackage-package.Rd:28: All text must be in a section
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/sergio/R/x86_64-pc-linux-gnu-library/3.2/mypackage/libs/mypackage.so':
/home/sergio/R/x86_64-pc-linux-gnu-library/3.2/mypackage/libs/mypackage.so: undefined symbol: _ZN4cudd12defaultErrorENSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE
Error: loading failed
Ejecución interrumpida
ERROR: loading failed
mypackge.so is created in the src folder of my package.
I've got a Makevars file (in src, too) with the following content:
PKG_CPPFLAGS=-I./buddy-2.5/src -I./cudd-3.0.0/cudd -I./cudd-3.0.0/mtr -I./cudd-3.0.0/cplusplus -I./cudd-3.0.0/dddmp -I./cudd-3.0.0/util -I./cudd-3.0.0 -isystem /usr/include/c++/v1 -std=c++11
PKG_LIBS=-lc++ -L/lib
and my NAMESPACE file has the lines:
useDynLib(mypackage)
exportPattern("^[[:alpha:]]+")
importFrom(Rcpp, evalCpp)
Someone knows how to solve this problem?
I am a little concerned about
PKG_LIBS=-lc++ -L/lib
Did you really mean /lib? If it is your library, a more common place would be /usr/local/lib which is also search by default.
But, and that is a BIG but, you also need to understand what you need to do for ldconfig for the proper setup of libfoo.so, libfoo.so.$MAJOR and so on. I taught myself that many moons ago from a Linux HOWTO.
If and when that is setup right, you can link it to R via Rcpp. Otherwise maybe stick with system libraries, or package-local static libraries. That approach will also make your package more portable.
The problem was I am consumming external libs, and I must compile it and execute ldconfig before compile my R library.
Does anyone have any experience with trying to install cairo for django using buildout?
It will install pycairo or py2cairo (the first is for python >3.0, the latest is for python 2.6, which I Am using)
I found 2 recipes to use for installation, both of them gives me errors, in buildout.cfg I have them as 2 parts (of course tried them seperately, not thogether).
The errors are totally different, but the result is the same: I can't get cairo installed using buildout.......
based on: http://pypi.python.org/pypi/tl.buildout_gtk/
[cairo_tl]
recipe = tl.buildout_gtk
#pycairo-url = http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2
pycairo-url = http://cairographics.org/releases/py2cairo-1.8.10.tar.gz
pycairo-md5sum = http://cairographics.org/releases/py2cairo-1.8.10.tar.gz.md5
based on: https://bitbucket.org/lgs/yaco.recipe.pycairo
[cairo_yaco]
recipe = yaco.recipe.pycairo
find-links = http://pypi.python.org/pypi/yaco.recipe.pycairo/0.1.1
#find-links = http://pypi.python.org/pypi/yaco.recipe.pycairo/0.1
# pkg-config-path ?
Both need a local install of cairo (pycairo and py2cairo depend on this):
so use on the server:
sudo apt-get install libcairo2-dev
The part jusing tl.buildout_gtk:
Either using the py2cairo-1.10.0 or pycairo-1.8.2 gives me a MD5 checksum mismatch
(see for available releases: http://cairographics.org/releases/)
e.g:
Error: MD5 checksum mismatch downloading 'http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2'
or:
Error: MD5 checksum mismatch downloading 'http://cairographics.org/releases/py2cairo-1.8.10.tar.gz'
The part jusing yaco:
I Am pretty sure this part is not configured correctly (pkg-config-path refering to the local cairo package), but I do not even get to that point.
It gives an error:
DistributionNotFound: zc.recipe.cmmi
However, this is installed in the eggs
By the way, I had the same kind of headache trying to install PIL by buildout, which I solved combining a lot of options and posts on the internet, together with a lot of time and trials and errors.
If anyone want to know how I finally got it working, just ask, and I will publish it.
(I consider myselve still a django starter, so I do not know for sure if anyone is interested in the solution)
PIL does not have all the options I found in cairo, so I started using cairo. On my local PC everything works fine (ubuntu desktop), on my server (Ubuntu server) I can't getting it to work......
Any other options for making drawings on the fly..... (like matplotlib...) let me know.
Pretty sure you have to give the real md5 hash to the pycairo-md5 option instead of a string with some url in it.
I would avoid specialized recipes like those two whenever possible. There are some cases when a specialized recipe really is needed, but those are cases where the dependency is so egregiously eccentric that no common build/install pattern is usable. I don't know pycairo so that may be the case.
But before assuming it is, try the following. Always try using an egg first by adding it to the eggs option of the relevant buildout part. If that doesn't work, update your question with those details, and then try adding a separate zc.recipe.egg part with build options that may help the distribution build successfully. If that doesn't work or the distribution uses a ./configure && make && make install (AKA "CMMI") build system, update your question with those details, and then try using zc.recipe.cmmi to build the package after which you can use the extra-paths option of your zc.recipe.egg part to include the relevant bits of the CMMI part (extra-paths = ${cmmi-part:location}/weird/path/to/python/modules).
This is the general dance for getting poorly/oddly behaved distributions. If this doesn't work, then a specialized recipe may be in order but in general there's a way to get it to work with the above and that will be much more maintainable.
I'm trying to install GDAL via buildout on MacOSX. I have following config:
[gdal]
recipe = zc.recipe.cmmi
url = http://download.osgeo.org/gdal/gdal-1.7.2.tar.gz
extra_options =
--with-geos=${geos:location}/bin/geos-config
--with-static-proj4=${proj:location}
--with-jpeg={libjpeg:location}
--with-spatialite=${spatialite-lib:location}
--with-sqlite=${spatialite-lib:location}
I tried many other configurations but all I've got is the following error:
http://pastebin.com/s0WxfnUu
Any clues?
I've managed to resolve the problem - description below.
Just for the record - proper configuration for building GDAL on MacOSX (for example purposes I've cut off additional stuff):
[libiconv]
# ...
[gdal]
recipe = hexagonit.recipe.cmmi
url = http://download.osgeo.org/gdal/gdal-1.7.3.tar.gz
configure-options =
--with-python
--with-jpeg=internal
--with-spatialite=${spatialite:location}
CFLAGS=-I${libiconv:location}/include
LIBS="${libiconv:location}/lib/libiconv.la ${libiconv:location}/lib/libcharset.la"
You need to specify libiconv (in my example I'm building it from source) - it will prevent charset errors.
Also my problem was in the version of jpeglib, so I've definied --with-jpeg=internal so the GDAL will use it's own libs. Depending on the error you can use --with-png=internal, --with-tiff=internal etc.
Good luck!
Buildout is great for a lot of things, but even I tend to hand over some responsibility to the OS.
The whole whopping geo stack is one of those things. Gdal, geos, libproj4, mapnik, I don't know what. Compiling everything from source is just too cumbersome, especially as you have a lot of dependencies.
In your case, it looks like there's a mismatch in some of the libraries that gdal compiles against. Wrong length of arguments.
My tip is to install gdal and friends via your OS (so: windows installer, apt-get, rpm, whatever).