Tim, all,
I have built gcc 4.3.4-3 to see if that fixes the iccconfig.cpp build failure in kdebase. What I don't know is:
"How to I change the cmake call or CMakeLists.txt to make sure I'm using gcc 4.3 and not 5.4?"
The executable is '/usr/bin/gcc-4.3'. Do I need a CC=gcc-4.3 or CXX=gcc-4.3 somewhere? If so where?
I've never tried to build anything with alternate gcc's installed. Any help would be greatly appreciated.
On 02/13/2011 09:18 PM, David C. Rankin wrote:
Tim, all,
I have built gcc 4.3.4-3 to see if that fixes the iccconfig.cpp build failure in kdebase. What I don't know is:
"How to I change the cmake call or CMakeLists.txt to make sure I'm using gcc 4.3 and not 5.4?"
The executable is '/usr/bin/gcc-4.3'. Do I need a CC=gcc-4.3 or CXX=gcc-4.3 somewhere? If so where?
I've never tried to build anything with alternate gcc's installed. Any help would be greatly appreciated.
I think I have found what to set, I just don't know *where* to set it in kdebase (or the rest of the trinity modules). From http://www.cmake.org/Wiki/CMake_Useful_Variables it looks like I need to set:
CMAKE_C_COMPILER the compiler used for C files. Normally it is detected and set during the CMake run, but you can override it at configuration time. Note! It can not be changed after the first cmake or ccmake run. Although the gui allows to enter an alternative, it will be ignored in the next 'configure' run. Use for example: CC=gcc-3.3 CXX=g++-3.3 cmake to set the compiler. (You can also set CMAKE_C_COMPILER_INIT, before any PROJECT() or ENABLE_LANGUAGE() command.) Any other way (like writing make CC=gcc-3.3 CXX=g++-3.3) will not work. When using distcc or similar tools, you need to write: CC="distcc gcc-3.3" CXX="distcc g++-3.3" cmake However, this will empty all your CMAKE_..._FLAGS_... above
and
CMAKE_CXX_COMPILER the compiler used for C++ files. Normally it is detected and set during the CMake run, but you can override it at configuration time. Note! It can not be changed after the first cmake or ccmake run. See CMAKE_C_COMPILER above.
But where? Guessing, I think I can do this is CMakeLists.txt with something similar to the following:
###### global compiler settings #################
add_definitions( -DHAVE_CONFIG_H ${TQT_CFLAGS_OTHER} )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include tqt.h" ) set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
##### dcr cmake flags for gcc-4.3 ###############
set( CMAKE_C_COMPILER "gcc-4.3" ) set( CMAKE_CXX_COMPILER "g++-4.3" )
I'll see if this will work, but if this isn't right, please let me know what else to try. Thanks.
On 02/13/2011 09:33 PM, David C. Rankin wrote:
But where? Guessing, I think I can do this is CMakeLists.txt with something similar to the following:
###### global compiler settings #################
add_definitions( -DHAVE_CONFIG_H ${TQT_CFLAGS_OTHER} )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include tqt.h" ) set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
##### dcr cmake flags for gcc-4.3 ###############
set( CMAKE_C_COMPILER "gcc-4.3" ) set( CMAKE_CXX_COMPILER "g++-4.3" )
I'll see if this will work, but if this isn't right, please let me know what else to try. Thanks.
I think I have it:
cmake ../ \ -DCMAKE_C_COMPILER="/usr/bin/gcc-4.3" \ -DCMAKE_CXX_COMPILER="/usr/bin/g++-4.3" \ -DCMAKE_INSTALL_PREFIX=${trinity_prefix} \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DWITH_QT3=ON \ -DQTDIR=/opt/qt \ -DQT_LIBRARY_DIRS=/opt/qt/lib \ -DBUILD_ALL=ON make VERBOSE=1
It's building....
On 02/13/2011 09:42 PM, David C. Rankin wrote:
On 02/13/2011 09:33 PM, David C. Rankin wrote:
But where? Guessing, I think I can do this is CMakeLists.txt with something similar to the following:
###### global compiler settings #################
add_definitions( -DHAVE_CONFIG_H ${TQT_CFLAGS_OTHER} )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include tqt.h" ) set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
##### dcr cmake flags for gcc-4.3 ###############
set( CMAKE_C_COMPILER "gcc-4.3" ) set( CMAKE_CXX_COMPILER "g++-4.3" )
I'll see if this will work, but if this isn't right, please let me know what else to try. Thanks.
I think I have it:
cmake ../ \ -DCMAKE_C_COMPILER="/usr/bin/gcc-4.3" \ -DCMAKE_CXX_COMPILER="/usr/bin/g++-4.3" \ -DCMAKE_INSTALL_PREFIX=${trinity_prefix} \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DWITH_QT3=ON \ -DQTDIR=/opt/qt \ -DQT_LIBRARY_DIRS=/opt/qt/lib \ -DBUILD_ALL=ON make VERBOSE=1
It's building....
UUGH!
"undefined reference to `std::ctype<char>::_M_widen_init() const@GLIBCXX_3.4.11'"
Looks like I need to downgrade other parts as well - bummer. Full error:
[ 7%] Building CXX object kcminit/CMakeFiles/kcminit.dir/kcminit_kdeinit_executable.cpp.o cd /home/david/tbld/kdebase/src/kcminit && /usr/bin/g++-4.3 -DHAVE_CONFIG_H -DUSE_QT3 -DQT_NO_ASCII_CAST -DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -DQT_THREAD_SUPPORT -D_REENTRANT -march=i686 -mtune=generic -O2 -pipe -include tqt.h -I/home/david/tbld/kdebase/src/kcminit -I/home/david/tbld/kdebase/src -I/opt/trinity/include -I/opt/qt/include -I/opt/qt/include/tqt -o CMakeFiles/kcminit.dir/kcminit_kdeinit_executable.cpp.o -c /home/david/tbld/kdebase/src/kcminit/kcminit_kdeinit_executable.cpp Linking CXX executable kcminit cd /home/david/tbld/kdebase/src/kcminit && /usr/bin/cmake -E cmake_link_script CMakeFiles/kcminit.dir/link.txt --verbose=1 /usr/bin/g++-4.3 -march=i686 -mtune=generic -O2 -pipe -include tqt.h -Wl,--hash-style=gnu -Wl,--as-needed CMakeFiles/kcminit.dir/kcminit_kdeinit_executable.cpp.o -o kcminit -rdynamic -L/opt/qt/lib libkdeinit_kcminit.so /opt/trinity/lib/libkutils.so.1.2.0 /opt/trinity/lib/libkparts.so.2.1.0 /opt/trinity/lib/libkio.so.4.2.0 /opt/trinity/lib/libkdeui.so.4.2.0 -lfreetype -lfontconfig /opt/trinity/lib/libkdesu.so.4.2.0 -lutil /opt/trinity/lib/libkwalletclient.so.1.0.1 /opt/trinity/lib/libkdecore.so.4.2.0 /opt/trinity/lib/libDCOP.so.4.2.0 /opt/trinity/lib/libkdefx.so.4.2.0 -ltqt -lqt-mt -lXrender -lX11 -lz -lICE -lSM -Wl,-rpath,/opt/qt/lib:/home/david/tbld/kdebase/src/kcminit:/opt/trinity/lib: /opt/trinity/lib/libkdefx.so.4.2.0: undefined reference to `std::ctype<char>::_M_widen_init() const@GLIBCXX_3.4.11' collect2: ld returned 1 exit status make[2]: *** [kcminit/kcminit] Error 1 make[2]: Leaving directory `/home/david/tbld/kdebase/src' make[1]: *** [kcminit/CMakeFiles/kcminit.dir/all] Error 2 make[1]: Leaving directory `/home/david/tbld/kdebase/src' make: *** [all] Error 2 Aborting...
What other parts/packages do I need to drop back to work with gcc-4.3?
On 02/13/2011 10:11 PM, David C. Rankin wrote:
UUGH!
"undefined reference to `std::ctype<char>::_M_widen_init() const@GLIBCXX_3.4.11'"
OK, looks like I just need to remake everything with gcc-4.3....
On 02/13/2011 10:16 PM, David C. Rankin wrote:
On 02/13/2011 10:11 PM, David C. Rankin wrote:
UUGH!
"undefined reference to `std::ctype<char>::_M_widen_init() const@GLIBCXX_3.4.11'"
OK, looks like I just need to remake everything with gcc-4.3....
Rebuilt everything on gcc 4.3.4 and kdebase builds just fine! There is a gcc 4.5.2 problem building Trinity :(
On 02/13/2011 10:16 PM, David C. Rankin wrote:
On 02/13/2011 10:11 PM, David C. Rankin wrote:
UUGH!
"undefined reference to `std::ctype<char>::_M_widen_init() const@GLIBCXX_3.4.11'"
OK, looks like I just need to remake everything with gcc-4.3....
Rebuilt everything on gcc 4.3.4 and kdebase builds just fine! There is a gcc 4.5.2 problem building Trinity :(
Or maybe just a GCC 4.5.2 problem. I would wait for the next point release (4.5.3?) before assuming Trinity actually has a build problem.
Thanks for trying it out on the older GCC!
Tim
On 02/14/2011 10:12 AM, Timothy Pearson wrote: <snip>
Rebuilt everything on gcc 4.3.4 and kdebase builds just fine! There is a gcc 4.5.2 problem building Trinity :(
Or maybe just a GCC 4.5.2 problem. I would wait for the next point release (4.5.3?) before assuming Trinity actually has a build problem.
Thanks for trying it out on the older GCC!
Tim
Tim,
You might want to add yourself to the email list for the gcc bug I've filed:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47723
The Arch Developers have shown an interest, but the gcc guys aren't sure that it's gcc. So you may be able to add a bit of technical detail from the trinity side that I don't have.
Nothing need at the moment, but never hurts to have another set of eyes on the problem.
On 02/14/2011 10:12 AM, Timothy Pearson wrote:
Or maybe just a GCC 4.5.2 problem. I would wait for the next point release (4.5.3?) before assuming Trinity actually has a build problem.
Thanks for trying it out on the older GCC!
Tim
Tim,
How do I set the 'gcc -save-temps' flag for just kdebase/kcontrol/iccconfig?
On 02/14/2011 10:58 AM, David C. Rankin wrote:
On 02/14/2011 10:12 AM, Timothy Pearson wrote:
Or maybe just a GCC 4.5.2 problem. I would wait for the next point release (4.5.3?) before assuming Trinity actually has a build problem.
Thanks for trying it out on the older GCC!
Tim
Tim,
How do I set the 'gcc -save-temps' flag for just kdebase/kcontrol/iccconfig?
Will this work in kdebase/kcontrol/iccconfig/CMakeLists.txt?
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -save-temps" )