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

Compilation error on arch linux #162

Open
pietroiusti opened this issue Dec 21, 2023 · 4 comments
Open

Compilation error on arch linux #162

pietroiusti opened this issue Dec 21, 2023 · 4 comments

Comments

@pietroiusti
Copy link

I get this error when (following the readme and) running make on arch linux. I had no problem on Ubuntu. Thanks.

[  1%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/AcroForm.cc.o
[  2%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Annot.cc.o
[  2%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Array.cc.o
[  3%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/BuiltinFont.cc.o
[  4%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/BuiltinFontTables.cc.o
[  5%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Catalog.cc.o
[  5%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/CharCodeToUnicode.cc.o
[  6%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/CMap.cc.o
[  7%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Decrypt.cc.o
[  8%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Dict.cc.o
[  8%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/DisplayState.cc.o
[  9%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Error.cc.o
[ 10%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/FontEncodingTables.cc.o
[ 11%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Function.cc.o
[ 11%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Gfx.cc.o
[ 12%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/GfxFont.cc.o
[ 13%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/GfxState.cc.o
[ 14%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/GlobalParams.cc.o
In file included from /home/gp/projects/pdfalto/xpdf-4.03/xpdf/GlobalParams.cc:70:
/home/gp/projects/pdfalto/xpdf-4.03/xpdf/UnicodeToUnicodeFontRules.h:28:10: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   28 |         {"AdvTT3f84ef53", 61550, advtt3f84ef53}
      |          ^~~~~~~~~~~~~~~
[ 14%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/JArithmeticDecoder.cc.o
[ 15%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/JBIG2Stream.cc.o
[ 16%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/JPXStream.cc.o
[ 17%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Lexer.cc.o
[ 18%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Link.cc.o
[ 18%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/NameToCharCode.cc.o
[ 19%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Object.cc.o
[ 20%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/OptionalContent.cc.o
[ 21%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Outline.cc.o
[ 21%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/OutputDev.cc.o
[ 22%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Page.cc.o
[ 23%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Parser.cc.o
[ 24%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/PDFCore.cc.o
[ 24%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/PDF417Barcode.cc.o
[ 25%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/PDFDoc.cc.o
[ 26%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/PDFDocEncoding.cc.o
[ 27%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/PSTokenizer.cc.o
[ 27%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/SecurityHandler.cc.o
[ 28%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Stream.cc.o
[ 29%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/TextString.cc.o
[ 30%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/UnicodeMap.cc.o
[ 30%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/UnicodeRemapping.cc.o
[ 31%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/UnicodeTypeTable.cc.o
[ 32%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/UTF8.cc.o
[ 33%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/XFAScanner.cc.o
[ 33%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/XRef.cc.o
[ 34%] Building CXX object xpdf-4.03/xpdf/CMakeFiles/xpdf.dir/Zoox.cc.o
[ 35%] Linking CXX static library ../build/xpdf/lib/libxpdf.a
[ 35%] Built target xpdf
[ 35%] Building CXX object xpdf-4.03/goo/CMakeFiles/goo_objs.dir/FixedPoint.cc.o
[ 36%] Building CXX object xpdf-4.03/goo/CMakeFiles/goo_objs.dir/GHash.cc.o
[ 37%] Building CXX object xpdf-4.03/goo/CMakeFiles/goo_objs.dir/GList.cc.o
[ 38%] Building CXX object xpdf-4.03/goo/CMakeFiles/goo_objs.dir/GString.cc.o
[ 38%] Building CXX object xpdf-4.03/goo/CMakeFiles/goo_objs.dir/gfile.cc.o
[ 39%] Building CXX object xpdf-4.03/goo/CMakeFiles/goo_objs.dir/gmem.cc.o
[ 40%] Building CXX object xpdf-4.03/goo/CMakeFiles/goo_objs.dir/gmempp.cc.o
[ 41%] Building C object xpdf-4.03/goo/CMakeFiles/goo_objs.dir/parseargs.c.o
[ 41%] Building CXX object xpdf-4.03/goo/CMakeFiles/goo_objs.dir/Trace.cc.o
[ 41%] Built target goo_objs
[ 42%] Linking CXX static library libgoo.a
[ 42%] Built target goo
[ 43%] Building CXX object xpdf-4.03/fofi/CMakeFiles/fofi_objs.dir/FoFiBase.cc.o
[ 44%] Building CXX object xpdf-4.03/fofi/CMakeFiles/fofi_objs.dir/FoFiEncodings.cc.o
[ 45%] Building CXX object xpdf-4.03/fofi/CMakeFiles/fofi_objs.dir/FoFiIdentifier.cc.o
[ 45%] Building CXX object xpdf-4.03/fofi/CMakeFiles/fofi_objs.dir/FoFiTrueType.cc.o
[ 46%] Building CXX object xpdf-4.03/fofi/CMakeFiles/fofi_objs.dir/FoFiType1.cc.o
[ 47%] Building CXX object xpdf-4.03/fofi/CMakeFiles/fofi_objs.dir/FoFiType1C.cc.o
[ 47%] Built target fofi_objs
[ 47%] Linking CXX static library libfofi.a
[ 47%] Built target fofi
[ 48%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/Splash.cc.o
[ 48%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/SplashBitmap.cc.o
[ 49%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/SplashClip.cc.o
[ 50%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/SplashFTFont.cc.o
[ 51%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/SplashFTFontEngine.cc.o
[ 52%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/SplashFTFontFile.cc.o
[ 52%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/SplashFont.cc.o
[ 53%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/SplashFontEngine.cc.o
[ 54%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/SplashFontFile.cc.o
[ 55%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/SplashFontFileID.cc.o
[ 55%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/SplashPath.cc.o
[ 56%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/SplashPattern.cc.o
[ 57%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/SplashScreen.cc.o
[ 58%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/SplashState.cc.o
[ 58%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/SplashXPath.cc.o
[ 59%] Building CXX object xpdf-4.03/splash/CMakeFiles/splash_objs.dir/SplashXPathScanner.cc.o
[ 59%] Built target splash_objs
[ 60%] Linking CXX static library libsplash.a
[ 60%] Built target splash
[ 61%] Building CXX object CMakeFiles/pdfalto.dir/src/AnnotsXrce.cc.o
[ 62%] Building CXX object CMakeFiles/pdfalto.dir/src/ConstantsUtils.cc.o
[ 63%] Building CXX object CMakeFiles/pdfalto.dir/src/ConstantsXML.cc.o
[ 63%] Building CXX object CMakeFiles/pdfalto.dir/src/Parameters.cc.o
[ 64%] Building CXX object CMakeFiles/pdfalto.dir/src/PDFDocXrce.cc.o
[ 65%] Building C object CMakeFiles/pdfalto.dir/src/whereami.c.o
[ 66%] Building CXX object CMakeFiles/pdfalto.dir/src/pdfalto.cc.o
[ 66%] Building CXX object CMakeFiles/pdfalto.dir/src/XmlAltoOutputDev.cc.o
[ 67%] Linking CXX executable pdfalto
/usr/bin/ld: xpdf-4.03/build/xpdf/lib/libxpdf.a(GlobalParams.cc.o): in function `GlobalParams::init(char const*, char const*)':
GlobalParams.cc:(.text+0x1691): undefined reference to `paperinit'
/usr/bin/ld: GlobalParams.cc:(.text+0x1696): undefined reference to `systempapername'
/usr/bin/ld: GlobalParams.cc:(.text+0x16b2): undefined reference to `paperinfo'
/usr/bin/ld: GlobalParams.cc:(.text+0x16c2): undefined reference to `paperpswidth'
/usr/bin/ld: GlobalParams.cc:(.text+0x16dc): undefined reference to `paperpsheight'
/usr/bin/ld: GlobalParams.cc:(.text+0x172d): undefined reference to `paperdone'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/pdfalto.dir/build.make:220: pdfalto] Error 1
make[1]: *** [CMakeFiles/Makefile2:180: CMakeFiles/pdfalto.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
@pietroiusti
Copy link
Author

pietroiusti commented Dec 21, 2023

I manage to compile if I replace all occurrences of ${CMAKE_THREAD_LIBS_INIT} with ${CMAKE_THREAD_LIBS_INIT} ${HAVE_PAPER_H}, both in xpdf-qt/CMakeLists.txt and xpdf/CMakeLists.txt as done in kermitt2/xpdf-4.00#1 (comment)

@lfoppiano
Copy link
Collaborator

I'm closing this issue, seems quite old. Feel free to reopen, should the problem be still there.

@lfoppiano lfoppiano closed this as not planned Won't fix, can't repro, duplicate, stale Jan 1, 2025
@kermitt2
Copy link
Owner

kermitt2 commented Jan 1, 2025

Re-opening because the forks for xpdf-4.03 and later need to be reviewed for this problem, based on the fixed made for xpdf-4.00 (which might have been forgotten to be added to the xpdf-4.03 fork).

@kermitt2 kermitt2 reopened this Jan 1, 2025
@lfoppiano
Copy link
Collaborator

Sorry 😅 I was too generous with the close button.

I went through the changes and patches to the code mentioned in this and the linked comment are commented out in both 4.0.0 and 4.03 (changes in 2021)

@pietroiusti could you perhaps give it a try with the current master version just to check whether the issue still happens?

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

No branches or pull requests

3 participants