Unable to compile applications - Qt error

I’ve tried to compile a few different applications from KDE-apps now and all have failed with the following error:

Qt compiled without support for -fvisibility=hidden. This will break plugins and linking of some applications. Please fix your Qt installation.

My libqt4 and libqt4-devel are ver 4.5.3-2.1

I’ve used the standard steps to compile -
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=kde4-config --prefix
make
sudo make install

Could someone please tell me how to determine whether this is really an issue with Qt or point me in the right direction to troubleshoot this further? This is a pretty clean installation of 11.2RC1, recently upgraded to RC2.

On Sun, 01 Nov 2009 21:16:02 GMT, MikeWelch
<MikeWelch@no-mx.forums.opensuse.org> wrote:

>
>I’ve tried to compile a few different applications from KDE-apps now and
>all have failed with the following error:
>
>Qt compiled without support for -fvisibility=hidden. This will break
>plugins and linking of some applications. Please fix your Qt
>installation.
>
>My libqt4 and libqt4-devel are ver 4.5.3-2.1
>
>I’ve used the standard steps to compile -
>mkdir build
>cd build
>cmake -DCMAKE_INSTALL_PREFIX=kde4-config --prefix
>make
>sudo make install
>
>Could someone please tell me how to determine whether this is really an
>issue with Qt or point me in the right direction to troubleshoot this
>further? This is a pretty clean installation of 11.2RC1, recently
>upgraded to RC2.

If you have a recent install why are you recompiling Qt?

It’s not Qt I’ve been trying to compile, it’s any Qt based application I’m compiling that I’ve had problems with. Basically anything I’ve tried to compile from kde-apps.org is failing with the Qt error.

On Wed, 11 Nov 2009 20:06:02 GMT, MikeWelch
<MikeWelch@no-mx.forums.opensuse.org> wrote:

>
>It’s not Qt I’ve been trying to compile, it’s any Qt based application
>I’m compiling that I’ve had problems with. Basically anything I’ve tried
>to compile from kde-apps.org is failing with the Qt error.

OK. How diligent have you been about including all of the development
(or source package if there is no matching development package)
packages?

Well I’m not sure which devel packages I’d need specifically, but under patterns I’ve got QT4 development, KDE development, C/C++ development and base development.
I’ve also got libkde4-devel.

I also make sure that I have anything required in the READMEs of the stuff I’ve downloaded.

OK, let’s get down to the basics.

What are you compiling?
What have you tried to compile?
What Qt rpms do you have installed?


rpm -qa *qt*

Thanks for taking a look Jonathan_R!

Here’s the list of installed Qt rpms:
libpoppler-qt4-3-0.12.0-3.5.x86_64
libqt4-x11-32bit-4.5.3-2.4.2.x86_64
libavahi-qt4-1-0.6.25-4.5.1.x86_64
google-gadgets-qt-0.11.0-4.4.x86_64
yast2-qt-2.18.7-2.1.x86_64
qtcurve-kde4-0.69.0-26.2.x86_64
yast2-qt-pkg-2.18.18-1.1.2.x86_64
libqt4-4.5.3-2.4.2.x86_64
python-qt4-4.6.1-1.1.1.x86_64
pinentry-qt4-0.7.6-5.5.x86_64
yast2-qt-graph-2.18.4-4.1.x86_64
qt4-qtscript-0.1.0-4.1.x86_64
qtcurve-gtk2-32bit-0.68.0-2.2.x86_64
libqt4-sql-sqlite-32bit-4.5.3-2.4.2.x86_64
libpoppler-qt4-devel-0.12.0-3.5.x86_64
libqt4-sql-32bit-4.5.3-2.4.2.x86_64
libqt4-qt3support-32bit-4.5.3-2.4.2.x86_64
vlc-qt-1.0.3-0.pm.5.6.x86_64
libqt4-32bit-4.5.3-2.4.2.x86_64
libqt4-x11-4.5.3-2.4.2.x86_64
libqt4-devel-doc-4.5.3-3.4.2.x86_64
libqt4-sql-4.5.3-2.4.2.x86_64
libqt4-devel-doc-data-4.5.3-3.4.1.noarch
qt3-3.3.8b-93.1.x86_64
libqt4-sql-sqlite-4.5.3-2.4.2.x86_64
libqt4-devel-4.5.3-2.4.2.x86_64
qtcurve-gtk2-0.68.0-2.2.x86_64
libavahi-qt4-devel-0.6.25-4.5.1.x86_64
yast2-control-center-qt-2.18.12-1.1.1.x86_64
libpolkit-qt0-0.9.2-8.1.x86_64
patterns-openSUSE-devel_qt4-11.2-20.22.1.x86_64
libqt4-qt3support-4.5.3-2.4.2.x86_64

