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



> On Aug 17, 2023, at 5:58 PM, Greg Troxel <gdt%lexort.com@localhost> wrote:
> 
> 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.
> 
> 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}

Yes, netcdf builds fine.  I have attached netcdf.pc.  It seems to be like yours; neither makes mention of libexecinfo.

I have also attached the lib/libnetcdf.settings file, which does make mention of -lexecinfo in LDFLAGS.

> 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?

Not yet, because I’m trying to figure this out first so that a PR will be useful.

>  does your system have libexecinfo built in?

I don’t believe so.  In any case, netcdf links against pkgsrc libexecinfo (see the output of otool -L, Mac equivalent to ldd, also attached).  

>  does the package build?

Both libexecinfo and netcdf build find.

>  when netcdf is built, does it end up using builtin or package?

A package, see above.

> What does that mean?  When you turn on debugging to see what that link
> line is, what is it?

The gdal build fails with the error 

	ld: library not found for -lexecinfo

I have attached the last line from .work.log, which I believe to be the failing command line.  Note the -lnetcdf, -lexecinfo (and other pkgsrc libraries), but no -L for the installed pkgsrc libraries.  

I hope this gives some clues for identifying the issue.

Thanks for your help.

Cheers,
Brook

Attachment: netcdf.pc
Description: Binary data

Attachment: libnetcdf.settings
Description: Binary data

Attachment: otool.out
Description: Binary data

Attachment: work.log
Description: Binary data



Home | Main Index | Thread Index | Old Index