Skip to content

precompiled compilation failed due to spec.hpp #246

@zhuzhzh

Description

@zhuzhzh

Here is my step.

% git clone https://github.com/ToruNiina/toml11
% cd toml11
% git submodule update --init --recursive
% mkdir build && cd build
% cmake -DCMAKE_INSTALL_PREFIX=/home/public/toml11-v4.0.0 -DTOML11_PRECOMPILE=ON  -DCMAKE_CXX_STANDARD=17 ../
-- The CXX compiler identification is GNU 11.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/rh/devtoolset-11/root/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (2.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/harriszh/install/toml11/build
% make
[  5%] Building CXX object src/CMakeFiles/toml11.dir/color.cpp.o
[ 11%] Building CXX object src/CMakeFiles/toml11.dir/context.cpp.o
In file included from /usr/include/sys/types.h:222,
                 from /usr/include/stdlib.h:314,
                 from /opt/rh/devtoolset-11/root/usr/include/c++/11/cstdlib:75,
                 from /opt/rh/devtoolset-11/root/usr/include/c++/11/bits/stl_algo.h:59,
                 from /opt/rh/devtoolset-11/root/usr/include/c++/11/algorithm:62,
                 from /home/harriszh/install/toml11/include/toml11/fwd/../fwd/../fwd/../fwd/../compat.hpp:6,
                 from /home/harriszh/install/toml11/include/toml11/fwd/../fwd/../fwd/../fwd/../result.hpp:4,
                 from /home/harriszh/install/toml11/include/toml11/fwd/../fwd/../fwd/../fwd/location_fwd.hpp:4,
                 from /home/harriszh/install/toml11/include/toml11/fwd/../fwd/../fwd/../location.hpp:4,
                 from /home/harriszh/install/toml11/include/toml11/fwd/../fwd/../fwd/region_fwd.hpp:4,
                 from /home/harriszh/install/toml11/include/toml11/fwd/../fwd/../region.hpp:4,
                 from /home/harriszh/install/toml11/include/toml11/fwd/../fwd/source_location_fwd.hpp:4,
                 from /home/harriszh/install/toml11/include/toml11/fwd/../source_location.hpp:4,
                 from /home/harriszh/install/toml11/include/toml11/fwd/error_info_fwd.hpp:4,
                 from /home/harriszh/install/toml11/include/toml11/error_info.hpp:4,
                 from /home/harriszh/install/toml11/include/toml11/context.hpp:4,
                 from /home/harriszh/install/toml11/src/context.cpp:1:
/home/harriszh/install/toml11/include/toml11/spec.hpp: In constructor ‘constexpr toml::semantic_version::semantic_version(uint32_t, uint32_t, uint32_t)’:
/home/harriszh/install/toml11/include/toml11/spec.hpp:15:11: error: class ‘toml::semantic_version’ does not have any field named ‘gnu_dev_major’
   15 |         : major(mjr), minor(mnr), patch(p)
      |           ^~~~~
/home/harriszh/install/toml11/include/toml11/spec.hpp:15:23: error: class ‘toml::semantic_version’ does not have any field named ‘gnu_dev_minor’
   15 |         : major(mjr), minor(mnr), patch(p)
      |                       ^~~~~
In file included from /home/harriszh/install/toml11/include/toml11/context.hpp:5,
                 from /home/harriszh/install/toml11/src/context.cpp:1:
/home/harriszh/install/toml11/include/toml11/spec.hpp:16:6: error: member ‘toml::semantic_version::major’ must be initialized by mem-initializer in ‘constexpr’ constructor
   16 |     {}
      |      ^
/home/harriszh/install/toml11/include/toml11/spec.hpp:18:19: note: declared here
   18 |     std::uint32_t major;
      |                   ^~~~~
/home/harriszh/install/toml11/include/toml11/spec.hpp:16:6: error: member ‘toml::semantic_version::minor’ must be initialized by mem-initializer in ‘constexpr’ constructor
   16 |     {}
      |      ^
/home/harriszh/install/toml11/include/toml11/spec.hpp:19:19: note: declared here
   19 |     std::uint32_t minor;
      |                   ^~~~~
make[2]: *** [src/CMakeFiles/toml11.dir/build.make:90: src/CMakeFiles/toml11.dir/context.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:854: src/CMakeFiles/toml11.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

I searched 'gnu_dev_major' in the whole directory, but didn't find anything.

My vim install LSP tool (clang), which shows the same error messages as above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions