compiling wxpdfdocument on linux

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
Everydaydiesel
Earned some good credits
Earned some good credits
Posts: 125
Joined: Wed Oct 28, 2015 9:48 pm

compiling wxpdfdocument on linux

Post by Everydaydiesel »

Hello I am trying to get wxPdfDocument addon to work but I cannot quite get it. Here is what I have done.

Downloaded
https://github.com/utelle/wxpdfdoc/archive/master.zip

I extracted the zip file and ran these commands

Code: Select all

 ../configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for wx-config... /usr/bin/wx-config
checking for wxWidgets version >= 2.8.0... yes (version 3.0.2)
checking for wxWidgets static library... 
          Warning: No config found to match: /usr/bin/wx-config --static --libs base,core,xml
                   in /usr/lib/x86_64-linux-gnu/wx/config
          If you require this configuration, please install the desired
          library build.  If this is part of an automated configuration
          test and no other errors occur, you may safely ignore it.
          You may use wx-config --list to see all configs available in
          the default prefix.

no
checking for wx-config... (cached) /usr/bin/wx-config
checking for wxWidgets version >= 2.8.0... yes (version 3.0.2)
checking for wxWidgets static library... 
          Warning: No config found to match: /usr/bin/wx-config --static --libs adv,base,core,html,richtext,xml
                   in /usr/lib/x86_64-linux-gnu/wx/config
          If you require this configuration, please install the desired
          library build.  If this is part of an automated configuration
          test and no other errors occur, you may safely ignore it.
          You may use wx-config --list to see all configs available in
          the default prefix.

no
checking for visibility support... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FONTCONFIG... yes
checking if wxWidgets was built with UNICODE enabled... yes
checking if wxWidgets was built in DEBUG mode... no
checking if wxWidgets was built in STATIC mode... no
checking which wxWidgets toolkit was selected... gtk2
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating wxpdfdoc.pc
config.status: linking ../samples/pdfdc/smile.jpg to samples/pdfdc/smile.jpg
config.status: linking ../samples/pdfdc/up.gif to samples/pdfdc/up.gif
config.status: linking ../samples/minimal/20k_c1.txt to samples/minimal/20k_c1.txt
config.status: linking ../samples/minimal/20k_c2.txt to samples/minimal/20k_c2.txt
config.status: linking ../samples/minimal/attached.txt to samples/minimal/attached.txt
config.status: linking ../samples/minimal/apple.gif to samples/minimal/apple.gif
config.status: linking ../samples/minimal/chart2d.pdf to samples/minimal/chart2d.pdf
config.status: linking ../samples/minimal/circle.png to samples/minimal/circle.png
config.status: linking ../samples/minimal/clips.jpg to samples/minimal/clips.jpg
config.status: linking ../samples/minimal/countries.txt to samples/minimal/countries.txt
config.status: linking ../samples/minimal/flower.jpg to samples/minimal/flower.jpg
config.status: linking ../samples/minimal/glasses.png to samples/minimal/glasses.png
config.status: linking ../samples/minimal/glyphsample.txt to samples/minimal/glyphsample.txt
config.status: linking ../samples/minimal/image.png to samples/minimal/image.png
config.status: linking ../samples/minimal/image_with_alpha.png to samples/minimal/image_with_alpha.png
config.status: linking ../samples/minimal/linear_gradient_coords.jpg to samples/minimal/linear_gradient_coords.jpg
config.status: linking ../samples/minimal/logo.png to samples/minimal/logo.png
config.status: linking ../samples/minimal/mask.png to samples/minimal/mask.png
config.status: linking ../samples/minimal/pattern1.png to samples/minimal/pattern1.png
config.status: linking ../samples/minimal/pattern2.png to samples/minimal/pattern2.png
config.status: linking ../samples/minimal/radial_gradient_coords.jpg to samples/minimal/radial_gradient_coords.jpg
config.status: linking ../samples/minimal/ringmaster.wmf to samples/minimal/ringmaster.wmf
config.status: linking ../samples/minimal/smile.jpg to samples/minimal/smile.jpg
config.status: linking ../samples/minimal/wxpdfdoc.png to samples/minimal/wxpdfdoc.png
config.status: linking ../samples/minimal/indic-assamese.txt to samples/minimal/indic-assamese.txt
config.status: linking ../samples/minimal/indic-bengali.txt to samples/minimal/indic-bengali.txt
config.status: linking ../samples/minimal/indic-gujarati.txt to samples/minimal/indic-gujarati.txt
config.status: linking ../samples/minimal/indic-hindi.txt to samples/minimal/indic-hindi.txt
config.status: linking ../samples/minimal/indic-kannada.txt to samples/minimal/indic-kannada.txt
config.status: linking ../samples/minimal/indic-malayalam.txt to samples/minimal/indic-malayalam.txt
config.status: linking ../samples/minimal/indic-nepali.txt to samples/minimal/indic-nepali.txt
config.status: linking ../samples/minimal/indic-oriya.txt to samples/minimal/indic-oriya.txt
config.status: linking ../samples/minimal/indic-punjabi.txt to samples/minimal/indic-punjabi.txt
config.status: linking ../samples/minimal/indic-tamil.txt to samples/minimal/indic-tamil.txt
config.status: linking ../samples/minimal/indic-telugu.txt to samples/minimal/indic-telugu.txt
config.status: executing depfiles commands
config.status: executing libtool commands

