d1vanov / QEverCloud

Unofficial Evernote Cloud API for Qt 5.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Various undefined reference problem in the test-build qevercloud package

hosiet opened this issue · comments

Hello,

I made the test-build packages for qevercloud and tested it with nixnote2 (with modifications of source code to use system qevercloud library and header files).

Chdir into nixnote2 and the build can be triggered by debuild -us -uc -i -b.

The result buildlog is attached. Error info starts at line 2848, both about the source code of nixnote2 and the qevercloud headers. For example:

release/nixnote.o: In function `NixNote::synchronize()':
./nixnote.cpp:1380: undefined reference to `qevercloud::EvernoteOAuthDialog::EvernoteOAuthDialog(QString, QString, QString, QWidget*)'
/usr/include/qt5qevercloud/EverCloudException.h:110: undefined reference to `vtable for qevercloud::EvernoteException'
/usr/include/qt5qevercloud/exceptions.h:27: undefined reference to `vtable for qevercloud::ThriftException'

So there must be something wrong :-( Do you have any idea?

The original build log:
nixnote2_testbuild.txt

update: This should not be packaging problem. The same problem happens when using bundled files in generated/ directory.

"undefined reference to vtable" usually occurs when there's some pure virtual method left unimplemented. Or its implementation didn't make it into the final binary.

First I'd like you to see what happens if you try to link nixnote2 to the vanilla QEverCloud library, without Debian patches at all, to understand whether the bug belongs to the vanilla version or to patches.

FWIW, I regulaly test the changes to QEverCloud via a NotePoster test app + one more app which I haven't open-sourced yet. I've never seen such symbols problem there.

It looks like only a few symbols could not be found (related to OAuth and
Exception). If the example project don't use them them maybe there won't be
errors. I'm not sure. Will dig into it later.

在 2016年9月7日週三 12:50,Dmitry Ivanov notifications@github.com 寫道:

FWIW, I regulaly test the changes to QEverCloud via a NotePoster
https://github.com/d1vanov/QEverCloud-example-NotePoster test app + one
more app which I haven't open-sourced yet. I've never seen such symbols
problem there.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#6 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIDYFkOjhyGIQXkgvDlNBxwcX_IbMsShks5qnkKUgaJpZM4J2hMe
.

The example project does use OAuth, otherwise it won't be able to communicate with Evernote servers 😃 It doesn't use the exceptions directly though.

In the build log you attached I don't actually see the linkage to QEverCloud library at all:
-L/usr/X11R6/lib64 -lhunspell -lcurl -L/usr/lib -lpoppler-qt5 -g -rdynamic -lQt5PrintSupport -lQt5WebKitWidgets -lQt5Widgets -lQt5WebKit -lQt5Gui -lQt5Network -lQt5Sql -lQt5Xml -lQt5DBus -lQt5Core -lGL -lpthread
I'd say that should explain the undefined references you have. Try to add the linkage to QEverCloud library into the NixNote.pro file:

greaterThan(QT_MAJOR_VERSION, 4) {
    QT       += core gui widgets printsupport webkit webkitwidgets sql network xml dbus
    DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
    INCLUDEPATH += /usr/include/poppler/qt5
    LIBS +=    -lhunspell -lcurl \
               -lpthread -L/usr/lib -lpoppler-qt5 -lqt5qevercloud -g -rdynamic
}

equals(QT_MAJOR_VERSION, 4) {
    QT       += core gui webkit sql network xml
    INCLUDEPATH += /usr/include/poppler/qt4
    LIBS +=    -lhunspell -lcurl \
               -lpthread -L/usr/lib -lpoppler-qt4 -lqt4qevercloud -g -rdynamic
}

Yes you are right, silly me. Things are working well now.

在 2016年9月7日週三 15:24,Dmitry Ivanov notifications@github.com 寫道:

In the build log you attached I don't actually see the linkage to
QEverCloud library at all:
-L/usr/X11R6/lib64 -lhunspell -lcurl -L/usr/lib -lpoppler-qt5 -g -rdynamic
-lQt5PrintSupport -lQt5WebKitWidgets -lQt5Widgets -lQt5WebKit -lQt5Gui
-lQt5Network -lQt5Sql -lQt5Xml -lQt5DBus -lQt5Core -lGL -lpthread
I'd say that should explain the undefined references you have. Try to add
the linkage to QEverCloud library into the NixNote.pro
https://github.com/hosiet/nixnote2/blob/debian/NixNote2.pro file:

greaterThan(QT_MAJOR_VERSION, 4) {
QT += core gui widgets printsupport webkit webkitwidgets sql network xml dbus
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
INCLUDEPATH += /usr/include/poppler/qt5
LIBS += -lhunspell -lcurl
-lpthread -L/usr/lib -lpoppler-qt5 -lqt5qevercloud -g -rdynamic
}

equals(QT_MAJOR_VERSION, 4) {
QT += core gui webkit sql network xml
INCLUDEPATH += /usr/include/poppler/qt4
LIBS += -lhunspell -lcurl
-lpthread -L/usr/lib -lpoppler-qt4 -lqt4qevercloud -g -rdynamic
}


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#6 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIDYFlDNHLNyXFQuJEEs9-ZHa6dOW1-qks5qnmaQgaJpZM4J2hMe
.

Great, closing this one then 😃