terwoord / skiasharp-raspberry

Scripts and patches for running skia sharp on the raspberry pi
13 stars 5 forks source link

SkiaSharp 1.60.0 #5

Open Feroks opened 6 years ago

Feroks commented 6 years ago

Did anyone tried and managed to build SkiaSharp 1.60.0?

I have altered the build.sh script and changed the patches a bit. Compilation is successful, but it dies during linking with multiple errors like this:

/home/mihail/skia1.60/build/skia/externals/skia/out/linux/arm/../../../src/codec/SkPngCodec.cpp:150: undefined reference to 'png_set_progressive_read_fn' /home/mihail/skia1.60/build/skia/externals/skia/out/linux/arm/../../../src/codec/SkWebpCodec.cpp:68: undefined reference to 'WebPDemuxGetI' /home/mihail/skia1.60/build/skia/externals/skia/out/linux/arm/../../../include/codec/../private/SkTemplates.h:50: undefined reference to 'WebPDemuxDelete'

Can anyone give advice on what to do? I can create a repo with my changes. If someone already has a compiled libSkiaSharp.so 1.60, feel free to share.

mterwoord commented 6 years ago

Sorry, not me.. You could try to disable webp by setting skia_use_libwebp to false in the buildscript...

Feroks commented 6 years ago

@mterwoord, thanks for the answer.

Adding following flags did help:

Now I am only getting one error: /home/mihail/skia1.60/build/skia/externals/skia/out/linux/arm/../../../src/core/SkFontMgr.cpp:175: undefined reference to 'SkFontMgr::Factory()’

Only relative information that I managed to find is here. Suggestion was to add skia_enable_fontmgr_empty = true Sadly, it does not help. I guess this flag was added in later versions.

nicolasr75 commented 6 years ago

@Feroks Have you found a solution? You may be interested in a possibly alternative solution for 1.60.*. I followed the instructions in the Wiki here: https://github.com/mono/SkiaSharp/wiki/Building-on-Linux

I wasn't able to build it on the RPI because the build tools downloaded are not compatible but cross- compiling it on my regular Ubuntu should be more performant anyway. You can find my current progress here https://github.com/mono/SkiaSharp/issues/633

It is not yet solved!!! Currently I am fighting with the -Werror flag and since I am not a Linux expert it gives me some headaches :-(

Feroks commented 6 years ago

@nicolasr75 Just like you, I am a Linux noob. I was not able to compile it and gave up for now. I tried to do it for 1.60.1 too, but had a bunch of error as well.

As for -Werror, I just removed it from source files build script (I guess). I can double check after approximately 15 hours, if it will still be relevant.

nicolasr75 commented 6 years ago

@Feroks It finally built sucessfully! If interested you may either follow the discussion in the Github issue I linked above or let me send you the final lib (3.3 MB). Note, however, that it was built from the current master (>1.60.3) and not some previous release!

Feroks commented 6 years ago

@nicolasr75 Good job! I would really appreciate, if you can send it to me (ferokss@gmail.com). I will try to compile it myself as well some time later.

Is it working with current Avalonia version? Last time I checked it used 1.60.0.1.