2017-09-16 3 views
1

J'essaie d'installer le paquet feather sur FreeBSD machine et il se bloque en raison de l'erreur suivante: error: 'snprintf' was not declared in this scope. g++ est utilisé pour la compilation.R erreur de compilation de paquet de plume (g ++) sur FreeBSD

Tout indice sur la façon de traiter ce problème sera très appréciée.

Vous trouverez ci-dessous le journal d'installation complet.

* installing *source* package ‘feather’ ... 
** package ‘feather’ successfully unpacked and MD5 sums checked 
Platform is little endian. Good. 
** libs 
g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include -fpic -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c RcppExports.cpp -o RcppExports.o 
g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include -fpic -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather-read.cpp -o feather-read.o 
g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include -fpic -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather-types.cpp -o feather-types.o 
g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include -fpic -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather-write.cpp -o feather-write.o 
g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include -fpic -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather/buffer.cc -o feather/buffer.o 
g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include -fpic -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather/feather-c.cc -o feather/feather-c.o 
g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include -fpic -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather/io.cc -o feather/io.o 
g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include -fpic -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather/metadata.cc -o feather/metadata.o 
g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include -fpic -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather/reader.cc -o feather/reader.o 
g++5 -std=gnu++11 -I/usr/local/lib/R/include -DNDEBUG -I. -I"/usr/local/lib/R/library/Rcpp/include" -DLIBICONV_PLUG -I/usr/local/include -isystem /usr/local/include -fpic -O2 -pipe -DLIBICONV_PLUG -fstack-protector -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc5 -isystem /usr/local/include -c feather/status.cc -o feather/status.o 
feather/status.cc: In member function 'std::__cxx11::string feather::Status::ToString() const': 
feather/status.cc:52:52: error: 'snprintf' was not declared in this scope 
snprintf(buf, sizeof(buf), " (error %d)", posix); 
               ^
gmake: *** [/usr/local/lib/R/etc/Makeconf:164: feather/status.o] Error 1 
ERROR: compilation failed for package ‘feather’ 
* removing ‘/usr/local/lib/R/library/feather’ 

The downloaded source packages are in 
     ‘/tmp/Rtmp26mAsU/downloaded_packages’ 
Updating HTML index of packages in '.Library' 
Making 'packages.html' ... done 
Warning message: 
In install.packages("feather") : 
installation of package ‘feather’ had non-zero exit status 
+0

Je devais chercher 'snprintf' ... pendant un moment je pensais que c'était juste une faute de frappe. Selon [ceci] (http://cygwin.1069669.n5.nabble.com/snprintf-with-g-std-c-98-error-snprintf-was-not-declared-in-this-scope-td27135. html), vous devrez peut-être changer votre 'Makeconf' pour compiler ce paquet. –

Répondre

1

Le problème semble être dans le fichier feather/status.cc. Essayez de l'ouvrir et d'ajouter la ligne #include <cstdio> à la liste incluse en haut de celle-ci.

+0

Ok, votre solution fonctionne et les auteurs ont déjà appliqué un [patch] (https://github.com/wesm/feather/pull/317) au code source pour résoudre ce problème sur FreeBSD. Par conséquent, j'accepte la réponse. Merci! – sztal