[librsvg: 6/16] tests/Makefile.am: link the api tests against librsvg_c_api.la




commit c3d460b7463eb45a9ba1354da92f225420074179
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Sep 15 18:34:30 2022 -0500

    tests/Makefile.am: link the api tests against librsvg_c_api.la
    
    Something changed with the last update of the container image, notably
    gcc 12.1.1 -> gcc 12.2.1.  I am getting this error in the CI when
    linking tests/abi:
    
      make[4]: Entering directory '/srv/project/_build/tests'
      depbase=`echo api.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
      gcc -DHAVE_CONFIG_H -I. -I../../tests -I..  -I../../tests -I../../include -I../include 
-DTEST_DATA_DIR="\"../../tests\"" -DTEST_SRC_DIR="\"/srv/project/_build/tests\"" -DTOP_SRC_DIR="\"../..\"" 
-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 
-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount 
-I/usr/include/blkid -I/usr/include/harfbuzz -I/usr/include/libxml2 -I/usr/include/pango-1.0 
-I/usr/include/fribidi -pthread    -g -O2 -MT api.o -MD -MP -MF $depbase.Tpo -c -o api.o ../../tests/api.c &&\
      mv -f $depbase.Tpo $depbase.Po
      depbase=`echo test-utils.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
      gcc -DHAVE_CONFIG_H -I. -I../../tests -I..  -I../../tests -I../../include -I../include 
-DTEST_DATA_DIR="\"../../tests\"" -DTEST_SRC_DIR="\"/srv/project/_build/tests\"" -DTOP_SRC_DIR="\"../..\"" 
-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 
-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount 
-I/usr/include/blkid -I/usr/include/harfbuzz -I/usr/include/libxml2 -I/usr/include/pango-1.0 
-I/usr/include/fribidi -pthread    -g -O2 -MT test-utils.o -MD -MP -MF $depbase.Tpo -c -o test-utils.o 
../../tests/test-utils.c &&\
      mv -f $depbase.Tpo $depbase.Po
      /bin/sh ../libtool  --tag=CC   --mode=link gcc  -g -O2 -static  -o api api.o test-utils.o  
../librsvg-2.la -lpng16 -lz -lcairo-gobject -lgdk_pixbuf-2.0 -lgio-2.0 -lxml2 -lpangocairo-1.0 -lcairo 
-lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lfontconfig -lfreetype  -lm
      libtool: link: gcc -g -O2 -o api api.o test-utils.o  ../.libs/librsvg-2.a -lpng16 -lz -lcairo-gobject 
-lgdk_pixbuf-2.0 -lgio-2.0 -lxml2 -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 
-lglib-2.0 -lharfbuzz -lfontconfig -lfreetype -lm
      /usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: api.o: in function 
`library_version_constants':
      /srv/project/_build/tests/../../tests/api.c:1451: undefined reference to `rsvg_major_version'
      /usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: 
/srv/project/_build/tests/../../tests/api.c:1451: undefined reference to `rsvg_major_version'
      ... all the other rsvg_* symbols are missing
    
    And .libs/librsvg-2.a is only 8 bytes.  It doesn't seem to have linked librsvg_c_api.a.
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/747>

 tests/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c11862374..b645ea6db 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -36,8 +36,8 @@ api_SOURCES =                 \
        test-utils.h    \
        $(NULL)
 
-api_LDADD = $(top_builddir)/librsvg-@RSVG_API_MAJOR_VERSION@.la        \
-       $(LIBRSVG_LIBS)                                         \
+api_LDADD = $(top_builddir)/librsvg_c_api.la   \
+       $(LIBRSVG_LIBS)                         \
        $(LIBM)
 
 api_LDFLAGS = -static


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]