OpenBoard-org / OpenBoard

OpenBoard is a cross-platform interactive whiteboard application intended for use in a classroom setting.
https://openboard.ch/
GNU General Public License v3.0
2.4k stars 428 forks source link

Compilation error in debian 9.4 #137

Closed aderbalbotelho closed 2 months ago

aderbalbotelho commented 6 years ago

Compilation error in debian 9.4

./OpenBoard/release_scripts/linux/build.sh

(...)

g++ -c -m64 -pipe -std=c++11 -fopenmp -O2 -w -D_REENTRANT -fPIC -DQUAZIP_STATIC -DNO_THIRD_PARTY_WARNINGS -DUBVERSION=""1.4.0."" -DUBVERSION_RC=1,4,0,240,0 -DQT_NO_DEBUG -DQT_WEBKITWIDGETS_LIB -DQT_WEBKIT_LIB -DQT_SVG_LIB -DQT_UITOOLS_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_XMLPATTERNS_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_CORE_LIB -I/usr/local/ssl/include -I+ -Isrc -I../OpenBoard-ThirdParty/zlib/1.2.8/include -I../OpenBoard-ThirdParty/xpdf/xpdf-3.04 -I../OpenBoard-ThirdParty/xpdf/xpdf-3.04/goo -I../OpenBoard-ThirdParty/xpdf/xpdf-3.04/splash -Isrc/web/browser -Isrc/pdf-merger -I../OpenBoard-ThirdParty/quazip -I../OpenBoard-ThirdParty/zlib/1.2.8/include -I../OpenBoard-ThirdParty/quazip/quazip-0.7.1 -I../OpenBoard-ThirdParty/qt/singleapplication -I../OpenBoard-ThirdParty/qt/singleapplication -I../OpenBoard-ThirdParty/qt/lockedfile -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebKitWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtWebKit -isystem /usr/include/x86_64-linux-gnu/qt5/QtSvg -isystem /usr/include/x86_64-linux-gnu/qt5/QtUiTools -isystem /usr/include/x86_64-linux-gnu/qt5/QtMultimediaWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtMultimedia -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtXmlPatterns -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /usr/include/x86_64-linux-gnu/qt5/QtScript -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Ibuild/linux/release/moc -Ibuild/linux/release/ui -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o build/linux/release/objects/UBGraphicsRuler.o src/tools/UBGraphicsRuler.cpp src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp: In member function ‘bool UBFFmpegVideoEncoder::init()’: src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp:415:33: error: ‘swr_alloc’ was not declared in this scope mSwrContext = swr_alloc(); ^ src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp:430:35: error: ‘swr_init’ was not declared in this scope ret = swr_init(mSwrContext); ^ src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp: In member function ‘void UBFFmpegVideoEncoder::processAudio(QByteArray&)’: src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp:550:74: error: ‘swr_get_out_samples’ was not declared in this scope int outSamplesCount = swr_get_out_samples(mSwrContext, inSamplesCount); ^ src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp:567:67: error: ‘swr_convert’ was not declared in this scope (const uint8_t )&inSamples, inSamplesCount); ^ src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp: In member function ‘void UBFFmpegVideoEncoder::finishEncoding()’: src/podcast/ffmpeg/UBFFmpegVideoEncoder.cpp:650:30: error: ‘swr_free’ was not declared in this scope swr_free(&mSwrContext); ^ Makefile.Release:5915: recipe for target 'build/linux/release/objects/UBFFmpegVideoEncoder.o' failed make[1]: [build/linux/release/objects/UBFFmpegVideoEncoder.o] Error 1 make[1]: Esperando que outros processos terminem. make[1]: Leaving directory '/home/educatux/Openboard/OpenBoard' Makefile:48: recipe for target 'release-install' failed make: [release-install] Error 2 error: OpenBoard build failed educatux@EducatuX:~/Openboard$

trizelka commented 6 years ago

try this: edit file: src/podcast/ffmpeg/UBFFmpegVideoEncoder.h

// Due to the whole ffmpeg / libAV silliness, we have to support libavresample on some platforms //#if LIBAVFORMAT_VERSION_MICRO > 100

include <libswresample/swresample.h>

//#else // #include <libavresample/avresample.h> // #define SwrContext AVAudioResampleContext //#endif

thats work for me

aderbalbotelho commented 6 years ago

dParty/quazip/lib/linux -lquazip -L/home/educatux/OpenBoard/OpenBoard-ThirdParty/xpdf/lib/linux -lxpdf -L../freetype/lib/linux -lpaper -lavformat -lavcodec -lva-x11 -lva -lxcb-shm -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lasound -lSDL -lx264 -lvpx -lvorbisenc -lvorbis -ltheoraenc -ltheoradec -logg -lopus -lmp3lame -lfreetype -lfdk-aac -lass -llzma -lbz2 -ldl -lswresample -lswscale -lavutil -lm -lz -l:libcrypto.so.1.0.2 -lX11 -lQt5WebKitWidgets -lQt5WebKit -lQt5Svg -lQt5UiTools -lQt5MultimediaWidgets -lQt5PrintSupport -lQt5Widgets -lQt5Multimedia -lQt5Gui -lQt5XmlPatterns -lQt5Network -lQt5Xml -lQt5Script -lQt5Core -lGL -lpthread /usr/bin/ld: cannot find -lva-x11 /usr/bin/ld: cannot find -lva /usr/bin/ld: cannot find -lxcb-shm /usr/bin/ld: cannot find -lasound /usr/bin/ld: cannot find -lSDL /usr/bin/ld: cannot find -lx264 /usr/bin/ld: cannot find -lvpx /usr/bin/ld: cannot find -lvorbisenc /usr/bin/ld: cannot find -lvorbis /usr/bin/ld: cannot find -ltheoraenc /usr/bin/ld: cannot find -ltheoradec /usr/bin/ld: cannot find -logg /usr/bin/ld: cannot find -lopus /usr/bin/ld: cannot find -lmp3lame /usr/bin/ld: cannot find -lfdk-aac /usr/bin/ld: cannot find -lass /usr/bin/ld: cannot find -llzma /usr/bin/ld: cannot find -lbz2 collect2: error: ld returned 1 exit status Makefile.Release:1275: recipe for target 'build/linux/release/product/OpenBoard' failed make[1]: [build/linux/release/product/OpenBoard] Error 1 make[1]: Leaving directory '/home/educatux/OpenBoard/OpenBoard' Makefile:48: recipe for target 'release-install' failed make: [release-install] Error 2 error: OpenBoard build failed

aderbalbotelho commented 6 years ago

educatux@educatux-pc:~/OpenBoard$ cat /etc/debian_version 9.4

xdelatour commented 6 years ago

Development packages are missing, try this:

apt-get install libva-dev libxcb-shm0-dev libasound2-dev libsdl1.2-dev libx264-dev libvpx-dev libvorbis-dev libtheora-dev libogg-dev libopus-dev libmp3lame-dev libass-dev liblzma-dev libbz2-dev

apt-get install libfdk-aac-dev (non-free section, check your /etc/apt/sources.list)