FedoraForum.org - Fedora Support Forums and Community
Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2008
    Location
    Germany
    Posts
    433

    compiing libqxt-0.7.0 fails with qxtmailattachment.h:49:32: error: expected ')' befo

    when compiling libqxt with qt5 support the compilation fails with the following error message:

    Code:
    g++ -c -pipe -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wall -W -D_REENTRANT -fPIC -DHAVE_QT -DHAVE_DB -DHAVE_OPENSSL -DHAVE_XRANDR -DHAVE_ZEROCONF -DBUILD_QXT_GUI -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/QxtCore -isystem /usr/include/avahi-compat-libdns_sd -I. -I../../include -I../core -I../../include/QxtCore -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -Idebug/.moc -isystem /usr/include/libdrm -I/usr/lib64/qt5/mkspecs/linux-g++ -o debug/.obj/qxtcheckcombobox.o qxtcheckcombobox.cpp
    g++ -c -pipe -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wall -W -D_REENTRANT -fPIC -DHAVE_QT -DHAVE_DB -DHAVE_OPENSSL -DHAVE_XRANDR -DHAVE_ZEROCONF -DBUILD_QXT_NETWORK -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/QxtCore -isystem /usr/include/avahi-compat-libdns_sd -I. -I../../include -I../core -I../../include/QxtCore -I../3rdparty/libssh2/libssh2/include -I../3rdparty/libssh2/libssh2/include -I../3rdparty/libssh2/libssh2/src -I../3rdparty/libssh2/linux -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -Idebug/.moc -I/usr/lib64/qt5/mkspecs/linux-g++ -o debug/.obj/qxtmailattachment.o qxtmailattachment.cpp
    In file included from qxtmailattachment.cpp:41:0:
    qxtmailattachment.h:49:32: error: expected ')' before '*' token
         QxtMailAttachment(QIODevice* content, const QString& contentType = QString("application/octet-stream"));
                                    ^
    qxtmailattachment.h:54:5: error: 'QIODevice' does not name a type
         QIODevice* content() const;
         ^~~~~~~~~
    qxtmailattachment.h:56:21: error: 'QIODevice' has not been declared
         void setContent(QIODevice* content);
                         ^~~~~~~~~
    qxtmailattachment.cpp:92:1: error: prototype for 'QxtMailAttachment::QxtMailAttachment(QIODevice*, const QString&)' does not match any in class 'QxtMailAttachment'
     QxtMailAttachment::QxtMailAttachment(QIODevice* content, const QString& contentType)
     ^~~~~~~~~~~~~~~~~
    qxtmailattachment.cpp:85:1: error: candidates are: QxtMailAttachment::QxtMailAttachment(const QByteArray&, const QString&)
     QxtMailAttachment::QxtMailAttachment(const QByteArray& content, const QString& contentType)
     ^~~~~~~~~~~~~~~~~
    qxtmailattachment.cpp:80:1: error:                 QxtMailAttachment::QxtMailAttachment(const QxtMailAttachment&)
     QxtMailAttachment::QxtMailAttachment(const QxtMailAttachment& other) : qxt_d(other.qxt_d)
     ^~~~~~~~~~~~~~~~~
    qxtmailattachment.cpp:75:1: error:                 QxtMailAttachment::QxtMailAttachment()
     QxtMailAttachment::QxtMailAttachment()
     ^~~~~~~~~~~~~~~~~
    qxtmailattachment.cpp:110:41: error: no 'QIODevice* QxtMailAttachment::content() const' member function declared in class 'QxtMailAttachment'
     QIODevice* QxtMailAttachment::content() const
                                             ^~~~~
    qxtmailattachment.cpp:124:6: error: prototype for 'void QxtMailAttachment::setContent(QIODevice*)' does not match any in class 'QxtMailAttachment'
     void QxtMailAttachment::setContent(QIODevice* content)
          ^~~~~~~~~~~~~~~~~
    In file included from qxtmailattachment.cpp:41:0:
    qxtmailattachment.h:56:10: error: candidates are: void QxtMailAttachment::setContent(int*)
         void setContent(QIODevice* content);
              ^~~~~~~~~~
    qxtmailattachment.cpp:115:6: error:                 void QxtMailAttachment::setContent(const QByteArray&)
     void QxtMailAttachment::setContent(const QByteArray& content)
          ^~~~~~~~~~~~~~~~~
    qxtmailattachment.cpp: In member function 'const QByteArray& QxtMailAttachment::rawData() const':
    qxtmailattachment.cpp:217:24: error: 'content' was not declared in this scope
             QIODevice* c = content();
                            ^~~~~~~
    qxtmailattachment.cpp:217:24: note: suggested alternative: 'center'
             QIODevice* c = content();
                            ^~~~~~~
                            center
    qxtmailattachment.cpp: In static member function 'static QxtMailAttachment QxtMailAttachment::fromFile(const QString&)':
    qxtmailattachment.cpp:249:45: error: no matching function for call to 'QxtMailAttachment::QxtMailAttachment(QFile*)'
         QxtMailAttachment rv(new QFile(filename));
                                                 ^
    I know the program is no longer under development.
    any suggestion ?

    Spec file: libqxt.spec
    all other necessary files are here: https://martinkg.fedorapeople.org/Packages/libqxt/

  2. #2
    Join Date
    Nov 2017
    Location
    Havant
    Posts
    32

    Re: compiing libqxt-0.7.0 fails with qxtmailattachment.h:49:32: error: expected ')'


  3. #3
    Join Date
    Mar 2008
    Location
    Germany
    Posts
    433

    Re: compiing libqxt-0.7.0 fails with qxtmailattachment.h:49:32: error: expected ')'

    Quote Originally Posted by leigh123linux
    Thanks Leigh
    that was simply but the next error message isn't it.

    Code:
    g++ -c -pipe -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wall -W -D_REENTRANT -fPIC -DHAVE_QT -DHAVE_DB -DHAVE_OPENSSL -DHAVE_XRANDR -DHAVE_ZEROCONF -DBUILD_QXT_NETWORK -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/QxtCore -isystem /usr/include/avahi-compat-libdns_sd -I. -I../../include -I../core -I../../include/QxtCore -I../3rdparty/libssh2/libssh2/include -I../3rdparty/libssh2/libssh2/include -I../3rdparty/libssh2/libssh2/src -I../3rdparty/libssh2/linux -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -Idebug/.moc -I/usr/lib64/qt5/mkspecs/linux-g++ -o debug/.obj/qxtmailattachment.o qxtmailattachment.cpp
    In file included from qxtmailattachment.cpp:41:0:
    qxtmailattachment.h:49:32: error: expected ')' before '*' token
         QxtMailAttachment(QIODevice* content, const QString& contentType = QString("application/octet-stream"));
                                    ^
    qxtmailattachment.h:54:5: error: 'QIODevice' does not name a type
         QIODevice* content() const;
         ^~~~~~~~~
    qxtmailattachment.h:56:21: error: 'QIODevice' has not been declared
         void setContent(QIODevice* content);
                         ^~~~~~~~~
    qxtmailattachment.cpp:92:1: error: prototype for 'QxtMailAttachment::QxtMailAttachment(QIODevice*, const QString&)' does not match any in class 'QxtMailAttachment'
     QxtMailAttachment::QxtMailAttachment(QIODevice* content, const QString& contentType)
     ^~~~~~~~~~~~~~~~~
    qxtmailattachment.cpp:85:1: error: candidates are: QxtMailAttachment::QxtMailAttachment(const QByteArray&, const QString&)
     QxtMailAttachment::QxtMailAttachment(const QByteArray& content, const QString& contentType)
     ^~~~~~~~~~~~~~~~~
    qxtmailattachment.cpp:80:1: error:                 QxtMailAttachment::QxtMailAttachment(const QxtMailAttachment&)
     QxtMailAttachment::QxtMailAttachment(const QxtMailAttachment& other) : qxt_d(other.qxt_d)
     ^~~~~~~~~~~~~~~~~
    qxtmailattachment.cpp:75:1: error:                 QxtMailAttachment::QxtMailAttachment()
     QxtMailAttachment::QxtMailAttachment()
     ^~~~~~~~~~~~~~~~~
    qxtmailattachment.cpp:110:41: error: no 'QIODevice* QxtMailAttachment::content() const' member function declared in class 'QxtMailAttachment'
     QIODevice* QxtMailAttachment::content() const
                                             ^~~~~
    qxtmailattachment.cpp:124:6: error: prototype for 'void QxtMailAttachment::setContent(QIODevice*)' does not match any in class 'QxtMailAttachment'
     void QxtMailAttachment::setContent(QIODevice* content)
          ^~~~~~~~~~~~~~~~~
    In file included from qxtmailattachment.cpp:41:0:
    qxtmailattachment.h:56:10: error: candidates are: void QxtMailAttachment::setContent(int*)
         void setContent(QIODevice* content);
              ^~~~~~~~~~
    qxtmailattachment.cpp:115:6: error:                 void QxtMailAttachment::setContent(const QByteArray&)
     void QxtMailAttachment::setContent(const QByteArray& content)
          ^~~~~~~~~~~~~~~~~
    qxtmailattachment.cpp: In member function 'const QByteArray& QxtMailAttachment::rawData() const':
    qxtmailattachment.cpp:217:24: error: 'content' was not declared in this scope
             QIODevice* c = content();
                            ^~~~~~~
    qxtmailattachment.cpp:217:24: note: suggested alternative: 'center'
             QIODevice* c = content();
                            ^~~~~~~
                            center
    qxtmailattachment.cpp: In static member function 'static QxtMailAttachment QxtMailAttachment::fromFile(const QString&)':
    qxtmailattachment.cpp:249:45: error: no matching function for call to 'QxtMailAttachment::QxtMailAttachment(QFile*)'
         QxtMailAttachment rv(new QFile(filename));
                                                 ^

  4. #4
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    2,683

    Re: compiing libqxt-0.7.0 fails with qxtmailattachment.h:49:32: error: expected ')'

    The error "QIODevice' does not name a type" indicates to me a missing #include
    Have the patches you referenced been applied ?
    (libqxt-header-fix.patch would seem to be the required fix.)

  5. #5
    Join Date
    Nov 2017
    Location
    Havant
    Posts
    32

    Smile Re: compiing libqxt-0.7.0 fails with qxtmailattachment.h:49:32: error: expected ')'

    Try build against compat-openssl10-devel instead and add the addition patch.

    https://bitbucket.org/bitbucketuser0...81a9a15f92/raw

    spec file changes


    Code:
    --- a/libqxt.spec
    +++ b/libqxt.spec
    @@ -33,13 +33,15 @@
     #Debian patches
     Patch3:         libqxt-use-system-qdoc3.patch
     Patch4:         libqxt-fix-compiler-flags.patch
    +Patch5: libqxt_qt5-eaf6872f6ad490a4355c5c46279ddb81a9a15f92.patch
     
     BuildRequires:  pkgconfig(avahi-compat-libdns_sd)
     BuildRequires:	avahi-devel
     BuildRequires:	libdb-devel
     BuildRequires:	libXrandr-devel
    -BuildRequires:	openssl-devel
    +BuildRequires:	compat-openssl10-devel
     BuildRequires:	pkgconfig(Qt5Core)
    +BuildRequires:	qt5-qtbase-devel
     
     %{?_qt5_version:Requires: qt5%{?_isa} >= %{_qt5_version}}
     
    @@ -62,12 +64,8 @@
     
     
     %prep
    -%setup -q -n %{name}-%{name}-%{hash}
    -%autopatch -p1
    -#patch0 -p1 -b .linking
    -#patch1 -p1 -b .mediakeys
    -#patch2 -p1 -b .includes
    -#patch3 -p1 -b .gcc6
    +%autosetup -p1 -n %{name}-%{name}-%{hash}
    +
     
     mkdir config.tests/qt5/
     cp config.tests/qt4/qt4.pro config.tests/qt5/qt5.pro
    @@ -96,13 +94,13 @@
     # manually running qmake here may end up being fragile, if so,
     # introducing a qmake wrapper is the next best thing -- rex
     %{qmake_qt5} -r
    -make %{?_smp_mflags}
    -make %{?_smp_mflags} docs
    +%make_build
    +#make %{?_smp_mflags} docs
     
     
     %install
    -#make install INSTALL_ROOT=$RPM_BUILD_ROOT
    -%make_install
    +make install INSTALL_ROOT=$RPM_BUILD_ROOT
    +
     
     # We are installing these to the proper location
     rm -fr $RPM_BUILD_ROOT%{_prefix}/doc/
    I will leave the files section for you to sort out

  6. #6
    Join Date
    Nov 2017
    Location
    Havant
    Posts
    32

    Re: compiing libqxt-0.7.0 fails with qxtmailattachment.h:49:32: error: expected ')'

    It compiles against compat-openssl10-devel once the linked patch is applied

    https://bitbucket.org/bitbucketuser0...81a9a15f92/raw

    PHP Code:
    --- a/libqxt.spec
    +++ b/libqxt.spec
    @@ -33,13 +33,15 @@
     
    #Debian patches
     
    Patch3:         libqxt-use-system-qdoc3.patch
     Patch4
    :         libqxt-fix-compiler-flags.patch
    +Patch5libqxt_qt5-eaf6872f6ad490a4355c5c46279ddb81a9a15f92.patch
     
     BuildRequires
    :  pkgconfig(avahi-compat-libdns_sd)
     
    BuildRequires:    avahi-devel
     BuildRequires
    :    libdb-devel
     BuildRequires
    :    libXrandr-devel
    -BuildRequires:    openssl-devel
    +BuildRequires:    compat-openssl10-devel
     BuildRequires
    :    pkgconfig(Qt5Core)
    +
    BuildRequires:    qt5-qtbase-devel
     
     
    %{?_qt5_version:Requiresqt5%{?_isa} >= %{_qt5_version}}
     
    @@ -
    62,12 +64,@@
     
     
     %
    prep
    -%setup --%{name}-%{name}-%{hash}
    -%
    autopatch -p1
    -#patch0 -p1 -b .linking
    -#patch1 -p1 -b .mediakeys
    -#patch2 -p1 -b .includes
    -#patch3 -p1 -b .gcc6
    +%autosetup -p1 -%{name}-%{name}-%{hash}
    +
     
     
    mkdir config.tests/qt5/
     
    cp config.tests/qt4/qt4.pro config.tests/qt5/qt5.pro
    @@ -96,13 +94,13 @@
     
    # manually running qmake here may end up being fragile, if so,
     # introducing a qmake wrapper is the next best thing -- rex
     
    %{qmake_qt5} -r
    -make %{?_smp_mflags}
    -
    make %{?_smp_mflagsdocs
    +%make_build
    +#make %{?_smp_mflags} docs
     
     
     
    %install
    -#make install INSTALL_ROOT=$RPM_BUILD_ROOT
    -%make_install
    +make install INSTALL_ROOT=$RPM_BUILD_ROOT
    +
     
     
    # We are installing these to the proper location
     
    rm -fr $RPM_BUILD_ROOT%{_prefix}/doc

  7. #7
    Join Date
    Mar 2008
    Location
    Germany
    Posts
    433

    Re: compiing libqxt-0.7.0 fails with qxtmailattachment.h:49:32: error: expected ')'

    Quote Originally Posted by ocratato
    The error "QIODevice' does not name a type" indicates to me a missing #include
    Have the patches you referenced been applied ?
    (libqxt-header-fix.patch would seem to be the required fix.)
    was solved in the meantime, but here is a new error message.

    Code:
    g++ -c -pipe -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wall -W -D_REENTRANT -fPIC -DHAVE_QT -DHAVE_DB -DHAVE_OPENSSL -DHAVE_XRANDR -DHAVE_ZEROCONF -DBUILD_QXT_GUI -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/QxtCore -isystem /usr/include/avahi-compat-libdns_sd -I. -I../../include -I../core -I../../include/QxtCore -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -Idebug/.moc -isystem /usr/include/libdrm -I/usr/lib64/qt5/mkspecs/linux-g++ -o debug/.obj/qxtlineedit.o qxtlineedit.cpp
    In file included from ../3rdparty/libssh2/libssh2/src/agent.c:39:0:
    ../3rdparty/libssh2/libssh2/src/libssh2_priv.h:254:22: error: field 'exchange_hash' has incomplete type
         libssh2_sha1_ctx exchange_hash;
                          ^~~~~~~~~~~~~
    make[1]: *** [Makefile:972: debug/.obj/agent.o] Error 1
    make[1]: Leaving directory '/home/martin/rpmbuild/BUILD/libqxt-libqxt-696423b68972/src/network'
    make: *** [Makefile:128: sub-src-network-make_first] Error 2

  8. #8
    Join Date
    Mar 2008
    Location
    Germany
    Posts
    433

    Re: compiing libqxt-0.7.0 fails with qxtmailattachment.h:49:32: error: expected ')'

    Quote Originally Posted by leigh123linux
    It compiles against compat-openssl10-devel once the linked patch is applied

    https://bitbucket.org/bitbucketuser0...81a9a15f92/raw
    Big Thanks for the proffessional support.

Similar Threads

  1. Replies: 6
    Last Post: 19th January 2016, 12:42 PM
  2. error: expected ; before ( token in c++
    By gowrishankar in forum Using Fedora
    Replies: 1
    Last Post: 24th January 2009, 02:36 PM
  3. winecfg error fscanf returns 1, expected 2
    By sdowney717 in forum Using Fedora
    Replies: 7
    Last Post: 4th July 2007, 02:33 PM
  4. Installation Error: MD5 digest: BAD Expected [INTEL FORTRAN COMPILER]
    By aftab in forum Installation, Upgrades and Live Media
    Replies: 5
    Last Post: 28th February 2006, 04:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •