Results 1 to 7 of 7

Thread: The process "/usr/bin/make" exited with code 2.

  1. #1
    Join Date
    Jan 2013
    Posts
    9
    Qt products
    Qt4
    Platforms
    MacOS X

    Default The process "/usr/bin/make" exited with code 2.

    Hi guys, I have a problem when I call one ffmpeg's library from Qt in MAC, in the .pro file I have this declaration:

    INCLUDEPATH += /Users/polin/ffmpeg/libswresample \
    INCLUDEPATH += /Users/polin/ffmpeg/libavutil \ # <----------------------------------------
    INCLUDEPATH += /Users/polin/ffmpeg/libavcodec \
    INCLUDEPATH += /Users/polin/ffmpeg/libavformat \
    INCLUDEPATH += /Users/polin/ffmpeg/libavdevice \
    INCLUDEPATH += /Users/polin/ffmpeg/libavfilter \
    INCLUDEPATH += /Users/polin/ffmpeg/libswscale \
    INCLUDEPATH += /Users/polin/ffmpeg/libpostproc \

    If I compile the project without the

    INCLUDEPATH += /Users/polin/ffmpeg/libavutil \

    I don't have any problem, but if I use this library I have this in output:

    In file included from /usr/include/c++/4.2.1/cwchar:52,
    from /usr/include/c++/4.2.1/bits/postypes.h:46,
    from /usr/include/c++/4.2.1/iosfwd:49,
    from /usr/include/c++/4.2.1/bits/stl_algobase.h:70,
    from /usr/include/c++/4.2.1/algorithm:65,
    from /usr/local/Trolltech/Qt-4.8.0/include/QtCore/qglobal.h:68,
    from /usr/local/Trolltech/Qt-4.8.0/include/QtCore/qnamespace.h:45,
    from /usr/local/Trolltech/Qt-4.8.0/include/QtCore/qobjectdefs.h:45,
    from /usr/local/Trolltech/Qt-4.8.0/include/QtGui/qwindowdefs.h:45,
    from /usr/local/Trolltech/Qt-4.8.0/include/QtGui/qwidget.h:45,
    from /usr/local/Trolltech/Qt-4.8.0/lib/QtGui.framework/Versions/4/Headers/qmainwindow.h:45,
    from /usr/local/Trolltech/Qt-4.8.0/lib/QtGui.framework/Versions/4/Headers/QMainWindow:1,
    from ../audvid/mainwindow.h:4,
    from ../audvid/main.cpp:1:
    /usr/include/c++/4.2.1/ctime:66: error: '::clock_t' has not been declared
    /usr/include/c++/4.2.1/ctime:68: error: '::tm' has not been declared
    /usr/include/c++/4.2.1/ctime:70: error: '::clock' has not been declared
    /usr/include/c++/4.2.1/ctime:71: error: '::difftime' has not been declared
    /usr/include/c++/4.2.1/ctime:72: error: '::mktime' has not been declared
    /usr/include/c++/4.2.1/ctime:73: error: '::time' has not been declared
    /usr/include/c++/4.2.1/ctime:74: error: '::asctime' has not been declared
    /usr/include/c++/4.2.1/ctime:75: error: '::ctime' has not been declared
    /usr/include/c++/4.2.1/ctime:76: error: '::gmtime' has not been declared
    /usr/include/c++/4.2.1/ctime:77: error: '::localtime' has not been declared
    /usr/include/c++/4.2.1/ctime:78: error: '::strftime' has not been declared
    In file included from /usr/include/c++/4.2.1/locale:46,
    from /usr/include/c++/4.2.1/bits/ostream.tcc:46,
    from /usr/include/c++/4.2.1/ostream:572,
    from /usr/include/c++/4.2.1/iterator:70,
    from /usr/local/Trolltech/Qt-4.8.0/include/QtCore/qlist.h:50,
    from /usr/local/Trolltech/Qt-4.8.0/include/QtCore/qobject.h:50,
    from /usr/local/Trolltech/Qt-4.8.0/include/QtGui/qwidget.h:46,
    from /usr/local/Trolltech/Qt-4.8.0/lib/QtGui.framework/Versions/4/Headers/qmainwindow.h:45,
    from /usr/local/Trolltech/Qt-4.8.0/lib/QtGui.framework/Versions/4/Headers/QMainWindow:1,
    from ../audvid/mainwindow.h:4,
    from ../audvid/main.cpp:1:
    /usr/include/c++/4.2.1/bits/locale_facets.tcc: In member function '_InIter std::time_get<_CharT, _InIter>::_M_extract_via_format(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, tm*, const _CharT*) const':
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:1839: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:1846: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:1854: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:1861: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:1873: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:1880: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:1883: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:1895: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:1900: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:1908: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:1912: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:1932: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:1968: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:1976: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc: In member function 'virtual _InIter std::time_get<_CharT, _InIter>::do_get_weekday(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, tm*) const':
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:2210: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc: In member function 'virtual _InIter std::time_get<_CharT, _InIter>::do_get_monthname(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, tm*) const':
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:2259: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    /usr/include/c++/4.2.1/bits/locale_facets.tcc: In member function 'virtual _InIter std::time_get<_CharT, _InIter>::do_get_year(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, tm*) const':
    /usr/include/c++/4.2.1/bits/locale_facets.tcc:2288: error: invalid use of incomplete type 'struct tm'
    /usr/include/wchar.h:152: error: forward declaration of 'struct tm'
    make: *** [main.o] Error 1
    make: Leaving directory `/Users/polin/Desktop/audvid/audvid-build-Qt_4_8_0_qt_everywhere_opensource_src_4_8_0_tp-Release'
    12:22:53: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project audvid (target: Qt 4.8.0 (qt-everywhere-opensource-src-4.8.0-tp))
    When executing step 'Make'

    Someone have a solution for this problem, thank a lot Pol!!!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: The process "/usr/bin/make" exited with code 2.

    Show your first 5 lines of your mainwindow.h and first 5 lines of your main.cpp
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2013
    Posts
    9
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: The process "/usr/bin/make" exited with code 2.

    Hi wysota, thank you for your fast reply, the code is this:

    mainwindow.h

    #ifndef MAINWINDOW_H
    #define MAINWINDOW_H

    #include <QMainWindow>


    namespace Ui {
    class MainWindow;
    }

    main.cpp

    #include "mainwindow.h"
    #include <QApplication>


    int main(int argc, char *argv[])
    {

    mainwindow.cpp

    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include <QProcess>
    #include <QFileDialog>

    #include <QDebug>

    MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    {

    thanks of all, polin.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: The process "/usr/bin/make" exited with code 2.

    Are you including files from avutil anywhere in your code?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jan 2013
    Posts
    9
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: The process "/usr/bin/make" exited with code 2.

    No because I have found the error and I'm stop for this.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: The process "/usr/bin/make" exited with code 2.

    In that case I suggest you remove the offending line from the project file. The error you get is (most probably) caused by the compiler picking up some file from this directory instead of some other file with the same name residing elsewhere which confuses the compiler. Sometimes it is enough to reorder include directives or INCLUDEPATH statements but I can't give you a definitive solution right now.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Jan 2013
    Posts
    9
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: The process "/usr/bin/make" exited with code 2.

    I think that I've solved in this way:

    INCLUDEPATH += /usr/local/include/ \

    LIBS += -lswresample \
    -lavutil \
    -lavcodec \
    -lavformat \
    -lavdevice \
    -lavfilter \
    -lswscale \

    LIBS += -L/usr/local/lib

    and after, in .h or .c file I call the libavutils library in this way:

    #include "libavutil/imgutils.h"

    I hope that this example will be useful at someone...

Similar Threads

  1. Replies: 4
    Last Post: 11th August 2011, 08:02
  2. Running example project with mingw gives "... exited with code -1073741792" error
    By sibercekirge in forum Installation and Deployment
    Replies: 8
    Last Post: 31st May 2011, 17:33
  3. Replies: 3
    Last Post: 2nd November 2010, 22:36
  4. Replies: 4
    Last Post: 18th April 2010, 00:37
  5. "make install" and "make clean" on Windows for Qt
    By Berberis in forum Installation and Deployment
    Replies: 0
    Last Post: 29th November 2009, 23:02

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.