[GNC] Windows installer build failure, cmath error: 'copysign' has not been declared in '::' on MINGW32

Hai Liang Wang hailiang.hl.wang at gmail.com
Wed Aug 14 23:32:43 EDT 2024


hi, folks

Run script `TARGET=gnucash-stable jhbuild -f jhbuildrc build` to build
windows installer, come to an error -

*gnucash.dir/gnucash-core-app.cpp.obj -c
C:/gcdev64/gnucash/stable/src/gnucash-git/gnucash/gnucash-core-app.cpp*
*In file included from
C:/gcdev64/msys2/mingw32/include/boost/core/cmath.hpp:19,*
*                 from
C:/gcdev64/msys2/mingw32/include/boost/lexical_cast/detail/converter_numeric.hpp:26,*
*                 from
C:/gcdev64/msys2/mingw32/include/boost/lexical_cast/try_lexical_convert.hpp:31,*
*                 from
C:/gcdev64/msys2/mingw32/include/boost/lexical_cast.hpp:33,*
*                 from
C:/gcdev64/msys2/mingw32/include/boost/program_options/value_semantic.hpp:14,*
*                 from
C:/gcdev64/msys2/mingw32/include/boost/program_options/options_description.hpp:13,*
*                 from
C:/gcdev64/msys2/mingw32/include/boost/program_options.hpp:15,*
*                 from
C:/gcdev64/gnucash/stable/src/gnucash-git/gnucash/gnucash-core-app.hpp:31,*
*                 from
C:/gcdev64/gnucash/stable/src/gnucash-git/gnucash/gnucash-core-app.cpp:32:*
*C:/gcdev64/msys2/mingw32/include/c++/14.2.0/cmath:2106:11: error:
'copysign' has not been declared in '::'*
* 2106 |   using ::copysign;*
*      |           ^~~~~~~~*
*[124/131] Building CXX object
gnucash/CMakeFiles/gnucash.dir/gnucash.cpp.obj*
*FAILED: gnucash/CMakeFiles/gnucash.dir/gnucash.cpp.obj *

How to fix it?
Any suggestion is apprecaited.

Other version info:

*# g++ --version*
g++.exe (Rev1, Built by MSYS2 project) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

*# pacman -Q|grep c++*
mingw-w64-i686-libc++ 18.1.8-1

*# pacman -Q|grep boost*
mingw-w64-i686-boost 1.85.0-4


Attached the full log.

Cheers.
Hai Liang W.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.202408151120.log
Type: application/octet-stream
Size: 36362 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20240815/d081b924/attachment-0001.obj>


More information about the gnucash-user mailing list