After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747874 - libgit2-glib rawhide build fails to detect ssh support
libgit2-glib rawhide build fails to detect ssh support
Status: RESOLVED FIXED
Product: libgit2-glib
Classification: Core
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: gitg-maint
gitg-maint
Depends on:
Blocks:
 
 
Reported: 2015-04-14 22:19 UTC by Kalev Lember
Modified: 2019-02-22 03:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
configure: Include passed in cflags for ssh check (970 bytes, patch)
2015-04-14 22:20 UTC, Kalev Lember
committed Details | Review
configure: Include passed in cflags for threading support check (957 bytes, patch)
2015-04-14 22:51 UTC, Kalev Lember
committed Details | Review

Description Kalev Lember 2015-04-14 22:19:38 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.
Comment 1 Kalev Lember 2015-04-14 22:20:31 UTC
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.
Comment 2 Kalev Lember 2015-04-14 22:43:04 UTC
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
Comment 3 Kalev Lember 2015-04-14 22:51:05 UTC
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.
Comment 4 Ignacio Casal Quinteiro (nacho) 2015-04-15 06:29:37 UTC
Review of attachment 301577 [details] [review]:

Looks good.
Comment 5 Ignacio Casal Quinteiro (nacho) 2015-04-15 06:30:07 UTC
Review of attachment 301579 [details] [review]:

Looks good.
Comment 6 Kalev Lember 2015-04-15 08:55:08 UTC
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
Comment 7 Kalev Lember 2015-04-15 08:55:35 UTC
Attachment 301579 [details] pushed as 1e0da0c - configure: Include passed in cflags for threading support check