Bug 349353 - error building kdepim (KF5 port) with undefined reference to PimCommon::SyntaxHighlighterBase
Summary: error building kdepim (KF5 port) with undefined reference to PimCommon::Synta...
Status: RESOLVED FIXED
Alias: None
Product: kdepim
Classification: Applications
Component: general (show other bugs)
Version: GIT (master)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-18 22:05 UTC by desaparecido
Modified: 2019-05-21 05:57 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
information about starting build (dependencies, etc) (1013 bytes, text/plain)
2015-06-18 22:17 UTC, desaparecido
Details
message error when building kdepim after completely uninstall/install (latest git) (12.27 KB, text/plain)
2015-06-19 15:26 UTC, desaparecido
Details

Note You need to log in before you can comment on or make changes to this bug.
Description desaparecido 2015-06-18 22:05:00 UTC
since 5-6 days I always have this error when building kdepim-git package in Archlinux (AUR repo), and I tried different commits this week, each time with others kdepim packages dependencies builded to latest commit, here the error message:

[ 98%] Building CXX object kmail/CMakeFiles/kmailprivate.dir/mailcomposeradaptor.cpp.o
[ 98%] Building CXX object kmail/CMakeFiles/kmailprivate.dir/kmailadaptor.cpp.o                         
/usr/lib/libtemplateparser.so.5: undefined reference to `PimCommon::SyntaxHighlighterBase::~SyntaxHighlighterBase()'
/usr/lib/libtemplateparser.so.5: undefined reference to `PimCommon::SyntaxHighlighterBase::highlightBlock(QString const&)'
/usr/lib/libtemplateparser.so.5: undefined reference to `PimCommon::SyntaxHighlighterBase::qt_metacall(QMetaObject::Call, int, void**)'
/usr/lib/libtemplateparser.so.5: undefined reference to `PimCommon::SyntaxHighlighterBase::staticMetaObject'
/usr/lib/libtemplateparser.so.5: undefined reference to `PimCommon::SyntaxHighlighterBase::SyntaxHighlighterBase(QTextDocument*)'
/usr/lib/libtemplateparser.so.5: undefined reference to `typeinfo for PimCommon::SyntaxHighlighterBase'
/usr/lib/libtemplateparser.so.5: undefined reference to `PimCommon::SyntaxHighlighterBase::qt_metacast(char const*)'
/usr/lib/libmessageviewer.so.5: undefined reference to `PimCommon::NetworkUtil::lowBandwidh() const'
collect2: error: ld returned 1 exit status
korganizer/CMakeFiles/korganizer.dir/build.make:188: recipe for target 'korganizer/korganizer' failed
make[2]: *** [korganizer/korganizer] Error 1
CMakeFiles/Makefile2:24009: recipe for target 'korganizer/CMakeFiles/korganizer.dir/all' failed
make[1]: *** [korganizer/CMakeFiles/korganizer.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

and after some lines and at the end:

In file included from /usr/include/KF5/KXmlGui/kxmlguiwindow.h:33:0,
                 from /tmp/makepkg/kdepim-git/src/kdepim/kmail/secondarywindow.h:34,
                 from /tmp/makepkg/kdepim-git/src/build/kmail/../../kdepim/kmail/editor/composer.h:23,
                 from /tmp/makepkg/kdepim-git/src/build/kmail/moc_composer.cpp:9,
                 from /tmp/makepkg/kdepim-git/src/build/kmail/kmailprivate_automoc.cpp:31:
/usr/include/KF5/KXmlGui/kmainwindow.h:604:37: note: declared here
     virtual KXMLGUI_DEPRECATED void showAboutApplication() {}
                                     ^
Linking CXX shared library libkmailprivate.so
[ 98%] Built target kmailprivate
Makefile:126: recipe for target 'all' failed
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

all dependencies usually are there.   I use KF5 and plasma from git.


Reproducible: Always

Steps to Reproduce:
1.build all packages of kdepim to their latest commit
2.build kdepim-git package
3.sometimes I uninstalled completely all packages of kdepim stuffs and to rebuild/install 

Actual Results:  
each time the same error when building kdepim-git

Expected Results:  
a successfully kdepim-git package builded

Archlinux with [testing] repo enable, GCC 5.1.0, Linux kernel 4.0.5, KF5 and Plasma GIT versions.
Comment 1 desaparecido 2015-06-18 22:17:09 UTC
Created attachment 93226 [details]
information about starting build (dependencies, etc)
Comment 2 Laurent Montel 2015-06-19 04:39:27 UTC
I don't have idea why it takes templateparser for system file and not build dir
a workaround is desinstall existing kdepim and build new one.
Comment 3 desaparecido 2015-06-19 09:36:27 UTC
(In reply to Laurent Montel from comment #2)
> I don't have idea why it takes templateparser for system file and not build
> dir
> a workaround is desinstall existing kdepim and build new one.

thanks for reply, I did it last sunday, but I'll try again today, and I report it if something changes
Comment 4 desaparecido 2015-06-19 15:26:55 UTC
Created attachment 93236 [details]
message error when building kdepim after completely uninstall/install (latest git)

I uninstalled completely kdepim, updated all KF5 and Plasma packages to their latest commit and build/install again kdepim stuff, and again with an error message but this time with different libraries: "/calendarsupport/libcalendarsupportcollectionpage.so.4.78.0: undefined reference to `MailCommon"
Comment 5 desaparecido 2015-06-19 17:30:29 UTC
(In reply to desaparecido from comment #4)
> Created attachment 93236 [details]
> message error when building kdepim after completely uninstall/install
> (latest git)
> 
> I uninstalled completely kdepim, updated all KF5 and Plasma packages to
> their latest commit and build/install again kdepim stuff, and again with an
> error message but this time with different libraries:
> "/calendarsupport/libcalendarsupportcollectionpage.so.4.78.0: undefined
> reference to `MailCommon"

this message output is additional message, the first one is still there too :(
Comment 6 desaparecido 2015-07-01 12:12:20 UTC
hi, finally I can take the time to test again and now all builds fine, so probably a commit was solved my issue or the small bug in my PC took his day-off ;-)
Comment 7 Max Sydorenko 2015-07-09 21:21:24 UTC
Unfortunately I still can not build kdepim, I uninstalled old kdepim, built all kdepim requirements from git and still getting 
/usr/bin/ld: warning: libmailcommon.so.5, needed by ../calendarsupport/libcalendarsupportcollectionpage.so.4.80.0, not found
and subsequent errors in libcalendarsupportcollectionpage.so
Comment 8 Dāvis 2015-07-17 19:19:07 UTC
For some reason it doesn't search build dir for libraries so I used this workaround, basically just add all those dirs to LD_LIBRARY_PATH and it will make them findable

export LD_LIBRARY_PATH=/mnt/AUR/kdepim-git/src/build/grantleetheme:/mnt/AUR/kdepim-git/src/build/kaddressbookgrantlee:/mnt/AUR/kdepim-git/src/build/libkpgp:/mnt/AUR/kdepim-git/src/build/libkleo:/mnt/AUR/kdepim-git/src/build/agents/followupreminderagent:/mnt/AUR/kdepim-git/src/build/agents/sendlateragent:/mnt/AUR/kdepim-git/src/build/messagecore:/mnt/AUR/kdepim-git/src/build/messageviewer:/mnt/AUR/kdepim-git/src/build/templateparser:/mnt/AUR/kdepim-git/src/build/mailimporter:/mnt/AUR/kdepim-git/src/build/messagecomposer:/mnt/AUR/kdepim-git/src/build/mailcommon
Comment 9 Ivan Čukić 2015-11-12 18:37:30 UTC
Happens for me as well.

The thing that solved it for me is putting these in CMakeLists.txt (not proposing to actually do it in the repo)

  set(CMAKE_CXX_VISIBILITY_PRESET default)
  set(CMAKE_VISIBILITY_INLINES_HIDDEN 0)

I'm guessing that there are problems with CMakeLists in the project that sometimes grab the installed libraries instead of those being compiled - and since the install does not happen because of the build failure, it does not pick up the new libraries with the new symbols.
Comment 10 Allen Winter 2016-10-16 15:47:39 UTC
over 1 year since this was first reported.
has it been resolved yet?
Comment 11 Laurent Montel 2019-05-21 05:57:24 UTC
For me it's fixed