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

Build Fails, Poppler 24.01.0-1 Arch #9

Open
SuperContraptionGuy opened this issue Apr 23, 2024 · 5 comments
Open

Build Fails, Poppler 24.01.0-1 Arch #9

SuperContraptionGuy opened this issue Apr 23, 2024 · 5 comments

Comments

@SuperContraptionGuy
Copy link

Just wanted to pop in and express interest in this project. Does anyone know of an alternative multi-threaded pdf viewer?

Followed the build commands listed in https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=flaxpdf-git

$ git clone https://github.com/clbr/flaxpdf
$ cd flaxpdf
$ ./autogen.sh
$ CC=gcc CXX=g++ ./configure --prefix=/usr
$ make

Resulting in make errors:

Making all in po
make[1]: Entering directory '/home/user/Applications/flaxpdf/po'
test ! -f ./flaxpdf.pot || \
  test -z "" || make 
touch stamp-po
make[1]: Leaving directory '/home/user/Applications/flaxpdf/po'
Making all in src
make[1]: Entering directory '/home/user/Applications/flaxpdf/src'
make  all-am
make[2]: Entering directory '/home/user/Applications/flaxpdf/src'
g++ -DHAVE_CONFIG_H -I.  -DDATADIR=\"/usr/share/flaxpdf\" -DLOCALEDIR=\"/usr/share/locale\"   -g -O2 -fopenmp  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/fltk/src=/usr/src/debug/fltk -flto=auto -ffat-lto-objects -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT -isystem /usr/include/poppler -Wall -Wextra -ffunction-sections -fdata-sections -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.cpp
In file included from /usr/include/X11/Xlib.h:44,
                 from main.h:26,
                 from main.cpp:17:
/usr/include/poppler/XRef.h:104:5: error: expected identifier before numeric constant
  104 |     None, /* No compression */
      |     ^~~~
/usr/include/poppler/XRef.h:104:5: error: expected ‘}’ before numeric constant
In file included from /usr/include/poppler/PDFDoc.h:60,
                 from main.h:41:
/usr/include/poppler/XRef.h:103:1: note: to match this ‘{’
  103 | {
      | ^
/usr/include/poppler/XRef.h:104:5: error: expected unqualified-id before numeric constant
  104 |     None, /* No compression */
      |     ^~~~
/usr/include/poppler/XRef.h:106:1: error: expected declaration before ‘}’ token
  106 | };
      | ^
/usr/include/poppler/XRef.h:224:128: error: expected unqualified-id before numeric constant
  224 |     Ref addStreamObject(Dict *dict, char *buffer, const Goffset bufferSize, StreamCompression compression = StreamCompression::None);
      |                                                                                                                                ^~~~
/usr/include/poppler/XRef.h:225:131: error: expected unqualified-id before numeric constant
  225 |     Ref addStreamObject(Dict *dict, uint8_t *buffer, const Goffset bufferSize, StreamCompression compression = StreamCompression::None);
      |                                                                                                                                   ^~~~
make[2]: *** [Makefile:437: main.o] Error 1
make[2]: Leaving directory '/home/user/Applications/flaxpdf/src'
make[1]: *** [Makefile:324: all] Error 2
make[1]: Leaving directory '/home/user/Applications/flaxpdf/src'
make: *** [Makefile:445: all-recursive] Error 1
@clbr
Copy link
Owner

clbr commented Apr 24, 2024

Just commenting on that specific error, None is an X11 keyword. If latest poppler is using that (check poppler git XRef.h), please file a bug against poppler.

@SuperContraptionGuy
Copy link
Author

SuperContraptionGuy commented Apr 24, 2024

It is in the latest poppler. I went ahead and posted an issue there.
https://gitlab.freedesktop.org/poppler/poppler/-/issues/1482
Is there any recourse besides downgrading poppler?

@clbr
Copy link
Owner

clbr commented Apr 24, 2024

Downgrading poppler is the only end-user solution. If you can code, you could edit either poppler or flaxpdf.

Poppler's API is not stable however, and you may have to go to an older version than the 2023 one before that compression commit (see the other poppler issue here).

@SuperContraptionGuy
Copy link
Author

According to the poppler dev, this is an X11 problem, rather than a poppler problem. I'm not really skilled enough to know for myself.

@clbr
Copy link
Owner

clbr commented Apr 25, 2024

X11 has used the word since 1989 or so. Poppler started using it in 2023. In my opinion, that's poppler's problem, not X's, especially as a PDF library will often be used with X. However as they closed it as "not our problem", no need to argue there really.

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

2 participants