#5 Use libtirpc for RPC routines
Closed 6 years ago by praiskup. Opened 6 years ago by tomh.
rpms/ tomh/gdal tirpc  into  master

file modified
+11 -4
@@ -62,7 +62,7 @@ 

  

  Name:		gdal

  Version:	2.2.3

- Release:	6%{?dist}%{?bootstrap:.%{bootstrap}.bootstrap}

+ Release:	7%{?dist}%{?bootstrap:.%{bootstrap}.bootstrap}

  Summary:	GIS file format library

  Group:		System Environment/Libraries

  License:	MIT
@@ -185,6 +185,7 @@ 

  BuildRequires:	xerces-c-devel

  BuildRequires:	xz-devel

  BuildRequires:	zlib-devel

+ BuildRequires:	libtirpc-devel

  

  # Run time dependency for gpsbabel driver

  Requires:	gpsbabel
@@ -415,8 +416,8 @@ 

  %else

  export CFLAGS="$RPM_OPT_FLAGS -fpic"

  %endif

- export CXXFLAGS="$CFLAGS -I%{_includedir}/libgeotiff"

- export CPPFLAGS="$CPPFLAGS -I%{_includedir}/libgeotiff"

+ export CXXFLAGS="$CFLAGS -I%{_includedir}/libgeotiff -I%{_includedir}/tirpc"

+ export CPPFLAGS="$CPPFLAGS -I%{_includedir}/libgeotiff -I%{_includedir}/tirpc"

  

  # For future reference:

  # epsilon: Stalled review -- https://bugzilla.redhat.com/show_bug.cgi?id=660024
@@ -429,7 +430,7 @@ 

  %endif

  

  %configure \

- 	LIBS=-l%{g2clib} \

+ 	LIBS="-l%{g2clib} -ltirpc" \

  	--with-autoload=%{_libdir}/%{name}plugins \

  	--datadir=%{_datadir}/%{name}/ \

  	--includedir=%{_includedir}/%{name}/ \
@@ -485,6 +486,8 @@ 

  POPPLER_OPTS="$POPPLER_OPTS POPPLER_0_58_OR_LATER=yes"

  %endif

  

+ export PERL_MM_OPT="LD=g++"

+ 

  make %{?_smp_mflags} $POPPLER_OPTS

  

  make man
@@ -882,6 +885,10 @@ 

  #Or as before, using ldconfig

  

  %changelog

+ * Wed Jan 24 2018 Tom Hughes <tom@compton.nu> - 2.2.3-7

+ - Use libtirpc for RPC routines

+ - Link perl extension using a C++ compiler

+ 

  * Sat Jan 27 2018 Than Ngo <than@redhat.com> - - 2.2.3-6

  - cleanup condition

  

no initial comment

This probably links everything against libtirpc, is that OK?

Well who knows, but the alternative is going to be painful as there are multiple libraries that it links to that use rpc.

At least libmfhdf (a static library, so no NEEDED in the so to drag in tirpc) and libdap (which tries to include rpc/*.h headers from it's own headers) are affected.

I have successfully built in mock with that patch, although it seems to be failing in koji for unrelated reasons :-( Best guess is that something else it uses has changed in the last few days.

I have successfully built in mock with that patch, although it seems to be failing in koji for unrelated reasons :-( Best guess is that something else it uses has changed in the last few days.

Do you have the link? Btw., I'll probably merge this soon if there's nobody faster than me (and if there are not complaints).

Sure - it was https://koji.fedoraproject.org/koji/taskinfo?taskID=24412387.

Looking at it again it might be a "-z defs" issue - it is failing to find things from the C++ standard library while linking GDAL.so for the perl extension.

1 new commit added

  • Link perl extension using a C++ compiler
6 years ago

I've added a commit to this branch to force the perl extension to link with g++ which produced a successful scratch build.

rebased onto a1a6501

6 years ago

I emailed the hdf maintainer about providing shared libraries, not just static ones which helps but I found this after looking at the rpc/types.h problem.

This really needs to be solved because it's causing a cascade of build issues in rawhide. It's a dependency of a dependency I'm trying to rebuild.

Using a scratch build[1] of hdf from the maintainer with shared libraries and the following I got a good build:

diff --git a/gdal.spec b/gdal.spec
index a06d1a4..7d70f2d 100644
--- a/gdal.spec
+++ b/gdal.spec
@@ -146,6 +146,8 @@ BuildRequires:      giflib-devel
 BuildRequires: netcdf-devel
 BuildRequires: libdap-devel
 BuildRequires: librx-devel
+# Needed for rpc/types.h
+BuildRequires:  libtirpc-devel
 %if 0%{?with_mysql}
 BuildRequires: mariadb-connector-c-devel
 %endif
@@ -415,8 +417,8 @@ export CFLAGS="$RPM_OPT_FLAGS -fPIC"
 %else
 export CFLAGS="$RPM_OPT_FLAGS -fpic"
 %endif
-export CXXFLAGS="$CFLAGS -I%{_includedir}/libgeotiff"
-export CPPFLAGS="$CPPFLAGS -I%{_includedir}/libgeotiff"
+export CXXFLAGS="$CFLAGS -I%{_includedir}/libgeotiff -I%{_includedir}/tirpc"
+export CPPFLAGS="$CPPFLAGS -I%{_includedir}/libgeotiff -I%{_includedir}/tiprc"

 # For future reference:
 # epsilon: Stalled review -- https://bugzilla.redhat.com/show_bug.cgi?id=660024

[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=25001979

I forgot about this, merging. Thank you Tom.

I think that's because the "-z defs" thing was reverted for now - it will probably be needed in future and is I think technically fixing a breakage in this case.

Ok, let's see in future. Thanks for the feedback!

Pull-Request has been closed by praiskup

6 years ago

I don't see anything here that addressed that hdf only provided static libraries which was causing a build failure for me in test builds...

I'm a bit lost in the problem, can you elaborate? Where the hdf with shared lib lives?

It was a scratch build, but it looks like you have it working with the static lib fine, it just wasn't working for me with a local mock build. It would error out during configuration.

Well, hdf got fixed since then to build against libtirpc-devel too. Maybe that's why the configuration works fine now?

Metadata