<div dir="ltr"><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b"><span class="gmail-Q4iAWc">


        
        <span></span></span></span></span>Hello!<br>I'm trying to build cairo for Android9 by cross-compiling with NDK-r24 aarch64.<br>My build script:<br><br>export CFLAGS="$CFLAGS -DCAIRO_NO_MUTEX=1"<br>export CXXFLAGS=$CFLAGS<br>make clean || true<br>./configure --prefix=$PREFIX --host=aarch64-linux-gnu --build=x86_64-linux-gnu \<br>--enable-glesv2 \<br>--enable-glesv3 \<br>--enable-xlib-xcb<br>make V=1 -j $NUMJOB<br><br>Compilation is generally successful, but errors occur during linking:<br><br>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<br>ld: error: duplicate symbol: _cairo_gl_composite_set_source<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_composite_set_source)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x0)<br><br>ld: error: duplicate symbol: _cairo_gl_composite_set_source_operand<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_composite_set_source_operand)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x5C)<br><br>ld: error: duplicate symbol: _cairo_gl_composite_set_solid_source<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_composite_set_solid_source)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0xC0)<br><br>ld: error: duplicate symbol: _cairo_gl_composite_set_mask<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_composite_set_mask)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0xFC)<br><br>ld: error: duplicate symbol: _cairo_gl_composite_set_mask_operand<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_composite_set_mask_operand)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x178)<br><br>ld: error: duplicate symbol: _cairo_gl_composite_set_spans<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_composite_set_spans)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x1EC)<br><br>ld: error: duplicate symbol: _cairo_gl_composite_set_multisample<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_composite_set_multisample)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x208)<br><br>ld: error: duplicate symbol: _cairo_gl_composite_set_clip_region<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_composite_set_clip_region)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x224)<br><br>ld: error: duplicate symbol: _cairo_gl_composite_set_clip<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_composite_set_clip)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x244)<br><br>ld: error: duplicate symbol: _cairo_gl_context_destroy_operand<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_context_destroy_operand)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x264)<br><br>ld: error: duplicate symbol: _cairo_gl_composite_flush<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_composite_flush)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x398)<br><br>ld: error: duplicate symbol: _cairo_gl_scissor_to_rectangle<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_scissor_to_rectangle)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x4A4)<br><br>ld: error: duplicate symbol: _cairo_gl_set_operands_and_operator<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_set_operands_and_operator)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x5E0)<br><br>ld: error: duplicate symbol: _cairo_gl_composite_begin<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_composite_begin)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0xFFC)<br><br>ld: error: duplicate symbol: _cairo_gl_context_choose_emit_rect<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_context_choose_emit_rect)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x15D4)<br><br>ld: error: duplicate symbol: _cairo_gl_context_emit_rect<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_context_emit_rect)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x1688)<br><br>ld: error: duplicate symbol: _cairo_gl_context_choose_emit_span<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_context_choose_emit_span)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x16CC)<br><br>ld: error: duplicate symbol: _cairo_gl_context_choose_emit_glyph<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_context_choose_emit_glyph)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x1A38)<br><br>ld: error: duplicate symbol: _cairo_gl_composite_fini<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_composite_fini)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x1D10)<br><br>ld: error: duplicate symbol: _cairo_gl_composite_set_operator<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(_cairo_gl_composite_set_operator)<br>>>> defined at cairo-gl-composite.c<br>>>>            .libs/cairo-gl-composite.o:(.text+0x1D44)<br><br>ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)<br>clang-14: error: linker command failed with exit code 1 (use -v to see invocation)<br><br>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.<br>Thank you.<br></div><div><br></div><div><br></div></div>