I tried to build after i install qt4 and execute the above mentioned
commands. This is what i got

*/home/sahil/my/New Folder/prog/okular/build> /usr/bin/cmake
-DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug
'/home/sahil/my/New Folder/prog/okular/'*
*-- Found Qt-Version 4.8.6 (using /usr/bin/qmake-qt4)*
*Change Dir: /home/sahil/my/New Folder/prog/okular/CMakeFiles/CMakeTmp*

*Run Build Command:/usr/bin/make "cmTryCompileExec3706206158/fast"*
*/usr/bin/make -f CMakeFiles/cmTryCompileExec3706206158.dir/build.make
CMakeFiles/cmTryCompileExec3706206158.dir/build*
*make[1]: Entering directory `/home/sahil/my/New
Folder/prog/okular/CMakeFiles/CMakeTmp'*
*/usr/bin/cmake -E cmake_progress_report "/home/sahil/my/New
Folder/prog/okular/CMakeFiles/CMakeTmp/CMakeFiles" 1*
*Building CXX object
CMakeFiles/cmTryCompileExec3706206158.dir/check_qt_application.cpp.o*
*compiling check_qt_application.cpp (c++)*
*In file included from /usr/include/qt5/QtCore/QtGlobal:1:0,*
*                 from /home/sahil/my/New
Folder/prog/okular/CMakeTmp/check_qt_application.cpp:1:*
*/usr/include/qt5/QtCore/qglobal.h:1008:4: error: #error "You must build
your code with position independent code if Qt was built with
-reduce-relocations. " "Compile your code with -fPIC or -fPIE."*
* #  error "You must build your code with position independent code if Qt
was built with -reduce-relocations. "\*
*    ^*
*make[1]: ***
[CMakeFiles/cmTryCompileExec3706206158.dir/check_qt_application.cpp.o]
Error 1*
*make[1]: Leaving directory `/home/sahil/my/New
Folder/prog/okular/CMakeFiles/CMakeTmp'*
*make: *** [cmTryCompileExec3706206158/fast] Error 2*

*CMake Error at
/usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake:1316 (message):*
*  Unable to compile a basic Qt application.  Qt has not been found
correctly.*
*Call Stack (most recent call first):*
*  /usr/share/cmake-2.8/Modules/FindKDE4.cmake:95 (find_package)*
*  CMakeLists.txt:3 (find_package)*


*-- Configuring incomplete, errors occurred!*
*See also "/home/sahil/my/New
Folder/prog/okular/CMakeFiles/CMakeOutput.log".*
*See also "/home/sahil/my/New
Folder/prog/okular/CMakeFiles/CMakeError.log".*
**** Failure: Exit code 1 ****

What i think is that my CMake is not properly installed or it is not able
to pickup the qt and kdelibraries.

Please suggest something

On Fri, Oct 24, 2014 at 1:05 PM, proy <proy....@gmail.com> wrote:

> Hi Sahil,
>
> I got the same problem when I tried to compile using terminal. Below steps
> resolved those:
>
> 1. Remove *CMakeCache.txt* first,
> 2. Run *cmake -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4*
>
> If you are running *cmake* from "*okular/build*" folder try this command
> *cmake .. -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4*
>
> I got this info from one of the okular conversation, couldn't find the link 
> now.
>
>
> Thanks,
>
> *Pranab*
>
>
>
> On Fri, Oct 24, 2014 at 12:24 PM, Sahil Sehgal <sahilsehgal1...@gmail.com>
> wrote:
>
>> Hello
>>
>> I was trying to build Okular (KDE application) in IDE (QT-creator and
>> Kdevelop both). I did the following steps:
>> 1.) clonned the source code of Okular
>> 2.) loaded the source code in IDE
>> 3.) click on the build command.
>>
>> I got the following error
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> */home/sahil/my/New Folder/prog/okular/build> /usr/bin/cmake
>> -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug
>> '/home/sahil/my/New Folder/prog/okular/'-- Found Qt-Version 5.2.1 (using
>> /usr/bin/qmake)CMake Error: The following variables are used in this
>> project, but they are set to NOTFOUND.Please set them or make sure they are
>> set and tested correctly in the CMake files:QT_QT_INCLUDE_DIR   used as
>> include directory in directory /home/sahil/my/New
>> Folder/prog/okular/build/CMakeFiles/CMakeTmpCMake Error: Internal CMake
>> error, TryCompile configure of cmake failedCMake Error at
>> /usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake:1316 (message):
>> Unable to compile a basic Qt application.  Qt has not been found
>> correctly.Call Stack (most recent call first):
>> /usr/share/cmake-2.8/Modules/FindKDE4.cmake:95 (find_package)
>> CMakeLists.txt:3 (find_package)-- Configuring incomplete, errors
>> occurred!See also "/home/sahil/my/New
>> Folder/prog/okular/build/CMakeFiles/CMakeOutput.log".See also
>> "/home/sahil/my/New Folder/prog/okular/build/CMakeFiles/CMakeError.log".***
>> Failure: Exit code 1 ****
>>
>> Please suggest the possible solution
>>
>>
>> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
>> unsubscribe <<
>>
>>
>
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> unsubscribe <<
>
>
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to