kraftwagen is not working - linux

I'm trying to do setting a kraftwagen project using http://kraftwagen.org/get-started.html
I can go through the document until Building topic. But after that, when I try to run drush kw-b is it give some error.
$ drush kw-b
Makefile generated from template (/home/dinuka/drush_test/src/tools/build.make.tpl).[success]
Beginning to build /tmp/kwLL5uil. [ok]
drupal-7.22 downloaded. [ok]
file_exists() expects parameter 1 to be string, array given filesystem.inc:185 [warning]
Source directory p is not readable or does not exist. [error]
drush_test copied from p. [ok]
Called command make returned an error.
I can't find drupal-7.22 anywhere. I think it is a problem. I'm a newcomer to Drupal and these things.

Seems to me to be a bug, like this one : https://drupal.org/node/1078318
Maybe you should report it directly (and try to get the patch for it.)
Hope it helps! :)

Related

Converting a package backend from Rcpp to cpp11

I'm trying to use cpp11 with a fork of fixest (I need to use vendoring). I put a new branch at https://github.com/pachadotdev/fixest/tree/cpp11, then started committing step by step as cpp11's FAQ says, and I fixed all the errors one by one.
Now when I run devtools::install(), the process fails, and now it doesn't say "I didn't like line 10 in means.cpp" or similar.
I'm looking for any help to be able to solve this problem. I listed my doubts at https://github.com/pachadotdev/fixest/issues.
The problem appears to be in this file just to show diff in the file quf.cpp (https://github.com/pachadotdev/fixest/pull/8/files#diff-b9826484794eda5aaf5e9687abf2c971b0b71666b0c44c0b5fa985ce24f3ef26).

Is this an error in the "path.normalize" documentation?

I've trying to figure out an issue with file paths using path and upath
(specific question: Issue saving to Windows "mapped network drive" in Electron)
Reading the documentation for path.normalize(path) it gives the following examples:
For example, on POSIX:
path.normalize('/foo/bar//baz/asdf/quux/..');
// Returns:
'/foo/bar/baz/asdf'
On Windows:
path.normalize('C:\temp\\foo\bar\..\');
// Returns: 'C:\temp\foo\'
In the first example, what happened to "quux"? And in the second, what happened to "bar"? Are these just copy-paste errors? Sorry if this seems a trivial question but this "path" stuff, particularly on Windows, is very confusing to me (I'm on macOS).
Like the doc says:
The path.normalize() method normalizes the given path, resolving '..' and '.' segments.
Try without the .. at the end, that is suggesting that you're going one directory up and is getting interpreted as basically
cd /foo/bar//baz/asdf/quux
cd ..
Also, this might be a mistake but you got two slashes between bar//baz in here.

Trouble building R package wtih devtools when it uses RcppArmadillo

This is my first stackoverflow question, so please be kind, folks!
I have greatly enjoyed my recently-found power to build R packages using devtools. However, as soon as I try building a package that uses RcppArmadillo, my workflow of running devtools::document(), devtools::check(), and devtools::build() no longer works.
For example, I have a (hopefully pretty minimal + complete) test version of the package I'm trying to develop here: https://github.com/suztolwinskiward/fooR/. fooR contains only one functions, which is a C++ implementation of the rdist.earth function from the fields package.
Running devtools::document("fooR") spits out lots of messages (several alluding to "undefined references" to variables that do not live in my source co that are not interpretable to me, and then fails:
collect2: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'fooR'
* removing 'C:/Users/I53794/AppData/Local/Temp/RtmpWgC8nD/devtools_install_1ea473123086/fooR'
Error: Command failed (1)
One the other hand, when I source the C++ function that depends on RcppArmadillo, it seems to run just fine:
> Rcpp::sourceCpp('./src/rdist_earth_cpp.cpp')
> data('miami')
> data('new_orleans','katrina_path')
> rdist_earth_cpp(katrina_path,new_orleans)
[,1]
[1,] 1042.36073
[2,] 998.96793
[3,] 957.69315
[4,] 917.91486
[5,] 868.07791
[6,] 805.73485
[7,] 763.01476
[8,] 726.10133
[9,] 692.14482
[10,] 670.15133
[11,] 662.23353
[12,] 625.55592
[13,] 601.08682
[14,] 579.73940
[15,] 560.32660
[16,] 539.14192
[17,] 510.15438
[18,] 481.40037
[19,] 442.52322
[20,] 391.96619
[21,] 331.66378
[22,] 271.79088
[23,] 201.24749
[24,] 128.12647
[25,] 56.99198
[26,] 45.80297
[27,] 32.96609
[28,] 81.71237
[29,] 189.31050
[30,] 296.92104
[31,] 406.12593
[32,] 516.08458
[33,] 654.81113
[34,] 808.21670
This leads me to think there's something wrong with the way I'm trying to use RcppArmadillo in my package, but I haven't been able to figure out what. Any advice much appreciated!
P.S. I'm surprised there's no RcppArmadillo tag here....
In addition to the answers of jtilly and the comment from Dirk:
RcppArmadillo.package.skeleton() generates the correct namespace file, but after running roxygen2 via document() the namespace just contains one line
# Generated by roxygen2: do not edit by hand
and the DynLib/export directives are overwritten. To let roxygen2 automatically generate the correct namespace, add a new R file to the R-subdirectory of your package directory containing the following:
#' #useDynLib YourPackageName
#' #importFrom Rcpp evalCpp
#' #exportPattern "^[[:alpha:]]+"
NULL
The name of this file doesn't matter, but YourPackageName.r is usual for this (kind of) "main file".
When running "document()", the following namespace file is generated:
# Generated by roxygen2: do not edit by hand
exportPattern("^[[:alpha:]]+")
importFrom(Rcpp,evalCpp)
useDynLib(YourPackageName)
This is the same namespace which is generated via RcppArmadillo.package.skeleton() by RcppArmadillo 0.6.700.6.0.
Your NAMESPACE file is empty. It should contain something like this:
useDynLib(fooR)
exportPattern("^[[:alpha:]]+")
What eventually worked was to initialize a new package with RcppArmadillo.skeleton.package, move all my previous files therein, document manually, and then check and build with the GUI buttons in RStudio. This feels pretty kludgy and I really liked using roxygen2 much better for documentation-- but as a relative novice in package development with RcppAmadillo dependence, I am just happy for now to have found a way to build successfully!
'devtools::document()' compiles your code, honestly, I'm not sure why. This means that if the compilation fails, the documentation isn't completed. It seems in your case this means you don't get your NAMESPACE written.
Start as Dirk suggests, and add stuff in, but it will have to compile before the docs get done.

Compiling nfdump with --enable-compat15

When trying to process netflow data with nfdump I get an error: "Can't process nfdump 1.5.x block type 1. Add --enable-compat15 to compile compatibility code. Skip block." I tried compiling it several times but to no avail. I always get the same error. Where exactly do I need to add that parameter? I tried to adding it to ./configure --enable-compat15, but it makes no difference. Must I add it some place else? Anyone encounter the same problem?
So, I finally figured it out. ./configure --enable-compat15 is correct, but you have to delete all the direcotory and extract from tar.gz again, if you had ran make previously in that directory. Now it works.

iPhone SQLite encryption with SQLCipher facing errors

I am trying to learn about the encryption of DB at application level using this tutorial. But I am getting an error that says
sqlcipher/sqlite3.c:11033:25: error: openssl/evp.h: No such file or directory
sqlcipher/sqlite3.c:11034:26: error: openssl/rand.h: No such file or directory
sqlite3.c:11035:26: error: openssl/hmac.h: No such file or directory
and due these there are around 93 more errors in the build process. I have strictly followed the tutorial but I am not able to get rid of those errors.
I have added the path of the source code as instructed in the tutorials but still the problem persists. The screenshot could be seen here
I had the same problem, in my case it was caused by a space in my OPENSSL_SRC path. Enclosing the value of OPENSSL_SRC in double-quotes fixed the problem.
The error messages you are seeing indicate that the compiler can't find the OpenSSL headers included in the SQLCipher code. The most likely problem is that you didn't add the OpenSSL headers to your include path when setting up your project. Perhaps you missed this step in the tutorial: "Look for the “Header Search Paths” setting and add references to $(SQLCIPHER_SRC) and $(OPENSSL_SRC). Check “recursive” on both."
As an aside, the information on that MO article is dated. In the future you can refer to this updated tutorial on the SQLCipher website: http://sqlcipher.net/documentation/ios
After long time i'm not sure whether you fixed this issue or not anyway to fix this do as follows:
In OPENSSL_SRC change destination from "/openssl-1.0.0d" to "/openssl-1.0.0d/include".
thatz it..it has to work.

Resources