Enblend-4.3-1472 fails to build in FC24

Bug #1597594 reported by tduell
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Enblend
Fix Committed
Undecided
Unassigned

Bug Description

Attempting to build Enblend-4.3-1472 (current default branch) in Fedora 24, using rpmbuild.
The build fails with the following message...

In file included from /home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/enblend.cc:81:0:
/home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/optional_transitional.hpp:51:31: error: no matching function for call to 'boost::none_t::none_t()'
     constexpr ::boost::none_t nullopt;
                               ^~~~~~~
In file included from /usr/include/boost/none.hpp:16:0,
                 from /usr/include/boost/optional/optional.hpp:51,
                 from /usr/include/boost/optional.hpp:15,
                 from /home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/optional_transitional.hpp:47,
                 from /home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/enblend.cc:81:
/usr/include/boost/none_t.hpp:32:12: note: candidate: boost::none_t::none_t(boost::none_t::init_tag)
   explicit none_t(init_tag){} // to prevent default constructor
            ^~~~~~
/usr/include/boost/none_t.hpp:32:12: note: candidate expects 1 argument, 0 provided
/usr/include/boost/none_t.hpp:29:8: note: candidate: constexpr boost::none_t::none_t(const boost::none_t&)
 struct none_t
        ^~~~~~
/usr/include/boost/none_t.hpp:29:8: note: candidate expects 1 argument, 0 provided
/usr/include/boost/none_t.hpp:29:8: note: candidate: constexpr boost::none_t::none_t(boost::none_t&&)
/usr/include/boost/none_t.hpp:29:8: note: candidate expects 1 argument, 0 provided
In file included from /home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/enblend.cc:190:0:
/home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/common.h: In function 'std::__cxx11::string enblend::expandFilenameTemplate(const string&, unsigned int, const string&, const string&, unsigned int)':
/home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/common.h:760:25: warning: attributes at the beginning of statement are ignored [-Wattributes]
                         [[fallthrough]];
                         ^
In file included from /home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/mask.h:42:0,
                 from /home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/enblend.h:46,
                 from /home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/enblend.cc:193:
/home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/fillpolygon.hxx: In function 'void vigra_ext::detail::group_to_pairs(Iterator, Iterator, BackInsertIterator)':
/home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/fillpolygon.hxx:255:21: warning: attributes at the beginning of statement are ignored [-Wattributes]
                     [[fallthrough]];
                     ^
/home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/enblend.cc: In function 'int process_options(int, char**)':
/home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/enblend.cc:926:13: warning: attributes at the beginning of statement are ignored [-Wattributes]
             [[fallthrough]];
             ^
/home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/enblend.cc:933:13: warning: attributes at the beginning of statement are ignored [-Wattributes]
             [[fallthrough]];
             ^
/home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/enblend.cc:965:13: warning: attributes at the beginning of statement are ignored [-Wattributes]
             [[fallthrough]];
             ^
/home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/enblend.cc:1051:13: warning: attributes at the beginning of statement are ignored [-Wattributes]
             [[fallthrough]];
             ^
/home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/enblend.cc:1063:13: warning: attributes at the beginning of statement are ignored [-Wattributes]
             [[fallthrough]];
             ^
/home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/enblend.cc:1355:13: warning: attributes at the beginning of statement are ignored [-Wattributes]
             [[fallthrough]];
             ^
/home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/enblend.cc:1390:13: warning: attributes at the beginning of statement are ignored [-Wattributes]
             [[fallthrough]];
             ^
/home/terry/rpmbuild/BUILD/enblend-4.3.0-1472hg-Source/src/enblend.cc:1495:13: warning: attributes at the beginning of statement are ignored [-Wattributes]
             [[fallthrough]];
             ^
src/CMakeFiles/enblend.dir/build.make:65: recipe for target 'src/CMakeFiles/enblend.dir/enblend.cc.o' failed
make[2]: *** [src/CMakeFiles/enblend.dir/enblend.cc.o] Error 1

this source build OK using the same rpmbuild .spec file in Fedora 23, so looks like an issue brought about by changes in Fedora.

Cheers,
Terry

Revision history for this message
tduell (tduell-iinet) wrote :

Trying to do a bit of sleuthing on this.
I note that when I run cmake I get the message along the lines (I didn't get a copy) "optional not found falling back to Boost"

If I look at file 'FindOptional.cmake', I see...

IF (OPTONAL_INCLUDE_DIR)
  # Already in cache, be silent
  SET(OPTOINAL_FIND_QUIETLY TRUE)
ENDIF()

FIND_PATH(OPTIONAL_INCLUDE_DIR optional.hpp
  /usr/local/include
  /usr/include
  ${SOURCE_BASE_DIR}/Optional-master
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Optional DEFAULT_MSG
                                  OPTIONAL_INCLUDE_DIR)

MARK_AS_ADVANCED(
  OPTIONAL_INCLUDE_DIR
)

Looks like a few tripewirting errors in this, but maybe of no consequence anyway.

Cheers,
Terry

Revision history for this message
Stefan Peter (s-peter-deactivatedaccount) wrote :

Hi Terry
enblend fails for the upcoming Ubuntu Yakkety with the very same error. Complete build log at
https://launchpadlibrarian.net/264810247/buildlog_ubuntu-yakkety-amd64.enblend-enfuse_4.3.0+hg1472+dfsg-0ubuntu1~yakkety_BUILDING.txt.gz

Interestingly, the same package succeeds for the latest Ubuntu release (xenial). Build logs:
https://launchpad.net/~s-peter/+archive/ubuntu/hugin-test/+build/9907747/+files/buildlog_ubuntu-xenial-amd64.enblend-enfuse_4.3.0+hg1472+dfsg-0ubuntu1~xenial_BUILDING.txt.gz

I have not reported this yet because I expected the failure to be caused by some work in progress on the upcoming release which is expected this October. Now I'm not so sure anymore.

With kind regards

Stefan Peter

Revision history for this message
tduell (tduell-iinet) wrote :

the latest default includes fixes to CMakelists.txt to correct FindOptional, which seems to be related to this problem.
Attempting to build the current default (1473) cmake reports...

-- Could not find OPTIONAL package Optional
-- No optional headers found, fall back to boost

Fedora 24 is using boost-1.60.0-6, and there doesn't seem to be any sign of the file "boost/optional.hpp".
So is it needed to overcome this error, and if so what provides it?

Cheers,
Terry

Revision history for this message
tduell (tduell-iinet) wrote :

OK, I do have "boost/optional.hpp", it is in /usr/include, but FindOptional is not finding it.
I tried a local change as follows...

diff -r c8d6c0d1a6fe CMakeModules/FindOptional.cmake
--- a/CMakeModules/FindOptional.cmake Sun Jul 03 18:11:07 2016 +0200
+++ b/CMakeModules/FindOptional.cmake Wed Jul 06 15:05:42 2016 +1000
@@ -4,8 +4,8 @@
 ENDIF()

 FIND_PATH(OPTIONAL_INCLUDE_DIR optional.hpp
- /usr/local/include
- /usr/include
+ /usr/local/include/boost
+ /usr/include/boost
   ${SOURCE_BASE_DIR}/Optional-master
 )

and cmake now finds optional in Fedora 24, for what it's worth.
Doesn't help fix the original issue, which appears to be a result of changes introduced in boost-1.60.0.

Cheers,
Terry

Revision history for this message
tmodes (tmodes) wrote :

Hi Terry,

the search of boost/optional is correct. Adding boost/optional.hpp to FindOptional will result in build error, because when the Boost variant is used the config file needs also correctly configured. This is done by the current 2 step approach.
When running CMake with the boost/optional header it should look as

Could not find OPTIONAL package Optional
No optional headers found, fall back to boost
Boost version: 1.60.0

And with the optional header it looks like
Found Optional: C:/Prog/Hugin/static_vs2015/Optional-master
Optional header found
CMAKE_ERRFILE = C:/Prog/Hugin/static_vs2015/build_enblend/CMakeFiles/CMakeError.log
(see the missing boost entry)

I commited a fix which should fix it with boost 1.60

Changed in enblend:
status: New → Fix Committed
Revision history for this message
tduell (tduell-iinet) wrote :

Thanks for the explanation Thomas.
I can confirm that the default branch does now build OK on Fedora 24.

Here, optional headers not found

-- Could not find OPTIONAL package Optional
-- No optional headers found, fall back to boost
-- Boost version: 1.60.0

which is probably of little consequence since it builds, but just to improve my (lack of) understanding on this, are the optional headers being searched for not the ones provided by Boost-devel on Fedora 24, or is cmake just not finding them here?

Cheers,
Terry

Revision history for this message
tmodes (tmodes) wrote :

Hi Terry,

CMake searches for the optional header from https://github.com/akrzemi1/Optional
(mentioned in the NEWS file).
In future the checks needs to be extended to take also C++17 <optional> header into account (like configure does it already).
AFAIK the current used compilers don't support this header (or is the header already in gcc 6.x from Fedora 24?)

Revision history for this message
tduell (tduell-iinet) wrote :

Hello Thomas,
I had read the NEWS file and checked the link, but as it mentioned it was distributed under Boost licence I jumped to the conclusion that it was in fact identical to the optional header included in the Fedora 24 boost-devel.
It doesn't appear in the list of songs provided by GCC 6.x.
Thanks for your help.

Cheers,
Terry

Revision history for this message
Stefan Peter (s-peter-deactivatedaccount) wrote :

Hi Thomas
Thank you for your patches, I can confirm that it builds now for both xenial (boost 1.58) and yakkety (boost 1.60).

With kind regards

Stefan Peter

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.