Problems compiling

27 views
Skip to first unread message

DeKay

unread,
Mar 8, 2009, 6:51:38 PM3/8/09
to arora-dev
Hi I am trying to build arora using cmake and I'm getting a warning
and an error. Compiling arora with qmake is clean. This on Linux
using Qt 4.4.3.

First the warning (this shows up many times during the compile):

[ 44%] Building CXX object src/CMakeFiles/surfboard.dir/
history.o
In file included from /home/dk/surfboard/src/ui_history.h:
26,
from /home/dk/surfboard/src/history.h:
354,
from /home/dk/surfboard/src/history.cpp:
63:
/usr/include/QtGui/qabstractitemview.h:283: warning: ‘virtual bool
QAbstractItemView::edit(const QModelIndex&,
QAbstractItemView::EditTrigger, QEvent*)’ was hidden
/home/dk/surfboard/src/edittreeview.h:79: warning: by ‘void
EditTreeView::edit(const QModelIndex&)’

Now the error:
CMakeFiles/surfboard.dir/utils/lineedit.o: In function `ProxyStyle':
/home/dk/surfboard/src/utils/proxystyle.h:45: undefined reference to
`vtable for ProxyStyle'
/home/dk/surfboard/src/utils/proxystyle.h:45: undefined reference to
`vtable for ProxyStyle'
CMakeFiles/surfboard.dir/utils/lineedit.o: In function `~ProxyStyle':
/home/dk/surfboard/src/utils/proxystyle.h:51: undefined reference to
`vtable for ProxyStyle'
/home/dk/surfboard/src/utils/proxystyle.h:51: undefined reference to
`vtable for ProxyStyle'
CMakeFiles/surfboard.dir/utils/lineedit.o:(.rodata._ZTV13LineEditStyle
[vtable for LineEditStyle]+0x8): undefined reference to
`ProxyStyle::metaObject() const'
CMakeFiles/surfboard.dir/utils/lineedit.o:(.rodata._ZTV13LineEditStyle
[vtable for LineEditStyle]+0xc): undefined reference to
`ProxyStyle::qt_metacast(char const*)'
CMakeFiles/surfboard.dir/utils/lineedit.o:(.rodata._ZTV13LineEditStyle
[vtable for LineEditStyle]+0x10): undefined reference to
`ProxyStyle::qt_metacall(QMetaObject::Call, int, void**)'
CMakeFiles/surfboard.dir/utils/lineedit.o:(.rodata._ZTI13LineEditStyle
[typeinfo forLineEditStyle]+0x8): undefined reference to `typeinfo for
ProxyStyle'
collect2: ld returned 1 exit status
make[2]: *** [src/surfboard] Error 1
make[1]: *** [src/CMakeFiles/surfboard.dir/all] Error 2
make: *** [all] Error 2

Any ideas?

Benjamin Meyer

unread,
Mar 9, 2009, 4:04:19 AM3/9/09
to aror...@googlegroups.com
By building with cmake you made a cmake build file right? The
warnings are interesting and I have submitted a fix for them, which
compiler/flags are you using? On the ProxyStyle class, the definition
and the implementation is in the header so you need to specify that in
your cmake file (there is no proxystyle.cpp).

-Benjamin Meyer

DeKay

unread,
Mar 10, 2009, 11:08:15 PM3/10/09
to arora-dev
Well, I'm making some progress. Your fix for the warning worked. My
compile flags were the defaults cmake was coming up with:

cd /home/dk/surfboard/src && /usr/bin/c++ -DQT_DLL -DQT_UITOOLS_LIB -
DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_NETWORK_LIB -
DQT_CORE_LIB -D_BSD_SOURCE -DQT_DLL -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -
DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -
DKDE_DEPRECATED_WARNINGS -DQT_NO_CAST_FROM_ASCII -DQT_STRICT_ITERATORS
-DGITVERSION=0 -DGITCHANGENUMBER=0 -DQT_NO_UITOOLS -DQT_NO_DEBUG -Wnon-
virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-
subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -
fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics
-fvisibility=hidden -fvisibility-inlines-hidden -O2 -g <snip
includes> -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-DPKGDATADIR="\"/usr/share/surfboard\"" -o CMakeFiles/surfboard.dir/
edittreeview.o -c /home/dk/surfboard/src/edittreeview.cpp

Unfortunately, my other problem still persists. I have this snippet
as part of my CMakeLists.txt file SRCS list. Note that proxystyle.h
is included.
<snip>
utils/autosaver.cpp
utils/lineedit.cpp
utils/lineedit_p.h
utils/proxystyle.h
utils/singleapplication.cpp
utils/squeezelabel.cpp

I then run the cmake macro
kde4_add_executable(surfboard ${surfboard_SRCS} )

which is supposed to run automoc4, but I see that the MOC is not being
called for proxystyle.h, even though it is being called for
lineedit_p.h above it and singleapplication.cpp below it. So this is
a problem with cmake and not the arora code, but I'm no cmake guru and
this is driving me crazy.

The kde4automoc() macro was also removed around the 4.1 timeframe so I
can't try that to force the issue.

On Mar 9, 2:04 am, Benjamin Meyer <b...@meyerhome.net> wrote:
> By building with cmake you made a cmake build file right?  The  clean

Benjamin

unread,
Mar 13, 2009, 11:11:48 AM3/13/09
to aror...@googlegroups.com
When compiling against Qt 4.5 the proxy style is not used by Arora so
you can just remove it from the cmake build.

-Benjamin Meyer

DeKay

unread,
Mar 13, 2009, 2:09:00 PM3/13/09
to arora-dev
Indeed. I'm still on 4.4 and stumbled over a hack workaround
yesterday. If I simply create proxystyle.cpp with a single line
"#include proxystyle.h" and put this in my list of sources, everything
works great and my project links cleanly. There's got to be something
more elegant than this, but at least I'm up and running now.

On Mar 13, 9:11 am, Benjamin <b...@meyerhome.net> wrote:
> When compiling against Qt 4.5 the proxy style is not used by Arora so
> you can just remove it from the cmake build.
>
> -Benjamin Meyer
>

Benjamin Meyer

unread,
Mar 13, 2009, 2:22:49 PM3/13/09
to aror...@googlegroups.com
Glad to here. Just curious any particular reason fro getting CMake
working rather then using qmake?

-Benjamin Meyer

DeKay

unread,
Mar 14, 2009, 10:26:57 AM3/14/09
to arora-dev
Good question. I am the same guy that started the "KDE Version"
thread. I took your suggestion and am starting a branch where I can
play around KDE-ifying some of the code. The first step in that
direction was CMake. I hope to be able to keep up with changes to
Arora, but have no intentions of ever trying to rally to get KDE stuff
into Arora. That's one reason I've given my work a separate name.
(P.S. Where did the name Arora come from anyway? Is it another
spelling for Aurora?)

I'm new to doing Qt / KDE development, but have wanted to get involved
in a project for some time. This seemed like something I could sink
my teeth into, was at about the right skill level, and would give me
the opportunity to learn something along the way. If it doesn't turn
into anything (I lose interest / get in over my head / get sucked into
a new project), then no harm done.

Hope that is cool with you.

Paweł Prażak

unread,
Mar 15, 2009, 12:54:47 PM3/15/09
to arora-dev
Hi DeKay,

I'm was about to start same thing, that is to play around with the
idea of Arora's KDE integration and I was wandering if we can try to
do it together. I've done small experiment with QtIconLoader, but it's
not enough for the KDE look'n'feel. I was thinking about making
minimal changes to Arora's code, as small as possible to make it
easier to maintain. I still have no idea what is the best way to do it
thou. One way would be to add a lots of preprocessor directives, but
I'm afraid it would make the code hard to read. I wonder if using
qmake for this version would make sense (if it wouldn't be to
difficult or complicated it would save us some trouble and possible
mistakes and source of bugs).

Best regards,
Paweł