Code: Select all

$ make
  CXX      src/pdfannotation.lo
  CXX      src/pdfbarcode.lo
  CXX      src/pdfcffdecoder.lo
  CXX      src/pdfcffindex.lo
  CXX      src/pdfcolour.lo
  CXX      src/pdfdc.lo
  CXX      src/pdfdecode.lo
  CXX      src/pdfdocument.lo
  CXX      src/pdfencoding.lo
  CXX      src/pdfencrypt.lo
  CXX      src/pdffont.lo
  CXX      src/pdffontdata.lo
  CXX      src/pdffontdatacore.lo
  CXX      src/pdffontdataopentype.lo
  CXX      src/pdffontdatatruetype.lo
  CXX      src/pdffontdatatype0.lo
  CXX      src/pdffontdatatype1.lo
  CXX      src/pdffontdescription.lo
  CXX      src/pdffontdetails.lo
  CXX      src/pdffontextended.lo
  CXX      src/pdffontmanager.lo
  CXX      src/pdffontparser.lo
  CXX      src/pdffontparsertruetype.lo
  CXX      src/pdffontparsertype1.lo
  CXX      src/pdffontsubsetcff.lo
  CXX      src/pdffontsubsettruetype.lo
  CXX      src/pdffontvolt.lo
  CXX      src/pdfform.lo
  CXX      src/pdfgradient.lo
  CXX      src/pdfgraphics.lo
  CXX      src/pdfimage.lo
  CXX      src/pdfkernel.lo
  CXX      src/pdflayer.lo
  CXX      src/pdfobjects.lo
  CXX      src/pdfocg.lo
  CXX      src/pdfparser.lo
  CXX      src/pdfpattern.lo
  CXX      src/pdfprint.lo
  CXX      src/pdfrijndael.lo
  CXX      src/pdftemplate.lo
  CXX      src/pdfutility.lo
  CXX      src/pdfxml.lo
  CXXLD    libwxcode_gtk2u_pdfdoc-3.0.la
ar: `u' modifier ignored since `D' is the default (see `U')
  CXX      samples/minimal/attachment.o
  CXX      samples/minimal/barcodes.o
  CXX      samples/minimal/bookmark.o
  CXX      samples/minimal/charting.o
  CXX      samples/minimal/cjktest.o
  CXX      samples/minimal/clipping.o
  CXX      samples/minimal/drawing.o
  CXX      samples/minimal/glyphwriting.o
  CXX      samples/minimal/gradients.o
  CXX      samples/minimal/indicfonts.o
  CXX      samples/minimal/jsform.o
  CXX      samples/minimal/kerning.o
  CXX      samples/minimal/labels.o
  CXX      samples/minimal/layers.o
  CXX      samples/minimal/minimal.o
  CXX      samples/minimal/protection.o
  CXX      samples/minimal/rotation.o
  CXX      samples/minimal/templates.o
  CXX      samples/minimal/transformation.o
  CXX      samples/minimal/transparency.o
  CXX      samples/minimal/tutorial1.o
  CXX      samples/minimal/tutorial2.o
  CXX      samples/minimal/tutorial3.o
  CXX      samples/minimal/tutorial4.o
  CXX      samples/minimal/tutorial5.o
  CXX      samples/minimal/tutorial6.o
  CXX      samples/minimal/tutorial7.o
  CXX      samples/minimal/wmf.o
  CXX      samples/minimal/xmlwrite.o
  CXXLD    samples/minimal/minimal
  CXX      samples/pdfdc/printing.o
  CXXLD    samples/pdfdc/pdfdc
  CXX      makefont/makefont.o
  CXXLD    makefont/makefont
  CXX      showfont/showfont.o
  CXXLD    showfont/showfont

Code: Select all

 sudo make install
[sudo] password for: 
make[1]: Entering directory '/home/user/apps/wxpdfdoc-master/build-gtk'
 /bin/mkdir -p '/usr/local/lib'
 /bin/bash ./libtool   --mode=install /usr/bin/install -c   libwxcode_gtk2u_pdfdoc-3.0.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libwxcode_gtk2u_pdfdoc-3.0.so.0.0.0 /usr/local/lib/libwxcode_gtk2u_pdfdoc-3.0.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libwxcode_gtk2u_pdfdoc-3.0.so.0.0.0 libwxcode_gtk2u_pdfdoc-3.0.so.0 || { rm -f libwxcode_gtk2u_pdfdoc-3.0.so.0 && ln -s libwxcode_gtk2u_pdfdoc-3.0.so.0.0.0 libwxcode_gtk2u_pdfdoc-3.0.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libwxcode_gtk2u_pdfdoc-3.0.so.0.0.0 libwxcode_gtk2u_pdfdoc-3.0.so || { rm -f libwxcode_gtk2u_pdfdoc-3.0.so && ln -s libwxcode_gtk2u_pdfdoc-3.0.so.0.0.0 libwxcode_gtk2u_pdfdoc-3.0.so; }; })
libtool: install: /usr/bin/install -c .libs/libwxcode_gtk2u_pdfdoc-3.0.lai /usr/local/lib/libwxcode_gtk2u_pdfdoc-3.0.la
libtool: install: /usr/bin/install -c .libs/libwxcode_gtk2u_pdfdoc-3.0.a /usr/local/lib/libwxcode_gtk2u_pdfdoc-3.0.a
libtool: install: chmod 644 /usr/local/lib/libwxcode_gtk2u_pdfdoc-3.0.a
libtool: install: ranlib /usr/local/lib/libwxcode_gtk2u_pdfdoc-3.0.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/mkdir -p '/usr/local/include/wx'
 /usr/bin/install -c -m 644 ../include/wx/pdfannotation.h ../include/wx/pdfarraydouble.h ../include/wx/pdfarraytypes.h ../include/wx/pdfbarcode.h ../include/wx/pdfbookmark.h ../include/wx/pdfcffdecoder.h ../include/wx/pdfcffindex.h ../include/wx/pdfcjkfontdata.h ../include/wx/pdfcolour.h ../include/wx/pdfcoonspatchmesh.h ../include/wx/pdfcorefontdata.h ../include/wx/pdfdc.h ../include/wx/pdfdc28.h ../include/wx/pdfdc29.h ../include/wx/pdfdoc.h ../include/wx/pdfdoc_version.h ../include/wx/pdfdocdef.h ../include/wx/pdfdocument.h ../include/wx/pdfencoding.h ../include/wx/pdfencrypt.h ../include/wx/pdffont.h ../include/wx/pdffontdata.h ../include/wx/pdffontdatacore.h ../include/wx/pdffontdataopentype.h ../include/wx/pdffontdatatruetype.h ../include/wx/pdffontdatatype0.h ../include/wx/pdffontdatatype1.h ../include/wx/pdffontdescription.h ../include/wx/pdffontdetails.h ../include/wx/pdffontextended.h ../include/wx/pdffontmacosx.h ../include/wx/pdffontmanager.h ../include/wx/pdffontparser.h ../include/wx/pdffontparsertruetype.h ../include/wx/pdffontparsertype1.h ../include/wx/pdffontsubsetcff.h ../include/wx/pdffontsubsettruetype.h ../include/wx/pdffontvolt.h ../include/wx/pdfform.h ../include/wx/pdfgradient.h '/usr/local/include/wx'
 /usr/bin/install -c -m 644 ../include/wx/pdfgraphics.h ../include/wx/pdfimage.h ../include/wx/pdfinfo.h ../include/wx/pdflayer.h ../include/wx/pdflinestyle.h ../include/wx/pdflinks.h ../include/wx/pdfobjects.h ../include/wx/pdfparser.h ../include/wx/pdfpattern.h ../include/wx/pdfprint.h ../include/wx/pdfproperties.h ../include/wx/pdfrijndael.h ../include/wx/pdfshape.h ../include/wx/pdfspotcolour.h ../include/wx/pdftemplate.h ../include/wx/pdfutility.h ../include/wx/pdfxml.h '/usr/local/include/wx'
 /bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 wxpdfdoc.pc '/usr/local/lib/pkgconfig'
make[1]: Leaving directory '/home/user/apps/wxpdfdoc-master/build-gtk'


Then I start a new wxwidgets project add the header include

Code: Select all

#include "/usr/local/include/wx/pdfdocument.h"
I also add a reference to the lib

Code: Select all

/usr/local/lib/libwxcode_gtk2u_pdfdoc-3.0.a
and it gives me this error

Code: Select all

||=== Build: Debug in PdfCreatorTest (compiler: GNU GCC Compiler) ===|
/usr/bin/ld: /usr/local/lib/libwxcode_gtk2u_pdfdoc-3.0.a(pdffontmanager.o)||undefined reference to symbol 'FcPatternAddInteger'|
||error: ld returned 1 exit status|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
Thanks for any help you can give
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 508
Joined: Fri Nov 03, 2006 2:00 pm

Re: compiling wxpdfdocument on linux

Post by stahta01 »

The include should be

Code: Select all

#include "wx/pdfdocument.h"
And, you add the header search path of "/usr/local/include".
No idea if this is causing the problem.

Edit: And, remember to add the wxWidgets libraries needed by wxpdfdocument

Tim S.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 6222
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: compiling wxpdfdocument on linux

Post by ONEEYEMAN »

Hi,
You need to add wx libraries that PDF requires.
In the "-L" option add the path to the librtaries, in the "-l" option (that's lower-case "L") add the libraries.
Now, those libraries has to be added before the pdf document one, so that linker know what to look for when it hits the pdf lib(s).

Thank you.
utelle
Moderator
Moderator
Posts: 1091
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: compiling wxpdfdocument on linux

Post by utelle »

The build system of wxPdfDocument uses libtool.

If you link against libwxcode_gtk3u_pdfdoc-3.0.la, all should work, since this libtool file contains references to all required dependencies like wxWidgets libraries and fontconfig library.

Regards,

Ulrich
Everydaydiesel
Earned some good credits
Earned some good credits
Posts: 125
Joined: Wed Oct 28, 2015 9:48 pm

Re: compiling wxpdfdocument on linux

Post by Everydaydiesel »

utelle wrote:The build system of wxPdfDocument uses libtool.

If you link against libwxcode_gtk3u_pdfdoc-3.0.la, all should work, since this libtool file contains references to all required dependencies like wxWidgets libraries and fontconfig library.

Regards,

Ulrich

Thank you!!!


and thank you to everyone that replied!
Everydaydiesel
Earned some good credits
Earned some good credits
Posts: 125
Joined: Wed Oct 28, 2015 9:48 pm

Re: compiling wxpdfdocument on linux

Post by Everydaydiesel »

utelle wrote: Fri Apr 20, 2018 5:48 pm The build system of wxPdfDocument uses libtool.

If you link against libwxcode_gtk3u_pdfdoc-3.0.la, all should work, since this libtool file contains references to all required dependencies like wxWidgets libraries and fontconfig library.

Regards,

Ulrich

I am trying to install your library on a newer version of ubuntu and I am having some trouble. I am hoping you can help me. This is the latest errors.


Code: Select all

[email protected]:~/apps/wxpdfdoc-main$ autoreconf
[email protected]:~/apps/wxpdfdoc-main$ mkdir build-gtk
[email protected]:~/apps/wxpdfdoc-main$ cd build-gtk/
[email protected]:~/apps/wxpdfdoc-main/build-gtk$ ../configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for wx-config... /usr/bin/wx-config
checking for wxWidgets version >= 3.0.0... yes (version 3.0.4)
checking for wxWidgets static library... 
          Warning: No config found to match: /usr/bin/wx-config --static --libs base,core,xml
                   in /usr/lib/x86_64-linux-gnu/wx/config
          If you require this configuration, please install the desired
          library build.  If this is part of an automated configuration
          test and no other errors occur, you may safely ignore it.
          You may use wx-config --list to see all configs available in
          the default prefix.

no
checking for wx-config... (cached) /usr/bin/wx-config
checking for wxWidgets version >= 2.8.0... yes (version 3.0.4)
checking for wxWidgets static library... 
          Warning: No config found to match: /usr/bin/wx-config --static --libs adv,base,core,html,richtext,xml
                   in /usr/lib/x86_64-linux-gnu/wx/config
          If you require this configuration, please install the desired
          library build.  If this is part of an automated configuration
          test and no other errors occur, you may safely ignore it.
          You may use wx-config --list to see all configs available in
          the default prefix.

no
checking for visibility support... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FONTCONFIG... no
configure: error: in `/home/user/apps/wxpdfdoc-main/build-gtk':
configure: error: Required Fontconfig library not detected.
See `config.log' for more details
[email protected]:~/apps/wxpdfdoc-main/build-gtk$ make
make: *** No targets specified and no makefile found.  Stop.


I was using this guide https://github.com/utelle/wxpdfdoc/
I have no idea what flags are done since I installed all wxlibraries with sudo apt install
utelle
Moderator
Moderator
Posts: 1091
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: compiling wxpdfdocument on linux

Post by utelle »

Everydaydiesel wrote: Sat Jan 22, 2022 6:28 pm I am trying to install your library on a newer version of ubuntu and I am having some trouble. I am hoping you can help me. This is the latest errors.

Code: Select all

[email protected]:~/apps/wxpdfdoc-main$ autoreconf
[email protected]:~/apps/wxpdfdoc-main$ mkdir build-gtk
[email protected]:~/apps/wxpdfdoc-main$ cd build-gtk/
[email protected]:~/apps/wxpdfdoc-main/build-gtk$ ../configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for wx-config... /usr/bin/wx-config
checking for wxWidgets version >= 3.0.0... yes (version 3.0.4)
checking for wxWidgets static library... 
          Warning: No config found to match: /usr/bin/wx-config --static --libs base,core,xml
                   in /usr/lib/x86_64-linux-gnu/wx/config
          If you require this configuration, please install the desired
          library build.  If this is part of an automated configuration
          test and no other errors occur, you may safely ignore it.
          You may use wx-config --list to see all configs available in
          the default prefix.

no
checking for wx-config... (cached) /usr/bin/wx-config
checking for wxWidgets version >= 2.8.0... yes (version 3.0.4)
checking for wxWidgets static library... 
          Warning: No config found to match: /usr/bin/wx-config --static --libs adv,base,core,html,richtext,xml
                   in /usr/lib/x86_64-linux-gnu/wx/config
          If you require this configuration, please install the desired
          library build.  If this is part of an automated configuration
          test and no other errors occur, you may safely ignore it.
          You may use wx-config --list to see all configs available in
          the default prefix.

no
checking for visibility support... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FONTCONFIG... no
configure: error: in `/home/user/apps/wxpdfdoc-main/build-gtk':
configure: error: Required Fontconfig library not detected.
See `config.log' for more details
[email protected]:~/apps/wxpdfdoc-main/build-gtk$ make
make: *** No targets specified and no makefile found.  Stop.
Actually, there is only one error: Required Fontconfig library not detected.. On Linux platforms wxPdfDocument uses FontConfig to detect and use installed fonts. According to the error message FontConfig is not installed on your system. So, the solution should be to install the FontConfig package.

Then there are warnings regarding static wx libraries. You can safely ignore those messages, if you don't plan to create statically linked wx applications. You would have to build static wx libraries otherwise.
Everydaydiesel wrote: Sat Jan 22, 2022 6:28 pm I was using this guide https://github.com/utelle/wxpdfdoc/
I have no idea what flags are done since I installed all wxlibraries with sudo apt install
If you installed wx using the default settings, it should not be necessary to add any specific flags when invoking configure.
Everydaydiesel
Earned some good credits
Earned some good credits
Posts: 125
Joined: Wed Oct 28, 2015 9:48 pm

Re: compiling wxpdfdocument on linux

Post by Everydaydiesel »

Hello, I hate to bug you but I seem to be having trouble on a new version of ubuntu. I would really appreicate any help you could give. I dont have FcPatternAddInteger anywhere in my code.

The error is

Code: Select all

/usr/bin/ld: /usr/local/lib/libwxcode_gtk3u_pdfdoc-3.0.a(pdffontmanager.o): undefined reference to symbol 'FcPatternAddInteger'
/usr/bin/ld: /lib/x86_64-linux-gnu//libfontconfig.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))

first i ran autoconf then created the build-gtk dir and cd into it

Code: Select all

../configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for wx-config... /usr/bin/wx-config
checking for wxWidgets version >= 3.0.0... yes (version 3.0.5)
checking for wxWidgets static library... 
          Warning: No config found to match: /usr/bin/wx-config --static --libs base,core,xml
                   in /usr/lib/x86_64-linux-gnu/wx/config
          If you require this configuration, please install the desired
          library build.  If this is part of an automated configuration
          test and no other errors occur, you may safely ignore it.
          You may use wx-config --list to see all configs available in
          the default prefix.

no
checking for wx-config... (cached) /usr/bin/wx-config
checking for wxWidgets version >= 2.8.0... yes (version 3.0.5)
checking for wxWidgets static library... 
          Warning: No config found to match: /usr/bin/wx-config --static --libs adv,base,core,html,richtext,xml
                   in /usr/lib/x86_64-linux-gnu/wx/config
          If you require this configuration, please install the desired
          library build.  If this is part of an automated configuration
          test and no other errors occur, you may safely ignore it.
          You may use wx-config --list to see all configs available in
          the default prefix.

no
checking for visibility support... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FONTCONFIG... yes
checking if wxWidgets was built with UNICODE enabled... yes
checking if wxWidgets was built in DEBUG mode... no
checking if wxWidgets was built in STATIC mode... no
checking which wxWidgets toolkit was selected... gtk3
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating wxpdfdoc.pc
config.status: linking ../samples/pdfdc/smile.jpg to samples/pdfdc/smile.jpg
config.status: linking ../samples/pdfdc/up.gif to samples/pdfdc/up.gif
config.status: linking ../samples/minimal/20k_c1.txt to samples/minimal/20k_c1.txt
config.status: linking ../samples/minimal/20k_c2.txt to samples/minimal/20k_c2.txt
config.status: linking ../samples/minimal/attached.txt to samples/minimal/attached.txt
config.status: linking ../samples/minimal/apple.gif to samples/minimal/apple.gif
config.status: linking ../samples/minimal/chart2d.pdf to samples/minimal/chart2d.pdf
config.status: linking ../samples/minimal/circle.png to samples/minimal/circle.png
config.status: linking ../samples/minimal/clips.jpg to samples/minimal/clips.jpg
config.status: linking ../samples/minimal/countries.txt to samples/minimal/countries.txt
config.status: linking ../samples/minimal/flower.jpg to samples/minimal/flower.jpg
config.status: linking ../samples/minimal/glasses.png to samples/minimal/glasses.png
config.status: linking ../samples/minimal/glyphsample.txt to samples/minimal/glyphsample.txt
config.status: linking ../samples/minimal/image.png to samples/minimal/image.png
config.status: linking ../samples/minimal/image_with_alpha.png to samples/minimal/image_with_alpha.png
config.status: linking ../samples/minimal/linear_gradient_coords.jpg to samples/minimal/linear_gradient_coords.jpg
config.status: linking ../samples/minimal/logo.png to samples/minimal/logo.png
config.status: linking ../samples/minimal/mask.png to samples/minimal/mask.png
config.status: linking ../samples/minimal/pattern1.png to samples/minimal/pattern1.png
config.status: linking ../samples/minimal/pattern2.png to samples/minimal/pattern2.png
config.status: linking ../samples/minimal/radial_gradient_coords.jpg to samples/minimal/radial_gradient_coords.jpg
config.status: linking ../samples/minimal/ringmaster.wmf to samples/minimal/ringmaster.wmf
config.status: linking ../samples/minimal/smile.jpg to samples/minimal/smile.jpg
config.status: linking ../samples/minimal/wxpdfdoc.png to samples/minimal/wxpdfdoc.png
config.status: linking ../samples/minimal/indic-assamese.txt to samples/minimal/indic-assamese.txt
config.status: linking ../samples/minimal/indic-bengali.txt to samples/minimal/indic-bengali.txt
config.status: linking ../samples/minimal/indic-gujarati.txt to samples/minimal/indic-gujarati.txt
config.status: linking ../samples/minimal/indic-hindi.txt to samples/minimal/indic-hindi.txt
config.status: linking ../samples/minimal/indic-kannada.txt to samples/minimal/indic-kannada.txt
config.status: linking ../samples/minimal/indic-malayalam.txt to samples/minimal/indic-malayalam.txt
config.status: linking ../samples/minimal/indic-nepali.txt to samples/minimal/indic-nepali.txt
config.status: linking ../samples/minimal/indic-oriya.txt to samples/minimal/indic-oriya.txt
config.status: linking ../samples/minimal/indic-punjabi.txt to samples/minimal/indic-punjabi.txt
config.status: linking ../samples/minimal/indic-tamil.txt to samples/minimal/indic-tamil.txt
config.status: linking ../samples/minimal/indic-telugu.txt to samples/minimal/indic-telugu.txt
config.status: executing depfiles commands
config.status: executing libtool commands

Code: Select all

$ make
  CXX      samples/minimal/attachment.o
  CXX      samples/minimal/barcodes.o
  CXX      samples/minimal/bookmark.o
  CXX      samples/minimal/charting.o
  CXX      samples/minimal/cjktest.o
  CXX      samples/minimal/clipping.o
  CXX      samples/minimal/drawing.o
  CXX      samples/minimal/glyphwriting.o
  CXX      samples/minimal/gradients.o
  CXX      samples/minimal/indicfonts.o
  CXX      samples/minimal/jsform.o
  CXX      samples/minimal/kerning.o
  CXX      samples/minimal/labels.o
  CXX      samples/minimal/layers.o
  CXX      samples/minimal/minimal.o
  CXX      samples/minimal/protection.o
  CXX      samples/minimal/rotation.o
  CXX      samples/minimal/templates.o
  CXX      samples/minimal/transformation.o
  CXX      samples/minimal/transparency.o
  CXX      samples/minimal/tutorial1.o
  CXX      samples/minimal/tutorial2.o
  CXX      samples/minimal/tutorial3.o
  CXX      samples/minimal/tutorial4.o
  CXX      samples/minimal/tutorial5.o
  CXX      samples/minimal/tutorial6.o
  CXX      samples/minimal/tutorial7.o
  CXX      samples/minimal/wmf.o
  CXX      samples/minimal/xmlwrite.o
  CXX      src/pdfannotation.lo
  CXX      src/pdfbarcode.lo
  CXX      src/pdfcffdecoder.lo
  CXX      src/pdfcffindex.lo
  CXX      src/pdfcolour.lo
  CXX      src/pdfdc.lo
  CXX      src/pdfdecode.lo
  CXX      src/pdfdocument.lo
  CXX      src/pdfencoding.lo
  CXX      src/pdfencrypt.lo
  CXX      src/pdffont.lo
  CXX      src/pdffontdata.lo
  CXX      src/pdffontdatacore.lo
  CXX      src/pdffontdataopentype.lo
  CXX      src/pdffontdatatruetype.lo
  CXX      src/pdffontdatatype0.lo
  CXX      src/pdffontdatatype1.lo
  CXX      src/pdffontdescription.lo
  CXX      src/pdffontdetails.lo
  CXX      src/pdffontextended.lo
  CXX      src/pdffontmanager.lo
  CXX      src/pdffontparser.lo
  CXX      src/pdffontparsertruetype.lo
  CXX      src/pdffontparsertype1.lo
  CXX      src/pdffontsubsetcff.lo
  CXX      src/pdffontsubsettruetype.lo
  CXX      src/pdffontvolt.lo
  CXX      src/pdfform.lo
  CXX      src/pdfgradient.lo
  CXX      src/pdfgraphics.lo
  CXX      src/pdfimage.lo
  CXX      src/pdfkernel.lo
  CXX      src/pdflayer.lo
  CXX      src/pdfobjects.lo
  CXX      src/pdfocg.lo
  CXX      src/pdfparser.lo
  CXX      src/pdfpattern.lo
  CXX      src/pdfprint.lo
  CXX      src/pdfrijndael.lo
  CXX      src/pdftemplate.lo
  CXX      src/pdfutility.lo
  CXX      src/pdfxml.lo
  CXXLD    libwxcode_gtk3u_pdfdoc-3.0.la
ar: `u' modifier ignored since `D' is the default (see `U')
  CXXLD    samples/minimal/minimal
  CXX      samples/pdfdc/printing.o
  CXXLD    samples/pdfdc/pdfdc
  CXX      makefont/makefont.o
  CXXLD    makefont/makefont
  CXX      showfont/showfont.o
  CXXLD    showfont/showfont

Code: Select all

$ sudo make install
make[1]: Entering directory '/home/user/apps/wxpdfdoc-main/build-gtk'
 /usr/bin/mkdir -p '/usr/local/lib'
 /bin/bash ./libtool   --mode=install /usr/bin/install -c   libwxcode_gtk3u_pdfdoc-3.0.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libwxcode_gtk3u_pdfdoc-3.0.so.0.0.0 /usr/local/lib/libwxcode_gtk3u_pdfdoc-3.0.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libwxcode_gtk3u_pdfdoc-3.0.so.0.0.0 libwxcode_gtk3u_pdfdoc-3.0.so.0 || { rm -f libwxcode_gtk3u_pdfdoc-3.0.so.0 && ln -s libwxcode_gtk3u_pdfdoc-3.0.so.0.0.0 libwxcode_gtk3u_pdfdoc-3.0.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libwxcode_gtk3u_pdfdoc-3.0.so.0.0.0 libwxcode_gtk3u_pdfdoc-3.0.so || { rm -f libwxcode_gtk3u_pdfdoc-3.0.so && ln -s libwxcode_gtk3u_pdfdoc-3.0.so.0.0.0 libwxcode_gtk3u_pdfdoc-3.0.so; }; })
libtool: install: /usr/bin/install -c .libs/libwxcode_gtk3u_pdfdoc-3.0.lai /usr/local/lib/libwxcode_gtk3u_pdfdoc-3.0.la
libtool: install: /usr/bin/install -c .libs/libwxcode_gtk3u_pdfdoc-3.0.a /usr/local/lib/libwxcode_gtk3u_pdfdoc-3.0.a
libtool: install: chmod 644 /usr/local/lib/libwxcode_gtk3u_pdfdoc-3.0.a
libtool: install: ranlib /usr/local/lib/libwxcode_gtk3u_pdfdoc-3.0.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /usr/bin/mkdir -p '/usr/local/include/wx'
 /usr/bin/install -c -m 644 ../include/wx/pdfannotation.h ../include/wx/pdfarraydouble.h ../include/wx/pdfarraytypes.h ../include/wx/pdfbarcode.h ../include/wx/pdfbookmark.h ../include/wx/pdfcffdecoder.h ../include/wx/pdfcffindex.h ../include/wx/pdfcjkfontdata.h ../include/wx/pdfcolour.h ../include/wx/pdfcoonspatchmesh.h ../include/wx/pdfcorefontdata.h ../include/wx/pdfdc.h ../include/wx/pdfdoc.h ../include/wx/pdfdoc_version.h ../include/wx/pdfdocdef.h ../include/wx/pdfdocument.h ../include/wx/pdfencoding.h ../include/wx/pdfencrypt.h ../include/wx/pdffont.h ../include/wx/pdffontdata.h ../include/wx/pdffontdatacore.h ../include/wx/pdffontdataopentype.h ../include/wx/pdffontdatatruetype.h ../include/wx/pdffontdatatype0.h ../include/wx/pdffontdatatype1.h ../include/wx/pdffontdescription.h ../include/wx/pdffontdetails.h ../include/wx/pdffontextended.h ../include/wx/pdffontmacosx.h ../include/wx/pdffontmanager.h ../include/wx/pdffontparser.h ../include/wx/pdffontparsertruetype.h ../include/wx/pdffontparsertype1.h ../include/wx/pdffontsubsetcff.h ../include/wx/pdffontsubsettruetype.h ../include/wx/pdffontvolt.h ../include/wx/pdfform.h ../include/wx/pdfgradient.h ../include/wx/pdfgraphics.h ../include/wx/pdfimage.h '/usr/local/include/wx'
 /usr/bin/install -c -m 644 ../include/wx/pdfinfo.h ../include/wx/pdflayer.h ../include/wx/pdflinestyle.h ../include/wx/pdflinks.h ../include/wx/pdfobjects.h ../include/wx/pdfparser.h ../include/wx/pdfpattern.h ../include/wx/pdfprint.h ../include/wx/pdfproperties.h ../include/wx/pdfrijndael.h ../include/wx/pdfshape.h ../include/wx/pdfspotcolour.h ../include/wx/pdftemplate.h ../include/wx/pdfutility.h ../include/wx/pdfxml.h '/usr/local/include/wx'
 /usr/bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 wxpdfdoc.pc '/usr/local/lib/pkgconfig'
