Giter Club home page Giter Club logo

Comments (5)

Andrettin avatar Andrettin commented on September 28, 2024

Thanks for the info! Do you know in which .cpp file the compilation fails?

Those headers should already be included indirectly through the stratagus.h header, which should be included in every .cpp file (but it is missing in one of them).

from wyrmgus.

stoecker avatar stoecker commented on September 28, 2024

As far as I remember the first error I've seen was in assert_util.cpp.

from wyrmgus.

Andrettin avatar Andrettin commented on September 28, 2024

Sorry for the delay in responding.

It is strange that the error is present in assert_util.cpp, since that includes stratagus.h, which in turn includes pch.h, which then includes and <source_location>. I'm not sure what could be causing this issue, especially since the automatic compilation workflow is working without any problems.

from wyrmgus.

susnux avatar susnux commented on September 28, 2024

Thanks for the info! Do you know in which .cpp file the compilation fails?

The error message:

[ 78s] In file included from /home/abuild/rpmbuild/BUILD/Wyrmgus-5.2.4/src/util/assert_util.cpp:29,
[ 78s] from /home/abuild/rpmbuild/BUILD/Wyrmgus-5.2.4/build/CMakeFiles/wyrmgus.dir/Unity/unity_util_cxx.cxx:5:
[ 78s] /home/abuild/rpmbuild/BUILD/Wyrmgus-5.2.4/src/util/assert_util.h:43:50: error: 'source_location' in namespace 'std' does not name a type
[ 78s] 43 | inline std::string get_assert_message(const std::source_location &location)
[ 78s] | ^~~~~~~~~~~~~~~
[ 78s] /home/abuild/rpmbuild/BUILD/Wyrmgus-5.2.4/src/util/assert_util.h:1:1: note: 'std::source_location' is defined in header '<source_location>'; did you forget to '#include <source_location>'?
[ 78s] +++ |+#include <source_location>

Full log:
build-log.txt

from wyrmgus.

Andrettin avatar Andrettin commented on September 28, 2024

I think I understand the reason for the issue now. I had made a mistake in the pch.h file, only including <source_location> if __cpp_lib_source_location were defined. But the latter is defined either in <source_location> itself, or in .

So whether this worked was compiler-dependent, if the C++ standard library headers for that implementation included directly or indirectly before we got to the <source_location> check.

I've fixed this issue now by replacing that condition with a check to __has_include<source_location> (in my two latest commits).

I hope this works!

from wyrmgus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.