[Bug 266252] science/libkml breakage (references to #266221)

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 06 Sep 2022 16:19:23 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266252

            Bug ID: 266252
           Summary: science/libkml breakage (references to #266221)
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: robert.kruus@gov.sk.ca

Added info for bug #266221

The errors stem from improper linking -- the build does not link to the libkml
libraries as it builds.
for example libkmlregionator.so.1 should link to libraries in PREFIX and
...
        libkmlconvenience.so.1
        libkmlengine.so.1
        libkmldom.so.1
        libkmlbase.so.1
....

but the latest reverted build did not do that, it was only linking to libraries
in PREFIX and none of the required libkml libraries in the build directory.

Using the same lib as an example, the broken build ran:
/usr/bin/c++ -fPIC -O2 -pipe -fstack-protector-strong -fno-strict-aliasing
-std=gnu++98 -O2 -pipe -fstack-protector-strong -fno-strict-aliasing
-std=gnu++98 -lz -fstack-protector-strong -shared
-Wl,-soname,libkmlregionator.so.1 -o lib/libkmlregionator.so.1.3.1

I was able to manually relinking the libs fixed the issue before install, for
the libkmlregionator.so.1 example adding in the build directory and libs to the
rpath:

/usr/bin/c++ -fPIC -O2 -pipe -fstack-protector-strong -fno-strict-aliasing
-std=gnu++98 -O2 -pipe -fstack-protector-strong -fno-strict-aliasing
-std=gnu++98 -lz -fstack-protector-strong -shared
-Wl,-soname,libkmlregionator.so.1 -o lib/libkmlregionator.so.1.3.1
src/kml/regionator/CMakeFiles/kmlregionator.dir/feature_list_region_handler.cc.o
src/kml/regionator/CMakeFiles/kmlregionator.dir/regionator.cc.o
src/kml/regionator/CMakeFiles/kmlregionator.dir/regionator_util.cc.o
-Wl,-rpath,/usr/obj/usr/ports/science/libkml/work/.build/lib
/usr/obj/usr/ports/science/libkml/work/.build/lib/libkmlbase.so.1
/usr/obj/usr/ports/science/libkml/work/.build/lib/libkmldom.so.1
/usr/obj/usr/ports/science/libkml/work/.build/lib/libkmlengine.so.1
/usr/obj/usr/ports/science/libkml/work/.build/lib/libkmlconvenience.so.1

resolved the issue.

Similar fixes were needed to be applied to relink all libkml libriaries, except
libkmlbase.

-- 
You are receiving this mail because:
You are the assignee for the bug.