ironclad icon indicating copy to clipboard operation
ironclad copied to clipboard

data\api\_stubmain.generated.xml

Open jduncalf opened this issue 7 years ago • 1 comments
trafficstars

Hi all, i'm trying to build Ironclad 2.7 but the scons.bat fails to build with a missing "data\api_stubmain.generated.xml".

Any idea?

jduncalf avatar Dec 09 '17 10:12 jduncalf

I got stuck with this too.

I managed to solve it by replacing this line:

GCCXML_INSERT = '-isystem "%s" -isystem "%s"' % (MINGW_INCLUDE, os.path.join(MINGW_LIB, 'gcc', 'mingw32', '4.8.1', 'include'))

With this line:

GCCXML_INSERT = '-isystem "%s" -isystem "%s"' % (MINGW_INCLUDE, os.path.join(MINGW_LIB, 'gcc', 'mingw32', '8.2.0', 'include'))

Note the change of directory from 4.8.1 to 8.2.0, which was the only directory I had in mingw32. You probably need to check in C:\MinGW\lib\gcc\mingw32 to see what you have. It might not be 8.2.0.

However, after getting past that hurdle, I now have the build break elsewhere further on - but haven't worked that out yet.


How I solved it?

I backtracked through the SConstrcut build file and found _stubmain.generated.xml comes from here:

stubmain_xml = native.GccXml('data/api/_stubmain.generated.xml', 'stub/stubmain.c')

Reading the SCons docs, I think native.GccXml is a custom builder so it needs to be defined somewhere:

native['BUILDERS']['GccXml'] = Builder(action=GCCXML_CMD, CPPPATH='stub/Include', source_scanner=CScanner())

That builder uses GCCXML_CMD to call gccxml. So where does that come from?

GCCXML_CMD = ' '.join((GCCXML_CC1PLUS, COMPILE_IRONCLAD_FLAGS, '-I$CPPPATH -D__GNUC__ %s $SOURCE -fxml="$TARGET"' % GCCXML_INSERT))

Then that uses GCCXML_INSERT which comes from:

GCCXML_INSERT = '-isystem "%s" -isystem "%s"' % (MINGW_INCLUDE, os.path.join(MINGW_LIB, 'gcc', 'mingw32', '4.8.1', 'include'))

MINGW_LIB is essentially defined as C:\MinGW\lib and inside C:\MinGW\lib\gcc\mingw32 I didn't have a 4.8.1 directory, I had a 8.2.0 so just tried swapping it, and it seemed to progress on.

Jamie- avatar Aug 22 '19 13:08 Jamie-

The repository now carries a Dockerfile that can be used to create and run a dev-container with all necessary build tools in it. See the building wiki page for details.

Note also that the default main branch is for the development of Ironclad 3.4, which uses a somewhat different toolset. Check out branch 2.7 to build Ironclad 2.7.

BCSharp avatar Dec 01 '23 03:12 BCSharp