Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not building #2

Closed
teleportingtortoise opened this issue Nov 6, 2020 · 2 comments
Closed

Not building #2

teleportingtortoise opened this issue Nov 6, 2020 · 2 comments

Comments

@teleportingtortoise
Copy link

In an Archlinux variant called Artix. I have both qt5-base and ffmpeg installed, but it fails to build.

qmake && make release
make -f Makefile.Release
make[1]: Entering directory '/home/****/github/parupaint'
g++ -c -pipe -std=c++11 -Wfatal-errors -fdiagnostics-color=auto -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -Isrc/bundled/ffmpeg -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtXml -I/usr/include/qt/QtCore -I.obj/moc -I/usr/lib/qt/mkspecs/linux-g++ -o .obj/parupaintAVWriter.o src/core/parupaintAVWriter.cpp
src/core/parupaintAVWriter.cpp: In destructor ‘ParupaintAVWriter::~ParupaintAVWriter()’:
src/core/parupaintAVWriter.cpp:35:51: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
   35 |   if(video_stream) pp_avcodec_close(video_stream->codec);
      |                                                   ^~~~~
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:880:21: note: declared here
  880 |     AVCodecContext *codec;
      |                     ^~~~~
src/core/parupaintAVWriter.cpp:35:51: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
   35 |   if(video_stream) pp_avcodec_close(video_stream->codec);
      |                                                   ^~~~~
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:880:21: note: declared here
  880 |     AVCodecContext *codec;
      |                     ^~~~~
src/core/parupaintAVWriter.cpp:35:51: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
   35 |   if(video_stream) pp_avcodec_close(video_stream->codec);
      |                                                   ^~~~~
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:880:21: note: declared here
  880 |     AVCodecContext *codec;
      |                     ^~~~~
src/core/parupaintAVWriter.cpp: In constructor ‘ParupaintAVWriter::ParupaintAVWriter(QString, int, int, int)’:
src/core/parupaintAVWriter.cpp:72:21: warning: ‘void av_register_all()’ is deprecated [-Wdeprecated-declarations]
   72 |  ppavfunc(avformat, av_register_all);
      |                     ^~~~~~~~~~~~~~~
src/core/parupaintAVWriter.cpp:19:48: note: in definition of macro ‘ppavfunc’
   19 | #define ppavfunc(l, f) auto pp_##f = decltype(&f)( l.resolve(#f)); if(!pp_##f) errorCancel("Function pp_" #f " in " #l " could not be loaded.")
      |                                                ^
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:2050:6: note: declared here
 2050 | void av_register_all(void);
      |      ^~~~~~~~~~~~~~~
src/core/parupaintAVWriter.cpp:72:21: warning: ‘void av_register_all()’ is deprecated [-Wdeprecated-declarations]
   72 |  ppavfunc(avformat, av_register_all);
      |                     ^~~~~~~~~~~~~~~
src/core/parupaintAVWriter.cpp:19:48: note: in definition of macro ‘ppavfunc’
   19 | #define ppavfunc(l, f) auto pp_##f = decltype(&f)( l.resolve(#f)); if(!pp_##f) errorCancel("Function pp_" #f " in " #l " could not be loaded.")
      |                                                ^
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:2050:6: note: declared here
 2050 | void av_register_all(void);
      |      ^~~~~~~~~~~~~~~
src/core/parupaintAVWriter.cpp:121:32: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
  121 |  codec_context = video_stream->codec;
      |                                ^~~~~
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:880:21: note: declared here
  880 |     AVCodecContext *codec;
      |                     ^~~~~
src/core/parupaintAVWriter.cpp:121:32: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
  121 |  codec_context = video_stream->codec;
      |                                ^~~~~
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:880:21: note: declared here
  880 |     AVCodecContext *codec;
      |                     ^~~~~
src/core/parupaintAVWriter.cpp:121:32: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
  121 |  codec_context = video_stream->codec;
      |                                ^~~~~
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:880:21: note: declared here
  880 |     AVCodecContext *codec;
      |                     ^~~~~
src/core/parupaintAVWriter.cpp:136:83: error: ‘CODEC_FLAG_GLOBAL_HEADER’ was not declared in this scope; did you mean ‘AV_CODEC_FLAG_GLOBAL_HEADER’?
  136 |  if (format_context->oformat->flags & AVFMT_GLOBALHEADER) codec_context->flags |= CODEC_FLAG_GLOBAL_HEADER;
      |                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                   AV_CODEC_FLAG_GLOBAL_HEADER
compilation terminated due to -Wfatal-errors.
make[1]: *** [Makefile.Release:973: .obj/parupaintAVWriter.o] Error 1
make[1]: Leaving directory '/home/****/github/parupaint'
make: *** [Makefile:42: release] Error 2

and with -config noffmpeg

❯ qmake -config noffmpeg && make release
Project MESSAGE: Compiling without ffmpeg support.
make -f Makefile.Release
make[1]: Entering directory '/home/****/github/parupaint'
g++ -c -pipe -std=c++11 -Wfatal-errors -fdiagnostics-color=auto -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DPARUPAINT_NOFFMPEG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -Isrc/bundled/ffmpeg -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtXml -I/usr/include/qt/QtCore -I.obj/moc -I/usr/lib/qt/mkspecs/linux-g++ -o .obj/parupaintBrush.o src/core/parupaintBrush.cpp
g++ -c -pipe -std=c++11 -Wfatal-errors -fdiagnostics-color=auto -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DPARUPAINT_NOFFMPEG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -Isrc/bundled/ffmpeg -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtXml -I/usr/include/qt/QtCore -I.obj/moc -I/usr/lib/qt/mkspecs/linux-g++ -o .obj/parupaintBrushGlass.o src/core/parupaintBrushGlass.cpp
g++ -c -pipe -std=c++11 -Wfatal-errors -fdiagnostics-color=auto -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DPARUPAINT_NOFFMPEG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -Isrc/bundled/ffmpeg -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtXml -I/usr/include/qt/QtCore -I.obj/moc -I/usr/lib/qt/mkspecs/linux-g++ -o .obj/parupaintCommonOperations.o src/core/parupaintCommonOperations.cpp
g++ -c -pipe -std=c++11 -Wfatal-errors -fdiagnostics-color=auto -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DPARUPAINT_NOFFMPEG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -Isrc/bundled/ffmpeg -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtXml -I/usr/include/qt/QtCore -I.obj/moc -I/usr/lib/qt/mkspecs/linux-g++ -o .obj/parupaintFrame.o src/core/parupaintFrame.cpp
src/core/parupaintFrame.cpp: In member function ‘QRect ParupaintFrame::drawLine(const QLineF&, QPen)’:
src/core/parupaintFrame.cpp:143:17: error: aggregate ‘QPainterPath path’ has incomplete type and cannot be defined
  143 |    QPainterPath path;
      |                 ^~~~
compilation terminated due to -Wfatal-errors.
make[1]: *** [Makefile.Release:987: .obj/parupaintFrame.o] Error 1
make[1]: Leaving directory '/home/****/github/parupaint'
make: *** [Makefile:42: release] Error 2
@pixaline
Copy link
Owner

pixaline commented Nov 7, 2020

Well then, it's been like half a decade since I worked on this.
The ffmpeg error is surely because the API has changed in 5 years. I'm sure someone online has made a new Qt<-->ffmpeg binding by now.
I'm not totally sure about the PainterPath error, but I'd think Qt has also changed quite a bit. Check examples of how that class is used, maybe it's missing an include header?

@teleportingtortoise
Copy link
Author

Yeah, I would have understood even if you hadn't responded.
I've got a lot to learn still but I'm sure a bug will bite and I'll end up giving it a shot. I'll go ahead and close the issue with this comment. Thank you very much for a point in the right direction.

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

No branches or pull requests

2 participants