Serghei, Tim, all,
Trying to debug the iccconfig.cpp error I'm having with kdebase, I've run across the following line in the ../iccconfig/Makefile.am:
noinst_HEADERS = iccconfig.h
According to http://www.gnu.org/software/hello/manual/automake/Headers.html
<quote>
Usually, only header files that accompany installed libraries need to be installed. Headers used by programs or convenience libraries are not installed. The noinst_HEADERS variable can be used for such headers. However when the header actually belongs to a single convenience library or program, we recommend listing it in the program's or library's _SOURCES variable (see Program Sources) instead of in noinst_HEADERS. This is clearer for the Makefile.am reader. noinst_HEADERS would be the right variable to use in a directory containing only headers and no associated library or program.
</quote>
What struck me is the line reading: "noinst_HEADERS would be the right variable to use in a directory containing only headers and no associated library or program." This isn't the case with iccconfig because you have the program iccconfig.cpp.
Also, is it possible that I've run into a gcc compiler error? I'm working with the following:
gcc 4.5.2-6 gcc-fortran 4.5.2-6 gcc-libs 4.5.2-6 gcc-objc 4.5.2-6
Thanks for any thoughts you may have.
On 02/10/2011 06:06 PM, David C. Rankin wrote:
Serghei, Tim, all,
Trying to debug the iccconfig.cpp error I'm having with kdebase, I've run across the following line in the ../iccconfig/Makefile.am:
noinst_HEADERS = iccconfig.h
<snip>
That wasn't the problem. I commented it out in the Makefile.am - same result.
I have also set -Wall in CMakeLists.txt for iccconfig. [ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -include tqt.h" ) ] Here is an expanded version of the compile error:
[ 29%] Building CXX object kcontrol/iccconfig/CMakeFiles/kcm_iccconfig-module.dir/iccconfig.cpp.o cd /home/david/tbld/kdebase/src/kcontrol/iccconfig && /usr/bin/c++ -Dkcm_iccconfig_module_EXPORTS -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 -Wall -include tqt.h -fPIC -I/home/david/tbld/kdebase/src/kcontrol/iccconfig -I/home/david/tbld/kdebase/src -I/opt/trinity/include -I/opt/qt/include -I/opt/qt/include/tqt -DKDE_CONFDIR="/opt/trinity/share/config" -o CMakeFiles/kcm_iccconfig-module.dir/iccconfig.cpp.o -c /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp In file included from /opt/qt/include/tqt/tqimage.h:32:0, from /opt/trinity/include/kaboutdata.h:24, from /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:29: /opt/qt/include/qimage.h: In member function ‘bool QImageTextKeyLang::operator<(const QImageTextKeyLang&) const’: /opt/qt/include/qimage.h:58:61: warning: suggest parentheses around ‘&&’ within ‘||’ /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘void KICCConfig::renameProfile()’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:148:6: warning: unused variable ‘i’ /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:149:12: warning: unused variable ‘iccFileArrayNew’ /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘QString KICCConfig::extractFileName(QString, QString)’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:255:1: warning: no return statement in function returning non-void /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘void KICCConfig::load(bool)’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:289:38: error: expected type-specifier /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:289:38: error: cannot convert ‘int*’ to ‘KRandrSimpleAPI*’ in initialization /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:289:38: error: expected ‘,’ or ‘;’ /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘virtual void KICCConfig::save()’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:359:37: error: expected type-specifier /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:359:37: error: cannot convert ‘int*’ to ‘KRandrSimpleAPI*’ in initialization /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:359:37: error: expected ‘,’ or ‘;’ make[2]: *** [kcontrol/iccconfig/CMakeFiles/kcm_iccconfig-module.dir/iccconfig.cpp.o] Error 1 make[2]: Leaving directory `/home/david/tbld/kdebase/src' make[1]: *** [kcontrol/iccconfig/CMakeFiles/kcm_iccconfig-module.dir/all] Error 2 make[1]: Leaving directory `/home/david/tbld/kdebase/src' make: *** [all] Error 2 Aborting...
I still don't understand the expected type-specifier error....
On Thu, Feb 10, 2011 at 19:30, David C. Rankin drankinatty@suddenlinkmail.com wrote:
On 02/10/2011 06:06 PM, David C. Rankin wrote:
Serghei, Tim, all,
Trying to debug the iccconfig.cpp error I'm having with kdebase, I've run across the following line in the ../iccconfig/Makefile.am:
noinst_HEADERS = iccconfig.h
<snip>
That wasn't the problem. I commented it out in the Makefile.am - same result.
I have also set -Wall in CMakeLists.txt for iccconfig. [ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -include tqt.h" ) ] Here is an expanded version of the compile error:
[ 29%] Building CXX object kcontrol/iccconfig/CMakeFiles/kcm_iccconfig-module.dir/iccconfig.cpp.o cd /home/david/tbld/kdebase/src/kcontrol/iccconfig && /usr/bin/c++ -Dkcm_iccconfig_module_EXPORTS -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 -Wall -include tqt.h -fPIC -I/home/david/tbld/kdebase/src/kcontrol/iccconfig -I/home/david/tbld/kdebase/src -I/opt/trinity/include -I/opt/qt/include -I/opt/qt/include/tqt -DKDE_CONFDIR="/opt/trinity/share/config" -o CMakeFiles/kcm_iccconfig-module.dir/iccconfig.cpp.o -c /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp In file included from /opt/qt/include/tqt/tqimage.h:32:0, from /opt/trinity/include/kaboutdata.h:24, from /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:29: /opt/qt/include/qimage.h: In member function ‘bool QImageTextKeyLang::operator<(const QImageTextKeyLang&) const’: /opt/qt/include/qimage.h:58:61: warning: suggest parentheses around ‘&&’ within ‘||’ /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘void KICCConfig::renameProfile()’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:148:6: warning: unused variable ‘i’ /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:149:12: warning: unused variable ‘iccFileArrayNew’ /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘QString KICCConfig::extractFileName(QString, QString)’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:255:1: warning: no return statement in function returning non-void /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘void KICCConfig::load(bool)’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:289:38: error: expected type-specifier /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:289:38: error: cannot convert ‘int*’ to ‘KRandrSimpleAPI*’ in initialization /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:289:38: error: expected ‘,’ or ‘;’ /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘virtual void KICCConfig::save()’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:359:37: error: expected type-specifier /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:359:37: error: cannot convert ‘int*’ to ‘KRandrSimpleAPI*’ in initialization /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:359:37: error: expected ‘,’ or ‘;’ make[2]: *** [kcontrol/iccconfig/CMakeFiles/kcm_iccconfig-module.dir/iccconfig.cpp.o] Error 1 make[2]: Leaving directory `/home/david/tbld/kdebase/src' make[1]: *** [kcontrol/iccconfig/CMakeFiles/kcm_iccconfig-module.dir/all] Error 2 make[1]: Leaving directory `/home/david/tbld/kdebase/src' make: *** [all] Error 2 Aborting...
I still don't understand the expected type-specifier error....
Can you try checking out kdebase from the latest svn?
On 02/10/2011 08:48 PM, Robert Xu wrote:
I still don't understand the expected type-specifier error....
Can you try checking out kdebase from the latest svn?
Will do, this was with kdebase rev: 1219760, I'll delete kdebase, pull a completely new kdebase source and try again and report back.
Do you want me to set any other flags to try and create more output to sort through? If so let me know what flags you want and where you want me to set them. (I'm no expert on setting make flags, but I'm competent to take instructions and use a keyboard :)
On Thu, Feb 10, 2011 at 22:07, David C. Rankin drankinatty@suddenlinkmail.com wrote:
On 02/10/2011 08:48 PM, Robert Xu wrote:
I still don't understand the expected type-specifier error....
Can you try checking out kdebase from the latest svn?
Will do, this was with kdebase rev: 1219760, I'll delete kdebase, pull a completely new kdebase source and try again and report back.
Do you want me to set any other flags to try and create more output to sort through? If so let me know what flags you want and where you want me to set them. (I'm no expert on setting make flags, but I'm competent to take instructions and use a keyboard :)
don't set any more cmake flags than needed, and we'll see how that builds. make sure you use make VERBOSE=1 only.
On 02/10/2011 09:10 PM, Robert Xu wrote:
On Thu, Feb 10, 2011 at 22:07, David C. Rankin drankinatty@suddenlinkmail.com wrote:
On 02/10/2011 08:48 PM, Robert Xu wrote:
I still don't understand the expected type-specifier error....
Can you try checking out kdebase from the latest svn?
Will do, this was with kdebase rev: 1219760, I'll delete kdebase, pull a completely new kdebase source and try again and report back.
Do you want me to set any other flags to try and create more output to sort through? If so let me know what flags you want and where you want me to set them. (I'm no expert on setting make flags, but I'm competent to take instructions and use a keyboard :)
don't set any more cmake flags than needed, and we'll see how that builds. make sure you use make VERBOSE=1 only.
Well, I checked out rev: 1219809 and we got to the same place :( My build arguments were:
[[ ${PATH%%:*} =~ /opt/trinity/bin ]] || export PATH=/opt/trinity/bin:$PATH export CMAKE_PREFIX_PATH=/opt/qt:/opt/trinity export CMAKE_INCLUDE_PATH=/opt/qt/include:/opt/qt/include/tqt:/usr/include/dbus-1.0:/opt/trinity/include:/opt/trinity/include/libkrandr export LD_LIBRARY_PATH=/opt/trinity/lib:$LD_LIBRARY_PATH export PKG_CONFIG_PATH=:/opt/trinity/lib/pkgconfig:/opt/qt/lib/pkgconfig
trinity_prefix="/opt/trinity"
cd ${srcdir} cmake ../ \ -DCMAKE_INSTALL_PREFIX=${trinity_prefix} \ -DWITH_QT3=ON \ -DQTDIR=/opt/qt \ -DBUILD_ALL=ON make VERBOSE=1
The error remained:
[ 30%] Building CXX object kcontrol/iccconfig/CMakeFiles/kcm_iccconfig-module.dir/iccconfig.cpp.o cd /home/david/tbld/kdebase/src/kcontrol/iccconfig && /usr/bin/c++ -Dkcm_iccconfig_module_EXPORTS -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 -fPIC -I/home/david/tbld/kdebase/src/kcontrol/iccconfig -I/home/david/tbld/kdebase/src -I/opt/trinity/include -I/opt/qt/include -I/opt/qt/include/tqt -DKDE_CONFDIR="/opt/trinity/share/config" -o CMakeFiles/kcm_iccconfig-module.dir/iccconfig.cpp.o -c /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘void KICCConfig::load(bool)’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:289:38: error: expected type-specifier /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:289:38: error: cannot convert ‘int*’ to ‘KRandrSimpleAPI*’ in initialization /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:289:38: error: expected ‘,’ or ‘;’ /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘virtual void KICCConfig::save()’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:359:37: error: expected type-specifier /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:359:37: error: cannot convert ‘int*’ to ‘KRandrSimpleAPI*’ in initialization /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:359:37: error: expected ‘,’ or ‘;’ make[2]: *** [kcontrol/iccconfig/CMakeFiles/kcm_iccconfig-module.dir/iccconfig.cpp.o] Error 1 make[2]: Leaving directory `/home/david/tbld/kdebase/src' make[1]: *** [kcontrol/iccconfig/CMakeFiles/kcm_iccconfig-module.dir/all] Error 2 make[1]: Leaving directory `/home/david/tbld/kdebase/src' make: *** [all] Error 2 Aborting...
Is there any use is rebuilding kdelibs again to see if that changes anything for the kdebase build? Thank you for your help Robert. Any ideas you have -- I'll try.
On 02/10/2011 09:55 PM, David C. Rankin wrote:
Is there any use is rebuilding kdelibs again to see if that changes anything for the kdebase build? Thank you for your help Robert. Any ideas you have -- I'll try.
Robert,
Just in case I'm doing something really stupid -- as a sanity check, here is what I have built and installed (in order):
trinity-qt3 3.3.8-20 trinity-pyqt3 3.18.1-9 trinity-tqtinterface 1219077-1.0 trinity-arts 1219157-1.1 trinity-kdelibs 1219276-1.0
(currently working on kdebase)
I'm not trying to build kdebase out of order am I?
The svn revisions above are set at build time by my build scripts that grabs the reversion # from the <current module>/.svn/entries file with "sed -n '4p' .svn/entries"
On Thu, Feb 10, 2011 at 23:14, David C. Rankin drankinatty@suddenlinkmail.com wrote:
On 02/10/2011 09:55 PM, David C. Rankin wrote:
Is there any use is rebuilding kdelibs again to see if that changes anything for the kdebase build? Thank you for your help Robert. Any ideas you have -- I'll try.
Robert,
Just in case I'm doing something really stupid -- as a sanity check, here is what I have built and installed (in order):
trinity-qt3 3.3.8-20 trinity-pyqt3 3.18.1-9 trinity-tqtinterface 1219077-1.0 trinity-arts 1219157-1.1 trinity-kdelibs 1219276-1.0
(currently working on kdebase)
I'm not trying to build kdebase out of order am I?
The svn revisions above are set at build time by my build scripts that grabs the reversion # from the <current module>/.svn/entries file with "sed -n '4p' .svn/entries"
Ok... Nothing's out of order here.
On Thu, Feb 10, 2011 at 22:55, David C. Rankin drankinatty@suddenlinkmail.com wrote:
On 02/10/2011 09:10 PM, Robert Xu wrote:
On Thu, Feb 10, 2011 at 22:07, David C. Rankin drankinatty@suddenlinkmail.com wrote:
On 02/10/2011 08:48 PM, Robert Xu wrote:
I still don't understand the expected type-specifier error....
Can you try checking out kdebase from the latest svn?
Will do, this was with kdebase rev: 1219760, I'll delete kdebase, pull a completely new kdebase source and try again and report back.
Do you want me to set any other flags to try and create more output to sort through? If so let me know what flags you want and where you want me to set them. (I'm no expert on setting make flags, but I'm competent to take instructions and use a keyboard :)
don't set any more cmake flags than needed, and we'll see how that builds. make sure you use make VERBOSE=1 only.
Well, I checked out rev: 1219809 and we got to the same place :( My build arguments were:
[[ ${PATH%%:*} =~ /opt/trinity/bin ]] || export PATH=/opt/trinity/bin:$PATH export CMAKE_PREFIX_PATH=/opt/qt:/opt/trinity export CMAKE_INCLUDE_PATH=/opt/qt/include:/opt/qt/include/tqt:/usr/include/dbus-1.0:/opt/trinity/include:/opt/trinity/include/libkrandr export LD_LIBRARY_PATH=/opt/trinity/lib:$LD_LIBRARY_PATH export PKG_CONFIG_PATH=:/opt/trinity/lib/pkgconfig:/opt/qt/lib/pkgconfig
trinity_prefix="/opt/trinity"
cd ${srcdir} cmake ../ \ -DCMAKE_INSTALL_PREFIX=${trinity_prefix} \ -DWITH_QT3=ON \ -DQTDIR=/opt/qt \ -DBUILD_ALL=ON make VERBOSE=1
The error remained:
[ 30%] Building CXX object kcontrol/iccconfig/CMakeFiles/kcm_iccconfig-module.dir/iccconfig.cpp.o cd /home/david/tbld/kdebase/src/kcontrol/iccconfig && /usr/bin/c++ -Dkcm_iccconfig_module_EXPORTS -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 -fPIC -I/home/david/tbld/kdebase/src/kcontrol/iccconfig -I/home/david/tbld/kdebase/src -I/opt/trinity/include -I/opt/qt/include -I/opt/qt/include/tqt -DKDE_CONFDIR="/opt/trinity/share/config" -o CMakeFiles/kcm_iccconfig-module.dir/iccconfig.cpp.o -c /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘void KICCConfig::load(bool)’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:289:38: error: expected type-specifier /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:289:38: error: cannot convert ‘int*’ to ‘KRandrSimpleAPI*’ in initialization /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:289:38: error: expected ‘,’ or ‘;’ /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘virtual void KICCConfig::save()’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:359:37: error: expected type-specifier /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:359:37: error: cannot convert ‘int*’ to ‘KRandrSimpleAPI*’ in initialization /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:359:37: error: expected ‘,’ or ‘;’ make[2]: *** [kcontrol/iccconfig/CMakeFiles/kcm_iccconfig-module.dir/iccconfig.cpp.o] Error 1 make[2]: Leaving directory `/home/david/tbld/kdebase/src' make[1]: *** [kcontrol/iccconfig/CMakeFiles/kcm_iccconfig-module.dir/all] Error 2 make[1]: Leaving directory `/home/david/tbld/kdebase/src' make: *** [all] Error 2 Aborting...
Is there any use is rebuilding kdelibs again to see if that changes anything for the kdebase build? Thank you for your help Robert. Any ideas you have -- I'll try.
Sure, you can try that... I'm truthfully stumped as well...
This is what I'm using for all Trinity cmake arguments: (RPM syntax, sorry) %cmake_trinity \ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ %__cmake \\ -DCMAKE_VERBOSE_MAKEFILE=ON \\ -DCMAKE_INSTALL_PREFIX:PATH=/opt/trinity \\ -DCMAKE_INSTALL_LIBDIR:PATH=/opt/trinity/%{_lib} \\ -DINCLUDE_INSTALL_DIR:PATH=/opt/trinity/include \\ -DLIB_INSTALL_DIR:PATH=/opt/trinity/%{_lib} \\ -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\ -DSHARE_INSTALL_PREFIX:PATH=/opt/trinity/share \\ %if 0%{?suse_version} || 0%{?mdkversion} \ -DQT_LIBRARY_DIRS=/usr/lib/qt3 \\ %endif \ %if "%{?_lib}" == "lib64" \ %{?_cmake_lib_suffix64} \\ %endif \ -DBUILD_SHARED_LIBS:BOOL=ON \\ -DPKGCONFIG_INSTALL_DIR=%{_libdir}/pkgconfig
I'll look closer, but something tells me I'm not going to get far...
On 02/10/2011 10:14 PM, Robert Xu wrote:
I'll look closer, but something tells me I'm not going to get far...
Hehehe...
I'd wager a little look closer by you = weeks of hunting and pecking around by me :) Thanks for your build arguments. I'll rebuild kdelibs and see if I can incorporate a few additional arguments and go from there.
On 02/10/2011 10:14 PM, Robert Xu wrote:
I'll look closer, but something tells me I'm not going to get far...
Hehehe...
I'd wager a little look closer by you = weeks of hunting and pecking around by me :) Thanks for your build arguments. I'll rebuild kdelibs and see if I can incorporate a few additional arguments and go from there.
Just for fu, try inserting this line: #include <libkrandr/libkrandr.h>
into this file: kdebase/kcontrol/iccconfig/iccconfig.cpp
directly underneath this line: #include <tqstring.h>
Then try rebuilding kdebase and see if the error changes at all. I have heard that GCC is not supposed to follow includes more than one file deep; if that is prohibiting a successful build then the above modification would fix it.
Let me know if that works!
Tim
On 02/11/2011 12:46 AM, Timothy Pearson wrote:
On 02/10/2011 10:14 PM, Robert Xu wrote:
I'll look closer, but something tells me I'm not going to get far...
Hehehe...
I'd wager a little look closer by you = weeks of hunting and pecking around by me :) Thanks for your build arguments. I'll rebuild kdelibs and see if I can incorporate a few additional arguments and go from there.
Just for fu, try inserting this line: #include <libkrandr/libkrandr.h>
into this file: kdebase/kcontrol/iccconfig/iccconfig.cpp
directly underneath this line: #include <tqstring.h>
Then try rebuilding kdebase and see if the error changes at all. I have heard that GCC is not supposed to follow includes more than one file deep; if that is prohibiting a successful build then the above modification would fix it.
Let me know if that works!
Tim
<snip> #include <string> #include <stdio.h> #include <tqstring.h>
// test inclusion #include <libkrandr/libkrandr.h>
#include "iccconfig.h"
using namespace std; <snip>
Hmm.. No change. Same 'expected type-specifier' -> cannot convert ‘int*’ to ‘KRandrSimpleAPI*’ in initialization error. It is like it is missing code that lets iccconfig.cpp know that ‘KRandrSimpleAPI*’ is an 'int*'. Could we add a type-cast somewhere? If so, where? Here is the error in full:
[ 30%] Building CXX object kcontrol/iccconfig/CMakeFiles/kcm_iccconfig-module.dir/iccconfig.cpp.o cd /home/david/tbld/kdebase/src/kcontrol/iccconfig && /usr/bin/c++ -Dkcm_iccconfig_module_EXPORTS -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 -fPIC -I/home/david/tbld/kdebase/src/kcontrol/iccconfig -I/home/david/tbld/kdebase/src -I/opt/trinity/include -I/opt/qt/include -I/opt/qt/include/tqt -DKDE_CONFDIR="/opt/trinity/share/config" -o CMakeFiles/kcm_iccconfig-module.dir/iccconfig.cpp.o -c /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘void KICCConfig::load(bool)’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:292:38: error: expected type-specifier /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:292:38: error: cannot convert ‘int*’ to ‘KRandrSimpleAPI*’ in initialization /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:292:38: error: expected ‘,’ or ‘;’ /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘virtual void KICCConfig::save()’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:362:37: error: expected type-specifier /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:362:37: error: cannot convert ‘int*’ to ‘KRandrSimpleAPI*’ in initialization /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:362:37: error: expected ‘,’ or ‘;’ make[2]: *** [kcontrol/iccconfig/CMakeFiles/kcm_iccconfig-module.dir/iccconfig.cpp.o] Error 1 make[2]: Leaving directory `/home/david/tbld/kdebase/src' make[1]: *** [kcontrol/iccconfig/CMakeFiles/kcm_iccconfig-module.dir/all] Error 2 make[1]: Leaving directory `/home/david/tbld/kdebase/src' make: *** [all] Error 2 Aborting...
On 02/11/2011 09:57 AM, David C. Rankin wrote:
On 02/11/2011 12:46 AM, Timothy Pearson wrote:
Then try rebuilding kdebase and see if the error changes at all. I have heard that GCC is not supposed to follow includes more than one file deep; if that is prohibiting a successful build then the above modification would fix it.
Let me know if that works!
Tim
<snip> #include <string> #include <stdio.h> #include <tqstring.h>
// test inclusion #include <libkrandr/libkrandr.h>
#include "iccconfig.h"
using namespace std;
<snip>
Hmm.. No change. Same 'expected type-specifier' -> cannot convert ‘int*’ to ‘KRandrSimpleAPI*’ in initialization error. It is like it is missing code that lets iccconfig.cpp know that ‘KRandrSimpleAPI*’ is an 'int*'. Could we add a type-cast somewhere? If so, where? Here is the error in full:
<snip>
Here are the current svn revisions for each of the modules I have built and installed if that makes any difference. I doubt it does, I do a svn up each day on the entire trinity svn tree and look for new/changed source files before copying the modules to a build directory. kdelibs was build just a few minutes ago and I haven't seen changes to tqtinterface or arts in several days so it should all be built against the current tree:
trinity-qt3 3.3.8-20 trinity-pyqt3 3.18.1-9 trinity-tqtinterface 1219398-1 trinity-arts 1219157-1.1 trinity-kdelibs 1219817-1.1
On 02/11/2011 09:57 AM, David C. Rankin wrote:
/home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘void KICCConfig::load(bool)’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:292:38: error: expected type-specifier /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:292:38: error: cannot convert ‘int*’ to ‘KRandrSimpleAPI*’ in initialization /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:292:38: error: expected ‘,’ or ‘;’ /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp: In member function ‘virtual void KICCConfig::save()’: /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:362:37: error: expected type-specifier /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:362:37: error: cannot convert ‘int*’ to ‘KRandrSimpleAPI*’ in initialization /home/david/tbld/kdebase/kcontrol/iccconfig/iccconfig.cpp:362:37: error: expected ‘,’ or ‘;’
Tim, Robert,
Looking at the iccconfig.cpp code, the errors are generated after each KRandrSimpleAPI *randrsimple = new KRandrSimpleAPI::KRandrSimpleAPI(); call. eg (line numbers mark line specified in error above):
void KICCConfig::load(bool useDefaults ) { //Update the toggle buttons with the current configuration int i; int j;
<snip>
XRROutputInfo *output_info; KRandrSimpleAPI *randrsimple = new KRandrSimpleAPI::KRandrSimpleAPI();
config->setReadDefaults( useDefaults ); 292
void KICCConfig::save() { int i; int j; KRandrSimpleAPI *randrsimple = new KRandrSimpleAPI::KRandrSimpleAPI();
// Write system configuration 362 systemconfig->setGroup(NULL);
I don't know if make is complaining about the config->setReadDefaults and systemconfig->setGroup calls or if it is actually complaining about the KRandrSimpleAPI *randrsimple = new KRandrSimpleAPI::KRandrSimpleAPI(); call. I suspect the latter. Dunno if this help, but I thought I would lay it out in case it sparks an idea. Could it be a class initialization/constructor problem for KICCConfig?
On 02/11/2011 11:21 AM, David C. Rankin wrote:
Tim, Robert,
Looking at the iccconfig.cpp code, the errors are generated after each KRandrSimpleAPI *randrsimple = new KRandrSimpleAPI::KRandrSimpleAPI(); call. eg (line numbers mark line specified in error above):
void KICCConfig::load(bool useDefaults ) { //Update the toggle buttons with the current configuration int i; int j;
<snip>
XRROutputInfo *output_info; KRandrSimpleAPI *randrsimple = new KRandrSimpleAPI::KRandrSimpleAPI();
config->setReadDefaults( useDefaults ); 292
Also, the only reference I can find grepping /opt/trinity/include to KRandrSimpleAPI is in:
libkrandr/libkrandr.h
class KRANDR_EXPORT KRandrSimpleAPI : public RandRDisplay
and... then I get lost :(
From the look of the KRANDR_EXPORT definitions, KRandrSimpleAPI seems to be the only class that is defined with KRANDR_EXPORT:
grep -r KRANDR_EXPORT /opt/trinity/include/*
kdelibs_export.h:#define KRANDR_EXPORT KDE_EXPORT libkrandr/libkrandr.h:class KRANDR_EXPORT KRandrSimpleAPI : public RandRDisplay libkrandr/libkrandr.h:#define KRANDR_EXPORT libkrandr/libkrandr.h:// KRANDR_EXPORT ScreenInfo* read_screen_info(Display *); libkrandr/libkrandr.h:// KRANDR_EXPORT int set_screen_size (ScreenInfo *screen_info); libkrandr/libkrandr.h:// KRANDR_EXPORT void output_auto (ScreenInfo *screen_info, OutputInfo *output_info); libkrandr/libkrandr.h:// KRANDR_EXPORT void output_off(ScreenInfo *screen_info, OutputInfo *output); libkrandr/libkrandr.h:// KRANDR_EXPORT CrtcInfo* auto_find_crtc (ScreenInfo *screen_info, OutputInfo *output_info); libkrandr/libkrandr.h:// KRANDR_EXPORT XRRModeInfo *find_mode_by_xid (ScreenInfo *screen_info, RRMode mode_id); libkrandr/libkrandr.h:// KRANDR_EXPORT int mode_height (XRRModeInfo *mode_info, Rotation rotation); libkrandr/libkrandr.h:// KRANDR_EXPORT int mode_width (XRRModeInfo *mode_info, Rotation rotation); libkrandr/libkrandr.h:// KRANDR_EXPORT int get_width_by_output_id (ScreenInfo *screen_info, RROutput output_id); libkrandr/libkrandr.h:// KRANDR_EXPORT int get_height_by_output_id (ScreenInfo *screen_info, RROutput output_id); libkrandr/libkrandr.h:// KRANDR_EXPORT char *get_output_name (ScreenInfo *screen_info, RROutput id); libkrandr/libkrandr.h:// KRANDR_EXPORT Status crtc_apply (CrtcInfo *crtc_info); libkrandr/libkrandr.h:// KRANDR_EXPORT Status crtc_disable (CrtcInfo *crtc); libkrandr/libkrandr.h:// KRANDR_EXPORT int main_low_apply (ScreenInfo *screen_info); libkrandr/libkrandr.h:// KRANDR_EXPORT bool kRandrHasRandr(); libkrandr/libkrandr.h:KRANDR_EXPORT const char *kRandrVersion(void); libkrandr/libkrandr.h:KRANDR_EXPORT const char *kRandrCopyright(void);
Is there something wrong in the class KRANDR_EXPORT KRandrSimpleAPI call that is preventing the expected type specifier for KRandrSimpleAPI from being seen in iccconfig.cpp with the latest gcc?