-
Notifications
You must be signed in to change notification settings - Fork 162
compilation error when building epdfinfo program #372
Comments
Hi, I got this error when building epdfinfo:
I'm using Ubuntu 16.04 and Emacs 25.1 |
+1 |
I had the same epdfinfo compilation problem. macOS 10.13.4, Emacs 27.0.50 (2018-04-22), elpa pdf-tools-20180109.1234, Homebrew poppler 0.64.0. Switching back to the old poppler temporarily fixed the compilation issue.
|
I had the same issue as @gochit , pdf-tools-20180422.935, Linux Mint 18.03, emacs 25.3.1 |
@gochit @et2010 I had the same problem. It shouldn't be an issue with more recent versions of poppler; // Implements the same logic as GooString::hasUnicodeMarker() in poppler
bool hasUnicodeMarker(const GooString *s) {
return (s->getChar(0) & 0xff) == 0xfe && (s->getChar(1) & 0xff) == 0xff;
} and change the call edited: the second call to |
@dmringo, updated poppler to 0.64 but I am still having the same issue. Could you share your version of poppler-hack.cc? |
@jmburgos I had the same issue and I found following @dmringo's advice worked for me. Here's my version of poppler-hack.cc. Not knowing anything about C++ I just put the Edit: Second call of
|
Thanks @ryw89 . Still having problems though. So basically you replaced the poppler-hack.cc function and then just ran M-x pdf-tools-install, correct? Or I am missing something? |
That's correct @jmburgos. After changing the poppler-hack.cc file running M-x pdf-tools-install did the build successfully for me. |
Ok, I started from scratch by reinstalling pdftools, and just realized that my error message is a bit different than mentioned before.
|
So, the original error is fixed by using the appropriate Why does the compiler suddenly care about the return value of |
@ryw89 I was sloppy in my original snippet, and have since fixed it. Would you update yours to match for any future observers looking to solve the @jmburgos @gochit @et2010 This may affect you too if you used the original workaround code |
Still not working, and I am a bit over my head. I will use zathura until this gets fixed. :) |
So, after some investigation I found out that the poppler people made the return value of the methods After @peschkaj's proposal to cast the const away, I immediately jumped to the conclusion, that it would be better to change the signature of the function, without really thinking about what's actually happening and what the implications of theses changes would be. And while it's possible in this world to work around the Lange Rede, kurzer Sinn: I've reverted the change and implemented the originally proposed solution. I hope that this will work for everyone. |
It works like a charm. Thank you!! |
Still the same problem on MacOS, as referenced by @dunn:
|
That's because the fix is only in the master branch, not v0.80 .
|
Thanks for the response! Do you have any ETA when it makes it downstream? I might want to spend some time building from master - which shouldn't be a problem, but I will have to integrate it into Emacs then which might take longer, so I wonder if I do it or wait for the fix to reach emacs support, |
Trying to build from master... The tar file was successfully created (after I upgraded to emacs 26.1). Now it fails to install, both within and outside of emacs:
Inside emacs:
|
Some kind of change somewhere was causing build failures on Mac, and the fix hasn't been released yet. See politza/pdf-tools#372
Is this still a problem ? Just install from melpa. |
Which one ? Just post the compiler output.
|
Sorry, I already delete my comment, since it turned out that there was a file corruption on my hard drive which resulted in a corrupt header file in Poppler. It raised a very similar error, but a reinstall fixed it. Mea culpa. Works fine on Ubuntu 18.04 with the melpa version of pdf-tools now. |
Hi I keep getting the following error whenever I try to compile the pdf-tools.
I've tried removing completely pdf-tools and re-installing but still I get the same error.
How can we resolve this?
Thanks!
The text was updated successfully, but these errors were encountered: