[cairo] Build error with NDK
Павел Самсонов
pvsamsonov76 at gmail.com
Mon Jul 11 15:52:09 UTC 2022
Hello!
I'm trying to build cairo for Android9 by cross-compiling with NDK-r24
aarch64.
My build script:
export CFLAGS="$CFLAGS -DCAIRO_NO_MUTEX=1"
export CXXFLAGS=$CFLAGS
make clean || true
./configure --prefix=$PREFIX --host=aarch64-linux-gnu
--build=x86_64-linux-gnu \
--enable-glesv2 \
--enable-glesv3 \
--enable-xlib-xcb
make V=1 -j $NUMJOB
Compilation is generally successful, but errors occur during linking:
libtool: link:
/home/pavel/android-ndk-r24/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android28-clang
-shared -fPIC -DPIC .libs/cairo-analysis-surface.o .libs/cairo-arc.o
.libs/cairo-array.o .libs/cairo-atomic.o .libs/cairo-base64-stream.o
.libs/cairo-base85-stream.o .libs/cairo-bentley-ottmann-rectangular.o
.libs/cairo-bentley-ottmann-rectilinear.o .libs/cairo-bentley-ottmann.o
.libs/cairo-botor-scan-converter.o .libs/cairo-boxes-intersect.o
.libs/cairo-boxes.o .libs/cairo-cache.o .libs/cairo-clip-boxes.o
.libs/cairo-clip-polygon.o .libs/cairo-clip-region.o
.libs/cairo-clip-surface.o .libs/cairo-clip-tor-scan-converter.o
.libs/cairo-clip.o .libs/cairo-color.o .libs/cairo-composite-rectangles.o
.libs/cairo-compositor.o .libs/cairo-contour.o .libs/cairo-damage.o
.libs/cairo-debug.o .libs/cairo-default-context.o .libs/cairo-device.o
.libs/cairo-error.o .libs/cairo-fallback-compositor.o .libs/cairo-fixed.o
.libs/cairo-font-face-twin-data.o .libs/cairo-font-face-twin.o
.libs/cairo-font-face.o .libs/cairo-font-options.o .libs/cairo-freed-pool.o
.libs/cairo-freelist.o .libs/cairo-gstate.o .libs/cairo-hash.o
.libs/cairo-hull.o .libs/cairo-image-compositor.o .libs/cairo-image-info.o
.libs/cairo-image-source.o .libs/cairo-image-surface.o .libs/cairo-line.o
.libs/cairo-lzw.o .libs/cairo-mask-compositor.o .libs/cairo-matrix.o
.libs/cairo-mempool.o .libs/cairo-mesh-pattern-rasterizer.o
.libs/cairo-misc.o .libs/cairo-mono-scan-converter.o .libs/cairo-mutex.o
.libs/cairo-no-compositor.o .libs/cairo-observer.o
.libs/cairo-output-stream.o .libs/cairo-paginated-surface.o
.libs/cairo-path-bounds.o .libs/cairo-path-fill.o .libs/cairo-path-fixed.o
.libs/cairo-path-in-fill.o .libs/cairo-path-stroke-boxes.o
.libs/cairo-path-stroke-polygon.o .libs/cairo-path-stroke-traps.o
.libs/cairo-path-stroke-tristrip.o .libs/cairo-path-stroke.o
.libs/cairo-path.o .libs/cairo-pattern.o .libs/cairo-pen.o
.libs/cairo-polygon-intersect.o .libs/cairo-polygon-reduce.o
.libs/cairo-polygon.o .libs/cairo-raster-source-pattern.o
.libs/cairo-recording-surface.o .libs/cairo-rectangle.o
.libs/cairo-rectangular-scan-converter.o .libs/cairo-region.o
.libs/cairo-rtree.o .libs/cairo-scaled-font.o
.libs/cairo-shape-mask-compositor.o .libs/cairo-slope.o
.libs/cairo-spans-compositor.o .libs/cairo-spans.o .libs/cairo-spline.o
.libs/cairo-stroke-dash.o .libs/cairo-stroke-style.o
.libs/cairo-surface-clipper.o .libs/cairo-surface-fallback.o
.libs/cairo-surface-observer.o .libs/cairo-surface-offset.o
.libs/cairo-surface-snapshot.o .libs/cairo-surface-subsurface.o
.libs/cairo-surface-wrapper.o .libs/cairo-surface.o .libs/cairo-time.o
.libs/cairo-tor-scan-converter.o .libs/cairo-tor22-scan-converter.o
.libs/cairo-toy-font-face.o .libs/cairo-traps-compositor.o
.libs/cairo-traps.o .libs/cairo-tristrip.o .libs/cairo-unicode.o
.libs/cairo-user-font.o .libs/cairo-version.o .libs/cairo-wideint.o
.libs/cairo.o .libs/cairo-cff-subset.o .libs/cairo-scaled-font-subsets.o
.libs/cairo-truetype-subset.o .libs/cairo-type1-fallback.o
.libs/cairo-type1-glyph-names.o .libs/cairo-type1-subset.o
.libs/cairo-type3-glyph-surface.o .libs/cairo-pdf-operators.o
.libs/cairo-pdf-shading.o .libs/cairo-tag-attributes.o
.libs/cairo-deflate-stream.o .libs/cairo-xlib-display.o
.libs/cairo-xlib-core-compositor.o .libs/cairo-xlib-fallback-compositor.o
.libs/cairo-xlib-render-compositor.o .libs/cairo-xlib-screen.o
.libs/cairo-xlib-source.o .libs/cairo-xlib-surface.o
.libs/cairo-xlib-surface-shm.o .libs/cairo-xlib-visual.o
.libs/cairo-xlib-xcb-surface.o .libs/cairo-xcb-connection.o
.libs/cairo-xcb-connection-core.o .libs/cairo-xcb-connection-render.o
.libs/cairo-xcb-connection-shm.o .libs/cairo-xcb-screen.o
.libs/cairo-xcb-shm.o .libs/cairo-xcb-surface.o
.libs/cairo-xcb-surface-core.o .libs/cairo-xcb-surface-render.o
.libs/cairo-xcb-resources.o .libs/cairo-png.o .libs/cairo-gl-composite.o
.libs/cairo-gl-device.o .libs/cairo-gl-dispatch.o .libs/cairo-gl-glyphs.o
.libs/cairo-gl-gradient.o .libs/cairo-gl-info.o
.libs/cairo-gl-msaa-compositor.o .libs/cairo-gl-operand.o
.libs/cairo-gl-shaders.o .libs/cairo-gl-source.o
.libs/cairo-gl-spans-compositor.o .libs/cairo-gl-surface.o
.libs/cairo-gl-traps-compositor.o .libs/cairo-gl-composite.o
.libs/cairo-gl-device.o .libs/cairo-gl-dispatch.o .libs/cairo-gl-glyphs.o
.libs/cairo-gl-gradient.o .libs/cairo-gl-info.o
.libs/cairo-gl-msaa-compositor.o .libs/cairo-gl-operand.o
.libs/cairo-gl-shaders.o .libs/cairo-gl-source.o
.libs/cairo-gl-spans-compositor.o .libs/cairo-gl-surface.o
.libs/cairo-gl-traps-compositor.o .libs/cairo-egl-context.o
.libs/cairo-script-surface.o .libs/cairo-ft-font.o .libs/cairo-ps-surface.o
.libs/cairo-pdf-surface.o .libs/cairo-pdf-interchange.o
.libs/cairo-tag-stack.o .libs/cairo-svg-surface.o -Wl,-rpath
-Wl,/tinysystem/usr/lib -Wl,-rpath -Wl,/tinysystem/usr/lib
-L/home/pavel/tinysystem_work/_build/arm64-v8a/tinysystem/usr/lib
-L/home/pavel/tinysystem_work/_build/arm64-v8a/tinysystem/usr/lib64
-L/home/pavel/tinysystem_work/_build/arm64-v8a/lib -L/tinysystem/usr/lib
/tinysystem/usr/lib/libpixman-1.so /tinysystem/usr/lib/libfontconfig.so
/tinysystem/usr/lib/libfreetype.so -lEGL -ldl
-L/data/user/0/ru.tinyware.hifihieringaid/files/usr/lib
/tinysystem/usr/lib/libpng16.so /tinysystem/usr/lib/libxcb-shm.so
/tinysystem/usr/lib/libX11-xcb.so /tinysystem/usr/lib/libxcb.so
/tinysystem/usr/lib/libxcb-render.so /tinysystem/usr/lib/libXrender.so
/tinysystem/usr/lib/libX11.so /tinysystem/usr/lib/libXext.so -lz -lGLESv2
-lrt -lm -pthread -Wl,-soname -Wl,libcairo.so.2 -o
.libs/libcairo.so.2.11704.0
ld: error: duplicate symbol: _cairo_gl_composite_set_source
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(_cairo_gl_composite_set_source)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x0)
ld: error: duplicate symbol: _cairo_gl_composite_set_source_operand
>>> defined at cairo-gl-composite.c
>>>
.libs/cairo-gl-composite.o:(_cairo_gl_composite_set_source_operand)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x5C)
ld: error: duplicate symbol: _cairo_gl_composite_set_solid_source
>>> defined at cairo-gl-composite.c
>>>
.libs/cairo-gl-composite.o:(_cairo_gl_composite_set_solid_source)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0xC0)
ld: error: duplicate symbol: _cairo_gl_composite_set_mask
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(_cairo_gl_composite_set_mask)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0xFC)
ld: error: duplicate symbol: _cairo_gl_composite_set_mask_operand
>>> defined at cairo-gl-composite.c
>>>
.libs/cairo-gl-composite.o:(_cairo_gl_composite_set_mask_operand)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x178)
ld: error: duplicate symbol: _cairo_gl_composite_set_spans
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(_cairo_gl_composite_set_spans)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x1EC)
ld: error: duplicate symbol: _cairo_gl_composite_set_multisample
>>> defined at cairo-gl-composite.c
>>>
.libs/cairo-gl-composite.o:(_cairo_gl_composite_set_multisample)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x208)
ld: error: duplicate symbol: _cairo_gl_composite_set_clip_region
>>> defined at cairo-gl-composite.c
>>>
.libs/cairo-gl-composite.o:(_cairo_gl_composite_set_clip_region)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x224)
ld: error: duplicate symbol: _cairo_gl_composite_set_clip
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(_cairo_gl_composite_set_clip)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x244)
ld: error: duplicate symbol: _cairo_gl_context_destroy_operand
>>> defined at cairo-gl-composite.c
>>>
.libs/cairo-gl-composite.o:(_cairo_gl_context_destroy_operand)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x264)
ld: error: duplicate symbol: _cairo_gl_composite_flush
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(_cairo_gl_composite_flush)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x398)
ld: error: duplicate symbol: _cairo_gl_scissor_to_rectangle
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(_cairo_gl_scissor_to_rectangle)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x4A4)
ld: error: duplicate symbol: _cairo_gl_set_operands_and_operator
>>> defined at cairo-gl-composite.c
>>>
.libs/cairo-gl-composite.o:(_cairo_gl_set_operands_and_operator)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x5E0)
ld: error: duplicate symbol: _cairo_gl_composite_begin
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(_cairo_gl_composite_begin)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0xFFC)
ld: error: duplicate symbol: _cairo_gl_context_choose_emit_rect
>>> defined at cairo-gl-composite.c
>>>
.libs/cairo-gl-composite.o:(_cairo_gl_context_choose_emit_rect)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x15D4)
ld: error: duplicate symbol: _cairo_gl_context_emit_rect
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(_cairo_gl_context_emit_rect)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x1688)
ld: error: duplicate symbol: _cairo_gl_context_choose_emit_span
>>> defined at cairo-gl-composite.c
>>>
.libs/cairo-gl-composite.o:(_cairo_gl_context_choose_emit_span)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x16CC)
ld: error: duplicate symbol: _cairo_gl_context_choose_emit_glyph
>>> defined at cairo-gl-composite.c
>>>
.libs/cairo-gl-composite.o:(_cairo_gl_context_choose_emit_glyph)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x1A38)
ld: error: duplicate symbol: _cairo_gl_composite_fini
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(_cairo_gl_composite_fini)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x1D10)
ld: error: duplicate symbol: _cairo_gl_composite_set_operator
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(_cairo_gl_composite_set_operator)
>>> defined at cairo-gl-composite.c
>>> .libs/cairo-gl-composite.o:(.text+0x1D44)
ld: error: too many errors emitted, stopping now (use -error-limit=0 to see
all errors)
clang-14: error: linker command failed with exit code 1 (use -v to see
invocation)
If you look closely, the .libs/cairo-gl-composite.o object appears twice in
the linking command. Why is this happening, please help. I myself can’t
figure out the assembly system, I see that it’s a simple mistake, but I
don’t know how to fix it.
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20220711/fd823acd/attachment.htm>
More information about the cairo
mailing list