JetBrains / skija

Java bindings for Skia
Apache License 2.0
2.63k stars 127 forks source link

Cannot find -lSKIA_OPENGL_LIBRARY-NOTFOUND #107

Closed pakdev closed 3 years ago

pakdev commented 3 years ago

Trying to build skija locally so I can run the examples, and I'm getting this error:

python3 ./script/build.py
Using Skia from /home/peter/projects/skija/native/Skia-m91-b99622c05a-linux-Release-x64 -- The CXX compiler identification is GNU 9.3.0 -- 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 -- Configuring done -- Generating done -- Build files have been written to: /home/peter/projects/skija/native/build [1/1] Linking CXX shared library libskija.so FAILED: libskija.so : && /usr/bin/c++ -fPIC -O3 -DNDEBUG -shared -Wl,-soname,libskija.so -o libskija.so CMakeFiles/skija.dir/src/BackendRenderTarget.cc.o CMakeFiles/skija.dir/src/Bitmap.cc.o CMakeFiles/skija.dir/src/BreakIterator.cc.o CMakeFiles/skija.dir/src/Canvas.cc.o CMakeFiles/skija.dir/src/Codec.cc.o CMakeFiles/skija.dir/src/ColorFilter.cc.o CMakeFiles/skija.dir/src/ColorSpace.cc.o CMakeFiles/skija.dir/src/ColorType.cc.o CMakeFiles/skija.dir/src/Data.cc.o CMakeFiles/skija.dir/src/DirectContext.cc.o CMakeFiles/skija.dir/src/Drawable.cc.o CMakeFiles/skija.dir/src/Font.cc.o CMakeFiles/skija.dir/src/FontMgr.cc.o CMakeFiles/skija.dir/src/FontStyleSet.cc.o CMakeFiles/skija.dir/src/Image.cc.o CMakeFiles/skija.dir/src/ImageFilter.cc.o CMakeFiles/skija.dir/src/ManagedString.cc.o CMakeFiles/skija.dir/src/MaskFilter.cc.o CMakeFiles/skija.dir/src/OutputWStream.cc.o CMakeFiles/skija.dir/src/Paint.cc.o CMakeFiles/skija.dir/src/PaintFilterCanvas.cc.o CMakeFiles/skija.dir/src/Path.cc.o CMakeFiles/skija.dir/src/PathEffect.cc.o CMakeFiles/skija.dir/src/PathMeasure.cc.o CMakeFiles/skija.dir/src/PathSegmentIterator.cc.o CMakeFiles/skija.dir/src/Picture.cc.o CMakeFiles/skija.dir/src/PictureRecorder.cc.o CMakeFiles/skija.dir/src/PixelRef.cc.o CMakeFiles/skija.dir/src/Region.cc.o CMakeFiles/skija.dir/src/Shader.cc.o CMakeFiles/skija.dir/src/ShadowUtils.cc.o CMakeFiles/skija.dir/src/Surface.cc.o CMakeFiles/skija.dir/src/TextBlob.cc.o CMakeFiles/skija.dir/src/TextBlobBuilder.cc.o CMakeFiles/skija.dir/src/TextLine.cc.o CMakeFiles/skija.dir/src/Typeface.cc.o CMakeFiles/skija.dir/src/U16String.cc.o CMakeFiles/skija.dir/src/interop.cc.o CMakeFiles/skija.dir/src/impl/Library.cc.o CMakeFiles/skija.dir/src/impl/Managed.cc.o CMakeFiles/skija.dir/src/impl/RefCnt.cc.o CMakeFiles/skija.dir/src/paragraph/FontCollection.cc.o CMakeFiles/skija.dir/src/paragraph/Paragraph.cc.o CMakeFiles/skija.dir/src/paragraph/ParagraphBuilder.cc.o CMakeFiles/skija.dir/src/paragraph/ParagraphCache.cc.o CMakeFiles/skija.dir/src/paragraph/ParagraphStyle.cc.o CMakeFiles/skija.dir/src/paragraph/StrutStyle.cc.o CMakeFiles/skija.dir/src/paragraph/TextStyle.cc.o CMakeFiles/skija.dir/src/paragraph/TypefaceFontProvider.cc.o CMakeFiles/skija.dir/src/paragraph/interop.cc.o CMakeFiles/skija.dir/src/shaper/FontMgrRunIterator.cc.o CMakeFiles/skija.dir/src/shaper/FontRunIterator.cc.o CMakeFiles/skija.dir/src/shaper/HbIcuScriptRunIterator.cc.o CMakeFiles/skija.dir/src/shaper/IcuBidiRunIterator.cc.o CMakeFiles/skija.dir/src/shaper/ManagedRunIterator.cc.o CMakeFiles/skija.dir/src/shaper/Shaper.cc.o CMakeFiles/skija.dir/src/shaper/TextBlobBuilderRunHandler.cc.o CMakeFiles/skija.dir/src/shaper/interop.cc.o CMakeFiles/skija.dir/src/svg/SVGCanvas.cc.o CMakeFiles/skija.dir/src/svg/SVGDOM.cc.o CMakeFiles/skija.dir/src/skottie/Animation.cc.o CMakeFiles/skija.dir/src/skottie/AnimationBuilder.cc.o CMakeFiles/skija.dir/src/skottie/Logger.cc.o CMakeFiles/skija.dir/src/skottie/interop.cc.o CMakeFiles/skija.dir/src/sksg/InvalidationController.cc.o ../Skia-m91-b99622c05a-linux-Release-x64/out/Release-x64/libfreetype2.a ../Skia-m91-b99622c05a-linux-Release-x64/out/Release-x64/libharfbuzz.a ../Skia-m91-b99622c05a-linux-Release-x64/out/Release-x64/libskottie.a ../Skia-m91-b99622c05a-linux-Release-x64/out/Release-x64/libsksg.a ../Skia-m91-b99622c05a-linux-Release-x64/out/Release-x64/libsvg.a ../Skia-m91-b99622c05a-linux-Release-x64/out/Release-x64/libskparagraph.a ../Skia-m91-b99622c05a-linux-Release-x64/out/Release-x64/libskshaper.a ../Skia-m91-b99622c05a-linux-Release-x64/out/Release-x64/libskia.a -lSKIA_OPENGL_LIBRARY-NOTFOUND /usr/lib/x86_64-linux-gnu/libfontconfig.so && : /usr/bin/ld: cannot find -lSKIA_OPENGL_LIBRARY-NOTFOUND

Thanks!

tonsky commented 3 years ago

Take a look at https://github.com/JetBrains/skija/blob/adf4d3aac4402a32096cf0a79ed75a0dc82c796d/extras/ubuntu-14.04/Dockerfile

Missing OpenGL means you need apt install libglu1-mesa-dev if I remember correctly

pakdev commented 3 years ago

Thanks, that was it!