GNOME Bugzilla – Bug 747874
libgit2-glib rawhide build fails to detect ssh support
Last modified: 2019-02-22 03:52:09 UTC
configure:13654: checking for libgit2 ssh support configure:13681: gcc -o conftest -pthread -I/usr/include/gobject-introspection-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld conftest.c -lgio-2.0 -lgit2 -lgirepository-1.0 -lgobject-2.0 -lglib-2.0 >&5 /usr/bin/ld: /tmp/cc9j045A.o: relocation R_X86_64_PC32 against undefined symbol `git_libgit2_init' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status This seems to be caused by the fact that the linker is invoked with -specs=/usr/lib/rpm/redhat/redhat-hardened-ld from LDFLAGS, but the compilation is done without matching -specs line that's supposed to come from CFLAGS.
Created attachment 301577 [details] [review] configure: Include passed in cflags for ssh check This fixes the Fedora 23 build where the cflags and ldflags have to match. Otherwise, if the configure check throws away cflags but uses ldflags, the check fails with a linker error.
Similar problem with libgit2-glib threading support check in gitg: configure:15102: checking for libgit2-glib threading support configure:15129: gcc -o conftest -pthread -I/usr/include/libgit2-glib-1.0 -I/usr/include/gobject-introspection-1.0 -I/usr/include/webkitgtk-4.0 -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/webkitgtk-4.0 -I/usr/include/gee-0.8 -I/usr/include/json-glib-1.0 -I/usr/include/libsecret-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gsettings-desktop-schemas -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld conftest.c -lgthread-2.0 -pthread -Wl,--export-dynamic -lgmodule-2.0 -pthread -lgio-2.0 -lgit2-glib-1.0 -lgit2 -lgirepository-1.0 -lwebkit2gtk-4.0 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lsoup-2.4 -ljavascriptcoregtk-4.0 -lgee-0.8 -ljson-glib-1.0 -lsecret-1 -lgio-2.0 -lgobject-2.0 -lglib-2.0 >&5 /usr/bin/ld: /tmp/cc5DAxxH.o: relocation R_X86_64_PC32 against undefined symbol `ggit_init' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value
Created attachment 301579 [details] [review] configure: Include passed in cflags for threading support check This fixes the Fedora 23 build where the cflags and ldflags have to match. Otherwise, if the configure check throws away cflags but uses ldflags, the check fails with a linker error.
Review of attachment 301577 [details] [review]: Looks good.
Review of attachment 301579 [details] [review]: Looks good.
Comment on attachment 301577 [details] [review] configure: Include passed in cflags for ssh check Attachment 301577 [details] pushed as 4cee9a9 - configure: Include passed in cflags for ssh check
Attachment 301579 [details] pushed as 1e0da0c - configure: Include passed in cflags for threading support check