You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qnamespace.h:37:0,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:41,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:40,
from /usr/include/x86_64-linux-gnu/qt5/QtMultimedia/qaudioformat.h:38,
from /home/cortana/libdash/libdash/qtplayer/libdashframework/Buffer/AudioChunk.h:16,
from /home/cortana/libdash/libdash/qtplayer/libdashframework/Buffer/AudioChunk.cpp:12:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1067:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)."
# error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\
^
[ 57%] Building CXX object CMakeFiles/qtsampleplayer.dir/libdashframework/Buffer/MediaObjectBuffer.cpp.o
[ 60%] Building CXX object CMakeFiles/qtsampleplayer.dir/libdashframework/Input/DASHReceiver.cpp.o
[ 63%] Building CXX object CMakeFiles/qtsampleplayer.dir/libdashframework/Input/MediaObject.cpp.o
CMakeFiles/qtsampleplayer.dir/build.make:389: recipe for target 'CMakeFiles/qtsampleplayer.dir/libdashframework/Buffer/AudioChunk.cpp.o' failed
make[2]: *** [CMakeFiles/qtsampleplayer.dir/libdashframework/Buffer/AudioChunk.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:63: recipe for target 'CMakeFiles/qtsampleplayer.dir/all' failed
make[1]: *** [CMakeFiles/qtsampleplayer.dir/all] Error 2
Makefile:75: recipe for target 'all' failed
make: *** [all] Error 2
I have used this command for cmake : ./cmake-2.8.11.2-Linux-i386/bin/cmake -DCMAKE_CXX_FLAGS="-fPIC" .. and also had edited the CMakeLists.txt of qtsampleplayer directory to add the -fPIC flag. The errors thrown by the code of libdash were removed by doing this but the qt is still throwing them. I have followed the instructions on README for installation of qt libraries.
The text was updated successfully, but these errors were encountered:
kgupta15
changed the title
Error while building qtsampleplayer on Ubuntu 16.04
"-fPIC" error while building qtsampleplayer on Ubuntu 16.04
Sep 16, 2016
I wasnt really able to solve it. What I did was:
Instead of running the command ./cmake-2.8.11.2-Linux-i386/bin/cmake, I ran cmake .. again and then make -j4. That worked fine for me and I was able to install qtsampleplayer.
I have this error while building qtsampleplayer:
I have used this command for cmake :
./cmake-2.8.11.2-Linux-i386/bin/cmake -DCMAKE_CXX_FLAGS="-fPIC" ..
and also had edited the CMakeLists.txt of qtsampleplayer directory to add the -fPIC flag. The errors thrown by the code of libdash were removed by doing this but the qt is still throwing them. I have followed the instructions on README for installation of qt libraries.The text was updated successfully, but these errors were encountered: