libpano13-2.9.21 release candidate rc1

95 views
Skip to first unread message

Bruno Postle

unread,
Oct 16, 2021, 8:09:55 AM10/16/21
to Hugin ptx
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

libpano13 is the PanoTools library for panoramic imaging.

A libpano13-2.9.21 rc1 tarball has been uploaded to sourceforge, this is
a release candidate for testing that may become the final release:

https://sourceforge.net/projects/panotools/files/libpano13/libpano13-2.9.21/

This release should be binary compatible with previous versions - This means
that prebuilt Hugin executables should just work with this libpano13.

There have been some changes since 2.9.20:

* New build option: USE_SPARSE_LEVMAR, requires the Suitesparce library.
This significantly improves geometric optimisation speed

* General clean-up of the build system, removal of the autotools build system,
CMake is now the default

* The test suite is now functional again

* A lot of fixes for potential crashes and safer handling of data

SHA256SUM: 00114f248249f8afae08f00dd2a9480e12dd9cb2b9c80bea5a34fc11ca577886 libpano13-2.9.21_rc1.tar.gz

This rc1 release is equivalent to HG 892:454a8e337d54

Here is the full ChangeLog since 2.9.20 for more details:

2021-09-18 11:22 +0200 tmodes <tmodes> (454a8e337d54 [tip])

* CMakeLists.txt:
Silence a CMake warning

2021-09-18 11:08 +0200 tmodes <tmodes> (ef176a030c82)

* PTcommon.c, parser.c, ppm.c, resample.c,
tests/simpleTiff2psd/reference/simpleStitch_crop_1_layer.psd,
tests/simpleTiff2psd/reference/simpleStitch_crop_2_layer.psd,
tests/simpleTiff2psd/reference/simpleStitch_uncrop_1_layer.psd,
tests/simpleTiff2psd/reference/simpleStitch_uncrop_2_layer.psd,
tests/simpleTiff2psd/reference/simpleTiff16-16-_uncrop_1_layer.psd,
tests/simpleTiff2psd/reference/simpleTiff16-16-_uncrop_2_layer.psd:
Merged branch libpano13-2.9.21

2021-09-18 11:04 +0200 tmodes <tmodes> (e1b647e267a0 <libpano13-2.9.21>)

* tests/README.TXT,
tests/simpleTiff2psd/tests/simpleStitch_crop_1_layer.psd,
tests/simpleTiff2psd/tests/simpleStitch_crop_2_layer.psd,
tests/simpleTiff2psd/tests/simpleStitch_uncrop_1_layer.psd,
tests/simpleTiff2psd/tests/simpleStitch_uncrop_2_layer.psd,
tests/simpleTiff2psd/tests/simpleTiff16-16-_uncrop_1_layer.psd,
tests/simpleTiff2psd/tests/simpleTiff16-16-_uncrop_2_layer.psd:
deleted file.
* tests/README.TXT,
tests/simpleTiff2psd/tests/simpleStitch_crop_1_layer.psd,
tests/simpleTiff2psd/tests/simpleStitch_crop_2_layer.psd,
tests/simpleTiff2psd/tests/simpleStitch_uncrop_1_layer.psd,
tests/simpleTiff2psd/tests/simpleStitch_uncrop_2_layer.psd,
tests/simpleTiff2psd/tests/simpleTiff16-16-_uncrop_1_layer.psd,
tests/simpleTiff2psd/tests/simpleTiff16-16-_uncrop_2_layer.psd:
Remove unused files

2021-09-18 11:03 +0200 tmodes <tmodes> (d247e9b41788 <libpano13-2.9.21>)

* file.c,
tests/simpleTiff2psd/reference/simpleStitch_crop_1_layer.psd,
tests/simpleTiff2psd/reference/simpleStitch_crop_2_layer.psd,
tests/simpleTiff2psd/reference/simpleStitch_uncrop_1_layer.psd,
tests/simpleTiff2psd/reference/simpleStitch_uncrop_2_layer.psd,
tests/simpleTiff2psd/reference/simpleTiff16-16-_uncrop_1_layer.psd,
tests/simpleTiff2psd/reference/simpleTiff16-16-_uncrop_2_layer.psd:
PTTiff2psd: Don't write libpano13 version number in generated files

Regenerate test reference files with libpano13 version number

2021-09-18 11:02 +0200 tmodes <tmodes> (d75bed990894 <libpano13-2.9.21>)

* adjust.c, levmar.c, levmar.h, optimize.c:
Further speedup of sparse optimizer by direct calculation of
Jacobian matrix

Initial patch by Florian Königstein

2021-09-14 17:47 +0200 tmodes <tmodes> (fd9dd1404381)

* tests/simpleTiff2psd/reference/simpleStitch_crop_1_layer.psd,
tests/simpleTiff2psd/reference/simpleStitch_crop_2_layer.psd,
tests/simpleTiff2psd/reference/simpleStitch_uncrop_1_layer.psd,
tests/simpleTiff2psd/reference/simpleStitch_uncrop_2_layer.psd,
tests/simpleTiff2psd/reference/simpleTiff16-16-_uncrop_1_layer.psd,
tests/simpleTiff2psd/reference/simpleTiff16-16-_uncrop_2_layer.psd:
Update version number in reference files for test

Test are now passed again

2021-05-09 16:28 +0200 tmodes <tmodes> (6f94e735c4b7 <libpano13-2.9.21>)

* parser.c:
Check that linking of image variables is done correctly

Reject forward linking or negative image numbers

2021-04-23 17:55 +0200 tmodes <tmodes> (62aa7eed8fae <libpano13-2.9.21>)

* parser.c:
Check pointer before incrementing - prevent crash

2021-04-23 17:55 +0200 tmodes <tmodes> (40c5cc21f660 <libpano13-2.9.21>)

* tools/PTtiffdump.c:
PTtiffdump: Removed unused overwrite option

2021-04-23 17:54 +0200 tmodes <tmodes> (9efcca9c36ea <libpano13-2.9.21>)

* tools/PTtiffdump.c:
PTtiffdump: Fixes typos in usage screen

2021-04-15 19:19 +0200 tmodes <tmodes> (efd9cc171025 <libpano13-2.9.21>)

* CMakeLists.txt:
More fiddeling with install target on Windows

Some more dll were needed Improve search logic

2021-04-15 18:17 +0200 tmodes <tmodes> (51ea609a2352 <libpano13-2.9.21>)

* .cvsignore, doc/.cvsignore, man/.cvsignore, tests/.cvsignore,
tests/simpleStitch/.cvsignore,
tests/simpleStitch/reference/.cvsignore,
tests/simpleTiff16/.cvsignore,
tests/simpleTiff16/reference/.cvsignore, tools/.cvsignore: deleted
file.
* .cvsignore, doc/.cvsignore, man/.cvsignore, tests/.cvsignore,
tests/simpleStitch/.cvsignore,
tests/simpleStitch/reference/.cvsignore,
tests/simpleTiff16/.cvsignore,
tests/simpleTiff16/reference/.cvsignore, tools/.cvsignore:
Removed old and outdated files from CVS

2021-04-15 18:16 +0200 tmodes <tmodes> (a491c533c1c4 <libpano13-2.9.21>)

* README.windows, makefile.win32: deleted file.
* README.windows, makefile.win32:
Removed obsolete files for Windows

2021-04-15 18:15 +0200 tmodes <tmodes> (adb2b4a56090 <libpano13-2.9.21>)

* CMakeLists.txt:
Install necessary DLL for Windows

2021-04-15 17:57 +0200 tmodes <tmodes> (06f08ec6d7ca <libpano13-2.9.21>)

* CMakeLists.txt, man/CMakeLists.txt:
Create the man pages during build process

2021-04-15 08:51 +0100 Bruno Postle <br...@postle.net> (42b62897faf3 <libpano13-2.9.21>)

* AUTHORS:
Convert AUTHORS file from Latin1 to UTF-8

2021-04-15 00:50 +0100 Bruno Postle <br...@postle.net> (115bebb424ed <libpano13-2.9.21>)

* CMakeLists.txt:
CMake pick-up version number from version.h

2021-04-15 00:19 +0100 Bruno Postle <br...@postle.net> (31ab188bf42d <libpano13-2.9.21>)

* README.linux: deleted file.
* INSTALL, README, README.linux:
Update installation instructions for cmake build system

2021-04-14 23:41 +0100 Bruno Postle <br...@postle.net> (f57d275ee4d6 <libpano13-2.9.21>)

* PTcommon.c, parser.c, ppm.c, resample.c:
remove executable bit from source files

2021-04-14 23:34 +0100 Bruno Postle <br...@postle.net> (7448ebf4d707 <libpano13-2.9.21>)

* CMakeModules/FindSUITESPARSE.cmake, man/Makefile: new file.
* Makefile.am, bootstrap, build/.cvsignore,
build/CMakeModules/FindSUITESPARSE.cmake, build/Makefile.am,
build/README, build/win32/.cvsignore, build/win32/Makefile.am,
build/win32/compile-resource, build/win32/lt-compile-resource,
configure.ac, doc/Makefile.am, m4/.cvsignore, m4/Makefile.am,
m4/ax_check_graphics.m4, m4/ax_check_java.m4, man/Makefile.am,
tests/Makefile.am, tests/simpleStitch/Makefile.am,
tests/simpleStitch/reference/Makefile.am,
tests/simpleTiff16/Makefile.am,
tests/simpleTiff16/reference/Makefile.am,
tests/simpleTiff2psd/Makefile.am,
tests/simpleTiff2psd/reference/Makefile.am,
tests/simpleTiff2psd/tests/Makefile.am, tools/Makefile.am: deleted
file.
* .hgignore, CMakeLists.txt, CMakeModules/FindSUITESPARSE.cmake,
Makefile.am, bootstrap, build/.cvsignore,
build/CMakeModules/FindSUITESPARSE.cmake, build/Makefile.am,
build/README, build/win32/.cvsignore, build/win32/Makefile.am,
build/win32/compile-resource, build/win32/lt-compile-resource,
configure.ac, doc/Makefile.am, m4/.cvsignore, m4/Makefile.am,
m4/ax_check_graphics.m4, m4/ax_check_java.m4, man/Makefile,
man/Makefile.am, tests/Makefile.am, tests/simpleStitch/Makefile.am,
tests/simpleStitch/reference/Makefile.am,
tests/simpleTiff16/Makefile.am,
tests/simpleTiff16/reference/Makefile.am,
tests/simpleTiff2psd/Makefile.am,
tests/simpleTiff2psd/reference/Makefile.am,
tests/simpleTiff2psd/tests/Makefile.am, tools/Makefile.am:
Remove autotools build system

2021-04-14 17:48 +0200 tmodes <tmodes> (6413c8758fc8 <libpano13-2.9.21>)

* build/CMakeModules/FindSUITESPARSE.cmake, levmar.c, levmar.h: new
file.
* AUTHORS, CMakeLists.txt, adjust.c,
build/CMakeModules/FindSUITESPARSE.cmake, levmar.c, levmar.h,
optimize.c:
Added new sparse Levenberg Marquardt algorithm (Florian Königstein)

The sparse Levenberg Marquardt should be faster than the current
dense Levenberg Marquardt algorithm used before

It is optional and can be activated in the build system

It needs the SuiteSparse package for doing the calculations

2021-04-14 17:37 +0200 tmodes <tmodes> (41d8c3032007 <libpano13-2.9.21>)

* parser.c:
Added more error checking for reading v lines (Florian Königstein)

2021-04-10 11:33 +0200 tmodes <tmodes> (c36f88d24fce <libpano13-2.9.21>)

* parser.c:
Initialize enough value for writing to output, part 2 (Florian
Königstein)

Also provide enough space for the cp description in the PTOptimizer
output (for each cp, 3 lines are written)

2021-04-10 10:48 +0200 tmodes <tmodes> (0218eab2f0ca <libpano13-2.9.21>)

* parser.c:
Initialize enough value for writing to output (Florian Königstein)

The introduction of the translation parameters has increased the
size of the output block for each image, so increase the size

2021-04-09 17:29 +0200 tmodes <tmodes> (2106eb0dfaad <libpano13-2.9.21>)

* .hgignore:
Don't ignore CMake files

2021-04-07 19:31 +0200 tmodes <tmodes> (cc6fa699e0bb <libpano13-2.9.21>)

* optimize.c:
One more safer string formatting

2021-04-07 19:13 +0200 tmodes <tmodes> (c1955b6aca96 <libpano13-2.9.21>)

* lmdif.c, optimize.c:
Explicit use 64 bit int type for fjac in LMStruct

On Windows, even on 64 bit system int is only 32 bit For big project
the 32 bit integer is too small for holding all values in fjac

Patch based on initial findings by Florian Königstein

2021-04-07 17:21 +0200 tmodes <tmodes> (40f9fc3210d3 <libpano13-2.9.21>)

* parser.c:
Removed an unnecessary while check

2021-04-06 18:26 +0200 tmodes <tmodes> (d525d97cd36c <libpano13-2.9.21>)

* parser.c:
Correctly count empty lines when parsing script

2021-04-06 17:13 +0200 tmodes <tmodes> (6efce6f96b29 <libpano13-2.9.21>)

* parser.c:
One more fix for format string in error reporting

2021-04-06 17:13 +0200 tmodes <tmodes> (1909bbffd0b5 <libpano13-2.9.21>)

* CMakeLists.txt:
Fixes typo in CMake

2021-04-06 17:13 +0200 tmodes <tmodes> (0890432e6c60 <libpano13-2.9.21>)

* CMakeLists.txt:
CMake: Set minimum version to 3.0

Newer CMake version don't support compatibility to 2.8 version
anymore

2021-04-05 18:07 +0200 tmodes <tmodes> (0d5b64db974a <libpano13-2.9.21>)

* parser.c:
Fix some error strings

2021-04-05 17:21 +0200 tmodes <tmodes> (be688177f217 <libpano13-2.9.21>)

* PaniniGeneral.c:
Fixes an include, use local version

2021-04-04 17:15 +0200 tmodes <tmodes> (db0620862d38 <libpano13-2.9.21>)

* ColourBrightness.c, PTcommon.c, adjust.c, correct.c, file.c,
filter.c, fourier.c, optimize.c, parser.c, ppm.c, ptstitch.c,
resample.c, seamer_.c, sys_ansi.c, sys_compat_win.c, sys_win.c,
tools/PTAInterpolate.c, tools/PTtiff2psd.c, tools/panoinfo.c:
Replace sprintf calls with safer snprintf calls

Initial patch by Florian Königstein

2021-04-04 16:20 +0200 tmodes <tmodes> (cd23befa4e3a <libpano13-2.9.21>)

* LocalDefs.props, LocalDefs.vsprops, libpano.sln, libpano.vcproj,
libpano.vcxproj, tools/PTAInterpolate.vcproj,
tools/PTAInterpolate.vcxproj, tools/PTOptimizer.vcproj,
tools/PTOptimizer.vcxproj, tools/PTblender.vcproj,
tools/PTblender.vcxproj, tools/PTcrop.vcproj, tools/PTcrop.vcxproj,
tools/PTinfo.vcproj, tools/PTinfo.vcxproj, tools/PTmasker.vcproj,
tools/PTmasker.vcxproj, tools/PTmender.vcproj,
tools/PTmender.vcxproj, tools/PTroller.vcproj,
tools/PTroller.vcxproj, tools/PTtiff2psd.vcproj,
tools/PTtiff2psd.vcxproj, tools/PTtiffdump.vcproj,
tools/PTtiffdump.vcxproj, tools/PTuncrop.vcproj,
tools/PTuncrop.vcxproj: deleted file.
* LocalDefs.props, LocalDefs.vsprops, libpano.sln, libpano.vcproj,
libpano.vcxproj, tools/PTAInterpolate.vcproj,
tools/PTAInterpolate.vcxproj, tools/PTOptimizer.vcproj,
tools/PTOptimizer.vcxproj, tools/PTblender.vcproj,
tools/PTblender.vcxproj, tools/PTcrop.vcproj, tools/PTcrop.vcxproj,
tools/PTinfo.vcproj, tools/PTinfo.vcxproj, tools/PTmasker.vcproj,
tools/PTmasker.vcxproj, tools/PTmender.vcproj,
tools/PTmender.vcxproj, tools/PTroller.vcproj,
tools/PTroller.vcxproj, tools/PTtiff2psd.vcproj,
tools/PTtiff2psd.vcxproj, tools/PTtiffdump.vcproj,
tools/PTtiffdump.vcxproj, tools/PTuncrop.vcproj,
tools/PTuncrop.vcxproj:
Removed Visual studio solution files They can be recreated with the
CMake build system

2021-04-04 16:16 +0200 tmodes <tmodes> (ac03fda20014 <libpano13-2.9.21>)

* ColourBrightness.c, queryfeature.c:
Removed some workaround for newer MS Visual compilers

2021-04-04 16:16 +0200 tmodes <tmodes> (2b892d820e97 <libpano13-2.9.21>)

* configure.ac, version.h:
Update version numbers

- --
Bruno
-----BEGIN PGP SIGNATURE-----

iF0EARECAB0WIQTmHdtnm+YlZTYl3RMWo6HAKPIIugUCYWrBDQAKCRAWo6HAKPII
uvLUAKC1KAJJqTKkGCNIlX31Q5ex1OrACACfc8W3/Adz181kdr4AqdwUFCyp9+w=
=aPOV
-----END PGP SIGNATURE-----

T. Modes

unread,
Oct 17, 2021, 4:05:52 AM10/17/21
to hugin and other free panoramic software
Windows binaries (64 bit) of rc1 can be found in the beta 1 release of Hugin 2021.0. see https://groups.google.com/g/hugin-ptx/c/HWycn8CfunI

Andreas Metzler

unread,
Oct 24, 2021, 2:47:07 AM10/24/21
to hugi...@googlegroups.com
On 2021-10-16 Bruno Postle <br...@postle.net> wrote:
> libpano13 is the PanoTools library for panoramic imaging.
[...]
> * General clean-up of the build system, removal of the autotools build system,
> CMake is now the default
[...]

Hello,

afaiu the rc files (resource files) are a windows thingy, i.e. this
should be changed:

8X---------------------------------
--- libpano13-2.9.21~rc1+dfsg.orig/CMakeLists.txt
+++ libpano13-2.9.21~rc1+dfsg/CMakeLists.txt
@@ -284,13 +284,13 @@ ENDIF()

if(NOT WIN32)
# Create and install shared library on non-windows
- add_library(pano13 SHARED ${pano13_hdr} ${pano13_res} ${pano13_src})
+ add_library(pano13 SHARED ${pano13_hdr} ${pano13_src})
target_link_libraries(pano13 ${_common_libs})
set_target_properties(pano13 PROPERTIES VERSION "3.0.0" SOVERSION "3")
install(TARGETS pano13 LIBRARY DESTINATION ${MYLIB} COMPONENT libraries)
set(_pano_target pano13)
#create and install static library
- add_library(pano13a STATIC ${pano13_hdr} ${pano13_res} ${pano13_src})
+ add_library(pano13a STATIC ${pano13_hdr} ${pano13_src})
set_target_properties(pano13a PROPERTIES OUTPUT_NAME pano13)
install(TARGETS pano13a ARCHIVE DESTINATION ${MYLIB} COMPONENT libraries)
else()
8X---------------------------------

