LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-14-2015, 02:07 PM   #1
jjscott
Member
 
Registered: Dec 2012
Posts: 33

Rep: Reputation: Disabled
Help compiling source code


I am a newbie when it comes to compiling code, so please bear with me.

I am trying to compile code I found on github for an Okular PDF plugin to be used in Firefox.
This is for CentOS 6.6.
Here is the url for the source code...https://github.com/afrimberger/okularplugin

I had to install cmake & kdelibs-devel in order to get past some fatal errors with cmake. After doing so, cmake completed, but with some warnings. I then ran make and it failed. The output from cmake and make is listed below.

Can anyone help me with this?

Thanks

cmake ..
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt-Version 4.6.2 (using /usr/bin/qmake-qt4)
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so;/usr/lib64/libXft.so;/usr/lib64/libXau.so;/usr/lib64/libXdmcp.so;/usr/lib64/libXpm.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so;/usr/lib64/libXft.so;/usr/lib64/libXau.so;/usr/lib64/libXdmcp.so;/usr/lib64/libXpm.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Automoc4: /usr/bin/automoc4
-- Found Perl: /usr/bin/perl (found version "5.10.1")
CMake Warning (dev) at /usr/share/cmake/Modules/CheckCXXCompilerFlag.cmake:28 (include):
File /usr/share/cmake/Modules/CheckCXXCompilerFlag.cmake includes
/usr/share/kde4/apps/cmake/modules/CheckCXXSourceCompiles.cmake (found via
CMAKE_MODULE_PATH) which shadows
/usr/share/cmake/Modules/CheckCXXSourceCompiles.cmake. This may cause
errors later on .

Policy CMP0017 is not set: Prefer files from the CMake module directory
when including from there. Run "cmake --help-policy CMP0017" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Call Stack (most recent call first):
/usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake:352 (include)
/usr/share/cmake/Modules/FindKDE4.cmake:95 (find_package)
CMakeLists.txt:3 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake:436 (include):
A logical block opening on the line

/usr/share/kde4/apps/cmake/modules/KDELibsDependencies.cmake:3 (if)

closes on the line

/usr/share/kde4/apps/cmake/modules/KDELibsDependencies.cmake:5 (endif)

with mis-matching arguments.
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindKDE4.cmake:95 (find_package)
CMakeLists.txt:3 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Phonon Version: 4.3.1
-- Found Phonon: /usr/lib64/libphonon.so
-- Found Phonon Includes: /usr/include/KDE;/usr/include
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_FPIE_SUPPORT
-- Performing Test HAVE_FPIE_SUPPORT - Success
-- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL
-- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL - Success
-- Performing Test __KDE_HAVE_GCC_VISIBILITY
-- Performing Test __KDE_HAVE_GCC_VISIBILITY - Success
-- Found KDE 4.3 include dir: /usr/include/kde4
-- Found KDE 4.3 library dir: /usr/lib64/kde4/devel
-- Found the KDE4 kconfig_compiler4 preprocessor: /usr/bin/kconfig_compiler4
-- Found automoc4: /usr/bin/automoc4
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/dvinst/okularplugin/build



[xstore@TRC0111R01 build]$ make
Scanning dependencies of target okularplugin_automoc
Generating partwin.moc
Generating moc_progresswidget.cpp
[ 0] Built target okularplugin_automoc
[ 16%] Generating ui_progresswidget.h
Scanning dependencies of target okularplugin
[ 33%] Building CXX object CMakeFiles/okularplugin.dir/okularplugin_automoc.o
[ 50%] Building CXX object CMakeFiles/okularplugin.dir/partwin.o
/opt/dvinst/okularplugin/partwin.cpp: In constructor PartWin::PartWin(QWidget*):
/opt/dvinst/okularplugin/partwin.cpp:73: error: class KParts::ReadOnlyPart has no member named replaceXMLFile
/opt/dvinst/okularplugin/partwin.cpp: At global scope:
/opt/dvinst/okularplugin/partwin.cpp:37: warning: unused parameter parent
make[2]: *** [CMakeFiles/okularplugin.dir/partwin.o] Error 1
make[1]: *** [CMakeFiles/okularplugin.dir/all] Error 2
make: *** [all] Error 2

Last edited by jjscott; 06-14-2015 at 02:09 PM.
 
Old 06-14-2015, 05:06 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,659

Rep: Reputation: 8146Reputation: 8146Reputation: 8146Reputation: 8146Reputation: 8146Reputation: 8146Reputation: 8146Reputation: 8146Reputation: 8146Reputation: 8146Reputation: 8146
Quote:
Originally Posted by jjscott View Post
I am a newbie when it comes to compiling code, so please bear with me.

I am trying to compile code I found on github for an Okular PDF plugin to be used in Firefox. This is for CentOS 6.6. Here is the url for the source code...https://github.com/afrimberger/okularplugin

I had to install cmake & kdelibs-devel in order to get past some fatal errors with cmake. After doing so, cmake completed, but with some warnings. I then ran make and it failed. The output from cmake and make is listed below. Can anyone help me with this?
Yes...don't install Okular from source. Their website even recommends to install it from packages and/or repositories:
https://okular.kde.org/download.php
Quote:
Originally Posted by Okular Website
The recommended way for end-user installations of Okular is using binary packages
You should be able to type in "yum install kdegraphics", and have it install, if you're using CentOS 6.6. Otherwise, you are in for a long haul, since you'll have to install LOTS of packages manually, to get things to build. Lots of KDE dependencies. The yum statement will install okular, as well as the plugins.
 
Old 06-15-2015, 03:12 PM   #3
jjscott
Member
 
Registered: Dec 2012
Posts: 33

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Yes...don't install Okular from source. Their website even recommends to install it from packages and/or repositories:
https://okular.kde.org/download.php

