Skip to content

Conversation

@hattne
Copy link
Collaborator

@hattne hattne commented Mar 13, 2025

Fix segfault in XRD1621.cbf (Linux). Now passes 64 out of 90 (71%) CTest tests, and all tests run (no more segfaults).

hattne added 11 commits March 12, 2025 21:36
Apply patch to expose TIFFSNPrintDirectory() and honor CMake strip
chopping configuration.  Fixes segfault in `XRD1621.cbf`.
All targets have dependencies, so clearer to be explicit at the expense
of more lines of code.  No need to link against both `img_static` and
`cbf_static`: `img_static` is a subset of `cbf_static` here.
Introduce `CBF_ENABLE_FORTRAN` CMake option in lieu of
`CBF_USE_FORTRAN_ENV` environment variable.
The fetchcontent_declare() invocation relies on `VERSION` in project().
Use test data from 0.9.8 instead of 0.9.6 and rename `CBF_DATADIRI` and
`CBFC_DATADIRO` to `CBF_DATA_INPUT` and `CBF_DATA_OUTPUT`, respectively;
if the latter are set when CMake is run, externally provided test data
directories are used.  This obsoletes the `CBF_LOAD_TARBALL` macro and
CMP0003, and fixes the `cmp-XRD1621_orig.cbf-XRD1621.cbf` test, now
synchronized to `Makefile`.
It should probably be written to cbf.h from the build system instead.
Use the (Linux) libtool convention for `SOVERSION`.
Rename TIFFSNPrintDirectory() in tif_sprint.c to
cbf_TIFFSNPrintDirectory() and avoid the private LibTIFF API.
`SMAXSAMPLEVALUE` and `SMINSAMPLEVALUE` are scalars according to recent
LibTIFF documentation. `TRANSFERFUNCTION` is either 1- or 3-dimensional.
Enable strip chopping, regardless of how LibTIFF was configured, because
the tests depend on it.  Obsoletes the LibTIFF patch.
No need to print differently on Windows.
Deprecated in LibTIFF 4.3.0.
@ndevenish
Copy link
Member

How much of the conda-forge cmake changes are included in this? e.g. if looking at the CMake should I start from here or from that patch?

@hattne
Copy link
Collaborator Author

hattne commented Mar 14, 2025

I don't know the answer to the first question (other than it includes more than it did before). There are still major bits missing such as incomplete tests, better handling of the external dependencies, and the Java and Python stuff. I'll get to all of that…

For the purpose of editing, I think it'd be better to look at this CMakeLists.txt, maybe referring to the patched thing at conda-forge as a roadmap. There are a couple of mistakes in the first version at conda-forge that are being fixed while I'm preparing these pull requests.

@hattne hattne marked this pull request as ready for review March 15, 2025 01:27
hattne added 2 commits March 18, 2025 06:56
Use `CBF_WITH_LIBTIFF` to toggle use of external LibTIFF.  For now,
default to static LibTIFF.  Thanks to @ndevenish.
@hattne hattne requested a review from ndevenish March 18, 2025 16:31
@hattne hattne merged commit f351b8d into dials:main Mar 20, 2025
@hattne hattne deleted the libtiff branch March 21, 2025 00:06
hattne added a commit to hattne/cbflib that referenced this pull request Jul 5, 2025
TRANSFERFUNCTION does not seem to agree with the LibTIFF documentation;
as per dials#70, CBFlib follows LibTIFF's TIFFPrintDirectory()
implementation.
hattne added a commit to hattne/cbflib that referenced this pull request Jul 17, 2025
TRANSFERFUNCTION does not seem to agree with the LibTIFF documentation;
as per dials#70, CBFlib follows LibTIFF's TIFFPrintDirectory()
implementation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants