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 issues #4

Closed
simontoftnielsen opened this issue Jul 12, 2017 · 5 comments
Closed

installation issues #4

simontoftnielsen opened this issue Jul 12, 2017 · 5 comments

Comments

@simontoftnielsen
Copy link

Hi,
Spend all day trying to get this to work.
I am running Ubuntu 16.04 LTS on a virtual machine.
I have built poppler using the build_poppler shell script you provided. It ran smoothly!

Running setup.py with the install command however returns the error:
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Googling suggested me to sudo apt-get a bunch of packages. So I installed/updated:

build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev libssl-dev python-dev gcc python-dateutil python-docutils python-feedparser python-gdata python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python3-dev python3.5-dev libffi-dev

I did not install all of them at once. Just tried a different suggested solutions - and there were a lot...
Anyway. I still can't get it to work. Any suggestions?

All the best,
Simon

@simontoftnielsen
Copy link
Author

ALSO...
I get a lot of warnings saying:
'warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
I have no clue what this means :-)

@izderadicka
Copy link
Owner

izderadicka commented Jul 12, 2017 via email

@oplahcinski
Copy link
Contributor

@simontoftnielsen I had this problem when i was compiling in centos 7.

I've made a fix in my pip installable branch
https://github.com/oplahcinski/pdfparser/blob/pip-installable/setup.py#L68

In the master branch you can see its empty
https://github.com/izderadicka/pdfparser/blob/master/setup.py#L16

It gives you a ton of warnings about the override but you should see an actual error saying something like "‘nullptr’ was not declared in this scope".

I had GCC 4.8 so nullptr was supported but you have to add that extra compile arg to make it work.

see
https://stackoverflow.com/questions/3756473/what-header-file-needs-to-be-included-for-using-nullptr-in-g#comment29860682_3756481

@jurrian
Copy link
Contributor

jurrian commented Jul 14, 2017

I had the same problem compiling this as a docker image with alpine linux.
@oplahcinski made the correct fix, I did the same and it fixed the problem.

For debugging purposes, these are the compilation errors I got:

cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
In file included from pdfparser/poppler.cpp:484:0:
/tmp/poppler/poppler/PDFDoc.h:295:3: warning: identifier 'nullptr' is a keyword in C++11 [-Wc++0x-compat]
   void markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, Guint numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts = nullptr);
   ^
In file included from pdfparser/poppler.cpp:484:0:
/tmp/poppler/poppler/PDFDoc.h:295:153: error: 'nullptr' was not declared in this scope
   void markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, Guint numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts = nullptr);
                                                                                                                                                         ^
/tmp/poppler/poppler/PDFDoc.h:296:156: error: 'nullptr' was not declared in this scope
   GBool markAnnotations(Object *annots, XRef *xRef, XRef *countRef, Guint numOffset, int oldPageNum, int newPageNum, std::set<Dict*> *alreadyMarkedDicts = nullptr);
                                                                                                                                                            ^
/tmp/poppler/poppler/PDFDoc.h:301:135: error: 'nullptr' was not declared in this scope
                            CryptAlgorithm encAlgorithm, int keyLength, int objNum, int objGen, std::set<Dict*> *alreadyWrittenDicts = nullptr);
                                                                                                                                       ^
/tmp/poppler/poppler/PDFDoc.h:315:146: error: 'nullptr' was not declared in this scope
   void markObject (Object *obj, XRef *xRef, XRef *countRef, Guint numOffset, int oldRefNum, int newRefNum, std::set<Dict*> *alreadyMarkedDicts = nullptr);
                                                                                                                                                  ^
/tmp/poppler/poppler/PDFDoc.h:324:99: error: 'nullptr' was not declared in this scope
                     int keyLength, int objNum, int objGen, std::set<Dict*> *alreadyWrittenDicts = nullptr)
                                                                                                   ^

@izderadicka
Copy link
Owner

Merged PR from @oplahcinski , thanks a lot for that. I'm usually too lazy to make reasonable setup scripts, sorry for that. README is better too, with tested installation recipes .
I'm going for beer now :-) and you are all invited if you'll be near Prague in future.

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

4 participants