lidavidm opened a new issue, #2754:
URL: https://github.com/apache/arrow-adbc/issues/2754

   ### What happened?
   
   `g-ir-scanner` is failing. I instrumented Meson and it appears that the RPM 
build is setting the following `LDFLAGS`:
   
   ```
   LDFLAGS=-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now 
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 
   ```
   
   Either we need to reset LDFLAGS somehow when invoking `g-ir-scanner`, or 
convince it to build with `-fPIE`. I patched Meson `gnome.py` to experiment 
with this and it worked, but obviously that's not a full solution
   
   ### Stack Trace
   
   ```
   [18/23] Generating adbc-glib/ADBC-1.0.gir with a custom command (wrapped by 
meson to set env)
   FAILED: adbc-glib/ADBC-1.0.gir 
   env 
PKG_CONFIG_PATH=/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/build/meson-uninstalled:/usr/lib64/pkgconfig:/usr/share/pkgconfig
 PKG_CONFIG=/usr/bin/pkg-config CC=gcc CFLAGS= /usr/bin/g-ir-scanner --quiet 
--no-libtool --namespace=ADBC --nsversion=1.0 --warn-all --output 
adbc-glib/ADBC-1.0.gir --c-include=adbc-glib/adbc-glib.h --warn-all 
-I/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/adbc-glib 
-I/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/build/adbc-glib 
-I/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/. 
-I/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/build/. 
-I/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/../c/include 
-I/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/build/../c/include 
--filelist=/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/build/adbc-glib/libadbc-glib.so.1.6.0.p/ADBC_1.0_gir_filelist
 --include=GObject-2.0 --symbol-prefix=gadbc --identifier-prefix=GADBC 
--pkg-export=adbc-glib --cflags-begin 
-I/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/. -I
 /build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/build/. 
-I/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/../c/include 
-I/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/build/../c/include 
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 
-I/usr/include/gobject-introspection-1.0 --cflags-end 
--add-include-path=/usr/share/gir-1.0 
-L/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/build/adbc-glib --library 
adbc-glib 
-L/root/rpmbuild/BUILD/apache-arrow-adbc-18/glib/../c/redhat-linux-build/driver_manager
 --extra-library=gobject-2.0 --extra-library=glib-2.0 
--extra-library=girepository-1.0 --sources-top-dirs 
/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/ --sources-top-dirs 
/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/build/ --warn-error
   /usr/bin/ld: 
/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/build/tmp-introspect4ug84fdq/ADBC-1.0.o:
 relocation R_X86_64_32 against `.rodata' can not be used when making a PIE 
object; recompile with -fPIE
   collect2: error: ld returned 1 exit status
   linking of temporary binary failed: Command '['gcc', '-o', 
'/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/build/tmp-introspect4ug84fdq/ADBC-1.0',
 
'/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/build/tmp-introspect4ug84fdq/ADBC-1.0.o',
 '-L.', '-Wl,-rpath,.', '-Wl,--no-as-needed', 
'-L/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/build/adbc-glib', 
'-Wl,-rpath,/build/rpmbuild/BUILD/apache-arrow-adbc-18/glib/build/adbc-glib', 
'-L/root/rpmbuild/BUILD/apache-arrow-adbc-18/glib/../c/redhat-linux-build/driver_manager',
 
'-Wl,-rpath,/root/rpmbuild/BUILD/apache-arrow-adbc-18/glib/../c/redhat-linux-build/driver_manager',
 '-ladbc-glib', '-lgobject-2.0', '-lglib-2.0', '-lgirepository-1.0', 
'-lgio-2.0', '-lgobject-2.0', '-Wl,--export-dynamic', '-lgmodule-2.0', 
'-pthread', '-lglib-2.0', '-lglib-2.0', '-Wl,-z,relro', '-Wl,--as-needed', 
'-Wl,-z,now', '-specs=/usr/lib/rpm/redhat/redhat-hardened-ld', 
'-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1']' returned non-zero exit status 
1.
   ninja: build stopped: subcommand failed.
   ```
   
   ### How can we reproduce the bug?
   
   ```
   cd ci/linux-packages/
   env YUM_TARGETS=almalinux-9 DISTRIBUTION=almalinux VERSION=18 
ARROW_SOURCE=/home/lidavidm/Code/arrow rake yum:build BUILD_DIR=build
   ```
   
   ### Environment/Setup
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to