I am getting a link error (missing -lm):
8X---------------------------------
cd obj-x86_64-linux-gnu && cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_RUNSTATEDIR=/run -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON "-GUnix Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu ..
[...]
[ 62%] Linking C shared library libpano13.so
/usr/bin/cmake -E cmake_link_script CMakeFiles/pano13.dir/link.txt --verbose=1
/usr/lib/ccache/cc -fPIC -g -O2 -ffile-prefix-map=/dev/shm/PANO/libpano13-2.9.21=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now -Wl,-z,defs -Wl,--as-needed -shared -Wl,-soname,libpano13.so.3 -o libpano13.so.3.0.0 CMakeFiles/pano13.dir/javastub.c.o CMakeFiles/pano13.dir/adjust.c.o CMakeFiles/pano13.dir/bmp.c.o CMakeFiles/pano13.dir/ColourBrightness.c.o CMakeFiles/pano13.dir/correct.c.o CMakeFiles/pano13.dir/dump.c.o CMakeFiles/pano13.dir/fftn.c.o CMakeFiles/pano13.dir/file.c.o CMakeFiles/pano13.dir/filter.c.o CMakeFiles/pano13.dir/fourier.c.o CMakeFiles/pano13.dir/hdrfile.c.o CMakeFiles/pano13.dir/jpeg.c.o CMakeFiles/pano13.dir/jpegicc.c.o CMakeFiles/pano13.dir/math.c.o CMakeFiles/pano13.dir/metadata.c.o CMakeFiles/pano13.dir/morpher.c.o CMakeFiles/pano13.dir/multilayer.c.o CMakeFiles/pano13.dir/optimize.c.o CMakeFiles/pano13.dir/pan.c.o CMakeFiles/pano13.dir/parser.c.o CMakeFiles/pano13.dir/perspect.c.o CMakeFiles/pano13.dir/png.c.o CMakeFiles/pano13.dir/ppm.c.o CMakeFiles/pano13.dir/PTcommon.c.o CMakeFiles/pano13.dir/PTDialogs.c.o CMakeFiles/pano13.dir/ptfeather.c.o CMakeFiles/pano13.dir/ptstitch.c.o CMakeFiles/pano13.dir/queryfeature.c.o CMakeFiles/pano13.dir/remap.c.o CMakeFiles/pano13.dir/resample.c.o CMakeFiles/pano13.dir/rgbe.c.o CMakeFiles/pano13.dir/seamer.c.o CMakeFiles/pano13.dir/sys_ansi.c.o CMakeFiles/pano13.dir/sys_compat_unix.c.o CMakeFiles/pano13.dir/sys_common.c.o CMakeFiles/pano13.dir/tiff.c.o CMakeFiles/pano13.dir/Triangulate.c.o CMakeFiles/pano13.dir/ZComb.c.o CMakeFiles/pano13.dir/PaniniGeneral.c.o CMakeFiles/pano13.dir/lmdif.c.o -ltiff -lz -ljpeg -lpng -lz -ljpeg -lpng
/usr/bin/ld: CMakeFiles/pano13.dir/resample.c.o: in function `Gaussian_2':
./obj-x86_64-linux-gnu/./resample.c:1772: undefined reference to `exp'
/usr/bin/ld: CMakeFiles/pano13.dir/resample.c.o: in function `Gaussian':
./obj-x86_64-linux-gnu/./resample.c:1764: undefined reference to `exp'
8X---------------------------------

which can be fixed with
8X---------------------------------
--- libpano13-2.9.21~rc1+dfsg.orig/CMakeLists.txt
+++ libpano13-2.9.21~rc1+dfsg/CMakeLists.txt
@@ -119,7 +119,7 @@ FIND_PACKAGE(PNG REQUIRED)
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})

-set(_common_libs ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES})
+set(_common_libs m ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES})

# Sparse or dense Levenberg Marquardt
OPTION(USE_SPARSE_LEVMAR "Use Sparse Levenberg Marquardt algorithm instead of dense Levenberg Marquardt algorithm" OFF)
8X---------------------------------

The cmake set-up ignores/overrides -DCMAKE_INSTALL_LIBDIR (unless
FIND_LIBRARY_USE_LIB64_PATHS is set). I am not 100% sure about the
proper fix but I suspect dropping the whole MYLIB logic and trusting
modern cmake to do the right thing would work.

cu Andreas
--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'

Andreas Metzler

unread,
Oct 24, 2021, 8:42:09 AM10/24/21
to hugi...@googlegroups.com
On 2021-10-24 Andreas Metzler <amet...@bebt.de> wrote:

> The cmake set-up ignores/overrides -DCMAKE_INSTALL_LIBDIR (unless
> FIND_LIBRARY_USE_LIB64_PATHS is set). I am not 100% sure about the
> proper fix but I suspect dropping the whole MYLIB logic and trusting
> modern cmake to do the right thing would work.

Hello,
This seems to work for me, might break other stuff:

--- libpano13-2.9.21~rc1+dfsg.orig/CMakeLists.txt
+++ libpano13-2.9.21~rc1+dfsg/CMakeLists.txt
@@ -287,12 +287,12 @@ if(NOT WIN32)
add_library(pano13 SHARED ${pano13_hdr} ${pano13_src})
target_link_libraries(pano13 ${_common_libs})
set_target_properties(pano13 PROPERTIES VERSION "3.0.0" SOVERSION "3")
- install(TARGETS pano13 LIBRARY DESTINATION ${MYLIB} COMPONENT libraries)
+ install(TARGETS pano13 LIBRARY COMPONENT libraries)
set(_pano_target pano13)
#create and install static library
add_library(pano13a STATIC ${pano13_hdr} ${pano13_src})
set_target_properties(pano13a PROPERTIES OUTPUT_NAME pano13)
- install(TARGETS pano13a ARCHIVE DESTINATION ${MYLIB} COMPONENT libraries)
+ install(TARGETS pano13a ARCHIVE COMPONENT libraries)
else()
IF(BUILD_DLL)
# Create and install shared library

and
--- libpano13-2.9.21~rc1+dfsg.orig/CMakeLists.txt
+++ libpano13-2.9.21~rc1+dfsg/CMakeLists.txt
@@ -401,7 +401,8 @@ set(LIB_ZLIB ${ZLIB_LIBRARY})
set(LIB_PNG ${PNG_LIBRARY})
set(VERSION ${PACKAGE_VERSION})
configure_file("${TOP_SRC_DIR}/libpano13.pc.in" "${CMAKE_BINARY_DIR}/libpano13.pc" @ONLY)
-install(FILES "${CMAKE_BINARY_DIR}/libpano13.pc" DESTINATION "${MYLIB}/pkgconfig" COMPONENT libraries)
+install(FILES "${CMAKE_BINARY_DIR}/libpano13.pc" DESTINATION
+ "${CMAKE_INSTALL_LIBDIR}/pkgconfig" COMPONENT libraries)

set(CPACK_PACKAGE_VERSION_MAJOR "${PANO_MAJOR_VERSION}")
set(CPACK_PACKAGE_VERSION_MINOR "${PANO_MINOR_VERSION}")


Tools are not installed to DESTDIR/usr/bin by
cd obj-x86_64-linux-gnu && make -j1 install DESTDIR=/dev/shm/PANO/libpano13-2.9.21/debian/tmp AM_UPDATE_INFO_DIR=no "INSTALL=install --strip-program=true"

Kornel Benko

unread,
Oct 24, 2021, 9:48:53 AM10/24/21
to hugi...@googlegroups.com
Am Sat, 16 Oct 2021 13:09:50 +0100
schrieb Bruno Postle <br...@postle.net>:

> libpano13 is the PanoTools library for panoramic imaging.
>
> A libpano13-2.9.21 rc1 tarball has been uploaded to sourceforge, this is
> a release candidate for testing that may become the final release:
>
> https://sourceforge.net/projects/panotools/files/libpano13/libpano13-2.9.21/
>
> This release should be binary compatible with previous versions - This means
> that prebuilt Hugin executables should just work with this libpano13.
>
> There have been some changes since 2.9.20:
...

I am getting too many warning messages of for '-Wformat-overflow'.
See attached (727 lines => 57 warnings, 31 from the 57 are uniq)

Kornel

warn

T. Modes

unread,
Oct 24, 2021, 12:08:37 PM10/24/21
to hugin and other free panoramic software
Hello,

Andreas Metzler schrieb am Sonntag, 24. Oktober 2021 um 08:47:07 UTC+2:

which can be fixed with
8X---------------------------------
--- libpano13-2.9.21~rc1+dfsg.orig/CMakeLists.txt
+++ libpano13-2.9.21~rc1+dfsg/CMakeLists.txt
@@ -119,7 +119,7 @@ FIND_PACKAGE(PNG REQUIRED)
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})

-set(_common_libs ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES})
+set(_common_libs m ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES})

# Sparse or dense Levenberg Marquardt
OPTION(USE_SPARSE_LEVMAR "Use Sparse Levenberg Marquardt algorithm instead of dense Levenberg Marquardt algorithm" OFF)
8X---------------------------------

Unconditional adding a m breaks compiling on Windows.

T. Modes

unread,
Oct 25, 2021, 11:37:28 AM10/25/21
to hugin and other free panoramic software
Hi Andreas,

Andreas Metzler schrieb am Sonntag, 24. Oktober 2021 um 08:47:07 UTC+2:

afaiu the rc files (resource files) are a windows thingy, i.e. this
should be changed:

8X---------------------------------
--- libpano13-2.9.21~rc1+dfsg.orig/CMakeLists.txt
+++ libpano13-2.9.21~rc1+dfsg/CMakeLists.txt
@@ -284,13 +284,13 @@ ENDIF()

This should not be necessary. CMake should be capable to figure out this for itself.
Nevertheless I have include this in the attached patch.
I added all your proposed changes to the patch and added a test if -lm is needed (I still understand why this was not necessary in libpano 13 2.9.20 from April.).
Could you please test, if this fixes your issues?
Also when somebody could test the patch, that nothing other is broken, this would be appreciated.

Thomas
libpano_cmake.patch

Andreas Metzler

unread,
Oct 26, 2021, 2:21:25 AM10/26/21
to hugi...@googlegroups.com
On 2021-10-25 "T. Modes" <Thomas...@gmx.de> wrote:
> Andreas Metzler schrieb am Sonntag, 24. Oktober 2021 um 08:47:07 UTC+2:
[...]
> I added all your proposed changes to the patch and added a test if -lm is
> needed (I still understand why this was not necessary in libpano 13 2.9.20
> from April.).

Hello,

I have since realized that libm was broken in the autoconf build script,
too. It is just that everybody had been using the same hotfix for years
and years.

> Could you please test, if this fixes your issues?
[...]
> -set(_common_libs ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES})
> +# check if libm needs additional linker flag
> +include(CheckCSourceCompiles)
> +set(LIBM_TEST_SRC "#include <math.h>\nint main() { float f=exp(2.0); }")
> +check_c_source_compiles("${LIBM_TEST_SRC}" HAVE_EXP)

This check succeeds with gcc because of the gcc-builtin
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-fno-builtin
is used but fails later in the real build where the gcc-builtin is not
used. (ansi or or std options set there.)

Linking against libm if available works for me:
----------------
set(_common_libs ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES})

+include(CheckLibraryExists)
+# Does explicit linking against libm work?
+check_library_exists(m exp "" LIBMNEEDED)
+if(LIBMNEEDED)
+ list(APPEND _common_libs "m")
+endif()
+
# Sparse or dense Levenberg Marquardt
OPTION(USE_SPARSE_LEVMAR "Use Sparse Levenberg Marquardt algorithm instead of dense Levenberg Marquardt algorithm" OFF)
----------------

[...]
> if(NOT WIN32)
> # Create and install shared library on non-windows
> - add_library(pano13 SHARED ${pano13_hdr} ${pano13_res} ${pano13_src})
> + add_library(pano13 SHARED ${pano13_hdr} ${pano13_src})
^^^^^^^^^^^^ This Change ....

[...]
> set(_pano_target pano13)
> #create and install static library
> add_library(pano13a STATIC ${pano13_hdr} ${pano13_res} ${pano13_src})
^^^^^^^^^^^^^^
... should be mirrored here

I have attached a updated version of your patch including the two
changes mentioned above.

Regarding my other problem "Tools are not installed to DESTDIR/usr/bin"
it turned out these were disabled for cmake profile "None" which is used
for Debian distribution packages, i.e.:
--------------------------------------------------------------
--- libpano13-2.9.21~rc1+dfsg.orig/tools/CMakeLists.txt
+++ libpano13-2.9.21~rc1+dfsg/tools/CMakeLists.txt
@@ -20,7 +20,8 @@ macro(make_command exe_name source_name)
list(APPEND extra_commands ${exe_name})
add_executable(${exe_name} ${source_name})
target_link_libraries(${exe_name} ${_pano_target} ${_common_libs})
- install(TARGETS ${exe_name} DESTINATION bin COMPONENT tools CONFIGURATIONS Release RelWithDebInfo MinSizeRel)
+ install(TARGETS ${exe_name} DESTINATION bin COMPONENT tools
+ CONFIGURATIONS Release RelWithDebInfo MinSizeRel None)
endmacro()
--------------------------------------------------------------

OTOH, I wonder why this qualification is there at all, why are the tools
installed for all but one ("Debug") of the 4 predefined CMake
configuration types? I would suggest dropping the whole CONFIGURATIONS
limitation.

TIA, cu Andreas
10_libpano_cmake.patch

Andreas Metzler

unread,
Oct 26, 2021, 6:07:50 AM10/26/21
to hugi...@googlegroups.com
On 2021-10-16 Bruno Postle <br...@postle.net> wrote:
> libpano13 is the PanoTools library for panoramic imaging.

> A libpano13-2.9.21 rc1 tarball has been uploaded to sourceforge, this is
> a release candidate for testing that may become the final release:

> https://sourceforge.net/projects/panotools/files/libpano13/libpano13-2.9.21/

> This release should be binary compatible with previous versions - This means
> that prebuilt Hugin executables should just work with this libpano13.

> There have been some changes since 2.9.20:

> * New build option: USE_SPARSE_LEVMAR, requires the Suitesparce library.
> This significantly improves geometric optimisation speed

> * General clean-up of the build system, removal of the autotools build system,
> CMake is now the default
[...]

Hello,
Comparing autotools built 2.9.20 with cmake built 2.9.21 there are a
couple of newly exported symbols:
+ panoBMPRead@Base
+ panoDumpAdjustData@Base
+ panoDumpCorrectPrefs@Base
+ panoDumpCropInfo@Base
+ panoDumpImage@Base
+ panoDumpPTRect@Base
+ writeBMP@Base

Is this done intentionally?

cu Andreas

Andreas Metzler

unread,
Oct 26, 2021, 8:22:13 AM10/26/21
to hugi...@googlegroups.com
On 2021-10-16 Bruno Postle <br...@postle.net> wrote:
[...]
> * General clean-up of the build system, removal of the autotools build system,
> CMake is now the default
[...]

Hello,
libdir is set to an empty vlue in the generated pkgconfig file. Attached
patch works for me.

cu Andreas
45_pkgconfig-libdir

T. Modes

unread,
Oct 26, 2021, 11:16:00 AM10/26/21
to hugin and other free panoramic software
Andreas Metzler schrieb am Dienstag, 26. Oktober 2021 um 08:21:25 UTC+2:

> Could you please test, if this fixes your issues?
[...]
> -set(_common_libs ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${PNG_LIBRARIES})
> +# check if libm needs additional linker flag
> +include(CheckCSourceCompiles)
> +set(LIBM_TEST_SRC "#include <math.h>\nint main() { float f=exp(2.0); }")
> +check_c_source_compiles("${LIBM_TEST_SRC}" HAVE_EXP)

This check succeeds with gcc because of the gcc-builtin
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-fno-builtin
is used but fails later in the real build where the gcc-builtin is not
used. (ansi or or std options set there.)

Sorry, but I don't understand.
According the the doc of CheckCSourceCompiles, it should take all flags into consideration:

CMAKE_REQUIRED_FLAGS

Additional flags to pass to the compiler. Note that the contents of CMAKE_C_FLAGS and its associated configuration-specific variable are automatically added to the compiler command before the contents of CMAKE_REQUIRED_FLAGS.

So where do you add -fno-builtin?

Thomas


Andreas Metzler

unread,
Oct 26, 2021, 12:39:03 PM10/26/21
to hugi...@googlegroups.com
On 2021-10-26 "T. Modes" <Thomas...@gmx.de> wrote:
> Andreas Metzler schrieb am Dienstag, 26. Oktober 2021 um 08:21:25 UTC+2:

[...]
> > This check succeeds with gcc because of the gcc-builtin
> > https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
> > https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-fno-builtin
> > is used but fails later in the real build where the gcc-builtin is not
> > used. (ansi or or std options set there.)

> Sorry, but I don't understand.
> According the the doc of CheckCSourceCompiles, it should take all flags
> into consideration:

> CMAKE_REQUIRED_FLAGS

> Additional flags to pass to the compiler. Note that the contents of
> CMAKE_C_FLAGS and its associated configuration-specific variable are
> automatically added to the compiler command before the contents of
> CMAKE_REQUIRED_FLAGS.

> So where do you add -fno-builtin?

Hello,

I do not add a -fno-builtin - it is something else like -ansi or a -std
setting.

Throwing in --trace-expand it looks like LDFLAGS are not passed
on, they differ between test and actual build.
==========================================
cd obj-x86_64-linux-gnu && cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_RUNSTATEDIR=/run -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON "-GUnix Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu -DSUPPORT_JAVA_PROGRAMS=OFF --trace-expand ..
[...]
/dev/shm/PANO/libpano13-2.9.21/CMakeLists.txt(115): set(LIBM_TEST_SRC #include <math.h>
int main() { float f=exp(2.0); } )
/dev/shm/PANO/libpano13-2.9.21/CMakeLists.txt(116): check_c_source_compiles(#include <math.h>
int main() { float f=exp(2.0); } HAVE_EXP )
/usr/share/cmake-3.21/Modules/CheckCSourceCompiles.cmake(76): cmake_check_source_compiles(C #include <math.h>
int main() { float f=exp(2.0); } HAVE_EXP )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(11): if(NOT DEFINED HAVE_EXP )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(13): if(_lang STREQUAL C )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(14): set(_lang_textual C )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(15): set(_lang_ext c )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(42): get_property(_supported_languages GLOBAL PROPERTY ENABLED_LANGUAGES )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(43): if(NOT _lang IN_LIST _supported_languages )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(48): set(_FAIL_REGEX )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(49): set(_SRC_EXT )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(50): set(_key )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(51): foreach(arg )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(64): if(NOT _SRC_EXT )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(65): set(_SRC_EXT c )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(68): if(CMAKE_REQUIRED_LINK_OPTIONS )
/usr/share/cmake-3.21/Modules/CheckCSourceCompiles.cmake(71): else()
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(72): set(CHECK__SOURCE_COMPILES_ADD_LINK_OPTIONS )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(74): if(CMAKE_REQUIRED_LIBRARIES )
/usr/share/cmake-3.21/Modules/CheckCSourceCompiles.cmake(77): else()
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(78): set(CHECK__SOURCE_COMPILES_ADD_LIBRARIES )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(80): if(CMAKE_REQUIRED_INCLUDES )
/usr/share/cmake-3.21/Modules/CheckCSourceCompiles.cmake(83): else()
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(84): set(CHECK__SOURCE_COMPILES_ADD_INCLUDES )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(86): file(WRITE /dev/shm/PANO/libpano13-2.9.21/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/src.c #include <math.h>
int main() { float f=exp(2.0); }
)
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(89): if(NOT CMAKE_REQUIRED_QUIET )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(90): message(CHECK_START Performing Test HAVE_EXP )
-- Performing Test HAVE_EXP
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(92): try_compile(HAVE_EXP /dev/shm/PANO/libpano13-2.9.21/obj-x86_64-linux-gnu /dev/shm/PANO/libpano13-2.9.21/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/src.c COMPILE_DEFINITIONS -DHAVE_EXP CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING= OUTPUT_VARIABLE OUTPUT )
CMake Warning (dev) at /usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake:92 (try_compile):
Policy CMP0066 is not set: Honor per-config flags in try_compile()
source-file signature. Run "cmake --help-policy CMP0066" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