The last thing I attempted to compile was the comicbook thumbnail plugin:
ComicBook Thumbnail Plugin KDE-Apps.org

I also tried Krecipes 2.0 alpha4:
Krecipes KDE-Apps.org

I think I tried 4 or 5 other applications before this, but I can’t recall which at the moment.

What gcc rpms do you have installed?

When do you get this error? When running cmake? make?

My cmake looks like this:


> cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ../                                        
-- The C compiler identification is GNU                                      
-- The CXX compiler identification is GNU                                    
-- Check for working C compiler: /usr/bin/gcc                                
-- Check for working C compiler: /usr/bin/gcc -- 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.0 (using /usr/bin/qmake)                             
-- 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 files CMAKE_HAVE_PTHREAD_H                            
-- Looking for include files CMAKE_HAVE_PTHREAD_H - 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                                                 
-- Phonon Version: 4.3.0                                                     
-- 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
-- Found KDE 4.3 library dir: /usr/lib64
-- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
-- Found automoc4: /usr/bin/automoc4
-- Configuring done
-- Generating done
-- Build files have been written to: /home/<snipped>/Downloads/comicbook-thumbnails/build

And my make looks like this:

> make
Scanning dependencies of target comicbookthumbnail_automoc
Generating comiccreator.moc
  0%] Built target comicbookthumbnail_automoc
Scanning dependencies of target comicbookthumbnail
 50%] Building CXX object src/CMakeFiles/comicbookthumbnail.dir/comicbookthumbnail_automoc.o
[100%] Building CXX object src/CMakeFiles/comicbookthumbnail.dir/comiccreator.o
Linking CXX shared module ../lib/comicbookthumbnail.so
[100%] Built target comicbookthumbnail

And make install looks like:


# make install
  0%] Built target comicbookthumbnail_automoc
[100%] Built target comicbookthumbnail
Linking CXX shared module CMakeFiles/CMakeRelink.dir/comicbookthumbnail.so
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/lib64/kde4/comicbookthumbnail.so
-- Installing: /usr/share/kde4/services/comicbookthumbnail.desktop

As to the Qt rpms I have, here is that list:


> rpm -qa *qt*      
libpoppler-qt4-3-0.12.0-3.5.x86_64                                           
qt-creator-1.2.1-25.27.x86_64                                                
patterns-openSUSE-devel_qt4-11.2-20.22.1.x86_64                              
qt3-devel-3.3.8b-93.1.x86_64                                                 
libqt4-sql-sqlite-4.5.80+4.6.20091111-4.1.x86_64                             
yast2-qt-2.18.7-2.1.x86_64                                                   
yast2-qt-pkg-2.18.18-1.1.2.x86_64                                            
libqt4-debuginfo-4.5.80+4.6.20091111-4.1.x86_64                              
libqt4-devel-doc-data-4.5.80+4.6.20091111-6.1.noarch                         
libqt4-sql-mysql-4.5.80+4.6.20091111-6.1.x86_64                              
qtcurve-gtk2-32bit-0.68.0-2.2.x86_64                                         
libpackagekit-qt12-0.5.1-3.7.x86_64                                          
qtsharp-0.7.1-238.3.x86_64                                                   
vlc-qt-1.0.3-2.2.x86_64                                                      
libqt4-devel-4.5.80+4.6.20091111-4.1.x86_64                                  
yast2-control-center-qt-2.18.12-1.1.1.x86_64                                 
libqt4-32bit-4.5.80+4.6.20091111-4.1.x86_64                                  
qtcurve-gtk2-0.68.0-2.2.x86_64                                               
libpolkit-qt0-0.9.2-4.1.x86_64                                               
libqt4-examples-4.5.80+4.6.20091111-4.1.x86_64                               
libqt4-x11-32bit-4.5.80+4.6.20091111-4.1.x86_64                              
libqt4-qt3support-32bit-4.5.80+4.6.20091111-4.1.x86_64                       
qt4-style-polyester-2.0.0-2.4.x86_64                                         
qt4-x11-tools-4.5.80+4.6.20091111-5.1.x86_64                                 
libavahi-qt4-devel-0.6.25-4.5.1.x86_64                                       
libsvnqt6-1.4.1-4.5.x86_64                                                   
libqt4-qt3support-4.5.80+4.6.20091111-4.1.x86_64                             
libqt4-sql-4.5.80+4.6.20091111-4.1.x86_64                                    
qtc-0.7a-222.1.x86_64                                                        
recordmydesktop-qt-0.3.8-0.pm.3.1.noarch                                     
pinentry-qt4-0.7.6-5.5.x86_64                                                
qt3-3.3.8b-93.1.x86_64                                                       
libavahi-qt4-1-0.6.25-4.5.1.x86_64                                           
avidemux-qt-2.5.1-3.pm.7.1.x86_64                                            
libqtpod-devel-0.4.2-8.1.x86_64                                              
google-gadgets-qt-0.11.0-4.4.x86_64
fraqtive-0.4.4-3.1.x86_64
recordmydesktop-qt-lang-0.3.8-0.pm.3.1.noarch
libqt4-4.5.80+4.6.20091111-4.1.x86_64
libqt4-sql-32bit-4.5.80+4.6.20091111-4.1.x86_64
libpoppler-qt4-devel-0.12.0-3.5.x86_64
yast2-qt-devel-2.18.7-2.1.x86_64
libqt4-sql-mysql-32bit-4.5.3-74.1.x86_64
libqt4-x11-4.5.80+4.6.20091111-4.1.x86_64
python-qt4-4.6.1-1.1.1.x86_64
qt3-man-3.3.8b-93.1.x86_64
qt4-qtscript-0.1.0-7.10.x86_64
libqtpod0-0.4.2-8.1.x86_64
qtcurve-kde4-0.69.0-26.2.x86_64
libqt4-sql-sqlite-32bit-4.5.3-72.2.x86_64
yast2-qt-graph-2.18.4-4.1.x86_64
freqtweak-0.7.2-4.1.x86_64