DeKay

unread,
Mar 17, 2009, 2:10:17 PM3/17/09
to arora-dev
Hi Pawel

The first thing I did was get (preliminary) CMake going, figuring that
if I'm going to try to get a KDE port going, I would do it the KDE
way. The next thing I'm digging in to is KXmlGui support for the same
reason (unfortunately this is poorly documented on techbase). After
that, I'd like to replace the download manager with KDE's notification
system. There are bound to be intrusive changes in some places, and
I'm not sure how that can be avoided. It probably can't. I'm hoping
Git's powerful merge features help out a lot here to keep synced with
arora.

You're welcome to fork the project and play around. Search for
"surfboard" on github and have a go.

Paweł Prażak

unread,
Mar 22, 2009, 8:18:43 AM3/22/09
to arora-dev
Thanks, I've forked the surfboard and started to play with the code a
bit.
This is my repo git://github.com/pawelprazak/surfboard.git

I'm doing kde versions of browsermainwindow and tabwidget. I've
modified all QTabWidget to KTabWidget and QAction to KAction and now
it's broken.
I've have a problem with MOC and I have no idea what is wrong, please
help :)
I keep getting this error:
[ 29%] [ 32%] [ 32%] Building CXX object src/CMakeFiles/surfboard.dir/
surfboard_automoc.o
In file included from /home/kojot/dev/arora-surfboard/src/
surfboard_automoc.cpp:29:
/home/kojot/dev/arora-surfboard/src/moc_stabwidget.cpp:121: error:
'KTabWidget' has not been declared
/home/kojot/dev/arora-surfboard/src/moc_stabwidget.cpp: In member
function 'virtual void* TabWidget::qt_metacast(const char*)':
/home/kojot/dev/arora-surfboard/src/moc_stabwidget.cpp:135: error:
'KTabWidget' has not been declared
/home/kojot/dev/arora-surfboard/src/moc_stabwidget.cpp: In member
function 'virtual int TabWidget::qt_metacall(QMetaObject::Call, int,
void**)':
/home/kojot/dev/arora-surfboard/src/moc_stabwidget.cpp:140: error:
'KTabWidget' has not been declared
/home/kojot/dev/arora-surfboard/src/moc_stabwidget.cpp:177: error:
expected type-specifier before 'KAction'
/home/kojot/dev/arora-surfboard/src/moc_stabwidget.cpp:177: error:
expected `>' before 'KAction'
/home/kojot/dev/arora-surfboard/src/moc_stabwidget.cpp:177: error:
expected `(' before 'KAction'
/home/kojot/dev/arora-surfboard/src/moc_stabwidget.cpp:177: error:
'KAction' was not declared in this scope
/home/kojot/dev/arora-surfboard/src/moc_stabwidget.cpp:177: error:
expected primary-expression before ')' token

Here is the header from which moc file is generated:
http://github.com/pawelprazak/surfboard/blob/62e0824a4ac7710e913f6829bcfab5d377bcc438/src/kde/stabwidget.h

and relevant lines look like this:
---
int TabWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = KTabWidget::qt_metacall(_c, _id, _a); // <- line 140
if (_id < 0)
if (_c == QMetaObject::InvokeMetaMethod) {
switch (_id) {
/* ... */
case 32: aboutToShowRecentTriggeredAction
((*reinterpret_cast< KAction*(*)>(_a[1]))); break; // <- line 177
---

Any help, sugestions, any feadback would be appreciated.

Regards,
Paweł

Paweł Prażak

unread,
Mar 22, 2009, 3:42:32 PM3/22/09
to arora-dev
OK, I've managed to solve this. A little script was helpful.
grep -EnHR "#include \"tabwidget.h\"|#include \"browsermainwindow.h\""
src | awk -F: '{ print "+" $2 " " $1 }'

After taking care of all instances of #include "tabwidget.h" error
disappeared.

So port is slowly going forward.
Any suggestions or tips would be very appreciated.

Regards,
Paweł
Reply all
Reply to author
Forward
0 new messages