Starlink / starlink

Starlink Software Collection
162 stars 53 forks source link

starlink build on debian 12 #82

Open paulkerry1 opened 7 months ago

paulkerry1 commented 7 months ago

Hi all

Prelim query: I normally build starlink from the github source for our debian amd64 systems - is the new starlink 2023A release taken from the github source on a specific date or commit as I cannot find a release or tag for 2023A?

Main query: I've cloned the latest github source on 09 Jan 2024, and on debian 12 amd64, make world fails at thirdparty/tclsys/tkimg with...

/usr/bin/ld: tifftclStubInit.o:(.data.rel.ro.local+0x508): undefined reference to `TIFFInitJBIG'
/usr/bin/ld: tif_codec.o:(.data.rel+0x118): undefined reference to `TIFFInitJBIG'

It looks like that is for "JBIG Compression Algorithm Support". By using "--disable-jbig" as a configure option within the libtiff source and starting from a newly cloned source, I can successfully build that part.

Does anyone know if doing this cause any future usage problems though? After I got everything installed, everything has worked so far with some limited testing.

make world also fails at thirdparty/kitware/vtk with a few errors such as...

thirdparty/kitware/vtk/cmake/Source/CTest/cmCTestBuildHandler.cxx:617:23:
/usr/include/c++/12/bits/stl_tree.h:770:15: error: static assertion failed: comparison object must be invocable as const
is_invocable_v<const _Compare&, const _Key&, const _Key&>,

which I've gotten around by adding an extra "const" term to...

thirdparty/kitware/vtk/cmake/Source/CTest/cmCTestBuildHandler.cxx line 575 to be... bool operator()(std::string const& l, std::string const& r) const

thirdparty/kitware/vtk/VTK/Rendering/Label/vtkLabelHierarchyPrivate.h line 77 to be... bool operator () ( const vtkIdType& a, const vtkIdType& b ) const

thirdparty/kitware/vtk/VTK/Rendering/Label/vtkLabelHierarchy.cxx line 528 to be... const vtkHierarchyNode & b) const

I've also had to tweak a few of the doc .tex files to include hyperref and html packages so that they can build correctly - I can provide more details on those if anyone is interested.

After doing those changes, everything builds correctly: no problems at all with the starjava build afterwards.

So am I doing the right things here?

Best regards Paul

pwdraper commented 7 months ago

Hi Paul,

looks like the 2023A release is just on a branch, so you should check that out.

Re: the tkimg issue. This is one that has been reported before:

https://www.jiscmail.ac.uk/cgi-bin/wa-jisc.exe?A2=ind2307&L=STARLINK&O=D&P=50

The solution there was to remove some of the system libraries that are interfering with the local version, but your solution sounds as good. Nothing to worry about removing that option.

Re: VTK, that also sounds good, compilers like to get more fussy so these sorts of issues turn up from time to time. If they are limited enough you could make a PR against the VTK repository https://github.com/Starlink/vtk and I'll consider them for a merge.

Cheers, Peter.

grahambell commented 7 months ago

Tags have been added for 2023A.

sfgraves commented 7 months ago

make world also fails at thirdparty/kitware/vtk with a few errors such as...

thirdparty/kitware/vtk/cmake/Source/CTest/cmCTestBuildHandler.cxx:617:23:
/usr/include/c++/12/bits/stl_tree.h:770:15: error: static assertion failed: comparison object must be invocable as const
is_invocable_v<const _Compare&, const _Key&, const _Key&>,

which I've gotten around by adding an extra "const" term to...

thirdparty/kitware/vtk/cmake/Source/CTest/cmCTestBuildHandler.cxx line 575 to be... bool operator()(std::string const& l, std::string const& r) const

thirdparty/kitware/vtk/VTK/Rendering/Label/vtkLabelHierarchyPrivate.h line 77 to be... bool operator () ( const vtkIdType& a, const vtkIdType& b ) const

thirdparty/kitware/vtk/VTK/Rendering/Label/vtkLabelHierarchy.cxx line 528 to be... const vtkHierarchyNode & b) const

We actually had issues building VTK on macOS for this build. In the end we turned it off for the release (which I just realised got missed from the release notes and have added back in). VTK is I believe only used for the Gaia 3D rendering, so everything else should work fine if there are any issues, but that's where to check if you want to see if your changes worked. You can also turn off VTK in the configure step. I'm hoping I'll get a chance to try updating VTK and see if that solves our build issues without breaking Gaia.

I've also had to tweak a few of the doc .tex files to include hyperref and html packages so that they can build correctly - I can provide more details on those if anyone is interested.

I'd love to get the changes you made and the latex/package versions you were using please.

paulkerry1 commented 7 months ago

Thank you all for your responses. I'd missed that jiscmail post Peter - it looks like using the workaround I did allows me to keep the system packages installed.

For vtk with gaia, is the 3d rendering for dealing with fits data cube files? If yes, I've done some testing with those types of files and everything works fine.

Sarah - for docs building the debian 12 dpkg is texlive version 2022.20230122-3

tex --version
TeX 3.141592653 (TeX Live 2022/Debian)
latex --version
pdfTeX 3.141592653-2.6-1.40.24 (TeX Live 2022/Debian)
kpathsea version 6.3.4
Copyright 2022 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.39; using libpng 1.6.39
Compiled with zlib 1.2.13; using zlib 1.2.13
Compiled with xpdf version 4.04

I have to add these 2x lines...

\usepackage{hyperref}
\usepackage{html}

to the top of these tex files for make world to continue... libraries/hds sun92.tex libraries/ndf sun33.tex applications/surf/docs sun216.tex docs/sc/004 sc4.tex docs/sc/021 sc21.tex

some further oddments...

Since my original post, something that I have noticed is that the html docs have not been created at all for any docs, so the findme and showme commands produce nothing. All of the pdf's are created fine: I'm presuming that I should still see html docs and that star2html creates these? For example for gaia docs under /star/docs I have...

sun214_fig.pdf
sun214.pdf
sun214.tex

sun214.htx:
htx.index
sun214.4tc
sun214.aux
sun214.dvi
sun214_fig.pdf
sun214.log
sun214.png
sun214.tmp
sun214.xref

but there is no html file - it's the same for everything else as well.

To test further, I've copied sun214.tex from the source folder to a temp folder and ran "star2html sun214.tex" but get this...

Star2HTML V2.0-1
================
Processing file: /tmp/1/sun214.tex
Preparations finished - now starting TeX4HT htlatex

TEXINPUTS=:/tmp/1:/star/share/latexsupport//: TEX4HTENV=/star/share/latexsupport/tex4ht.env TEX4HTHTF=:/star/share/latexsupport: htlatex /tmp/1/sun214_htx/sun214.tex "starlinkxhtml.cfg,,charset="utf-8",fn-in" ' -cvalidate -cstarfont' "" '-interaction=batchmode'
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022/Debian) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
Star2HTML fatal: Translation of document /tmp/1/sun214.tex failed.

The sun214.htx directory is created: the final line of sun214.htx/sun214.log shows... Output written on sun214.dvi (86 pages, 143268 bytes). and the sun214.dvi is there, but it's pages aren't correct (i.e. block1/page 1 is blank, pages 2-27 have two blocks with letters of the alphabet in sequence for each page, page 28 onwards has symbols, block2/page1 has html code). Nothing further is created.

Best regards Paul