Bug 392635 - Compile error on KDE Neon 5.12: cannot convert ‘const wchar_t*’ to ‘TagLib::FileName
Summary: Compile error on KDE Neon 5.12: cannot convert ‘const wchar_t*’ to ‘TagLib::F...
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: kf5
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-02 13:45 UTC by Jürgen Blümer
Modified: 2020-02-18 20:46 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jürgen Blümer 2018-04-02 13:45:40 UTC
Performing C++ SOURCE FILE Test COMPLEX_TAGLIB_FILENAME failed with the following output:
Change Dir: /opt/amarok/amarok-2.9.0/amarok-2.9.0-build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_e766a/fast"
/usr/bin/make -f CMakeFiles/cmTC_e766a.dir/build.make CMakeFiles/cmTC_e766a.dir/build
make[1]: Verzeichnis „/opt/amarok/amarok-2.9.0/amarok-2.9.0-build/CMakeFiles/CMakeTmp“ wird betreten
Building CXX object CMakeFiles/cmTC_e766a.dir/src.cxx.o
/usr/bin/c++    -I/usr/include/taglib  -DCOMPLEX_TAGLIB_FILENAME -I/usr/include/taglib   -o CMakeFiles/cmTC_e766a.dir/src.cxx.o -c /opt/amarok/amarok-2.9.0/amarok-2.9.0-build/CMakeFiles/CMakeTmp/src.cxx
/opt/amarok/amarok-2.9.0/amarok-2.9.0-build/CMakeFiles/CMakeTmp/src.cxx: In function ‘int main()’:
/opt/amarok/amarok-2.9.0/amarok-2.9.0-build/CMakeFiles/CMakeTmp/src.cxx:5:38: error: cannot convert ‘const wchar_t*’ to ‘TagLib::FileName {aka const char*}’ in initialization
   TagLib::FileName fileName2(L"wchar");
                                      ^
CMakeFiles/cmTC_e766a.dir/build.make:65: die Regel für Ziel „CMakeFiles/cmTC_e766a.dir/src.cxx.o“ scheiterte
make[1]: *** [CMakeFiles/cmTC_e766a.dir/src.cxx.o] Fehler 1
make[1]: Verzeichnis „/opt/amarok/amarok-2.9.0/amarok-2.9.0-build/CMakeFiles/CMakeTmp“ wird verlassen
Makefile:126: die Regel für Ziel „cmTC_e766a/fast“ scheiterte
make: *** [cmTC_e766a/fast] Fehler 2

Source file was:
#include <tfile.h>
        int main()
        {
                TagLib::FileName fileName1("char");
                TagLib::FileName fileName2(L"wchar");
                return 0;
        }
Determining if the Q_WS_WIN exist failed with the following output:
Change Dir: /opt/amarok/amarok-2.9.0/amarok-2.9.0-build/CMakeFiles/CMakeTmp
Comment 1 Heiko Becker 2018-04-04 14:08:20 UTC
Which compiler do you use? And which taglib version?
Comment 2 Jürgen Blümer 2018-04-08 16:07:18 UTC
To answer your questions

gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)

> apt-show-versions libtag1-dev
libtag1-dev:amd64/xenial 1.11.1-0.2+16.04+xenial+build1 uptodate
libtag1-dev:i386 not installed
Comment 3 Serhiy Zahoriya 2019-10-26 11:20:05 UTC
If you want to get rid of this message you can remove L before "wchar". But I'm not sure it's safe because on a freshly-installed Lubuntu 19.10 Amarok does not compile with this and two other errors:
1. Somehow not seeing pthread_create
2. MySQL test failing
Comment 4 Serhiy Zahoriya 2020-02-16 21:49:26 UTC
MySQL error may be fixed by this patch: https://mirror.git.trinitydesktop.org/gitea/TDE/amarok/issues/9
Comment 5 Myriam Schweingruber 2020-02-17 15:02:36 UTC
(In reply to Serhiy Zahoriya from comment #4)
> MySQL error may be fixed by this patch:
> https://mirror.git.trinitydesktop.org/gitea/TDE/amarok/issues/9

please submit patches to https://phabricator.kde.org, subscribing the 'amarok' group to it, else nobody will look at.
Comment 6 Serhiy Zahoriya 2020-02-18 06:28:58 UTC
Thank you, Myriam. Unfortunately this is beyond the scope of my current familiarity with C++ and amarok source. I tried looking into it but it's some old fork of amarok, before 2.0 and I don't know yet how to port these changes.

> else nobody will look at
Amarok FTBFS on newer systems which is critical. It's either someone will have to look at it eventually or we can close this as unmaintained.
Comment 7 Myriam Schweingruber 2020-02-18 19:33:42 UTC
(In reply to Serhiy Zahoriya from comment #6)
> Thank you, Myriam. Unfortunately this is beyond the scope of my current
> familiarity with C++ and amarok source. I tried looking into it but it's
> some old fork of amarok, before 2.0 and I don't know yet how to port these
> changes.

Pre 2.x is irrelevant today and pretty pointless, as pre 2.x we had three different options for databases, and default was SQLite. It was horrible to maintain. Only current master should be worked with nowadays, so event the version in this bug report (2.9.0) is outdated and was never meant to work on Qt5-based systems anyway.
> 
> > else nobody will look at
> Amarok FTBFS on newer systems which is critical. It's either someone will
> have to look at it eventually or we can close this as unmaintained.

I said nobody will look at patches that are not submitted to our system.

Current master builds with mariadb AFAIK
Comment 8 Serhiy Zahoriya 2020-02-18 19:37:42 UTC
Oh, so I just need to install different package? I'll check. This problem is relevant for current master, last checked yesterday so I'll change the version, hope that's ok.
Comment 9 Serhiy Zahoriya 2020-02-18 20:42:01 UTC
Ok, I have it compiling now (in progress) on Ubuntu 20.04.
I had to install

libmariadb-dev libmariadbd-dev libmariadb-dev-compat libglib2.0-dev

And I had to put L before "wchar" back. The only change I had to make to code was using i variable with "(void)i" in cmake/modules/FindMySQL.cmake

I'll report back later.
Comment 10 Serhiy Zahoriya 2020-02-18 20:46:44 UTC
Since some of my actions mentioned above fixed this particular problem I'll change this issue status. I assume it was caused by missing packages.