Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation error in pdftools #119

Open
shubhamgajbhiye1994 opened this issue Jan 9, 2023 · 0 comments
Open

installation error in pdftools #119

shubhamgajbhiye1994 opened this issue Jan 9, 2023 · 0 comments

Comments

@shubhamgajbhiye1994
Copy link

I tired to install pdftools on 16.04 ubuntu , after installing pre requisite like libpoppler-cpp-dev.
but getting below error.

  • installing source package ‘pdftools’ ...
    ** package ‘pdftools’ successfully unpacked and MD5 sums checked
    Found pkg-config cflags and libs!
    Using PKG_CFLAGS=-I/usr/local/include/poppler/cpp -I/usr/local/include/poppler
    Using PKG_LIBS=-L/usr/local/lib -lpoppler-cpp
    ** libs
    g++ -I/usr/share/R/include -DNDEBUG -I/usr/local/include/poppler/cpp -I/usr/local/include/poppler -I"/usr/local/lib/R/site-library/Rcpp/include" -fvisibility=hidden -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
    g++ -I/usr/share/R/include -DNDEBUG -I/usr/local/include/poppler/cpp -I/usr/local/include/poppler -I"/usr/local/lib/R/site-library/Rcpp/include" -fvisibility=hidden -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c bindings.cpp -o bindings.o
    In file included from bindings.cpp:5:0:
    /usr/local/include/poppler/cpp/poppler-page.h:39:22: error: expected ‘,’ or ‘...’ before ‘&&’ token
    text_box(text_box&&);
    ^
    /usr/local/include/poppler/cpp/poppler-page.h:39:24: error: invalid constructor; you probably meant ‘poppler::text_box (const poppler::text_box&)’
    text_box(text_box&&);
    ^
    /usr/local/include/poppler/cpp/poppler-page.h:40:33: error: expected ‘,’ or ‘...’ before ‘&&’ token
    text_box& operator=(text_box&&);
    ^
    /usr/local/include/poppler/cpp/poppler-page.h:70:10: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
    std::unique_ptr<text_box_data> m_data;
    ^
    bindings.cpp: In function ‘Rcpp::String ustring_to_utf8(poppler::ustring)’:
    bindings.cpp:56:26: error: ‘std::__cxx11::string {aka class std::__cxx11::basic_string}’ has no member named ‘bac

    if(str.length() && str.back() == '\f')
    ^
    bindings.cpp: In function ‘Rcpp::List poppler_pdf_info(Rcpp::RawVector, std::__cxx11::string, std::__cxx11::string)’:
    bindings.cpp:146:3: error: ‘unique_ptr’ is not a member of ‘std’
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw, true));
    ^
    bindings.cpp:146:36: error: expected primary-expression before ‘>’ token
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw, true));
    ^
    bindings.cpp:146:73: error: ‘doc’ was not declared in this scope
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw, true));
    ^
    bindings.cpp: In function ‘Rcpp::List poppler_pdf_data(Rcpp::RawVector, bool, std::__cxx11::string, std::__cxx11::string)’:
    bindings.cpp:194:3: error: ‘unique_ptr’ is not a member of ‘std’
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:194:36: error: expected primary-expression before ‘>’ token
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:194:67: error: ‘doc’ was not declared in this scope
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:197:5: error: ‘unique_ptr’ is not a member of ‘std’
    std::unique_ptrpoppler::page p(doc->create_page(i));
    ^
    bindings.cpp:197:34: error: expected primary-expression before ‘>’ token
    std::unique_ptrpoppler::page p(doc->create_page(i));
    ^
    bindings.cpp:197:57: error: ‘p’ was not declared in this scope
    std::unique_ptrpoppler::page p(doc->create_page(i));
    ^
    bindings.cpp: In function ‘Rcpp::CharacterVector poppler_pdf_text(Rcpp::RawVector, std::__cxx11::string, std::__cxx11::string)’:
    bindings.cpp:261:3: error: ‘unique_ptr’ is not a member of ‘std’
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:261:36: error: expected primary-expression before ‘>’ token
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:261:67: error: ‘doc’ was not declared in this scope
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:264:5: error: ‘unique_ptr’ is not a member of ‘std’
    std::unique_ptrpoppler::page p(doc->create_page(i));
    ^
    bindings.cpp:264:34: error: expected primary-expression before ‘>’ token
    std::unique_ptrpoppler::page p(doc->create_page(i));
    ^
    bindings.cpp:264:57: error: ‘p’ was not declared in this scope
    std::unique_ptrpoppler::page p(doc->create_page(i));
    ^
    bindings.cpp: In function ‘Rcpp::DataFrame poppler_pdf_pagesize(Rcpp::RawVector, std::__cxx11::string, std::__cxx11::string)’:
    bindings.cpp:293:3: error: ‘unique_ptr’ is not a member of ‘std’
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:293:36: error: expected primary-expression before ‘>’ token
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:293:67: error: ‘doc’ was not declared in this scope
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:303:5: error: ‘unique_ptr’ is not a member of ‘std’
    std::unique_ptrpoppler::page p(doc->create_page(i));
    ^
    bindings.cpp:303:34: error: expected primary-expression before ‘>’ token
    std::unique_ptrpoppler::page p(doc->create_page(i));
    ^
    bindings.cpp:303:57: error: ‘p’ was not declared in this scope
    std::unique_ptrpoppler::page p(doc->create_page(i));
    ^
    bindings.cpp: In function ‘Rcpp::List poppler_pdf_fonts(Rcpp::RawVector, std::__cxx11::string, std::__cxx11::string)’:
    bindings.cpp:325:3: error: ‘unique_ptr’ is not a member of ‘std’
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:325:36: error: expected primary-expression before ‘>’ token
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:325:67: error: ‘doc’ was not declared in this scope
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp: In function ‘Rcpp::List poppler_pdf_files(Rcpp::RawVector, std::__cxx11::string, std::__cxx11::string)’:
    bindings.cpp:349:3: error: ‘unique_ptr’ is not a member of ‘std’
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:349:36: error: expected primary-expression before ‘>’ token
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:349:67: error: ‘doc’ was not declared in this scope
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp: In function ‘Rcpp::List poppler_pdf_toc(Rcpp::RawVector, std::__cxx11::string, std::__cxx11::string)’:
    bindings.cpp:373:3: error: ‘unique_ptr’ is not a member of ‘std’
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:373:36: error: expected primary-expression before ‘>’ token
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:373:67: error: ‘doc’ was not declared in this scope
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:375:3: error: ‘unique_ptr’ is not a member of ‘std’
    std::unique_ptrpoppler::toc contents(doc->create_toc());
    ^
    bindings.cpp:375:31: error: expected primary-expression before ‘>’ token
    std::unique_ptrpoppler::toc contents(doc->create_toc());
    ^
    bindings.cpp:375:59: error: ‘contents’ was not declared in this scope
    std::unique_ptrpoppler::toc contents(doc->create_toc());
    ^
    bindings.cpp: In function ‘Rcpp::RawVector poppler_render_page(Rcpp::RawVector, int, double, std::__cxx11::string, std::__cxx11::string, bool, bool)’:
    bindings.cpp:386:3: error: ‘unique_ptr’ is not a member of ‘std’
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:386:36: error: expected primary-expression before ‘>’ token
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:386:67: error: ‘doc’ was not declared in this scope
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:387:3: error: ‘unique_ptr’ is not a member of ‘std’
    std::unique_ptrpoppler::page p(doc->create_page(pagenum - 1));
    ^
    bindings.cpp:387:32: error: expected primary-expression before ‘>’ token
    std::unique_ptrpoppler::page p(doc->create_page(pagenum - 1));
    ^
    bindings.cpp:387:65: error: ‘p’ was not declared in this scope
    std::unique_ptrpoppler::page p(doc->create_page(pagenum - 1));
    ^
    bindings.cpp: In function ‘std::vector<std::__cxx11::basic_string > poppler_convert(Rcpp::RawVector, std::__cxx11::string, std::vector, std::vector<std::__cxx11::basic_string >, double, std::__cxx11::string, std::__cxx11::string, bool, bool, bool)’:
    bindings.cpp:416:3: error: ‘unique_ptr’ is not a member of ‘std’
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:416:36: error: expected primary-expression before ‘>’ token
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:416:67: error: ‘doc’ was not declared in this scope
    std::unique_ptrpoppler::document doc(read_raw_pdf(x, opw, upw));
    ^
    bindings.cpp:422:5: error: ‘unique_ptr’ is not a member of ‘std’
    std::unique_ptrpoppler::page p(doc->create_page(pagenum - 1));
    ^
    bindings.cpp:422:34: error: expected primary-expression before ‘>’ token
    std::unique_ptrpoppler::page p(doc->create_page(pagenum - 1));
    ^
    bindings.cpp:422:67: error: ‘p’ was not declared in this scope
    std::unique_ptrpoppler::page p(doc->create_page(pagenum - 1));
    ^
    /usr/lib/R/etc/Makeconf:143: recipe for target 'bindings.o' failed
    make: *** [bindings.o] Error 1
    ERROR: compilation failed for package ‘pdftools’
  • removing ‘/usr/local/lib/R/site-library/pdftools’

The downloaded source packages are in
‘/tmp/Rtmpipjjor/downloaded_packages’
Warning message:
In install.packages("pdftools") :
installation of package ‘pdftools’ had non-zero exit status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant