Re: [poppler] Unable to build Poppler 0.63.0 with Openjpeg2
Thanks Suzuki, William. I ended up just moving the .a file into a location where pkg could pick it up. Kind regards, Simon Lee Shugar -- [image: Veeva Systems - Zinc Team] *Simon Shugar* Software Engineer *Veeva Systems * simon.shu...@veeva.com www.veeva.com *This email and the information it contains are intended for the intended recipient only, are confidential and may be privileged information exempt from disclosure by law.* *If you have received this email in error, please notify us immediately by reply email and delete this message from your computer.* *Please do not retain, copy or distribute this email.* On Fri, Apr 6, 2018 at 5:27 PM, suzuki toshiya wrote: > Dear Simon, > > > I've already installed all dependencies and using pkg-config as my > dependency management tool. > > Cleary your cmake could not spot the location of libopenjp2. > If you execute "pkg-config --libs libopenjp2", what you receive? > > I think the situation would be same with your last post about freetype, > > >set(FREETYPE_LIBRARIES "/usr/local/lib/libfreetype.a") > >set(poppler_LIBS ${poppler_LIBS} ${FREETYPE_LIBRARIES}) > > There is a variable LIBOPENJPEG2_LIBRARIES. > > >http://www.linuxfromscratch.org/blfs/view/svn/general/poppler.html > > I've already installed all dependencies and using pkg-config as my > dependency management tool. > > In my understanding, this website is assuming that everything is installed > into > /usr (and installed things would be merged into the host system), > so the result would be different from your case that you install > everything into > /usr/local to avoid the mixture. > please do not ask "why I do like this but the result is different?", you > did > unlikely that :-), > > Regards, > mpsuzuki > > Simon Shugar wrote: > > Dear all, > > > > I am trying to build Poppler 0.63.0 statically with openjpeg2. I run > into the error below when using CMake. Has anyone seen this issue and able > to point me in the right direction? > > > > As on previous requests. I am roughly following instructions from > http://www.linuxfromscratch.org/blfs/view/svn/general/poppler.html I'm > building everything statically as our we are using an old OS. > > > > I've already installed all dependencies and using pkg-config as my > dependency management tool. > > > > Command > > cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON > -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr/ -DENABLE_QT5=OFF > -DENABLE_LIBOPENJPEG=openjpeg2 .. && make > > > > > > Output > > Scanning dependencies of target pdftoppm > > make[2]: Leaving directory `/root/Poppler_Update/poppler-0.63.0/build' > > make -f utils/CMakeFiles/pdftoppm.dir/build.make > utils/CMakeFiles/pdftoppm.dir/build > > make[2]: Entering directory `/root/Poppler_Update/poppler-0.63.0/build' > > [ 61%] Building CXX object utils/CMakeFiles/pdftoppm.dir/parseargs.cc.o > > cd /root/Poppler_Update/poppler-0.63.0/build/utils && /usr/bin/c++ > -DUSE_OPENJPEG2 -I/root/Poppler_Update/poppler-0.63.0 > -I/root/Poppler_Update/poppler-0.63.0/fofi > -I/root/Poppler_Update/poppler-0.63.0/goo > -I/root/Poppler_Update/poppler-0.63.0/poppler > -I/root/Poppler_Update/poppler-0.63.0/build > -I/root/Poppler_Update/poppler-0.63.0/build/poppler -I/usr/local/include > -I/usr/local/include/freetype2 -I/usr/local/include/openjpeg-2.3 -Wall > -Wextra -Wpedantic -Wno-unused-parameter -Wcast-align -Wformat-security > -Wframe-larger-than=65536 -Wlogical-op -Wmissing-format-attribute > -Wnon-virtual-dtor -Woverloaded-virtual -Wmissing-declarations -Wundef > -Wzero-as-null-pointer-constant -fno-exceptions -fno-check-new > -fno-common -D_DEFAULT_SOURCE -O2 -DNDEBUG-std=c++11 -o > CMakeFiles/pdftoppm.dir/parseargs.cc.o -c /root/Poppler_Update/poppler- > 0.63.0/utils/parseargs.cc > > [ 61%] Building CXX object utils/CMakeFiles/pdftoppm.dir/ > Win32Console.cc.o > > cd /root/Poppler_Update/poppler-0.63.0/build/utils && /usr/bin/c++ > -DUSE_OPENJPEG2 -I/root/Poppler_Update/poppler-0.63.0 > -I/root/Poppler_Update/poppler-0.63.0/fofi > -I/root/Poppler_Update/poppler-0.63.0/goo > -I/root/Poppler_Update/poppler-0.63.0/poppler > -I/root/Poppler_Update/poppler-0.63.0/build > -I/root/Poppler_Update/poppler-0.63.0/build/poppler -I/usr/local/include > -I/usr/local/include/freetype2 -I/usr/local/include/openjpeg-2.3 -Wall > -Wextra -Wpedantic -Wno-unused-parameter -Wcast-align -Wformat-security > -Wframe-larger-than=65536 -Wlogical-op -Wmissing-format-attribute > -Wnon-virtual-dtor -Woverloaded-virtual -Wmissing-declarations -Wundef > -Wzero-as-null-pointer-constant -fno-exceptions -fno-check-new > -fno-common -D_DEFAULT_SOURCE -O2 -DNDEBUG-std=c++11 -o > CMakeFiles/pdftoppm.dir/Win32Console.cc.o -c /root/Poppler_Update/poppler- > 0.63.0/utils/Win32Console.cc > > [ 62%] Building CXX object utils/CMakeFiles/pdftoppm.dir/pdftoppm.cc.o > > cd /root/Poppler_Update/poppler-0.63.0/build/utils && /usr/bin/c++ > -DUSE_OPENJPEG2 -I/root/Poppler_Update/poppler-0.63.0 > -I/root/Poppler_Up
Re: [poppler] Unable to build Poppler 0.63.0 with Openjpeg2
The compile warnings might be from an old compiler. >/root/Poppler_Update/poppler-0.63.0/utils/pdftoppm.cc:213:1: warning: missing >initializer for member ‘ArgDesc::kind’ [-Wmissing-field-initializers] >/root/Poppler_Update/poppler-0.63.0/utils/pdftoppm.cc:213:1: warning: missing >initializer for member ‘ArgDesc::val’ [-Wmissing-field-initializers] You can get a view of the code at https://cgit.freedesktop.org/poppler/poppler/tree/utils/pdftoppm.cc?h=poppler-0.63.0#n200 In the initialization for ArgDesc argDesc[], the final item on line 212 is {}, which I suppose should make an item that is all null or 0. Older versions of poppler had {NULL} instead. You could try that. findArg() in utils/parseargs.cc uses an item with a null argument pointer (the first field) as a marker for the end of the list. >/usr/bin/ld: cannot find -lopenjp2 That is likely from not having libopenjp2.a in the right place, or if you want it to use libopenjpeg2.a, you might need to grep for libopenjp2 to see what code is adding it. At worst, as a last resort, if it is a one-time build and you do not want -lopenjp2, you could edit the makefiles. Regards, William From: poppler on behalf of Simon Shugar Sent: Friday, April 6, 2018 6:51 PM To: poppler@lists.freedesktop.org Subject: [poppler] Unable to build Poppler 0.63.0 with Openjpeg2 Dear all, I am trying to build Poppler 0.63.0 statically with openjpeg2. I run into the error below when using CMake. Has anyone seen this issue and able to point me in the right direction? As on previous requests. I am roughly following instructions from http://www.linuxfromscratch.org/blfs/view/svn/general/poppler.html I'm building everything statically as our we are using an old OS. I've already installed all dependencies and using pkg-config as my dependency management tool. Command cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr/ -DENABLE_QT5=OFF -DENABLE_LIBOPENJPEG=openjpeg2 .. && make Output Scanning dependencies of target pdftoppm make[2]: Leaving directory `/root/Poppler_Update/poppler-0.63.0/build' make -f utils/CMakeFiles/pdftoppm.dir/build.make utils/CMakeFiles/pdftoppm.dir/build make[2]: Entering directory `/root/Poppler_Update/poppler-0.63.0/build' [ 61%] Building CXX object utils/CMakeFiles/pdftoppm.dir/parseargs.cc.o cd /root/Poppler_Update/poppler-0.63.0/build/utils && /usr/bin/c++ -DUSE_OPENJPEG2 -I/root/Poppler_Update/poppler-0.63.0 -I/root/Poppler_Update/poppler-0.63.0/fofi -I/root/Poppler_Update/poppler-0.63.0/goo -I/root/Poppler_Update/poppler-0.63.0/poppler -I/root/Poppler_Update/poppler-0.63.0/build -I/root/Poppler_Update/poppler-0.63.0/build/poppler -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include/openjpeg-2.3 -Wall -Wextra -Wpedantic -Wno-unused-parameter -Wcast-align -Wformat-security -Wframe-larger-than=65536 -Wlogical-op -Wmissing-format-attribute -Wnon-virtual-dtor -Woverloaded-virtual -Wmissing-declarations -Wundef -Wzero-as-null-pointer-constant -fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE -O2 -DNDEBUG-std=c++11 -o CMakeFiles/pdftoppm.dir/parseargs.cc.o -c /root/Poppler_Update/poppler-0.63.0/utils/parseargs.cc [ 61%] Building CXX object utils/CMakeFiles/pdftoppm.dir/Win32Console.cc.o cd /root/Poppler_Update/poppler-0.63.0/build/utils && /usr/bin/c++ -DUSE_OPENJPEG2 -I/root/Poppler_Update/poppler-0.63.0 -I/root/Poppler_Update/poppler-0.63.0/fofi -I/root/Poppler_Update/poppler-0.63.0/goo -I/root/Poppler_Update/poppler-0.63.0/poppler -I/root/Poppler_Update/poppler-0.63.0/build -I/root/Poppler_Update/poppler-0.63.0/build/poppler -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include/openjpeg-2.3 -Wall -Wextra -Wpedantic -Wno-unused-parameter -Wcast-align -Wformat-security -Wframe-larger-than=65536 -Wlogical-op -Wmissing-format-attribute -Wnon-virtual-dtor -Woverloaded-virtual -Wmissing-declarations -Wundef -Wzero-as-null-pointer-constant -fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE -O2 -DNDEBUG-std=c++11 -o CMakeFiles/pdftoppm.dir/Win32Console.cc.o -c /root/Poppler_Update/poppler-0.63.0/utils/Win32Console.cc [ 62%] Building CXX object utils/CMakeFiles/pdftoppm.dir/pdftoppm.cc.o cd /root/Poppler_Update/poppler-0.63.0/build/utils && /usr/bin/c++ -DUSE_OPENJPEG2 -I/root/Poppler_Update/poppler-0.63.0 -I/root/Poppler_Update/poppler-0.63.0/fofi -I/root/Poppler_Update/poppler-0.63.0/goo -I/root/Poppler_Update/poppler-0.63.0/poppler -I/root/Poppler_Update/poppler-0.63.0/build -I/root/Poppler_Update/poppler-0.63.0/build/poppler -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include/openjpeg-2.3 -Wall -Wextra -Wpedantic -Wno-unused-parameter -Wcast-align -Wformat-security -Wframe-larger-than=65536 -Wlogical-op -Wmissing-format-attribute -Wnon-virtual-dtor -Woverloaded-virtual -Wmissing-declarations -Wundef -Wz
Re: [poppler] Unable to build Poppler 0.63.0 with Openjpeg2
Dear Simon, > I've already installed all dependencies and using pkg-config as my dependency > management tool. Cleary your cmake could not spot the location of libopenjp2. If you execute "pkg-config --libs libopenjp2", what you receive? I think the situation would be same with your last post about freetype, >set(FREETYPE_LIBRARIES "/usr/local/lib/libfreetype.a") >set(poppler_LIBS ${poppler_LIBS} ${FREETYPE_LIBRARIES}) There is a variable LIBOPENJPEG2_LIBRARIES. >http://www.linuxfromscratch.org/blfs/view/svn/general/poppler.html > I've already installed all dependencies and using pkg-config as my dependency > management tool. In my understanding, this website is assuming that everything is installed into /usr (and installed things would be merged into the host system), so the result would be different from your case that you install everything into /usr/local to avoid the mixture. please do not ask "why I do like this but the result is different?", you did unlikely that :-), Regards, mpsuzuki Simon Shugar wrote: > Dear all, > > I am trying to build Poppler 0.63.0 statically with openjpeg2. I run into the > error below when using CMake. Has anyone seen this issue and able to point me > in the right direction? > > As on previous requests. I am roughly following instructions from > http://www.linuxfromscratch.org/blfs/view/svn/general/poppler.html I'm > building everything statically as our we are using an old OS. > > I've already installed all dependencies and using pkg-config as my dependency > management tool. > > Command > cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON > -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr/ -DENABLE_QT5=OFF > -DENABLE_LIBOPENJPEG=openjpeg2 .. && make > > > Output > Scanning dependencies of target pdftoppm > make[2]: Leaving directory `/root/Poppler_Update/poppler-0.63.0/build' > make -f utils/CMakeFiles/pdftoppm.dir/build.make > utils/CMakeFiles/pdftoppm.dir/build > make[2]: Entering directory `/root/Poppler_Update/poppler-0.63.0/build' > [ 61%] Building CXX object utils/CMakeFiles/pdftoppm.dir/parseargs.cc.o > cd /root/Poppler_Update/poppler-0.63.0/build/utils && /usr/bin/c++ > -DUSE_OPENJPEG2 -I/root/Poppler_Update/poppler-0.63.0 > -I/root/Poppler_Update/poppler-0.63.0/fofi > -I/root/Poppler_Update/poppler-0.63.0/goo > -I/root/Poppler_Update/poppler-0.63.0/poppler > -I/root/Poppler_Update/poppler-0.63.0/build > -I/root/Poppler_Update/poppler-0.63.0/build/poppler -I/usr/local/include > -I/usr/local/include/freetype2 -I/usr/local/include/openjpeg-2.3 -Wall > -Wextra -Wpedantic -Wno-unused-parameter -Wcast-align -Wformat-security > -Wframe-larger-than=65536 -Wlogical-op -Wmissing-format-attribute > -Wnon-virtual-dtor -Woverloaded-virtual -Wmissing-declarations -Wundef > -Wzero-as-null-pointer-constant -fno-exceptions -fno-check-new -fno-common > -D_DEFAULT_SOURCE -O2 -DNDEBUG-std=c++11 -o > CMakeFiles/pdftoppm.dir/parseargs.cc.o -c > /root/Poppler_Update/poppler-0.63.0/utils/parseargs.cc > [ 61%] Building CXX object utils/CMakeFiles/pdftoppm.dir/Win32Console.cc.o > cd /root/Poppler_Update/poppler-0.63.0/build/utils && /usr/bin/c++ > -DUSE_OPENJPEG2 -I/root/Poppler_Update/poppler-0.63.0 > -I/root/Poppler_Update/poppler-0.63.0/fofi > -I/root/Poppler_Update/poppler-0.63.0/goo > -I/root/Poppler_Update/poppler-0.63.0/poppler > -I/root/Poppler_Update/poppler-0.63.0/build > -I/root/Poppler_Update/poppler-0.63.0/build/poppler -I/usr/local/include > -I/usr/local/include/freetype2 -I/usr/local/include/openjpeg-2.3 -Wall > -Wextra -Wpedantic -Wno-unused-parameter -Wcast-align -Wformat-security > -Wframe-larger-than=65536 -Wlogical-op -Wmissing-format-attribute > -Wnon-virtual-dtor -Woverloaded-virtual -Wmissing-declarations -Wundef > -Wzero-as-null-pointer-constant -fno-exceptions -fno-check-new -fno-common > -D_DEFAULT_SOURCE -O2 -DNDEBUG-std=c++11 -o > CMakeFiles/pdftoppm.dir/Win32Console.cc.o -c > /root/Poppler_Update/poppler-0.63.0/utils/Win32Console.cc > [ 62%] Building CXX object utils/CMakeFiles/pdftoppm.dir/pdftoppm.cc.o > cd /root/Poppler_Update/poppler-0.63.0/build/utils && /usr/bin/c++ > -DUSE_OPENJPEG2 -I/root/Poppler_Update/poppler-0.63.0 > -I/root/Poppler_Update/poppler-0.63.0/fofi > -I/root/Poppler_Update/poppler-0.63.0/goo > -I/root/Poppler_Update/poppler-0.63.0/poppler > -I/root/Poppler_Update/poppler-0.63.0/build > -I/root/Poppler_Update/poppler-0.63.0/build/poppler -I/usr/local/include > -I/usr/local/include/freetype2 -I/usr/local/include/openjpeg-2.3 -Wall > -Wextra -Wpedantic -Wno-unused-parameter -Wcast-align -Wformat-security > -Wframe-larger-than=65536 -Wlogical-op -Wmissing-format-attribute > -Wnon-virtual-dtor -Woverloaded-virtual -Wmissing-declarations -Wundef > -Wzero-as-null-pointer-constant -fno-exceptions -fno-check-new -fno-common > -D_DEFAULT_SOURCE -O2 -DNDEBUG-std=c++11 -o > CMakeFiles/pdftoppm.dir/pdftoppm.cc.o -c > /root/Poppler_Update/poppler-0