Skip to content

No newlines in SPARC #647

@Enchufa2

Description

@Enchufa2

I got my hands on a SPARC machine and I've detected that a std::endl issued with Rcpp::Rcout is not printed. I've done the following:

  1. Create a test package with Rcpp::Rcpp.package.skeleton("test").
  2. Modify src/rcpp_hello_world.cpp as follows:
#include <Rcpp.h>
using namespace Rcpp;

// [[Rcpp::export]]
void rcpp_hello_world() {
  Rcpp::Rcout << "hello world!" << std::endl;
  Rcpp::Rcout << "another hello world!" << std::endl;
}
  1. Build the package with R CMD build test.
  2. And in the SPARC station...
-bash-3.2$ R CMD INSTALL test_1.0.tar.gz 
* installing to library '/export/home/***/R/sparc-sun-solaris2.10-library/3.3'
* installing *source* package 'test' ...
** libs
/opt/csw/bin/g++-5.2 -I/opt/csw/lib/R/include -DNDEBUG  -I/opt/csw/include -I"/export/home/***/R/sparc-sun-solaris2.10-library/3.3/Rcpp/include"   -fPIC  -O2 -pipe -fno-omit-frame-pointer -mcpu=v9 -Wa,-xarch=v8plus  -c RcppExports.cpp -o RcppExports.o
/opt/csw/bin/g++-5.2 -I/opt/csw/lib/R/include -DNDEBUG  -I/opt/csw/include -I"/export/home/***/R/sparc-sun-solaris2.10-library/3.3/Rcpp/include"   -fPIC  -O2 -pipe -fno-omit-frame-pointer -mcpu=v9 -Wa,-xarch=v8plus  -c rcpp_hello_world.cpp -o rcpp_hello_world.o
/opt/csw/bin/g++-5.2 -shared -mcpu=v9 -Wa,-xarch=v8plus -L/opt/csw/lib -o test.so RcppExports.o rcpp_hello_world.o
installing to /export/home/***/R/sparc-sun-solaris2.10-library/3.3/test/libs
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (test)
-bash-3.2$ Rscript -e "test::rcpp_hello_world()"
hello world!another hello world!-bash-3.2$

No newlines! (I've verified that a simple C++ program using std::cout prints the newlines).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions