[gdal-dev] float16 woes on solaris
Greg Troxel
gdt at lexort.com
Tue May 20 04:28:00 PDT 2025
The pkgsrc package isn't building on SmartOS (which is illumos, which is
OpenSolaris, more or less).
Full build at the last link:
https://reports.pkgci.org/SmartOS/upstream/trunk/20250518.2249/meta/report.html
https://reports.pkgci.org/SmartOS/upstream/trunk/20250518.2249/gdal-lib-3.11.0/configure.log
https://reports.pkgci.org/SmartOS/upstream/trunk/20250518.2249/gdal-lib-3.11.0/build.log
but the key points are:
configure:
-- Performing Test HAVE_STD_FLOAT16_T
-- Performing Test HAVE_STD_FLOAT16_T - Failed
build:
[ 94%] Linking CXX shared library libgdal.so
Undefined first referenced
symbol in file
__extendhfsf2 port/CMakeFiles/cpl.dir/cpl_json_streaming_writer.cpp.o
__extendhfxf2 /home/pbulk/build/geography/gdal-lib/work/.buildlink/lib/libhdf5.so.310
__extendhfdf2 port/CMakeFiles/cpl.dir/cpl_json_streaming_writer.cpp.o
__truncdfhf2 alg/CMakeFiles/alg.dir/gdalrasterize.cpp.o
__truncxfhf2 gcore/CMakeFiles/gcore.dir/rasterio.cpp.o
__truncsfhf2 gcore/CMakeFiles/gcore.dir/gdalrasterband.cpp.o
__eqhf2 alg/CMakeFiles/alg.dir/gdalwarpkernel.cpp.o
__nehf2 alg/CMakeFiles/alg.dir/gdalwarpkernel.cpp.o
ld: fatal: symbol referencing errors. No output written to libgdal.so.37.3.11.0
I think this is:
https://github.com/llvm/llvm-project/issues/105181
Looking in gdal 3.11.0's CMakeLists.txt, the test for Float16 is
# Check whether std::float16_t is available and is working
include(CheckCXXSourceCompiles)
check_cxx_source_compiles(
"
#include <cmath>
#include <stdfloat>
int main() {
std::float16_t x = 0;
using std::nextafter;
std::float16_t y = nextafter(x, x);
return y == 0 ? 0 : 1;
}
"
HAVE_STD_FLOAT16_T
)
It fails, whcih is good because it seems this platform has troubled
float16.
But somehow, float16 functions get added to to link.
Has anyone built/tested gdal on Solaris-ish?
More information about the gdal-dev
mailing list