Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

Compilation issues with GCC8 #193

Closed
crazypingoo94 opened this issue Jan 29, 2018 · 10 comments
Closed

Compilation issues with GCC8 #193

crazypingoo94 opened this issue Jan 29, 2018 · 10 comments
Assignees
Labels
Milestone

Comments

@crazypingoo94
Copy link

Description:

I wanted to install mellowplayer on my manjaro (archlinux based system distrib )

Steps To Reproduce:

I just run this command line 'yaourt -S mellowplayer'

Log Files

Paste the application logs (About > Show logs)

==> Validating source files with md5sums...
    3.3.1.tar.gz ... Passed
    widevine-path.patch ... Passed
==> Extracting sources...
  -> Extracting 3.3.1.tar.gz with bsdtar
==> Starting prepare()...
patching file /tmp/yaourt-tmp-jeanmi/aur-mellowplayer/src/MellowPlayer-3.3.1/src/main/share/applications/mellowplayer.desktop
==> Starting build()...
-- The C compiler identification is GNU 8.0.1
-- The CXX compiler identification is GNU 8.0.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Qt 5.10.0 in /usr/lib64/cmake/Qt5
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Checking for one of the modules 'libnotify'
-- Found libnotify 0.7.7 in /usr/lib
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Using GNU gold linker
-- qml import path: from imports.qrc
-- CMAKE_INSTALL_BINDIR: /usr/bin
-- CMAKE_INSTALL_LIBDIR: /usr/lib
-- CMAKE_INSTALL_DATADIR: /usr/share
-- cotire 1.7.10 loaded.
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/libX11.so
-- CXX target MellowPlayer.Domain cotired without unity build.
-- CXX target MellowPlayer.Infrastructure cotired without unity build.
-- Linux header files 
-- CXX target MellowPlayer.Presentation cotired without unity build.
-- Building MellowPlayer v3.3.1.0
-- Build date: 2018-01-29
-- Build type: Release
-- Use pre-compiled headers: ON
-- Default theme: Adaptive
-- Build tests: OFF
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/yaourt-tmp-jeanmi/aur-mellowplayer/src/MellowPlayer-3.3.1
Scanning dependencies of target qxtglobalshortcut_autogen
[  1%] Automatic MOC and RCC for target qxtglobalshortcut
[  1%] Built target qxtglobalshortcut_autogen
Scanning dependencies of target qxtglobalshortcut
[  2%] Building CXX object src/lib/MellowPlayer/CMakeFiles/qxtglobalshortcut.dir/__/__/__/3rdparty/libqxt/src/widgets/qxtglobalshortcut.cpp.o
[  2%] Building CXX object src/lib/MellowPlayer/CMakeFiles/qxtglobalshortcut.dir/__/__/__/3rdparty/libqxt/src/widgets/x11/qxtglobalshortcut_x11.cpp.o
[  3%] Building CXX object src/lib/MellowPlayer/CMakeFiles/qxtglobalshortcut.dir/qxtglobalshortcut_autogen/mocs_compilation.cpp.o
[  3%] Linking CXX static library libqxtglobalshortcut.a
[  3%] Built target qxtglobalshortcut
Scanning dependencies of target MellowPlayer.Domain_autogen
[  3%] Automatic MOC and RCC for target MellowPlayer.Domain
[  3%] Built target MellowPlayer.Domain_autogen
[  4%] Generating src/lib/MellowPlayer/Domain/cotire/MellowPlayer.Domain_CXX_prefix.cxx
[  4%] Generating src/lib/MellowPlayer/Domain/cotire/MellowPlayer.Domain_CXX_prefix.hxx
[  5%] Building CXX precompiled header src/lib/MellowPlayer/Domain/cotire/MellowPlayer.Domain_CXX_prefix.hxx.gch
In file included from /usr/include/qt/QtGui/qtransform.h:43,
                 from /usr/include/qt/QtGui/qimage.h:48,
                 from /usr/include/qt/QtGui/qpixmap.h:49,
                 from /usr/include/qt/QtGui/qicon.h:46,
                 from /usr/include/qt/QtGui/QIcon:1,
                 from /tmp/yaourt-tmp-jeanmi/aur-mellowplayer/src/MellowPlayer-3.3.1/src/lib/MellowPlayer/Domain/stdafx.hpp:28,
                 from /tmp/yaourt-tmp-jeanmi/aur-mellowplayer/src/MellowPlayer-3.3.1/src/lib/MellowPlayer/Domain/cotire/MellowPlayer.Domain_CXX_prefix.cxx:4,
                 from /tmp/yaourt-tmp-jeanmi/aur-mellowplayer/src/MellowPlayer-3.3.1/src/lib/MellowPlayer/Domain/cotire/MellowPlayer.Domain_CXX_prefix.hxx:4:
/usr/include/qt/QtGui/qmatrix.h: In member function ‘QMatrix& QMatrix::operator=(QMatrix&&)’:
/usr/include/qt/QtGui/qmatrix.h:68:43: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class QMatrix’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
     { memcpy(this, &other, sizeof(QMatrix)); return *this; }
                                           ^
/usr/include/qt/QtGui/qmatrix.h:57:20: note: ‘class QMatrix’ declared here
 class Q_GUI_EXPORT QMatrix // 2D transform matrix
                    ^~~~~~~
In file included from /usr/include/qt/QtGui/qimage.h:48,
                 from /usr/include/qt/QtGui/qpixmap.h:49,
                 from /usr/include/qt/QtGui/qicon.h:46,
                 from /usr/include/qt/QtGui/QIcon:1,
                 from /tmp/yaourt-tmp-jeanmi/aur-mellowplayer/src/MellowPlayer-3.3.1/src/lib/MellowPlayer/Domain/stdafx.hpp:28,
                 from /tmp/yaourt-tmp-jeanmi/aur-mellowplayer/src/MellowPlayer-3.3.1/src/lib/MellowPlayer/Domain/cotire/MellowPlayer.Domain_CXX_prefix.cxx:4,
                 from /tmp/yaourt-tmp-jeanmi/aur-mellowplayer/src/MellowPlayer-3.3.1/src/lib/MellowPlayer/Domain/cotire/MellowPlayer.Domain_CXX_prefix.hxx:4:
/usr/include/qt/QtGui/qtransform.h: In member function ‘QTransform& QTransform::operator=(QTransform&&)’:
/usr/include/qt/QtGui/qtransform.h:81:46: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class QTransform’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
     { memcpy(this, &other, sizeof(QTransform)); return *this; }
                                              ^
/usr/include/qt/QtGui/qtransform.h:57:20: note: ‘class QTransform’ declared here
 class Q_GUI_EXPORT QTransform
                    ^~~~~~~~~~
At global scope:
cc1plus: error: unrecognized command line option ‘-Wno-c++1z-extensions’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-unused-private-field’ [-Werror]
cc1plus: all warnings being treated as errors
CMake Error at /tmp/yaourt-tmp-jeanmi/aur-mellowplayer/src/MellowPlayer-3.3.1/cmake/Cotire.cmake:1885 (message):
  cotire: error 1 precompiling
  /tmp/yaourt-tmp-jeanmi/aur-mellowplayer/src/MellowPlayer-3.3.1/src/lib/MellowPlayer/Domain/cotire/MellowPlayer.Domain_CXX_prefix.hxx.
Call Stack (most recent call first):
  /tmp/yaourt-tmp-jeanmi/aur-mellowplayer/src/MellowPlayer-3.3.1/cmake/Cotire.cmake:3558 (cotire_precompile_prefix_header)


make[2]: *** [src/lib/MellowPlayer/Domain/CMakeFiles/MellowPlayer.Domain.dir/build.make:64: src/lib/MellowPlayer/Domain/cotire/MellowPlayer.Domain_CXX_prefix.hxx.gch] Error 1
make[1]: *** [CMakeFiles/Makefile2:339: src/lib/MellowPlayer/Domain/CMakeFiles/MellowPlayer.Domain.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Additional Information:

  • Version: 3.3.1
  • Affected streaming services (if any):
  • Operating System: Manjaro
@ColinDuquesnoy
Copy link
Owner

ColinDuquesnoy commented Jan 29, 2018

I think the issue is related to gcc 8 and I think this is a Qt issue not a mellowplayer issue -> we could disable that warning in MellowPlayer's cmake config.

How come you have gcc8 on your system? (official archlinux version is still at v7.2 in stable and 7.3 in testing).

@crazypingoo94
Copy link
Author

I had installed this version by aur.

I downgrade the gcc version to the 7.2.1 version and i can compile right now. Thanks you @ColinDuquesnoy

@ColinDuquesnoy ColinDuquesnoy changed the title Error in the installation 3.3.1 Compilation issues with GCC8 Jan 29, 2018
@ColinDuquesnoy
Copy link
Owner

Thank you for reporting the issue. Downgrading is a temporary workaround. MellowPlayer treats warnings as errors (which is good) but warnings coming from 3rd party libraries should be ignored. I'll try to fix this issue ASAP and will let you know when it's time to try compiling with GCC8.

@ColinDuquesnoy ColinDuquesnoy self-assigned this Jan 29, 2018
@ColinDuquesnoy ColinDuquesnoy added this to the 3.3.3 milestone Jan 29, 2018
@martinkg
Copy link

martinkg commented Feb 7, 2018

same issue [1] here on Fedora 28 with upcoming gcc-8.0.1

[1] https://kojipkgs.fedoraproject.org//work/tasks/4641/24754641/build.log

ColinDuquesnoy added a commit that referenced this issue Feb 7, 2018
Hopefully this will fix warnings coming from Qt with GCC8 (see #193)
@ColinDuquesnoy
Copy link
Owner

@martinkg I've just pushed what I think should fix the warnings with GCC 8 but I am unable to test it. Please try again with latest commit and let me know if that fixes the issue.

@martinkg
Copy link

martinkg commented Feb 7, 2018

built mellowplayer with this patch [1] but it fails again on Fedora 28 [2]

[1] https://martinkg.fedorapeople.org/Packages/mellowplayer/mellowplayer-gcc8.patch
[2] https://kojipkgs.fedoraproject.org//work/tasks/1387/24811387/build.log

ColinDuquesnoy added a commit that referenced this issue Feb 9, 2018
@ColinDuquesnoy
Copy link
Owner

@martinkg I added -Wno-class-memaccess flag to the cmake config. Let me know if that fix the issue. If that doesn't work, I'll setup a VM with GCC 8 to debug this issue.

@martinkg
Copy link

fails now with a other message:
(build.log: https://kojipkgs.fedoraproject.org//work/tasks/9499/24919499/build.log)

/builddir/build/BUILD/MellowPlayer-3.3.2/3rdparty/spdlog-0.11.0/include/spdlog/sinks/file_sinks.h:93:9: error: dependent-name 'std::conditional<std::is_same<char, char>::value, fmt::BasicMemoryWriter, fmt::BasicMemoryWriter<wchar_t> >::type' is parsed as a non-type, but instantiation yields a type
/builddir/build/BUILD/MellowPlayer-3.3.2/3rdparty/spdlog-0.11.0/include/spdlog/sinks/file_sinks.h:93:9: note: say 'typename std::conditional<std::is_same<char, char>::value, fmt::BasicMemoryWriter, fmt::BasicMemoryWriter<wchar_t> >::type' if a type is meant
At global scope:
cc1plus: error: unrecognized command line option '-Wno-c++1z-extensions' [-Werror]
cc1plus: error: unrecognized command line option '-Wno-unused-private-field' [-Werror]
cc1plus: all warnings being treated as errors
make[2]: *** [src/lib/MellowPlayer/Infrastructure/CMakeFiles/MellowPlayer.Infrastructure.dir/build.make:428: src/lib/MellowPlayer/Infrastructure/CMakeFiles/MellowPlayer.Infrastructure.dir/Logging/SpdLoggerFactory.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 37%] Building CXX object src/lib/MellowPlayer/Infrastructure/CMakeFiles/MellowPlayer.Infrastructure.dir/Logging/SpdLogger.cpp.o

@ColinDuquesnoy
Copy link
Owner

Ok, I'll setup a GCC 8 environment and will debug it on my side. I hope upgrading spdlog will be enough to fix the issue...

@ColinDuquesnoy
Copy link
Owner

ColinDuquesnoy commented Feb 10, 2018

I've upgraded to spdlog 0.16.3 with a fix proposed in gabime/spdlog/pull/634. MellowPlayer now builds fine with this version of gcc and spdlog:

gcc-8 --version
gcc-8 (SUSE Linux) 8.0.1 20180209 (experimental) [trunk revision 257516]
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

MellowPlayer log:

I] [2018-02-10 15-27-20:675115] [main] MellowPlayer 3.3.2.0 - Built on Feb 10 2018 at 15:11:41 (GCC 8.0.1 20180209 (experimental) [trunk revision 257516], 64 bit) with Qt 5.10.0

The fix is included in MellowPlayer 3.3.3 that I've just released.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants