Local package install with undefined reference error - r

I am very new to the R extension with C.
The scenario is:
I want to implement the code in one package from one paper which is quite old (2007 or earlier).
I first tried to install the package with the commend
install.packages("~/ppmx_1.0.tar.gz", repos = NULL, type = "source")
Then I got errors and warnings (I am sorry it it quite long)
** libs
*** arch - i386
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c bayes.c -o bayes.o
bayes.c: In function 'nn_bayes1':
bayes.c:107:5: warning: variable 'sd' set but not used [-Wunused-but-set-variable]
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c cdf.c -o cdf.o
cdf.c:3:1: warning: "/*" within comment [-Wcomment]
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c com.c -o com.o
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c dcdflib.c -o dcdflib.o
dcdflib.c: In function 'cdfbin':
dcdflib.c:1889:5: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
dcdflib.c: In function 'cdfgam':
dcdflib.c:3551:9: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
dcdflib.c: In function 'E0000':
dcdflib.c:6410:5: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
dcdflib.c:6434:5: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
dcdflib.c:6475:5: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
dcdflib.c:6342:56: warning: variable 'qok' set but not used [-Wunused-but-set-variable]
dcdflib.c: In function 'E0001':
dcdflib.c:6877:5: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c fortif.c -o fortif.o
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c interface.c -o interface.o
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c ipmpar.c -o ipmpar.o
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c matrix.c -o matrix.o
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c mess.c -o mess.o
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c nrutil.c -o nrutil.o
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c ppmx.c -o ppmx.o
ppmx.c: In function 'init':
ppmx.c:69:8: warning: unused variable 'line' [-Wunused-variable]
ppmx.c:68:10: warning: unused variable 'r' [-Wunused-variable]
ppmx.c: In function 'init_config':
ppmx.c:382:13: warning: unused variable 'ct' [-Wunused-variable]
ppmx.c: In function 'gibbs':
ppmx.c:426:7: warning: unused variable 'time' [-Wunused-variable]
ppmx.c: In function 'sample_config':
ppmx.c:470:11: warning: unused variable 'j' [-Wunused-variable]
ppmx.c:470:7: warning: unused variable 'si' [-Wunused-variable]
ppmx.c: In function 'loglik':
ppmx.c:589:11: warning: unused variable 'offset' [-Wunused-variable]
ppmx.c:589:9: warning: unused variable 'k' [-Wunused-variable]
ppmx.c:589:7: warning: unused variable 'j' [-Wunused-variable]
ppmx.c: In function 'make_Sk':
ppmx.c:725:10: warning: variable 'nk' set but not used [-Wunused-but-set-variable]
ppmx.c:724:12: warning: unused variable 'j2' [-Wunused-variable]
ppmx.c:724:9: warning: unused variable 'j1' [-Wunused-variable]
ppmx.c: In function 'make_Sk1':
ppmx.c:742:10: warning: variable 'nk' set but not used [-Wunused-but-set-variable]
ppmx.c:741:12: warning: unused variable 'j2' [-Wunused-variable]
ppmx.c:741:9: warning: unused variable 'j1' [-Wunused-variable]
ppmx.c: In function 'sample_V':
ppmx.c:838:9: warning: unused variable 'j2' [-Wunused-variable]
ppmx.c:838:6: warning: unused variable 'j1' [-Wunused-variable]
ppmx.c:837:5: warning: unused variable 'V11' [-Wunused-variable]
ppmx.c: In function 'sample_S':
ppmx.c:894:23: warning: unused variable 'S1' [-Wunused-variable]
ppmx.c:894:18: warning: unused variable 'Vinv' [-Wunused-variable]
ppmx.c:892:12: warning: unused variable 'j2' [-Wunused-variable]
ppmx.c:892:9: warning: unused variable 'j1' [-Wunused-variable]
ppmx.c: In function 'setup_mj1':
ppmx.c:1070:20: warning: unused variable 'mu' [-Wunused-variable]
ppmx.c: In function 'setup_aj4':
ppmx.c:1147:13: warning: unused variable 'b1' [-Wunused-variable]
ppmx.c:1147:10: warning: unused variable 'a1' [-Wunused-variable]
ppmx.c: In function 'print_pars':
ppmx.c:1267:7: warning: too many arguments for format [-Wformat-extra-args]
ppmx.c: In function 'write_nclass':
ppmx.c:1401:7: warning: unused variable 'j' [-Wunused-variable]
ppmx.c:1407:1: warning: control reaches end of non-void function [-Wreturn-type]
ppmx.c: In function 'update_nclass':
ppmx.c:1396:1: warning: control reaches end of non-void function [-Wreturn-type]
ppmx.c: In function 'print_allpars':
ppmx.c:1344:1: warning: control reaches end of non-void function [-Wreturn-type]
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c predict2.c -o predict2.o
predict2.c: In function 'py_update':
predict2.c:173:5: warning: unused variable 'y' [-Wunused-variable]
predict2.c:169:22: warning: unused variable 'lpr' [-Wunused-variable]
predict2.c:169:10: warning: variable 'kd' set but not used [-Wunused-but-set-variable]
predict2.c: In function 'print_pyvec':
predict2.c:343:5: warning: too many arguments for format [-Wformat-extra-args]
predict2.c: In function 'pyvec_update':
predict2.c:366:9: warning: unused variable 'sx' [-Wunused-variable]
predict2.c:364:9: warning: unused variable 'lgr' [-Wunused-variable]
predict2.c:364:5: warning: unused variable 'hC' [-Wunused-variable]
predict2.c:363:5: warning: unused variable 'r' [-Wunused-variable]
predict2.c:360:22: warning: unused variable 'lpr' [-Wunused-variable]
predict2.c:360:10: warning: variable 'kd' set but not used [-Wunused-but-set-variable]
predict2.c:358:10: warning: variable 'n' set but not used [-Wunused-but-set-variable]
predict2.c: In function 'py_update':
predict2.c:213:11: warning: 'mxh' may be used uninitialized in this function [-Wuninitialized]
predict2.c:171:5: warning: 'wmx' may be used uninitialized in this function [-Wuninitialized]
predict2.c: In function 'pyvec_update':
predict2.c:438:16: warning: 'V' may be used uninitialized in this function [-Wuninitialized]
predict2.c:438:16: warning: 'm' may be used uninitialized in this function [-Wuninitialized]
predict2.c:361:5: warning: 'wmx' may be used uninitialized in this function [-Wuninitialized]
predict2.c:427:12: warning: 'k0' may be used uninitialized in this function [-Wuninitialized]
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c rand-nr.c -o rand-nr.o
rand-nr.c:5:1: warning: "/*" within comment [-Wcomment]
rand-nr.c:65:1: warning: "/*" within comment [-Wcomment]
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c rand.c -o rand.o
In file included from rand.c:60:0:
mathconst.h:23:0: warning: "M_PI" redefined [enabled by default]
c:\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/math.h:45:0: note: this is the location of the previous definition
rand.c:77:0: warning: ignoring #pragma warning [-Wunknown-pragmas]
rand.c: In function 'pdf_norm_trunc':
rand.c:380:28: warning: variable 'lpdf' set but not used [-Wunused-but-set-variable]
rand.c:380:10: warning: unused variable 'u' [-Wunused-variable]
rand.c: In function 'cdfbeta':
rand.c:491:20: warning: variable 'x1' set but not used [-Wunused-but-set-variable]
rand.c: In function 'expdev':
rand.c:737:5: warning: variable 'b' set but not used [-Wunused-but-set-variable]
rand.c: At top level:
cdflib.h:45:13: warning: 'E0000' declared 'static' but never defined [-Wunused-function]
cdflib.h:52:13: warning: 'E0001' declared 'static' but never defined [-Wunused-function]
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c ranlib.c -o ranlib.o
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c regr.c -o regr.o
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c unixrep.c -o unixrep.o
In file included from unixrep.c:31:0:
mathconst.h:23:0: warning: "M_PI" redefined [enabled by default]
c:\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/math.h:45:0: note: this is the location of the previous definition
gcc -m32 -I"C:/R-31~1.0/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c vector.c -o vector.o
gcc -m32 -shared -s -static-libgcc -o ppmx.dll tmp.def bayes.o cdf.o com.o dcdflib.o fortif.o interface.o ipmpar.o matrix.o mess.o nrutil.o ppmx.o predict2.o rand-nr.o rand.o ranlib.o regr.o unixrep.o vector.o -LC:/R-31~1.0/bin/i386 -lRlapack -LC:/R-31~1.0/bin/i386 -lRblas -lm -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LC:/R-31~1.0/bin/i386 -lR
fortif.o:fortif.c:(.text+0x38): undefined reference to `DPOTRF#24'
fortif.o:fortif.c:(.text+0x88): undefined reference to `DPOTRI#24'
fortif.o:fortif.c:(.text+0xf9): undefined reference to `DTRTRI#32'
fortif.o:fortif.c:(.text+0x181): undefined reference to `DSYEV#44'
collect2: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'ppmx'
* removing 'C:/R-3.1.0/library/ppmx'
Warning in install.packages :
running command '"C:/R-31~1.0/bin/x64/R" CMD INSTALL -l "C:\R-3.1.0\library" "C:/Users/kutrds11/Documents/ppmx_1.3.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/kutrds11/Documents/ppmx_1.3.tar.gz’ had non-zero exit status
I doubt the problem is the way to call .c file too old?
I know the problem is quite complicated. Is there anyone could help me please. I guess it is about the link problem bec of
fortif.o:fortif.c:(.text+0x38): undefined reference to `DPOTRF#24'
fortif.o:fortif.c:(.text+0x88): undefined reference to `DPOTRI#24'
fortif.o:fortif.c:(.text+0xf9): undefined reference to `DTRTRI#32'
fortif.o:fortif.c:(.text+0x181): undefined reference to `DSYEV#44'
I think I need toensure that my program is linked with a Lapack
library.. But I dont know how..
The fortif.c code is
static const char fortif_c_sccs_id[] = "%W%";
/*+
* fortif.c - Fortran Interface
*
* Version: %I%
*
* Description:
* Handles the interface between FORTRAN and C on the two platforms, by
* providing a single C interface to the Fortran routine, and dispatching
* according to the platform.
*
* This particular file only contains Win32 interface routines for FORTRAN
* subroutines that have a character arguments. When a FORTRAN routine is
* compiled, for each character argument in the signature the compiler
* adds another unsigned long argument immediately following it, that
* holds the length of the char array being passed to it.
*
* In Response\01, we have C routines calling FORTRAN ones, and the size
* of the char array is generally unknown (it may be passed in from the
* caller's caller). However, for the FORTRAN routines we are interested
* in, the character argument is input only, not being changed by the
* routine. Therefore, we can use the length of the string represented by
* the "char*" argument as a suitable length to pass to the FORTRAN code.
*
* Note that this ".c" file does not contain interfaces for routines that
* do not pass in character arguments; these interfaces can be handled
* by simple definitions in the associated header file.
*
* Modification History:
* 10-JUN-1999 1.1 Stephen Morris (Tessella Support Services plc)
* Created.
-*/
#include <string.h>
#define FORTIF_H_SCCS_ID
#include "fortif.h"
#if defined(_WIN32)
/*+
* dpotrf - Lapack Routine
-*/
extern void __stdcall DPOTRF(char *uplo, unsigned int uplo_length, int *n,
double *a, int *ncol_a, int *info);
void dpotrf(char *uplo, int *n, double *a, int *ncol_a, int *info)
{
DPOTRF(uplo, (unsigned int) strlen(uplo), n, a, ncol_a, info);
}
/*+
* dpotri - Lapack Routine
-*/
extern void __stdcall DPOTRI(char *uplo, unsigned int uplo_length, int *n,
double *a, int *ncol_a, int *info);
void dpotri(char *uplo, int *n, double *a, int *ncol_a, int *info)
{
DPOTRI(uplo, (unsigned int) strlen(uplo), n, a, ncol_a, info);
}
/*+
* dtrtri - Lapack Routine
-*/
extern void __stdcall DTRTRI(char *uplo, unsigned int uplo_length,
char *diag, unsigned int diag_len, int *n, double *a, int *ncol_a, int *info);
void dtrtri(char *uplo, char *diag, int *n, double *a, int *ncol_a, int *info)
{
DTRTRI(uplo, (unsigned int) strlen(uplo), diag, (unsigned int) strlen(diag),
n, a, ncol_a, info);
}
/*+
* dsyev - Lapack Routine
*/
extern void __stdcall DSYEV(char *jobz, unsigned int jobz_length,
char *uplo, unsigned int uplo_length, int *n, double *a, int *lda,
double *w, double *work, int *lwork, int *info);
void dsyev(char *jobz, char *uplo, int *n, double *a, int *lda, double *w, double *work,
int *lwork, int *info)
{
DSYEV(jobz, (unsigned int) strlen(jobz), uplo, (unsigned int) strlen(uplo),
n, a, lda, w, work, lwork, info);
}
#endif
Please help me.
I have put the link of the code below just in case:
https://www.tandfonline.com/doi/suppl/10.1198/jcgs.2011.09066?scroll=top
Please let me know if you need more specific information
Thank you so much in advance

Related

Is there a way of installing the package PET for installation of gitter and DeadOrAlive in the newest version of R?

> install.packages("C:/Users/andyk/Downloads/PET_0.5.1.tar.gz", repos = NULL, type = "source")
‘C:/Users/andyk/AppData/Local/R/win-library/4.2’의 위치에 패키지(들)을 설치합니다.
(왜냐하면 ‘lib’가 지정되지 않았기 때문입니다)
* installing *source* package 'PET' ...
** package 'PET' successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c Hough.c -o Hough.o
Hough.c: In function 'Hough4':
Hough.c:41:10: warning: variable 'theta_min' set but not used [-Wunused-but-set-variable]
41 | double theta_min;
| ^~~~~~~~~
Hough.c:40:38: warning: variable 'y' set but not used [-Wunused-but-set-variable]
40 | double *costheta,*sintheta,theta,x,y;
| ^
Hough.c: In function 'Hough3':
Hough.c:118:10: warning: variable 'theta_min' set but not used [-Wunused-but-set-variable]
118 | double theta_min;
| ^~~~~~~~~
Hough.c: In function 'Hough2':
Hough.c:173:10: warning: variable 'theta_min' set but not used [-Wunused-but-set-variable]
173 | double theta_min;
| ^~~~~~~~~
Hough.c: In function 'Hough1':
Hough.c:227:10: warning: variable 'theta_min' set but not used [-Wunused-but-set-variable]
227 | double theta_min;
| ^~~~~~~~~
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c PET_init.c -o PET_init.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c amatrix.c -o amatrix.o
amatrix.c: In function 'RegulateMatrix':
amatrix.c:234:10: warning: variable 'tempVv' set but not used [-Wunused-but-set-variable]
234 | float *tempVv;
| ^~~~~~
amatrix.c: In function 'RegulateL1Matrix':
amatrix.c:289:10: warning: variable 'tempVv' set but not used [-Wunused-but-set-variable]
289 | float *tempVv;
| ^~~~~~
amatrix.c: In function 'GenerateAMatrixColumn':
amatrix.c:784:9: warning: variable 'onedivsq2' set but not used [-Wunused-but-set-variable]
784 | float onedivsq2,psi,pidivDeltaX,costheta,sintheta,of;
| ^~~~~~~~~
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c art.c -o art.o
art.c: In function 'FAST_ART':
art.c:128:10: warning: variable 'tempXv' set but not used [-Wunused-but-set-variable]
128 | float *tempXv,*tempBv;
| ^~~~~~
art.c: In function 'SLOW_ART':
art.c:239:10: warning: variable 'tempXv' set but not used [-Wunused-but-set-variable]
239 | float *tempXv,*tempBv;
| ^~~~~~
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c calc.c -o calc.o
calc.c: In function 'BackFilter':
calc.c:335:19: warning: variable 'M' set but not used [-Wunused-but-set-variable]
335 | int i,m,n,mm,nn,M,N,OldHeight,OldWidth;
| ^
calc.c: In function 'CentralSliceCZ':
calc.c:700:49: warning: variable 'rhomin' set but not used [-Wunused-but-set-variable]
700 | float DC,deltatheta,theta,thetaadj,*realtheta,rhomin,deltarho;
| ^~~~~~
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c cg.c -o cg.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c em.c -o em.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c eval.c -o eval.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c imgtools.c -o imgtools.o
imgtools.c: In function 'ReadPET':
imgtools.c:1005:10: warning: variable 'result' set but not used [-Wunused-but-set-variable]
1005 | size_t result;
| ^~~~~~
imgtools.c: In function 'ReadFIFHeader':
imgtools.c:1148:10: warning: variable 'result' set but not used [-Wunused-but-set-variable]
1148 | size_t result;
| ^~~~~~
imgtools.c: In function 'ReadFIF':
imgtools.c:1222:10: warning: variable 'result' set but not used [-Wunused-but-set-variable]
1222 | size_t result;
| ^~~~~~
imgtools.c: In function 'ReadAnalyze':
imgtools.c:1616:10: warning: variable 'result' set but not used [-Wunused-but-set-variable]
1616 | size_t result;
| ^~~~~~
imgtools.c:1614:21: warning: variable 'OffSet' set but not used [-Wunused-but-set-variable]
1614 | float ScaleFactor,OffSet;
| ^~~~~~
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c iradon.c -o iradon.o
iradon.c: In function 'iradon':
iradon.c:271:5: warning: 'spectrum' may be used uninitialized in this function [-Wmaybe-uninitialized]
271 | FreeImage(spectrum);
| ^~~~~~~~~~~~~~~~~~~
iradon.c: In function 'loadFile':
iradon.c:568:9: warning: 'list' may be used uninitialized in this function [-Wmaybe-uninitialized]
568 | return(list);
| ^
iradon.c:404:16: warning: 'typeF' may be used uninitialized in this function [-Wmaybe-uninitialized]
404 | OutImage = ReadImage(fileName, typeF);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
iradon.c: In function 'writeFile':
iradon.c:684:19: warning: 'N' may be used uninitialized in this function [-Wmaybe-uninitialized]
684 | SaveImage=NewFloatImage(fileName, M, N, _RealArray);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
iradon.c:684:19: warning: 'M' may be used uninitialized in this function [-Wmaybe-uninitialized]
iradon.c:772:5: warning: 'typeF' may be used uninitialized in this function [-Wmaybe-uninitialized]
772 | WriteImage(SaveImage, typeF);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c it.c -o it.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c itreadargs.c -o itreadargs.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c misc.c -o misc.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c oradLI.c -o oradLI.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c oradNN.c -o oradNN.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c oradSINC.c -o oradSINC.o
oradSINC.c: In function 'radonSINC':
oradSINC.c:52:10: warning: variable 'idx' set but not used [-Wunused-but-set-variable]
52 | double idx,mintrig,psi;
| ^~~
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c sparse.c -o sparse.o
sparse.c: In function 'ReadSIFHeader':
sparse.c:607:10: warning: variable 'result' set but not used [-Wunused-but-set-variable]
607 | size_t result;
| ^~~~~~
sparse.c: In function 'ReadSIF':
sparse.c:657:10: warning: variable 'result' set but not used [-Wunused-but-set-variable]
657 | size_t result;
| ^~~~~~
sparse.c: In function 'MeanFilterVector':
sparse.c:1537:13: warning: variable 'area' set but not used [-Wunused-but-set-variable]
1537 | float sum,area,*tempVv,*tempNv,*tempKernM;
| ^~~~
gcc -shared -s -static-libgcc -o PET.dll tmp.def Hough.o PET_init.o amatrix.o art.o calc.o cg.o em.o eval.o imgtools.o iradon.o it.o itreadargs.o misc.o oradLI.o oradNN.o oradSINC.o sparse.o -LC:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA~1/R/R-42~1.1/bin/x64 -lR
C:\RBuildTools\4.2\x86_64-w64-mingw32.static.posix\bin/ld.exe: it.o:it.c:(.bss+0x610): multiple definition of `DebugNiveau'; iradon.o:iradon.c:(.data+0x0): first defined here
C:\RBuildTools\4.2\x86_64-w64-mingw32.static.posix\bin/ld.exe: it.o:it.c:(.bss+0x480): multiple definition of `IniFile'; iradon.o:iradon.c:(.bss+0x0): first defined here
C:\RBuildTools\4.2\x86_64-w64-mingw32.static.posix\bin/ld.exe: it.o:it.c:(.bss+0x598): multiple definition of `multtemp'; iradon.o:iradon.c:(.bss+0x118): first defined here
C:\RBuildTools\4.2\x86_64-w64-mingw32.static.posix\bin/ld.exe: it.o:it.c:(.bss+0x5a0): multiple definition of `LogFileName'; iradon.o:iradon.c:(.bss+0x120): first defined here
C:\RBuildTools\4.2\x86_64-w64-mingw32.static.posix\bin/ld.exe: it.o:it.c:(.bss+0x608): multiple definition of `LogFile'; iradon.o:iradon.c:(.bss+0x188): first defined here
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'PET'
* removing 'C:/Users/andyk/AppData/Local/R/win-library/4.2/PET'
Warning in install.packages :
패키지 ‘C:/Users/andyk/Downloads/PET_0.5.1.tar.gz’의 설치가 0이 아닌 종료상태를 가졌습니다
I need the package PET to install gitter and DeadOrAlive. I've tried manually installing with tar. file for PET, using install.packages, and other versions of the package, but none of the methods worked.
Is it not possible to install the package at all, or are there other ways of installing PET to download the subsequent packages.

Error using rcpp armadillo when making R package

I am trying to get into using C++ code in my R packages. I created a test package using
usethis::create_package("~/Documents/ptest")
and I then set up the C++ necessaries using
usethis::use_rcpp_armadillo("sum_func")
I then created R/test-package.R and pasted in
## usethis namespace: start
#' #useDynLib ptest, .registration = TRUE
## usethis namespace: end
NULL
## usethis namespace: start
#' #importFrom Rcpp sourceCpp
## usethis namespace: end
NULL
In sum_func.cpp I then put
//sum.cpp
#include <Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
double rcpp_sum(NumericVector v){
double sum = 0;
for(int i=0; i<v.length(); ++i){
sum += v[i];
}
return(sum);
}
I then created R/sum__func.R and put in
#' My Sum Function
#'
#' #param vec A vector of values
#'
#' #return The sum
#' #export
#'
#' #examples
#' my_sum(1:10)
my_sum <- function(vec) {
rcpp_sum(vec)
}
But then when I run devtools::load_all(".") I get
> ℹ Loading ptest Exports from
> /Users/hwarden/Documents/ptest/src/sum_func.cpp: double
> rcpp_sum(NumericVector v)
>
> /Users/hwarden/Documents/ptest/src/RcppExports.cpp updated.
> /Users/hwarden/Documents/ptest/R/RcppExports.R updated. Re-compiling
> ptest ─ installing *source* package ‘ptest’ ... ** using staged
> installation ** libs clang++ -mmacosx-version-min=10.13
> -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include'
> -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include'
> -I/usr/local/include -fPIC -Wall -g -O2 -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o clang++ -mmacosx-version-min=10.13 -std=gnu++11
> -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rcpp/include'
> -I'/Library/Frameworks/R.framework/Versions/4.1/Resources/library/RcppArmadillo/include'
> -I/usr/local/include -fPIC -Wall -g -O2 -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c sum_func.cpp -o sum_func.o clang++ -mmacosx-version-min=10.13 -std=gnu++11 -dynamiclib
> -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o ptest.so RcppExports.o sum_func.o
> -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0' ld:
> warning: directory not found for option '-L/usr/local/gfortran/lib'
> ld: library not found for -lgfortran clang: error: linker command
> failed with exit code 1 (use -v to see invocation) make: ***
> [ptest.so] Error 1 ERROR: compilation failed for package ‘ptest’ ─
> removing
> ‘/private/var/folders/n4/lwxlchrn2s7gvc878rw7ln1m0000gn/T/RtmpjJw195/devtools_install_c9e2c847f68/ptest’
> Error in `(function (command = NULL, args = character(),
> error_on_status = TRUE, …`: ! System command 'R' failed
> --- Exit status: 1 stdout & stderr: <printed>
> ---
I get an error but after googling I can't figure out how to solve it.
Thank you #dirk-eddelbuettel,
This article was the most useful.
I'm not an expert, but for me this worked (or at least got me to my next error).
I ran
brew reinstall gcc
to make sure I had the most up to date gfortran. Then I made a ~/.R/Makevars (as I did not have one already). I then wrote this in there
FC = usr/local/opt/gcc/bin/gfortran
F77 = /usr/local/opt/gcc/bin/gfortran
FLIBS = -L/usr/local/opt/gcc/lib
I restarted R and the package then loaded successfully! Many thanks!

Having trouble installing R package httpuv

I am using R 3.3.3 on Debian/Linux 8 and I am having trouble installing the package httpuv, which is a dependency for another package I want to use. The installing error message is shown below. It seems like there are problems with libuv, but I am not sure about this.
How can I figure out where the problem is and how to fix it?
> install.packages("httpuv")
Installing package into ‘/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.cnr.berkeley.edu/src/contrib/httpuv_1.5.1.tar.gz'
Content type 'unknown' length 1758514 bytes (1.7 MB)
==================================================
downloaded 1.7 MB
* installing *source* package ‘httpuv’ ...
** package ‘httpuv’ successfully unpacked and MD5 sums checked
** libs
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -Ilibuv/include -pthread -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/BH/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/later/include" -DSTRICT_R_HEADERS -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c RcppExports-legacy.cpp -o RcppExports-legacy.o
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -Ilibuv/include -pthread -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/BH/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/later/include" -DSTRICT_R_HEADERS -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -Ilibuv/include -pthread -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/BH/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/later/include" -DSTRICT_R_HEADERS -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c callback.cpp -o callback.o
g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -Ilibuv/include -pthread -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/Rcpp/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/BH/include" -I"/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/later/include" -DSTRICT_R_HEADERS -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c callbackqueue.cpp -o callbackqueue.o
In file included from libuv/include/uv.h:62:0,
from thread.h:4,
from tqueue.h:7,
from callbackqueue.h:4,
from callbackqueue.cpp:1:
libuv/include/uv/unix.h:103:28: error: ‘sem_t’ does not name a type
# define UV_PLATFORM_SEM_T sem_t
^
libuv/include/uv/unix.h:135:9: note: in expansion of macro ‘UV_PLATFORM_SEM_T’
typedef UV_PLATFORM_SEM_T uv_sem_t;
^
In file included from thread.h:4:0,
from tqueue.h:7,
from callbackqueue.h:4,
from callbackqueue.cpp:1:
libuv/include/uv.h:1562:27: error: ‘uv_sem_t’ was not declared in this scope
UV_EXTERN int uv_sem_init(uv_sem_t* sem, unsigned int value);
^
libuv/include/uv.h:1562:37: error: ‘sem’ was not declared in this scope
UV_EXTERN int uv_sem_init(uv_sem_t* sem, unsigned int value);
^
libuv/include/uv.h:1562:42: error: expected primary-expression before ‘unsigned’
UV_EXTERN int uv_sem_init(uv_sem_t* sem, unsigned int value);
^
libuv/include/uv.h:1562:60: error: expression list treated as compound expression in initializer [-fpermissive]
UV_EXTERN int uv_sem_init(uv_sem_t* sem, unsigned int value);
^
libuv/include/uv.h:1563:31: error: variable or field ‘uv_sem_destroy’ declared void
UV_EXTERN void uv_sem_destroy(uv_sem_t* sem);
^
libuv/include/uv.h:1563:31: error: ‘uv_sem_t’ was not declared in this scope
libuv/include/uv.h:1563:41: error: ‘sem’ was not declared in this scope
UV_EXTERN void uv_sem_destroy(uv_sem_t* sem);
^
libuv/include/uv.h:1564:28: error: variable or field ‘uv_sem_post’ declared void
UV_EXTERN void uv_sem_post(uv_sem_t* sem);
^
libuv/include/uv.h:1564:28: error: ‘uv_sem_t’ was not declared in this scope
libuv/include/uv.h:1564:38: error: ‘sem’ was not declared in this scope
UV_EXTERN void uv_sem_post(uv_sem_t* sem);
^
libuv/include/uv.h:1565:28: error: variable or field ‘uv_sem_wait’ declared void
UV_EXTERN void uv_sem_wait(uv_sem_t* sem);
^
libuv/include/uv.h:1565:28: error: ‘uv_sem_t’ was not declared in this scope
libuv/include/uv.h:1565:38: error: ‘sem’ was not declared in this scope
UV_EXTERN void uv_sem_wait(uv_sem_t* sem);
^
libuv/include/uv.h:1566:30: error: ‘uv_sem_t’ was not declared in this scope
UV_EXTERN int uv_sem_trywait(uv_sem_t* sem);
^
libuv/include/uv.h:1566:40: error: ‘sem’ was not declared in this scope
UV_EXTERN int uv_sem_trywait(uv_sem_t* sem);
^
/usr/lib/R/etc/Makeconf:141: recipe for target 'callbackqueue.o' failed
make: *** [callbackqueue.o] Error 1
ERROR: compilation failed for package ‘httpuv’
* removing ‘/data/home/yh362/R/x86_64-pc-linux-gnu-library/3.3/httpuv’
The downloaded source packages are in
‘/tmp/Rtmpqg62zZ/downloaded_packages’
Warning message:
In install.packages("httpuv") :
installation of package ‘httpuv’ had non-zero exit status
I had the same error and tried several installations to make it work:
Install Java jre and jdk
Install devtools install.packages("devtools")
In the console, run .libPaths() to see where packages are installed.
Make sure to get full permission from your library directory
Run devtools::install_github("rstudio/httpuv", lib = "directory from 3.") in the console.

R Rstudio problems installing packages mapdeck and googlePolylines

When I try to install the package mapdeck in Rstudio, it appears a message in the console saying that I need to install the package googlePolylines, but I can't install this one. The error that appears in the console is the following:
package ‘googlePolylines’ successfully unpacked and MD5 sums checked
libs
g++ -m64 -std=gnu++0x -I/usr/include/R -DNDEBUG -I../inst/include -I"/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include" -I"/usr/lib64/R/library/BH/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c RcppExports.cpp -o RcppExports.o
g++ -m64 -std=gnu++0x -I/usr/include/R -DNDEBUG -I../inst/include -I"/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include" -I"/usr/lib64/R/library/BH/include" -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c encode.cpp -o encode.o
encode.cpp: In function ‘void encode_vector(std::ostringstream&, std::ostringstream&, Rcpp::List, Rcpp::CharacterVector&, int)’:
encode.cpp:175: error: conversion from ‘Rcpp::internal::generic_proxy<19, Rcpp::PreserveStorage>’ to ‘double’ is ambiguous
/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:73: note: candidates are: Rcpp::internal::generic_proxy::operator int() const [with int RTYPE = 19, StoragePolicy = Rcpp::PreserveStorage]
/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:72: note: Rcpp::internal::generic_proxy::operator bool() const [with int RTYPE = 19, StoragePolicy = Rcpp::PreserveStorage]
/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:67: note: Rcpp::internal::generic_proxy::operator U() const [with U = double, int RTYPE = 19, StoragePolicy = Rcpp::PreserveStorage]
encode.cpp:176: error: conversion from ‘Rcpp::internal::generic_proxy<19, Rcpp::PreserveStorage>’ to ‘double’ is ambiguous
/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:73: note: candidates are: Rcpp::internal::generic_proxy::operator int() const [with int RTYPE = 19, StoragePolicy = Rcpp::PreserveStorage]
/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:72: note: Rcpp::internal::generic_proxy::operator bool() const [with int RTYPE = 19, StoragePolicy = Rcpp::PreserveStorage]
/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:67: note: Rcpp::internal::generic_proxy::operator U() const [with U = double, int RTYPE = 19, StoragePolicy = Rcpp::PreserveStorage]
make: *** [encode.o] Error 1
ERROR: compilation failed for package ‘googlePolylines’
removing ‘/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/googlePolylines’
Warning in install.packages :
installation of package ‘googlePolylines’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpwwAJSv/downloaded_packages’
I haven't found almost any information about these two packages, so I would appreciate if anyone could help me, thank you.

Can not make qmqtt

I had previously installed qt4. Now, I have installed QT5.7. I am trying to compile the qmqtt project to generate the libqmqtt file. Qmake is fine. But make gives the following error.
Link:
https://github.com/emqtt/qmqtt
g++ -c -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -O2 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_BUILD_MQTT_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I/home/sm/qt_applications/qmqtt/qmqtt-master/src/mqtt -I/home/sm/qt_applications/qmqtt/qmqtt-master/src/mqtt -I/home/sm/qt_applications/qmqtt/qmqtt-master/include -I/home/sm/qt_applications/qmqtt/qmqtt-master/include/qmqtt -I../../include -I../../include/qmqtt -I/home/sm/qt_applications/qmqtt/qmqtt-master/include/qmqtt/1.0.0 -I/home/sm/qt_applications/qmqtt/qmqtt-master/include/qmqtt/1.0.0/qmqtt -I/usr/include/qt5 -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtCore -I.moc -I. -o .obj/qmqtt_routedmessage.o /home/sm/qt_applications/qmqtt/qmqtt-master/src/mqtt/qmqtt_routedmessage.cpp
g++ -c -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -O2 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_BUILD_MQTT_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I/home/sm/qt_applications/qmqtt/qmqtt-master/src/mqtt -I/home/sm/qt_applications/qmqtt/qmqtt-master/src/mqtt -I/home/sm/qt_applications/qmqtt/qmqtt-master/include -I/home/sm/qt_applications/qmqtt/qmqtt-master/include/qmqtt -I../../include -I../../include/qmqtt -I/home/sm/qt_applications/qmqtt/qmqtt-master/include/qmqtt/1.0.0 -I/home/sm/qt_applications/qmqtt/qmqtt-master/include/qmqtt/1.0.0/qmqtt -I/usr/include/qt5 -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtCore -I.moc -I. -o .obj/qmqtt_router.o /home/sm/qt_applications/qmqtt/qmqtt-master/src/mqtt/qmqtt_router.cpp
In file included from /usr/include/qt5/QtCore/qobjectdefs.h:47:0,
from /usr/include/qt5/QtCore/qobject.h:48,
from /usr/include/qt5/QtCore/QObject:1,
from /home/sm/qt_applications/qmqtt/qmqtt-master/src/mqtt/qmqtt_router.h:38,
from /home/sm/qt_applications/qmqtt/qmqtt-master/src/mqtt/qmqtt_router.cpp:33:
/usr/include/qt5/QtCore/qobjectdefs_impl.h: In instantiation of ‘struct QtPrivate::AreArgumentsCompatible<QMQTT::Message, QMQTT::Message>’:
/usr/include/qt5/QtCore/qobjectdefs_impl.h:599:21: required from ‘struct QtPrivate::CheckCompatibleArguments<QtPrivate::List<const QMQTT::Message&>, QtPrivate::List<const QMQTT::Message&> >’
/usr/include/qt5/QtCore/qobject.h:241:80: required from ‘static QMetaObject::Connection QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const typename QtPrivate::FunctionPointer<Func2>::Object*, Func2, Qt::ConnectionType) [with Func1 = void (QMQTT::Client::*)(const QMQTT::Message&); Func2 = void (QMQTT::RouteSubscription::*)(const QMQTT::Message&); typename QtPrivate::FunctionPointer<Func>::Object = QMQTT::Client; typename QtPrivate::FunctionPointer<Func2>::Object = QMQTT::RouteSubscription]’
/home/sm/qt_applications/qmqtt/qmqtt-master/src/mqtt/qmqtt_router.cpp:52:87: required from here
/usr/include/qt5/QtCore/qobjectdefs_impl.h:573:42: error: invalid use of incomplete type ‘class QMQTT::Message’
enum { value = sizeof(test(dummy())) == sizeof(int) };
^
In file included from /home/sm/qt_applications/qmqtt/qmqtt-master/src/mqtt/qmqtt_router.cpp:35:0:
/home/sm/qt_applications/qmqtt/qmqtt-master/src/mqtt/qmqtt_client.h:95:7: error: forward declaration of ‘class QMQTT::Message’
class Message;
^
In file included from /home/sm/qt_applications/qmqtt/qmqtt-master/src/mqtt/qmqtt_global.h:35:0,
from /home/sm/qt_applications/qmqtt/qmqtt-master/src/mqtt/qmqtt_router.h:36,
from /home/sm/qt_applications/qmqtt/qmqtt-master/src/mqtt/qmqtt_router.cpp:33:
/usr/include/qt5/QtCore/qobject.h: In instantiation of ‘static QMetaObject::Connection QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const typename QtPrivate::FunctionPointer<Func2>::Object*, Func2, Qt::ConnectionType) [with Func1 = void (QMQTT::Client::*)(const QMQTT::Message&); Func2 = void (QMQTT::RouteSubscription::*)(const QMQTT::Message&); typename QtPrivate::FunctionPointer<Func>::Object = QMQTT::Client; typename QtPrivate::FunctionPointer<Func2>::Object = QMQTT::RouteSubscription]’:
/home/sm/qt_applications/qmqtt/qmqtt-master/src/mqtt/qmqtt_router.cpp:52:87: required from here
/usr/include/qt5/QtCore/qglobal.h:669:47: error: static assertion failed: Signal and slot arguments are not compatible.
#define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
^
/usr/include/qt5/QtCore/qobject.h:228:9: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
Q_STATIC_ASSERT_X((QtPrivate::CheckCompatibleArguments<typename SignalType::Arguments, typename SlotType::Arguments>::value),
^
make[2]: *** [.obj/qmqtt_router.o] Error 1
make[2]: Leaving directory `/home/sm/qt_applications/qmqtt/qmqtt-master/build/src/mqtt'
make[1]: *** [sub-mqtt-make_first] Error 2
make[1]: Leaving directory `/home/sm/qt_applications/qmqtt/qmqtt-master/build/src'
make: *** [sub-src-make_first] Error 2
Spent a lot of time. After compiling by Qt 5.7.0, there was no Dll-files in the folder "release". I looking at the compilation log and I saw that there was created the folder "lib" in the root of the disk with the project, there I found Dll. But work with DLL allows you to work on Windows. I need on Android.
In github someone suggests just use it as plain code.
I rewrite it to "plain code" and made example-project. It is here. There is two folders: project and mosquitto for using mqtt on localhost

Resources