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

Pdfium on CentOS #464

Open
UstimVV opened this issue Oct 3, 2024 · 12 comments
Open

Pdfium on CentOS #464

UstimVV opened this issue Oct 3, 2024 · 12 comments
Labels

Comments

@UstimVV
Copy link

UstimVV commented Oct 3, 2024

Describe the bug
When I try to import PDF into NAPS2 7.5.1 I ha

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Import'
  2. Choose any pdf file
  3. Click on 'Open'
  4. See error: The file 'filename.pdf' could not be imported...
  5. Technical details: System.Exception: Could not load library: "libpdfium.so". Error:
    see on screenshot
    2024-10-03_11-59

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop:

  • OS: CentOS
  • Version 7.5.1
@cyanfish
Copy link
Owner

cyanfish commented Oct 3, 2024

What version of CentOS?

@UstimVV
Copy link
Author

UstimVV commented Oct 4, 2024

kernel version 6.6.51
centos 8

@sT331h0rs3
Copy link

I had such issue, when naps2 executable was incorrectly placed in /usr/bin directory instead of /usr/lib/naps2.
The error occurs because libpdfium.so is lazy-loaded from path ./_linux/libpdfium.so, relative to the naps2 executable. The full path is /usr/lib/naps2/_linux/libpdfium.so by default.

@UstimVV
Copy link
Author

UstimVV commented Oct 4, 2024

Executable naps2 I found in /usr/bin. I made symlink /usr/lib/naps2 -> /usr/lib64/naps2/ where I found file _linux/libpdfium.so. But I have the same error.

@sT331h0rs3
Copy link

Executable naps2 should be placed in /usr/lib/naps2 directory by default (could be /usr/lib64/naps2 in some distros as well).
File /usr/bin/naps2 might be a symlink to /usr/lib/naps2/naps2 though.

@cyanfish
Copy link
Owner

cyanfish commented Oct 4, 2024

The other possibility is that Centos is using too old a glibc (2.28) for the pdfium build (it's supposed to only require 2.27 but I might have missed some change). I'll check later but if you want you can see what glibc version libpdfium.so depends on.
https://stackoverflow.com/questions/3436008/how-to-determine-version-of-glibc-glibcxx-binary-will-depend-on

@UstimVV
Copy link
Author

UstimVV commented Oct 4, 2024

  1. Executable naps2 I put to diffrents places - no success.
  2. glibc version now 2.36

@cyanfish
Copy link
Owner

cyanfish commented Oct 4, 2024

What's the output of ldd /lib/naps2/_linux/libpdfium.so?

@cyanfish
Copy link
Owner

cyanfish commented Oct 7, 2024

That's... odd. It works fine on my Fedora VM (which also uses the RPM). At some point I might try creating a CentOS VM and see if I can track it down but I'm not sure what the problem is.

@UstimVV
Copy link
Author

UstimVV commented Oct 7, 2024

Then I use version naps2-7.1.2 I can import pdf files and output is:

ldd /lib/naps2/_linux/libpdfium.so

linux-vdso.so.1 (0x00007ffe9c199000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fbe15ba5000)
libm.so.6 => /lib64/libm.so.6 (0x00007fbe15520000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fbe15b85000)
libc.so.6 => /lib64/libc.so.6 (0x00007fbe15343000)
/lib64/ld-linux-x86-64.so.2 (0x00007fbe15bc0000)

After update to version naps2-7.5.1 output is:

ldd /lib/naps2/_linux/libpdfium.so

ldd: warning: you do not have execute permissions `/lib/naps2/_linux/libpdfium.so'
linux-vdso.so.1 (0x00007ffea496a000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fea86bed000)
libm.so.6 => /lib64/libm.so.6 (0x00007fea86b0d000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fea86aed000)
libc.so.6 => /lib64/libc.so.6 (0x00007fea86423000)
/lib64/ld-linux-x86-64.so.2 (0x00007fea86c08000)

@UstimVV
Copy link
Author

UstimVV commented Oct 7, 2024

That's... odd. It works fine on my Fedora VM (which also uses the RPM). At some point I might try creating a CentOS VM and see if I can track it down but I'm not sure what the problem is.

Thank you

@cyanfish cyanfish changed the title Import PDF Files Pdfium on CentOS Oct 8, 2024
@cyanfish cyanfish added the linux label Oct 8, 2024
@UstimVV
Copy link
Author

UstimVV commented Oct 25, 2024

Import pdf files on Version 7.5.1-2 working exelent)

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

No branches or pull requests

4 participants
@sT331h0rs3 @cyanfish @UstimVV and others