Description
When I try to install mango after installing the dependencies, I receive the following error. Could you please advise?
./mergesort.h:192:54: error: dynamic_cast from rvalue to reference type 'std::ostringstream &' (aka 'basic_ostringstream &')
192 | fileName = tempName; fileName += ""; fileName += SSTR( numFiles ); fileName += ".txt";
| ^~~~~~~~~~~~~~~~
./mergesort.h:16:19: note: expanded from macro 'SSTR'
16 | #define SSTR( x ) dynamic_cast< std::ostringstream & >(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 | ( std::ostringstream() << std::dec << x ) ).str()
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./mergesort.h:289:56: error: dynamic_cast from rvalue to reference type 'std::ostringstream &' (aka 'basic_ostringstream &')
289 | fileName1 = tempName; fileName1 += ""; fileName1 += SSTR(i); fileName1 += ".txt";
| ^~~~~~~
./mergesort.h:16:19: note: expanded from macro 'SSTR'
16 | #define SSTR( x ) dynamic_cast< std::ostringstream & >(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 | ( std::ostringstream() << std::dec << x ) ).str()
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./mergesort.h:290:56: error: dynamic_cast from rvalue to reference type 'std::ostringstream &' (aka 'basic_ostringstream &')
290 | fileName2 = tempName; fileName2 += ""; fileName2 += SSTR(i+1); fileName2 += ".txt";
| ^~~~~~~~~
./mergesort.h:16:19: note: expanded from macro 'SSTR'
16 | #define SSTR( x ) dynamic_cast< std::ostringstream & >(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 | ( std::ostringstream() << std::dec << x ) ).str()
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./mergesort.h:319:56: error: dynamic_cast from rvalue to reference type 'std::ostringstream &' (aka 'basic_ostringstream &')
319 | fileName1 = tempName; fileName1 += ""; fileName1 += SSTR(k); fileName1 += ".txt";
| ^~~~~~~
./mergesort.h:16:19: note: expanded from macro 'SSTR'
16 | #define SSTR( x ) dynamic_cast< std::ostringstream & >(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 | ( std::ostringstream() << std::dec << x ) ).str()
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./mergesort.h:192:54: error: dynamic_cast from rvalue to reference type 'std::ostringstream &' (aka 'basic_ostringstream &')
192 | fileName = tempName; fileName += ""; fileName += SSTR( numFiles ); fileName += ".txt";
| ^~~~~~~~~~~~~~~~
./mergesort.h:16:19: note: expanded from macro 'SSTR'
16 | #define SSTR( x ) dynamic_cast< std::ostringstream & >(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 | ( std::ostringstream() << std::dec << x ) ).str()
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./mergesort.h:96:13: note: in instantiation of member function 'externalMergesortstd::string::readInputFile' requested here
96 | numFiles = readInputFile(inputFile, tempName);
| ^
mangoC.cpp:1247:32: note: in instantiation of member function 'externalMergesortstd::string::externalMergesort' requested here
1247 | externalMergesort externalMergeSorter(inputfile, outputfile, 5000000);
| ^
In file included from mangoC.cpp:17:
./mergesort.h:289:56: error: dynamic_cast from rvalue to reference type 'std::ostringstream &' (aka 'basic_ostringstream &')
289 | fileName1 = tempName; fileName1 += ""; fileName1 += SSTR(i); fileName1 += ".txt";
| ^~~~~~~
./mergesort.h:16:19: note: expanded from macro 'SSTR'
16 | #define SSTR( x ) dynamic_cast< std::ostringstream & >(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 | ( std::ostringstream() << std::dec << x ) ).str()
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./mergesort.h:104:2: note: in instantiation of member function 'externalMergesortstd::string::mergeFiles' requested here
104 | mergeFiles(numFiles, tempName);
| ^
mangoC.cpp:1247:32: note: in instantiation of member function 'externalMergesortstd::string::externalMergesort' requested here
1247 | externalMergesort externalMergeSorter(inputfile, outputfile, 5000000);
| ^
In file included from mangoC.cpp:17:
./mergesort.h:290:56: error: dynamic_cast from rvalue to reference type 'std::ostringstream &' (aka 'basic_ostringstream &')
290 | fileName2 = tempName; fileName2 += ""; fileName2 += SSTR(i+1); fileName2 += ".txt";
| ^~~~~~~~~
./mergesort.h:16:19: note: expanded from macro 'SSTR'
16 | #define SSTR( x ) dynamic_cast< std::ostringstream & >(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 | ( std::ostringstream() << std::dec << x ) ).str()
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./mergesort.h:319:56: error: dynamic_cast from rvalue to reference type 'std::ostringstream &' (aka 'basic_ostringstream &')
319 | fileName1 = tempName; fileName1 += ""; fileName1 += SSTR(k); fileName1 += ".txt";
| ^~~~~~~
./mergesort.h:16:19: note: expanded from macro 'SSTR'
16 | #define SSTR( x ) dynamic_cast< std::ostringstream & >(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 | ( std::ostringstream() << std::dec << x ) ).str()
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 errors generated.
make: *** [mangoC.o] Error 1
ERROR: compilation failed for package ‘mango’
- removing ‘/usr/local/lib/R/4.4/site-library/mango’