cmake does not work

Tomaz Canabrava tcanabrava at kde.org
Thu Jul 10 15:21:23 UTC 2014


On Thu, Jul 10, 2014 at 12:17 PM, Devanshu Jain
<devanshu.jain919 at gmail.com> wrote:
> I already tried that but I think cmake does not realise -fPIC/fPIE as a
> valid option. So it considers that a file exists with the same name and
> shows me the following error:
> CMake Error: The source directory
> "/home/devanshu/Documents/PMC/plasma-mediacenter/build/-fPIC" does not
> exist.

What? no no no,
You must add -fPIC as the CXX_COMPILER_FLAGS, how's your CMakeLists.txt?
It seems that you are adding -fPIC at the wrong location.

>
> On Thu, Jul 10, 2014 at 8:41 PM, Tomaz Canabrava <tcanabrava at kde.org> wrote:
>>
>> Devanshu,
>>
>> I know it's frustrating to begin in a very complex and huge software
>> as KDE and Plasma, belive me - this happened to me 6 years ago.
>> It's very important to try to understand the errors that you have
>> before asking for help, really. Holding hands is cool but not the most
>> efficient way to learn.
>>
>> for instance, in the second one
>>
>>  /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. "\
>>
>> This means that your Qt was build with -reduce-relocations and you
>> must compile your code with -fPIC , as the error says.
>> so, go to your CMake and add -fPIC to the CXX_COMPILER_FLAGS , and try
>> again. :)
>>
>> Tomaz
>> _______________________________________________
>> Plasma-devel mailing list
>> Plasma-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/plasma-devel
>
>
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>


More information about the Plasma-devel mailing list