Bug 282079 - Okular compiled from sources can't open PDF files
Summary: Okular compiled from sources can't open PDF files
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 0.13
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-15 12:12 UTC by Carlos Alvarado Martínez
Modified: 2011-09-16 02:25 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alvarado Martínez 2011-09-15 12:12:36 UTC
Version:           0.13 (using KDE 4.7.1) 
OS:                Linux

Okular compiled from sources can't open PDF files

The list of all optional packages installed have been found, but Okular can't open a PDF files, in particular, I compiled from sources poppler-qt and, I recompiled, erasing first the directory build, and the directory of the sources (I have the tar.bz2 files) but Okular can't open any PDF file, in tried with .dvi file, and in this case Okular works without problem

I downloaded the sources of KDE 4.7.1 and KDE was compiled with the QT libs 4.8.0 compiled from sources

Poppler version is 0.16.7

In fact, pdf backend of Okular isnt compiled, i don't know why

Reproducible: Always

Steps to Reproduce:
Compile Okular

Try to open a PDF file


Expected Results:  
Only wish to open PDF files with Okular, any help with pdf backend

OS: Linux (x86_64) release 2.6.40.4-5.fc15.x86_64 Fedora core 15
Compiler: gcc
Comment 1 Carlos Alvarado Martínez 2011-09-15 12:49:52 UTC
CMakeLists.txt of the sources of Okular have this:

if(POPPLER_FOUND AND HAVE_POPPLER_0_8)
  add_subdirectory(poppler)
endif(POPPLER_FOUND AND HAVE_POPPLER_0_8)

if I erase "AND HAVE_POPPLER_0_8":

if(POPPLER_FOUND)
  add_subdirectory(poppler)
endif(POPPLER_FOUND)

and try to compile, this is occur:

[ 53%] Building CXX object generators/poppler/CMakeFiles/okularGenerator_poppler.dir/generator_pdf.o
In file included from /opt/KDE/src/okular-4.7.1/generators/poppler/generator_pdf.cpp:46:0:                                                                   
/opt/KDE/build/okular-4.7.1/generators/poppler/config-okular-poppler.h:11:1: error: 'cmakedefine' does not name a type
In file included from /opt/KDE/src/okular-4.7.1/generators/poppler/formfields.h:13:0,
                 from /opt/KDE/src/okular-4.7.1/generators/poppler/generator_pdf.cpp:48:
/usr/include/poppler/qt4/poppler-form.h:133:39: error: '::Page' has not been declared
/usr/include/poppler/qt4/poppler-form.h:189:37: error: '::Page' has not been declared
/usr/include/poppler/qt4/poppler-form.h:261:39: error: '::Page' has not been declared
/opt/KDE/src/okular-4.7.1/generators/poppler/generator_pdf.cpp: In function 'Okular::Action* createLinkFromPopplerLink(const Poppler::Link*)':
/opt/KDE/src/okular-4.7.1/generators/poppler/generator_pdf.cpp:171:8: warning: enumeration value 'JavaScript' not handled in switch [-Wswitch]
/opt/KDE/src/okular-4.7.1/generators/poppler/generator_pdf.cpp: In member function 'virtual const Okular::DocumentInfo* PDFGenerator::generateDocumentInfo()':
/opt/KDE/src/okular-4.7.1/generators/poppler/generator_pdf.cpp:577:62: warning: 'double Poppler::Document::pdfVersion() const' is deprecated (declared at /usr/include/poppler/qt4/poppler-qt4.h:1072) [-Wdeprecated-declarations]
/opt/KDE/src/okular-4.7.1/generators/poppler/generator_pdf.cpp: In member function 'virtual Okular::FontInfo::List PDFGenerator::fontsForPage(int)':
/opt/KDE/src/okular-4.7.1/generators/poppler/generator_pdf.cpp:702:37: warning: 'bool Poppler::Document::scanForFonts(int, QList<Poppler::FontInfo>*) const' is deprecated (declared at /usr/include/poppler/qt4/poppler-qt4.h:1118) [-Wdeprecated-declarations]
/opt/KDE/src/okular-4.7.1/generators/poppler/generator_pdf.cpp: At global scope:
/opt/KDE/src/okular-4.7.1/generators/poppler/generator_pdf.cpp:1670:6: warning: unused parameter 'errorText' [-Wunused-parameter]
[ 54%] Building CXX object generators/poppler/CMakeFiles/okularGenerator_poppler.dir/formfields.o
In file included from /opt/KDE/src/okular-4.7.1/generators/poppler/formfields.cpp:16:0:                                                                      
/opt/KDE/build/okular-4.7.1/generators/poppler/config-okular-poppler.h:11:1: error: 'cmakedefine' does not name a type
[ 54%] Building CXX object generators/poppler/CMakeFiles/okularGenerator_poppler.dir/annots.o
In file included from /opt/KDE/src/okular-4.7.1/generators/poppler/annots.cpp:18:0:                                                                          
/opt/KDE/build/okular-4.7.1/generators/poppler/config-okular-poppler.h:11:1: error: 'cmakedefine' does not name a type
In file included from /usr/local/Trolltech/Qt-4.8.0/include/QtCore/qvariant.h:48:0,
                 from /opt/KDE/src/okular-4.7.1/generators/poppler/annots.cpp:13:
/usr/local/Trolltech/Qt-4.8.0/include/QtCore/qmetatype.h: In static member function 'static int QMetaTypeId2<T>::qt_metatype_id() [with T = Poppler::Annotation*]':
/usr/local/Trolltech/Qt-4.8.0/include/QtCore/qmetatype.h:230:44:   instantiated from 'int qMetaTypeId(T*) [with T = Poppler::Annotation*]'
/usr/local/Trolltech/Qt-4.8.0/include/QtCore/qvariant.h:573:55:   instantiated from 'T qvariant_cast(const QVariant&) [with T = Poppler::Annotation*]'
/opt/KDE/src/okular-4.7.1/generators/poppler/annots.cpp:29:95:   instantiated from here
/usr/local/Trolltech/Qt-4.8.0/include/QtCore/qmetatype.h:169:80: error: 'qt_metatype_id' is not a member of 'QMetaTypeId<Poppler::Annotation*>'
Comment 2 Albert Astals Cid 2011-09-15 23:36:36 UTC
Okular works perfectly with Poppler 0.16.7 since it is the one i use. I would recommend cleaning the Okular build dir, but you say you already did so, so the only thing i can say is, come over the #okular channel in freenode IRC network and we will give you a hand online to try to see what is failing.
Comment 3 Carlos Alvarado Martínez 2011-09-16 02:25:00 UTC
(In reply to comment #2)
> Okular works perfectly with Poppler 0.16.7 since it is the one i use. I would
> recommend cleaning the Okular build dir, but you say you already did so, so the
> only thing i can say is, come over the #okular channel in freenode IRC network
> and we will give you a hand online to try to see what is failing.

Ok, I compile poppler with other method:

as root

cd popplerxx

mkdir build

cd build

cmake -D CMAKE_INSTALL_PREFIX=/usr ..

make 

make install

Only installing in /usr dir poppler has no more problems

thanks for all!!