For compatibility with older versions of CMake, try_compile is not honoring
caller config-specific compiler flags (e.g. CMAKE_C_FLAGS_DEBUG) in the
test project.
Call Stack (most recent call first):
/usr/share/cmake-3.21/Modules/CheckCSourceCompiles.cmake:76 (cmake_check_source_compiles)
CMakeLists.txt:116 (check_c_source_compiles)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake:92 (try_compile):
Policy CMP0056 is not set: Honor link flags in try_compile() source-file
signature. Run "cmake --help-policy CMP0056" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

For compatibility with older versions of CMake, try_compile is not honoring
caller link flags (e.g. CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
/usr/share/cmake-3.21/Modules/CheckCSourceCompiles.cmake:76 (cmake_check_source_compiles)
CMakeLists.txt:116 (check_c_source_compiles)
This warning is for project developers. Use -Wno-dev to suppress it.

/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(102): foreach(_regex )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(108): if(HAVE_EXP )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(109): set(HAVE_EXP 1 CACHE INTERNAL Test HAVE_EXP )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(110): if(NOT CMAKE_REQUIRED_QUIET )
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(111): message(CHECK_PASS Success )
-- Performing Test HAVE_EXP - Success
/usr/share/cmake-3.21/Modules/Internal/CheckSourceCompiles.cmake(113): file(APPEND /dev/shm/PANO/libpano13-2.9.21/obj-x86_64-linux-gnu/CMakeFiles/CMakeOutput.log Performing C SOURCE FILE Test HAVE_EXP succeeded with the following output:
Change Dir: /dev/shm/PANO/libpano13-2.9.21/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_bc036/fast && gmake[2]: Entering directory '/dev/shm/PANO/libpano13-2.9.21/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
/usr/bin/gmake -f CMakeFiles/cmTC_bc036.dir/build.make CMakeFiles/cmTC_bc036.dir/build
gmake[3]: Entering directory '/dev/shm/PANO/libpano13-2.9.21/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_bc036.dir/src.c.o
/usr/lib/ccache/cc -DHAVE_EXP -g -O2 -ffile-prefix-map=/dev/shm/PANO/libpano13-2.9.21=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -o CMakeFiles/cmTC_bc036.dir/src.c.o -c /dev/shm/PANO/libpano13-2.9.21/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/src.c
/dev/shm/PANO/libpano13-2.9.21/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/src.c: In function 'main':
/dev/shm/PANO/libpano13-2.9.21/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/src.c:2:20: warning: unused variable 'f' [-Wunused-variable]
2 | int main() { float f=exp(2.0); }
| ^
Linking C executable cmTC_bc036
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_bc036.dir/link.txt --verbose=1
/usr/lib/ccache/cc -g -O2 -ffile-prefix-map=/dev/shm/PANO/libpano13-2.9.21=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now -Wl,-z,defs -Wl,--as-needed -rdynamic CMakeFiles/cmTC_bc036.dir/src.c.o -o cmTC_bc036
gmake[3]: Leaving directory '/dev/shm/PANO/libpano13-2.9.21/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'
gmake[2]: Leaving directory '/dev/shm/PANO/libpano13-2.9.21/obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp'


Source file was:
#include <math.h>
int main() { float f=exp(2.0); }
)
/dev/shm/PANO/libpano13-2.9.21/CMakeLists.txt(117): if(HAVE_EXP )
/dev/shm/PANO/libpano13-2.9.21/CMakeLists.txt(118): unset(LIBM_LIB )
[...]
[ 55%] Building C object CMakeFiles/pano13.dir/resample.c.o
/usr/lib/ccache/cc -D__Ansi__ -Dpano13_EXPORTS -I/dev/shm/PANO/libpano13-2.9.21 -g -O2 -ffile-prefix-map=/dev/shm/PANO/libpano13-2.9.21=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -MD -MT CMakeFiles/pano13.dir/resample.c.o -MF CMakeFiles/pano13.dir/resample.c.o.d -o CMakeFiles/pano13.dir/resample.c.o -c /dev/shm/PANO/libpano13-2.9.21/resample.c
[...]
[ 62%] Linking C shared library libpano13.so
/usr/bin/cmake -E cmake_link_script CMakeFiles/pano13.dir/link.txt --verbose=1
/usr/lib/ccache/cc -fPIC -g -O2 -ffile-prefix-map=/dev/shm/PANO/libpano13-2.9.21=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now -Wl,-z,defs -Wl,--as-needed -shared -Wl,-soname,libpano13.so.3 -o libpano13.so.3.0.0 CMakeFiles/pano13.dir/javastub.c.o CMakeFiles/pano13.dir/adjust.c.o CMakeFiles/pano13.dir/bmp.c.o CMakeFiles/pano13.dir/ColourBrightness.c.o CMakeFiles/pano13.dir/correct.c.o CMakeFiles/pano13.dir/dump.c.o CMakeFiles/pano13.dir/fftn.c.o CMakeFiles/pano13.dir/file.c.o CMakeFiles/pano13.dir/filter.c.o CMakeFiles/pano13.dir/fourier.c.o CMakeFiles/pano13.dir/hdrfile.c.o CMakeFiles/pano13.dir/jpeg.c.o CMakeFiles/pano13.dir/jpegicc.c.o CMakeFiles/pano13.dir/math.c.o CMakeFiles/pano13.dir/metadata.c.o CMakeFiles/pano13.dir/morpher.c.o CMakeFiles/pano13.dir/multilayer.c.o CMakeFiles/pano13.dir/optimize.c.o CMakeFiles/pano13.dir/pan.c.o CMakeFiles/pano13.dir/parser.c.o CMakeFiles/pano13.dir/perspect.c.o CMakeFiles/pano13.dir/png.c.o CMakeFiles/pano13.dir/ppm.c.o CMakeFiles/pano13.dir/PTcommon.c.o CMakeFiles/pano13.dir/PTDialogs.c.o CMakeFiles/pano13.dir/ptfeather.c.o CMakeFiles/pano13.dir/ptstitch.c.o CMakeFiles/pano13.dir/queryfeature.c.o CMakeFiles/pano13.dir/remap.c.o CMakeFiles/pano13.dir/resample.c.o CMakeFiles/pano13.dir/rgbe.c.o CMakeFiles/pano13.dir/seamer.c.o CMakeFiles/pano13.dir/sys_ansi.c.o CMakeFiles/pano13.dir/sys_compat_unix.c.o CMakeFiles/pano13.dir/sys_common.c.o CMakeFiles/pano13.dir/tiff.c.o CMakeFiles/pano13.dir/Triangulate.c.o CMakeFiles/pano13.dir/ZComb.c.o CMakeFiles/pano13.dir/PaniniGeneral.c.o CMakeFiles/pano13.dir/lmdif.c.o -ltiff -lz -ljpeg -lpng -lz -ljpeg -lpng
/usr/bin/ld: CMakeFiles/pano13.dir/resample.c.o: in function `Gaussian_2':
./obj-x86_64-linux-gnu/./resample.c:1772: undefined reference to `exp'
==========================================

Minimal testcase:
(sid)ametzler@argenau:/tmp/PANO/libpano13-2.9.21$ rm -rf build ; mkdir build ; cd build ; LDFLAGS='-Wl,-z,defs -Wl,--as-needed' cmake -DCMAKE_VERBOSE_MAKEFILE=ON .. && make

cu Andreas

T. Modes

unread,
Oct 26, 2021, 1:51:24 PM10/26/21
to hugin and other free panoramic software
Hi Andreas,

thanks for the output. I think I found the cause:
Andreas Metzler schrieb am Dienstag, 26. Oktober 2021 um 18:39:03 UTC+2:
Policy CMP0066 is not set: Honor per-config flags in try_compile()
source-file signature. Run "cmake --help-policy CMP0066" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

For compatibility with older versions of CMake, try_compile is not honoring
caller config-specific compiler flags (e.g. CMAKE_C_FLAGS_DEBUG) in the
test project.
Call Stack (most recent call first):
/usr/share/cmake-3.21/Modules/CheckCSourceCompiles.cmake:76 (cmake_check_source_compiles)
CMakeLists.txt:116 (check_c_source_compiles)
This warning is for project developers. Use -Wno-dev to suppress it.

I hope setting the policy fixes the issue. See attached modified patch.
A first set of the changes are already gone into the repository (default branch). The patch is for the default branch, not the source tar ball.
libpano_cmake_ver2.patch

Andreas Metzler

unread,
Oct 27, 2021, 1:01:35 PM10/27/21
to hugi...@googlegroups.com
On 2021-10-26 "T. Modes" <Thomas...@gmx.de> wrote:
[...]

Hello Thomas,

Does not seem to have worked, attaching the full log of the minimal
testcase mentioned above.

cu Andreas
the_full_log.xz

T. Modes

unread,
Oct 28, 2021, 11:46:07 AM10/28/21
to hugin and other free panoramic software
Hi Andreas,

Andreas Metzler schrieb am Mittwoch, 27. Oktober 2021 um 19:01:35 UTC+2:

Does not seem to have worked, attaching the full log of the minimal
testcase mentioned above.

thanks for testing, even if it does not work.
Instead of further fiddling with my non-working approach I committed the version with check_library_exists as you proposed.
I hope it works now for you.

Thomas

Andreas Metzler

unread,
Oct 30, 2021, 7:49:41 AM10/30/21
to hugi...@googlegroups.com
Hello,

Thank you, I just need to add the attached patch to make things work for
me.
20_pkgconfig_multiarch.diff

T. Modes

unread,
Oct 30, 2021, 8:39:21 AM10/30/21
to hugin and other free panoramic software
Hi Andreas,

Andreas Metzler schrieb am Samstag, 30. Oktober 2021 um 13:49:41 UTC+2:
Thank you, I just need to add the attached patch to make things work for
me.

Thanks. Committed to repository.

Thomas

Bruno Postle

unread,
Oct 31, 2021, 4:31:46 PM10/31/21
to hugin and other free panoramic software
With the latest code (probably since [b6aef0]), the libpano13 library
gets installed into /usr/lib on all architectures. Previously on
x86_64 and other 64 bit architectures the library was installed to
/usr/lib64 (as expected)

--
Bruno

Andreas Metzler

unread,
Nov 1, 2021, 5:59:37 AM11/1/21
to hugi...@googlegroups.com
On 2021-10-31 Bruno Postle <br...@postle.net> wrote:
[...]
> With the latest code (probably since [b6aef0]), the libpano13 library
> gets installed into /usr/lib on all architectures. Previously on
> x86_64 and other 64 bit architectures the library was installed to
> /usr/lib64 (as expected)

Does this help?
8X-----------------
--- libpano13-2.9.21~rc1+dfsg.orig/CMakeLists.txt
+++ libpano13-2.9.21~rc1+dfsg/CMakeLists.txt
@@ -62,6 +62,9 @@ include(CheckIncludeFiles)
## global setup
project(libpano13)

+# support lib/lib64
+include(GNUInstallDirs)
+
##
# This must come before FINDs for tiff, jpeg, png, zlib to enable
# finding the wxWidgets distributions of those packages on Windows.
8X-----------------

(I have googled a bit and landed at
https://bugzilla.redhat.com/show_bug.cgi?id=1425064 )

cu Andreas

Bruno Postle

unread,
Nov 1, 2021, 2:57:58 PM11/1/21
to hugin and other free panoramic software
On Mon, 1 Nov 2021 at 09:59, Andreas Metzler <amet...@bebt.de> wrote:
> On 2021-10-31 Bruno Postle wrote:
> [...]
> > With the latest code (probably since [b6aef0]), the libpano13 library
> > gets installed into /usr/lib on all architectures. Previously on
> > x86_64 and other 64 bit architectures the library was installed to
> > /usr/lib64 (as expected)
>
> Does this help?
>
> +# support lib/lib64
> +include(GNUInstallDirs)

Great, that works as expected on aarch64, armhfp, i386, ppc64le and
x86_64. I'll commit the patch.

--
Bruno

Kornel Benko

unread,
Nov 2, 2021, 6:36:59 AM11/2/21
to hugi...@googlegroups.com
Ping ...

Am Sun, 24 Oct 2021 15:48:47 +0200
schrieb Kornel Benko <Kornel...@berlin.de>:
Reply all
Reply to author
Forward
0 new messages