-
-
Notifications
You must be signed in to change notification settings - Fork 617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for vendored includes on linux. #2021
Comments
It looks like the |
Yes, this is a basically a request for support of |
Would be fairly straight forward to implement. What behavior would you expect for XCode and Visual Studio exporters? Would it just append to external/system includes? |
Well, depends on premake policy what to do with XCode and VS exporters or whether this is wontfix. :) As far as Wildfire Games is concerned the problem is currently limited to Linux distributions installing the shipped ICU headers alongside their mozjs package, limiting this effectively to gcc and clang. |
I'm not necessarily saying it's a won't fix, as this is a pretty straight forward thing to add. I'm just trying to determine how to correctly map the flag to XCode and Visual Studio exporters, or if it's ignored by those exporters. |
Me thinks there is no correct answers, so erroring out if not supported might also be an option? |
As far as I can make out, the XCode exporter uses either the Would it be easier if I filter out the modifications to premake core that are proposed in the above Revision and upload it as a pull request here? |
I'm fine with those changes above, but the Visual Studio and XCode exporters are exporting files for the IDEs, whereas gcc, clang, and msc toolsets are more geared towards output needed for CLI and Makefiles. Since I don't believe VS and XCode have an equivalent to idirafter in their project structured, I'd be inclined to append those to the @starkos @samsinsane Y'all have any thoughts on that? (Relevant GCC Documentation: https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html) |
Fair enough. I look forward to seeing what you come up with. |
I think I've left enough time for discussion. I'll try to get started on an implementation soon. |
@s0600204 I've got the review out. Hope to merge it in soon. Feel free to pull down the branch and test it out. |
Sorry it's taken me so long to respond to this, haven't had much time for Premake this year. I'm not sure I fully understand the problem? So, I get that you're having issues including |
This has nothing to do with pkgconfig (the " Our problem is that the dependency Our code, which also depends on When we then get to the linking stage: because our code needs to link against built There is no guarantee that the One solution would be to tell However, many linux distro repository maintainers (understandably) would like to use the version of So an alternate solution is to shift the |
@s0600204 Yes, I understood the issue was the duplicate files. I'm just not sure I understand how pkgconfig isn't the issue? I don't use it, so you may need to explain what I'm missing, sorry. When I use SDL2 on Linux, I can I apologise if it seems like I'm being difficult here, that is very much not my intention. If that's "just how it is" that's fine, but it seems like there's something I'm otherwise missing? |
I think the bit you are missing is that pkgconfig won't return a path for libs that are in the default / system include directory, so you can't prepend the system ICU to mozjs which is not in the default / system include directory. |
@seragh I reread through the patch link above, and the linked issue in that after posting before. I think I understand the issue, there was a comment in there saying:
This was the bit I wasn't considering. In my head, I couldn't follow why you would do @s0600204 @seragh Sorry I wasn't following along, it seems painfully obvious now 🤦 |
What problem will this solve?
There is a problem with some (most) linux distro-provided mozjs-/jspackage (or whatever spidermonkey (any version) is packaged as on that system), in that it contains a copy of icu headers that don't match the version of icu installed on the system. This mismatch causes a linking issue in 0 A.D.'s Empire Ascendant build process, preventing us to use system provided libraries.
What might be a solution?
This revision contains a possible solution, by telling gcc (and clang, as it follows enough of the same code path within premake) to look through the mozjs-* includes directory after the system standard directories. This means that gcc/clang will look for icu in the system standard location (and find it) before searching the mozjs-* location.
What other alternatives have you already considered?
Keeping a bundled copy of the library forever.
The text was updated successfully, but these errors were encountered: