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

WIP: Use a git submodule for plutovg #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bkmgit
Copy link

@bkmgit bkmgit commented Oct 16, 2022

Partially addresses #110

Building the examples fails. Error messages:

/usr/bin/ld: ../3rdparty/plutovg/example/libplutovg.a(plutovg.c.o): in function `stbi_write_bmp':
plutovg.c:(.text+0x945): multiple definition of `stbi_write_bmp'; CMakeFiles/svg2png.dir/svg2png.cpp.o:svg2png.cpp:(.text+0x60f): first defined here
/usr/bin/ld: ../3rdparty/plutovg/example/libplutovg.a(plutovg.c.o): in function `stbi_write_tga':
plutovg.c:(.text+0xdd2): multiple definition of `stbi_write_tga'; CMakeFiles/svg2png.dir/svg2png.cpp.o:svg2png.cpp:(.text+0x6bc): first defined here
/usr/bin/ld: ../3rdparty/plutovg/example/libplutovg.a(plutovg.c.o): in function `stbi_write_png':
plutovg.c:(.text+0x3446): multiple definition of `stbi_write_png'; CMakeFiles/svg2png.dir/svg2png.cpp.o:svg2png.cpp:(.text+0x23e8): first defined here
collect2: error: ld returned 1 exit status

Dynamic linking also fails:

[100%] Linking CXX shared library liblunasvg.so
/usr/bin/ld: 3rdparty/plutovg/example/libplutovg.a(plutovg.c.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: 3rdparty/plutovg/example/libplutovg.a(plutovg-blend.c.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: 3rdparty/plutovg/example/libplutovg.a(plutovg-rle.c.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: 3rdparty/plutovg/example/libplutovg.a(plutovg-font.c.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: 3rdparty/plutovg/example/libplutovg.a(sw_ft_raster.c.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: 3rdparty/plutovg/example/libplutovg.a(sw_ft_stroker.c.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: 3rdparty/plutovg/example/libplutovg.a(sw_ft_math.c.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: 3rdparty/plutovg/example/libplutovg.a(plutovg.c.o): warning: relocation against `stbi__flip_vertically_on_write' in read-only section `.text'
collect2: error: ld returned 1 exit status

Maybe libplutovg can also be compiled as shared library by overriding configuration, as described here

Suggestions for fixing above welcome, but will keep working on them.

@sammycage
Copy link
Owner

Lemme update plutovg first

1 similar comment
@sammycage
Copy link
Owner

Lemme update plutovg first

@ivantishchenko
Copy link

@sammycage

Lemme update plutovg first

Do you have any updates on this? Are there any divergences between 3rdparty/plutovg and the actual plutovg repo? As I understand 3rdparty/plutovg is a superset of the actual plutovg repo, as more features were added.

sammycage/plutovg#31

@sammycage
Copy link
Owner

@ivantishchenko Well done! I'm kind of busy right now, but I'll let you know when I have time to do so.

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

Successfully merging this pull request may close these issues.

None yet

3 participants