tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: geography/gdal-lib: devel/netcdf + devel/libexecinfo
Brook Milligan <brook%nmsu.edu@localhost> writes:
> I am trying to build the geography/gdal-lib package (pkgsrc-2023Q2) on a MacOS system. Out of the box, it fails with the following error:
>
> ld: library not found for -lexecinfo
>
> It seems that the dependency on libexecinfo is introduced by the
> gdal-lib dependency on devel/netcdf, which includes
> devel/libexecinfo/buildlink3.mk.
I do not know what you mean by "is not known to". When I run ldd on
libdal.so on NetBSD, I see libexecinfo. When I run it on libnetcdf.os,
I see libexecinfo.
So the first question is does netcdf build on your system, does the lib
link to libexecinfo, and where is libexecinfo? On my system, netcdf's
pc has
Libs: -L${libdir} -lnetcdf
Libs.private: -lhdf5_hl -lhdf5 -lm -lsz -lbz2 -lxml2 -lcurl
Cflags: -I${includedir}
which is broken as there is no -Wl,-rpath, but given that libdir for
that and libdir for the other package is the same, no actual trouble.
> That last dependency, netcdf depending on libexecinfo, was introduced
> in the last commit, i.e., v1.66 of devel/netcdf/Makefile, which
> updated to netcdf v4.9.2. from v4.6.1.
Which is a vast update.
> I have yet found no reference to libexecinfo in the netcdf release
> notes, so I am not sure why this was included in the Makefile.
The netcdf configure.ac looks for execinfo, and so does the CMakeList.
It is not listed as a dependency in a README. From which we
conclude... netcdf upstream docs could be better!
> I can report, however, that removing the dependency on libexecinfo
> from netcdf allows both netcdf (which built fine before) and gdal-lib
> (which did not build before) to build on my system.
Did you file a bug with netcdf that the build scripts look for it but
that there is no readme that explains whether it is optional or
required?
Reading the sources, two debug routines print backtraces if libexecinfo
was found at configure time. So there's the answer: it's optional, and
likely it is recommended.
I can't figure how libexecinfo gets on a link line but -lexecinfo is in
LDFLAGS after configuring.
> What is the correct fix here?
I think there is something troubled between your system and the various
packages, and we should figure that out and fix it.
So:
does your system have libexecinfo built in?
does the package build?
when netcdf is built, does it end up using builtin or package?
> Somehow the transitive dependency is not known to gdal-lib.
What does that mean? When you turn on debugging to see what that link
line is, what is it?
Overall, I bet the issue is that this is a mac-dylib-think-different
problem that something in gdal or netcdf does not support.
But, I am very wary of just turning it off because of a mac build bug.
Home |
Main Index |
Thread Index |
Old Index