Conversation
|
It now works with dll cgame. |
|
With this Lua patch, PNaCl can also build the nexe: diff --git a/luaconf.h b/luaconf.h
index 33bb580d..a30e6314 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -122,7 +122,9 @@
/*
@@ LUA_32BITS enables Lua with 32-bit integers and 32-bit floats.
*/
+#if !defined(LUA_32BITS)
#define LUA_32BITS 0
+#endif
/* |
90789c2 to
e9af38b
Compare
|
Everything works with PNaCl, but I get Saigo crashing when building Lua for the amd64 nexe: |
|
When building Lua for the i686 nexe with Saigo, the error message is more meaningful: |
You have |
e9af38b to
c066b6d
Compare
|
Right, this should be disabled, some other commits from Anyway with this command line I get the crash as well:
|
|
Actually I got this kind of error in the past, with either cgame or sgame, I don't remember what fixed it, maybe that was that PIE thing, but removing it doesn't fix Lua. |
|
Just doing that crashes Saigo:
|
|
Here is the output: |
|
I had to use |
623d1ed to
6e8af57
Compare
|
@slipher do you know how to extend that timeout? It is very annoying. Maybe it works but something is slower… |
|
Hmm, maybe that's |
|
After spamming some logs, it looks like the loop in |
|
Unvanquished/src/cgame/cg_rocket.cpp Line 209 in 698b3de |
|
In |
|
The |
|
In |
|
It is stuck in |
|
In |
|
In |
|
I did that: In if ( !Q_stricmp( token, "misc" ) )
{
token = COM_Parse2( &text_p );
if ( *token != '{' )
{
Sys::Drop( "Error parsing %s. Expecting \"{\" but found \"%c\".", rocket_menuFile.Get(), *token );
}
while ( 1 )
{
Log::Warn("iterating misc loop");
token = COM_Parse2( &text_p );
if ( *token == '}' )
{
break;
}
if ( !*token )
{
Sys::Drop( "Error parsing %s. Unexpected end of file. Expecting closing '}'.", rocket_menuFile.Get() );
}
// Skip non-RML files
if ( Q_stricmp( token + strlen( token ) - 4, ".rml" ) )
{
Log::Warn( "Non-RML file listed in %s: \"%s\" . Skipping.", rocket_menuFile.Get(), token );
continue;
}
Log::Warn("Load misc document: %s", token);
Rocket_LoadDocument( token );
Log::Warn("Loaded misc document: %s", token);
}
continue;
}In // Instances a element tree based on the stream
ElementPtr Factory::InstanceDocumentStream(Context* context, Stream* stream, const String& document_base_tag)
{
RMLUI_ZoneScoped;
Log::Message(Log::LT_INFO, "Factory::InstanceDocumentStream 0");
ElementPtr element = Factory::InstanceElement(nullptr, document_base_tag, document_base_tag, XMLAttributes());
Log::Message(Log::LT_INFO, "Factory::InstanceDocumentStream 1");
if (!element)
{
Log::Message(Log::LT_ERROR, "Failed to instance document, instancer returned nullptr.");
return nullptr;
}
ElementDocument* document = rmlui_dynamic_cast< ElementDocument* >(element.get());
Log::Message(Log::LT_INFO, "Factory::InstanceDocumentStream 2");
if (!document)
{
Log::Message(Log::LT_ERROR, "Failed to instance document element. Found type '%s', was expecting derivative of ElementDocument.", rmlui_type_name(*element));
return nullptr;
}
document->context = context;
Log::Message(Log::LT_INFO, "Factory::InstanceDocumentStream 3");
XMLParser parser(element.get());
Log::Message(Log::LT_INFO, "Factory::InstanceDocumentStream 4");
parser.Parse(stream);
Log::Message(Log::LT_INFO, "Factory::InstanceDocumentStream 5");
return element;
}In // Parses the given stream as an XML file, and calls the handlers when
// interesting phenomenon are encountered.
void BaseXMLParser::Parse(Stream* stream)
{
Log::Message(Log::LT_INFO, "BaseXMLParser::Parse 0");
source_url = &stream->GetSourceURL();
Log::Message(Log::LT_INFO, "BaseXMLParser::Parse 1");
xml_source.clear();
// We read in the whole XML file here.
// TODO: It doesn't look like the Stream interface is used for anything useful. We
// might as well just use a span or StringView, and get completely rid of it.
// @performance Otherwise, use the temporary allocator.
Log::Message(Log::LT_INFO, "BaseXMLParser::Parse 2");
const size_t source_size = stream->Length();
Log::Message(Log::LT_INFO, "BaseXMLParser::Parse 3");
stream->Read(xml_source, source_size);
xml_index = 0;
line_number = 1;
line_number_open_tag = 1;
inner_xml_data = false;
inner_xml_data_terminate_depth = 0;
inner_xml_data_index_begin = 0;
// Read (er ... skip) the header, if one exists.
Log::Message(Log::LT_INFO, "BaseXMLParser::Parse 4");
ReadHeader();
// Read the XML body.
Log::Message(Log::LT_INFO, "BaseXMLParser::Parse 5");
ReadBody();
Log::Message(Log::LT_INFO, "BaseXMLParser::Parse 6");
xml_source.clear();
Log::Message(Log::LT_INFO, "BaseXMLParser::Parse 7");
source_url = nullptr;
Log::Message(Log::LT_INFO, "BaseXMLParser::Parse 8");
return;
}I get this output: So it is like if |
1e2961a to
7df34f5
Compare
|
@slipher would know what is happening with the MSVC build and why it fails? The current native MSVC build is assumed to make it use the external deps like before (because of |
7df34f5 to
1c07673
Compare
|
Hmm, of course this is when I ask for help I find a mistake I did… Maybe that's fixed. |
|
That's fixed. |
1c07673 to
5b1acdc
Compare
bc13066 to
8b679c8
Compare
|
If there is no comment about mistakes to fix, I will merge it in two days. See this comment for the reasons why I want and need FreeType to be a submodule: |
|
How to build with Saigo:
|
8b679c8 to
99392b0
Compare
975dfa0 to
de93c4c
Compare
|
I noticed that on the Lua submodule I used the latest tagged version for our What would you recommend? I can reset FreeType to the latest release tag (which is a bit older). |
|
It looks ready to me, modulo the decision about what submodule reference to commit. |
de93c4c to
aa1a58f
Compare
I've reset the FreeType submodule to the |
CMakeLists.txt
Outdated
| ${CGAMELIST} | ||
| LIBS | ||
| RMLUI_LIB | ||
| ${RMLUI_LIBRARY} |
There was a problem hiding this comment.
What's this {$RMLUI_LIBRARY} stuff? I don't like the extra indirection when a simple library name works well.
There was a problem hiding this comment.
Using a <NAME>_LIBRARY variable is usually what we do that with other libraries (with variant of <NAME>_LIBRARIES when more than one libraries).
Actually the capitalized name without being a variable looks like a typo as some other place in CMake can parse variable names without ${}, here RMLUI_LIB looked like a variable name but was the file name. We don't do that nowhere else.
If we don't want to use a variable, then it better be named srclibs-rmlui but not RMLUI_LIB, the last one is very confusing.
There was a problem hiding this comment.
See my new commit for an alternative hardcoding srclibs-rmlui instead.
| if (BUILDING_ANY_GAMELOGIC) | ||
| if (BUILD_CGAME) | ||
| # Freetype | ||
| # Freetype (RmlUi dependency), already found for a native game when the client is built. |
There was a problem hiding this comment.
Does something bad happen if you do prefer_package again for one that was searched earlier? Would be nicer not to care about that
There was a problem hiding this comment.
Not sure to fully understand what you mean, but replacing some existing stuff with prefer_package should not have more drawbacks than replacing the same existing stuff by something else written by hand. If there is a drawback, then we would have to handle it anyway.
But I doubt that using a submodule after a search is problematic, I made efforts for the submodules using the same variable names as the search, so one should fully replace the other. I haven't got any problem by turning on and off the PREFER_EXTERNAL_LIBS option. And if one day we face a cmake error, that would be one we cannot avoid anyway (i.e. a CMake bug or design limitation).
I don't see anything to do more.
ed210d0 to
926daf9
Compare
|
I'm going to merge this, if there is something we think we can do better, we can do it later. |
926daf9 to
13a58ab
Compare
It is written against the Saigo branch:
Requires:
There is no submodule yet, one has to clone:
https://github.com/lua/luaaslibs/luahttps://gitlab.freedesktop.org/freetype/freetype.gitasdaemon/libs/freetypeIt works with dll, exe and nexe (PNaCl). Saigo is not tested yet.
When
USE_SYSTEM_LIBSis set toON, system libraries are used instead of submodules for native builds (engine, dll or exe game).See this issue for the motivation behind it: