Bug 1183715

Summary: GCC 11: libebml package fails
Product: [openSUSE] openSUSE Tumbleweed Reporter: Martin Liška <martin.liska>
Component: BasesystemAssignee: Ferdinand Thiessen <rpm>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 1181859    

Description Martin Liška 2021-03-18 14:05:38 UTC
Fails here:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/libebml/standard/x86_64

due to:
[   60s]   312 |     auto Buffer = (GetSize() + 1 < std::numeric_limits<std::size_t>::max()) ? new (std::nothrow) char[GetSize()+1] : nullptr;
[   60s]       |                                         ^~~~~~~~~~~~~~
[   60s] /home/abuild/rpmbuild/BUILD/libebml-1.4.2/src/EbmlUnicodeString.cpp:312:67: error: expected primary-expression before '>' token
[   60s]   312 |     auto Buffer = (GetSize() + 1 < std::numeric_limits<std::size_t>::max()) ? new (std::nothrow) char[GetSize()+1] : nullptr;
[   60s]       |                                                                   ^
[   60s] /home/abuild/rpmbuild/BUILD/libebml-1.4.2/src/EbmlUnicodeString.cpp:312:70: error: '::max' has not been declared; did you mean 'std::max'?
[   60s]   312 |     auto Buffer = (GetSize() + 1 < std::numeric_limits<std::size_t>::max()) ? new (std::nothrow) char[GetSize()+1] : nullptr;
[   60s]       |                                                                      ^~~
[   60s]       |                                                                      std::max

It's missing include of <limits>
Comment 1 Christophe Marin 2021-03-19 14:14:06 UTC
https://build.opensuse.org/request/show/880117
Comment 2 Ferdinand Thiessen 2021-03-19 16:06:12 UTC
https://build.opensuse.org/request/show/880144
Comment 3 Martin Liška 2021-03-19 16:55:41 UTC
Fixed in devel project, thanks for it.