You should be able to type in "yum install kdegraphics", and have it install, if you're using CentOS 6.6. Otherwise, you are in for a long haul, since you'll have to install LOTS of packages manually, to get things to build. Lots of KDE dependencies. The yum statement will install okular, as well as the plugins.
I can install Okular fine. The problem is that is does not have a native plugin for viewing PDF documents in Firefox. That's why someone wrote a plugin for Okluar. The whole problem here is getting the plugin to compile under Centos 6.6.

I have since been told that the Okular plugin relies on kdelibs version 5 and CentOS 6 used version 4. Not sure if it is worth trying to get kdelibs 5 build for CentOS 6.

Any thoughts?
 
Old 06-15-2015, 06:32 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,685

Rep: Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657
yes and no

firefox HAS a built in pdf reader it is built into firefox
there is no need to build or install anything
( it was ADDED AFTER THE DEVELOPMENT ON THAT CODE IN GIT STOPPED)

also in the firefox settings
edit/preferences

Applications tab

you can set Okular as the DEFAULT program for pdf's

again NO NEED for a plugin


did you notice the last update dates on that git page ?
2012 and 13
this WAS BEFORE!!! firefox added the BUILT IN READER
and for a version of firefox MUCH OLDER than the current FF 38
sep 2012 to may 2013 ( firefox 12 to firefox 22 )
 
Old 06-15-2015, 07:16 PM   #5
jjscott
Member
 
Registered: Dec 2012
Posts: 33

Original Poster
Rep: Reputation: Disabled
Yep, but the built-in PDF viewer for Firefox does not handle printing landscape documents correctly. It would appear that this was broken in the CUPS version added to CentOS v6.6. Everything prints in portrait mode.

I know that I can select Okular as the default PDF viewer, but that will spawn a separate window for Okular to view the document and actually download it the hard drive to view it. Not what I want.

See the post I made in the same forum tonight for additional details... "Browser PDF plugin for CentOS v6.6 - Landscape printing issue"
 
Old 06-15-2015, 07:48 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,685

Rep: Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657
Quote:
but that will spawn a separate window for Okular to view the document and actually download it the hard drive to view it. Not what I want.
the built in and a plugin to view the pdf in a new tab in FF will ALSO have to download it FIRST
it will be downloaded to /tmp/???.pdf then opened in a new tab in ff


now

as to the errors in the plugin for a old version of ff and okular
( you might HAVE to hack the code to get it to work with ff 38 )

and how did you install the kde5 libs
cent uses kde3 and 4 libs

the KDE5 desktop is in fedora and suse OBS

on CentOS 7 cmake is TOO OLD to build and use the kde5 libs

so if you REALLY want to build this plugin

i would install Fedora 22 and kde5 framework and replace kde4 desktop with kde5
 
Old 06-15-2015, 08:21 PM   #7
jjscott
Member
 
Registered: Dec 2012
Posts: 33

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by John VV View Post
the built in and a plugin to view the pdf in a new tab in FF will ALSO have to download it FIRST
it will be downloaded to /tmp/???.pdf then opened in a new tab in ff


now

as to the errors in the plugin for a old version of ff and okular
( you might HAVE to hack the code to get it to work with ff 38 )

and how did you install the kde5 libs
cent uses kde3 and 4 libs

the KDE5 desktop is in fedora and suse OBS

on CentOS 7 cmake is TOO OLD to build and use the kde5 libs

so if you REALLY want to build this plugin

i would install Fedora 22 and kde5 framework and replace kde4 desktop with kde5
"the built in and a plugin to view the pdf in a new tab in FF will ALSO have to download it FIRST
it will be downloaded to /tmp/???.pdf then opened in a new tab in ff"

It DOESN'T matter what the built in viewer will or will not do in regards to downloading the PDF...It DOSEN'T handle landscape printing. THAT'S the issue.
My observation was that the built in viewer was downloading the PDF because it displayed "downloading" when selecting it. The plugin never did. I checked after reading your post and confirmed that the plugin did the same thing. But, as a I said, it doesn't matter as the built in viewer in Firefox does not handle landscape printing, so it's a moot point.

I installed kdelibs 4 since that is the latest version for CentOS 6.6. I have since been told that the Okular plugin requires kdelibs 5, which accounts for the problem I am facing. Our production system runs on CentOS. I cannot replace it with Fedora. Are you suggesting that I perform the compile on Fedora and then install the resulting plugin on CentOS? Please keep in mind that I am not a Linux programming expert.
 
Old 06-15-2015, 09:30 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,685

Rep: Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657
Quote:
Please keep in mind that I am not a Linux programming expert.
this will then be a major problem

to build this plugin you need kde5 and the kde5 libs
but
cmake is way too old on cent6 ( and 7 )
so
you would need to build the NEWER cmake " out of the system path"
and build kde5 also " out of the system path"

then maybe rewrite some of the code in the plugin to work with the CURRENT firefox 38
-- update the code on the git page to work with ff38 -- might be a single line of code, might be hundreds of lines of code ?

there might be an EXPERIMENTAL !!! kde5 repo for rhel7 and ? maybe 6

but if you use fedora 22 kde5 can be installed and this plugin ? might build , but again you might have to update the plugin from git


a lot of work
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling from source code umamaheshmunez Linux - Software 9 10-24-2008 03:05 AM
get, modify and compiling source code peji Linux - Newbie 6 03-22-2007 07:16 AM
compiling source code BoredStudent Linux - Desktop 1 10-26-2006 08:09 AM
compiling source code bishalpoudyal Linux - Software 1 04-08-2006 03:40 AM
HELP: newbie compiling source code.... kevingpo Linux - Software 6 12-13-2004 01:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration