Bug 1771 - Patch for error: unable to find numeric literal operator 'operator""Q'
Summary: Patch for error: unable to find numeric literal operator 'operator""Q'
Status: CONFIRMED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Build system (show other bugs)
Version: unreleased development snapshot
Hardware: x86 Linux
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-28 21:59 CET by Ronny Habel
Modified: 2022-01-28 21:59 CET (History)
0 users



Attachments
patch for the problem (392 bytes, text/plain)
2022-01-28 21:59 CET, Ronny Habel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ronny Habel 2022-01-28 21:59:25 CET
Created attachment 761 [details]
patch for the problem

on a fresh (january 2022) installed and fully patched Ubuntu 20.04 with fresh compiled mxe I got a lot of errors while compiling pulseview:
...
/home/sigrok/mxe-git/usr/i686-w64-mingw32.static.posix/include/boost/math/special_functions/erf.hpp:966:13: error: unable to find numeric literal operator 'operator""Q'
             BOOST_MATH_BIG_CONSTANT(T, 113, 0.11005507545746069573608988651927452e-7),
             ^
/home/sigrok/mxe-git/usr/i686-w64-mingw32.static.posix/include/boost/math/special_functions/erf.hpp:966:13: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
...

I seems, that adding 
add_definitions(-DBOOST_MATH_DISABLE_FLOAT128=1)
to CMakeLists.txt is not enough. 
So I have to add a 
add_definitions(-fext-numeric-literals) as well:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7791b1b..83985bd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -488,6 +488,7 @@ add_definitions(-D__STDC_LIMIT_MACROS)
 add_definitions(-Wall -Wextra)
 add_definitions(-std=c++11)
 add_definitions(-DBOOST_MATH_DISABLE_FLOAT128=1)
+add_definitions(-fext-numeric-literals) 
 if(WIN32)
        add_definitions(-Wa,-mbig-obj -O3)
 endif(