And to the gcc rpms:

> rpm -qa *gcc*
gcc41-testresults-4.1.2_20070115-11.8.x86_64                            
gcc-locale-4.4-4.2.x86_64                                               
gcc41-32bit-4.1.2_20070115-11.4.x86_64                                  
gcc41-fortran-4.1.2_20070115-11.4.x86_64                                
gcc44-info-4.4.1_20090817-2.3.4.x86_64                                  
gcc44-ada-4.4.1_20090817-2.3.4.x86_64                                   
gcc41-objc-4.1.2_20070115-11.4.x86_64                                   
gcc43-c++-4.3.4_20090804-2.4.x86_64                                     
gcc-gij-4.4-4.2.x86_64                                                  
gcc-c++-4.4-4.2.x86_64                                                  
gcc43-locale-4.3.4_20090804-2.4.x86_64                                  
cross-ia64-gcc-icecream-backend-4.4.1_20090817-2.3.2.x86_64             
libgcc44-32bit-4.4.1_20090817-2.3.4.x86_64                              
gcc44-java-4.4.1_20090817-2.3.4.x86_64                                  
gcc41-info-4.1.2_20070115-11.4.x86_64                                   
gcc-fortran-4.4-4.2.x86_64                                              
libgcc44-4.4.1_20090817-2.3.4.x86_64                                    
gcc-4.4-4.2.x86_64                                                      
gcc44-objc-4.4.1_20090817-2.3.4.x86_64                                  
gcc44-32bit-4.4.1_20090817-2.3.4.x86_64                                 
cross-spu-gcc-4.4.1_20090817-2.3.2.x86_64                               
gcc43-java-4.3.4_20090804-2.8.x86_64                                    
gcc-obj-c++-4.4-4.2.x86_64                                              
gcc33-c++-3.3.3-15.3.x86_64                                             
cross-s390-gcc-icecream-backend-4.4.1_20090817-2.3.2.x86_64             
gcc33-testresults-3.3.3-15.3.x86_64                                     
gcc33-locale-3.3.3-15.3.x86_64                                          
gcc44-gij-4.4.1_20090817-2.3.4.x86_64                                   
gcc-java-4.4-4.2.x86_64                                                 
cross-x86_64-gcc-icecream-backend-4.4.1_20090817-2.3.1.x86_64           
gcc41-ada-4.1.2_20070115-11.4.x86_64                                    
gcc44-locale-4.4.1_20090817-2.3.4.x86_64                                
gcc43-4.3.4_20090804-2.4.x86_64                                         
gcc41-java-4.1.2_20070115-11.4.x86_64                                   
gcc43-info-4.3.4_20090804-2.4.x86_64                                    
gcc-objc-4.4-4.2.x86_64                                                 
gcc43-32bit-4.3.4_20090804-2.4.x86_64                                   
gcc-info-4.4-4.2.x86_64                                                 
gcc44-c++-4.4.1_20090817-2.3.4.x86_64                                   
cross-i386-gcc-icecream-backend-4.4.1_20090817-2.3.2.x86_64             
gcc43-fortran-4.3.4_20090804-2.4.x86_64                                 
gcc-ada-4.4-4.2.x86_64                                                  
gcc44-4.4.1_20090817-2.3.4.x86_64                                       
cross-ppc64-gcc-icecream-backend-4.4.1_20090817-2.3.2.x86_64            
gcc44-obj-c++-4.4.1_20090817-2.3.4.x86_64                               
gcc43-objc-4.3.4_20090804-2.4.x86_64                                    
gcc33-fortran-3.3.3-15.3.x86_64
cross-ppc-gcc-icecream-backend-4.4.1_20090817-2.3.2.x86_64
cross-s390x-gcc-icecream-backend-4.4.1_20090817-2.3.2.x86_64
gcc33-info-3.3.3-15.3.x86_64
cross-avr-gcc44-4.4.1_20090817-2.3.1.x86_64
cross-hppa-gcc-icecream-backend-4.4.1_20090817-2.3.2.x86_64
gcc44-fortran-4.4.1_20090817-2.3.4.x86_64
gcc41-4.1.2_20070115-11.4.x86_64
gcc-32bit-4.4-4.2.x86_64
gcc33-32bit-3.3.3-15.3.x86_64
gcc41-obj-c++-4.1.2_20070115-11.4.x86_64
gcc33-objc-3.3.3-15.3.x86_64
gcc43-testresults-4.3.4_20090804-2.8.x86_64
gcc33-3.3.3-15.3.x86_64
gcc41-c++-4.1.2_20070115-11.4.x86_64
gcc41-locale-4.1.2_20070115-11.4.x86_64
gcc43-ada-4.3.4_20090804-2.4.x86_64

Now I am not saying you need to install all that. But do take a look here: fvisibility=hidden - Google Search
And ofcourse here: Qt compiled without support for -fvisibility=hidden - Google Search

I get the error running cmake.

nos@Valis:~/Desktop/Install/comicbook-thumbnails/comicbook-thumbnails/build$ cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..
-- The C compiler identification is GNU                                                                                            
-- The CXX compiler identification is GNU                                                                                          
-- Check for working C compiler: /usr/bin/gcc                                                                                      
-- Check for working C compiler: /usr/bin/gcc -- 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.5.3 (using /usr/bin/qmake)                                                                                   
-- 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 files CMAKE_HAVE_PTHREAD_H                                                                                                                     
-- Looking for include files CMAKE_HAVE_PTHREAD_H - 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                                                                                                                                          
-- Phonon Version: 4.3.0                                                                                                                                              
-- 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
CMake Error at /usr/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake:1104 (message):
  Qt compiled without support for -fvisibility=hidden.  This will break
  plugins and linking of some applications.  Please fix your Qt installation.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindKDE4.cmake:81 (FIND_PACKAGE)
  CMakeLists.txt:3 (find_package)


-- Configuring incomplete, errors occurred!


Here are my gcc rpms:

gcc-info-4.4-4.2.x86_64
gcc44-gij-4.4.1_20090817-2.3.4.x86_64
libgcc44-32bit-4.4.1_20090817-2.3.4.x86_64
gcc44-4.4.1_20090817-2.3.4.x86_64
gcc44-info-4.4.1_20090817-2.3.4.x86_64
gcc-gij-4.4-4.2.x86_64
gcc-c+±4.4-4.2.x86_64
gcc-4.4-4.2.x86_64
gcc44-c+±4.4.1_20090817-2.3.4.x86_64
libgcc44-4.4.1_20090817-2.3.4.x86_64

I followed the instructions on this page:

Compiling software - openSUSE

I searched Google as well, but I didn’t see anything that I (in my limited experience) could pinpoint as the same issue.

OK, since we know mine worked, then make sure you have the same Qt rpms and GCC rpms I have. And try again.

On Tue, 17 Nov 2009 06:46:02 GMT, MikeWelch
<MikeWelch@no-mx.forums.opensuse.org> wrote:

>
>Well I’m not sure which devel packages I’d need specifically, but under
>patterns I’ve got QT4 development, KDE development, C/C++ development
>and base development.
>I’ve also got libkde4-devel.
>
>I also make sure that I have anything required in the READMEs of the
>stuff I’ve downloaded.

Unless there is some mismatch between your devel packages and your run
time libraries my supposition isn’t where the issue is.

Jonathan_R, I should be able to install those packages tomorrow, I’ll update as soon as I do.

JosephKK, All of my dev packages match my runtime libs as far as I’m aware.