make[1]: Leaving directory '/home/user/apps/wxpdfdoc-main/build-gtk'
utelle
Moderator
Moderator
Posts: 1091
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: compiling wxpdfdocument on linux

Post by utelle »

Everydaydiesel wrote: Sun Sep 18, 2022 12:03 am Hello, I hate to bug you but I seem to be having trouble on a new version of ubuntu. I would really appreicate any help you could give. I dont have FcPatternAddInteger anywhere in my code.
The class wxPdfFontManager (implemented in pdffontmanager.cpp) uses the fontconfig library under Linux to handle installed fonts. Among the used functions is FcPatternAddInteger, but also several other fontconfig functions. Looking at the output of configure, it was properly detected that fontconfig is installed on your system. Otherwise already the compiler would have emitted error messages.
Everydaydiesel wrote: Sun Sep 18, 2022 12:03 am The error is

Code: Select all

/usr/bin/ld: /usr/local/lib/libwxcode_gtk3u_pdfdoc-3.0.a(pdffontmanager.o): undefined reference to symbol 'FcPatternAddInteger'
/usr/bin/ld: /lib/x86_64-linux-gnu//libfontconfig.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
However, it is a bit strange that the linker complains only about missing function FcPatternAddInteger, and not about other missing fontconfig functions.

Unfortunately, I have absolutely no idea why you are experiencing this error. Please check which version of fontconfig is installed on your system and whether it actually contains the function entry point FcPatternAddInteger.
utelle
Moderator
Moderator
Posts: 1091
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: compiling wxpdfdocument on linux

Post by utelle »

Everydaydiesel wrote: Sun Sep 18, 2022 12:03 am The error is

Code: Select all

/usr/bin/ld: /usr/local/lib/libwxcode_gtk3u_pdfdoc-3.0.a(pdffontmanager.o): undefined reference to symbol 'FcPatternAddInteger'
/usr/bin/ld: /lib/x86_64-linux-gnu//libfontconfig.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
I assume this error message does not occur on building wxPdfDocument (since the library and the samples were built successfully according to the log you showed), but on compiling and linking your own project. If you link against libwxcode_gtk3u_pdfdoc-3.0.la (as I already wrote in viewtopic.php?p=183768#p183768) you should not get such an error.
Post Reply