Skip to content

Instantly share code, notes, and snippets.

@achadwick
Last active August 29, 2015 14:12
Show Gist options
  • Save achadwick/498358f65a71f88b85d2 to your computer and use it in GitHub Desktop.
Save achadwick/498358f65a71f88b85d2 to your computer and use it in GitHub Desktop.
An attempt at some MyPaint build instructions for Windows
@lilithebowman
Copy link

Looked up the error message : scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly

Apparently it's exactly what the error is telling us. We need VS. And one forum post suggests that only 2012 will do. Downloading 2012 Express and crossing my fingers.

[edit] doing so eliminated the VS error but did nothing to help with the code attempting to delete from an array in env that doesn't exist.

Edited mypaint/lib/SConscript @ line 75:

# Make sure assertions are enabled
if env.get('CPPDEFINES'):
    try:
        env['CPPDEFINES'].remove('NDEBUG')
    except:
        print('NDEBUG was not enabled, not disabling.')

Then running the build produces the following output:

$ MSYSTEM= ./scons.py
scons: Reading SConscript files ...
building for 'python' (use scons python_binary=xxx to change)
using 'python-config' (use scons python_config=xxx to change)
Delete(["libmypaint-tests.so", "libmypaint-tests.so", "libmypaint.so", "libmypaintlib.so", "libmypaint.a", "libmypaint-tests.a", "lib/_mypaintlib.so"])
Enabling i18n for brushlib in full application build
NDEBUG was not enabled, not disabling.
AttributeError: 'str' object has no attribute 'attributes':
  File "C:\msys64\tmp\mypaint\SConstruct", line 219:
    SConscript('./SConscript')
  File "C:\msys64\tmp\mypaint\scons-local-2.3.4/SCons/Script/SConscript.py", line 614:
    return method(*args, **kw)
  File "C:\msys64\tmp\mypaint\scons-local-2.3.4/SCons/Script/SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "C:\msys64\tmp\mypaint\scons-local-2.3.4/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File "C:\msys64\tmp\mypaint\SConscript", line 26:
    mypaintlib = SConscript('lib/SConscript')
  File "C:\msys64\tmp\mypaint\scons-local-2.3.4/SCons/Script/SConscript.py", line 614:
    return method(*args, **kw)
  File "C:\msys64\tmp\mypaint\scons-local-2.3.4/SCons/Script/SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "C:\msys64\tmp\mypaint\scons-local-2.3.4/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File "C:\msys64\tmp\mypaint\lib\SConscript", line 102:
    SHLIBPREFIX="",
  File "C:\msys64\tmp\mypaint\lib\SConscript", line 23:
    return env.SharedLibrary(*args, **kwargs)
  File "C:\msys64\tmp\mypaint\scons-local-2.3.4/SCons/Environment.py", line 260:
    return MethodWrapper.__call__(self, target, source, *args, **kw)
  File "C:\msys64\tmp\mypaint\scons-local-2.3.4/SCons/Environment.py", line 224:
    return self.method(*nargs, **kwargs)
  File "C:\msys64\tmp\mypaint\scons-local-2.3.4/SCons/Builder.py", line 633:
    return self._execute(env, target, source, OverrideWarner(kw), ekw)
  File "C:\msys64\tmp\mypaint\scons-local-2.3.4/SCons/Builder.py", line 554:
    tlist, slist = self._create_nodes(env, target, source)
  File "C:\msys64\tmp\mypaint\scons-local-2.3.4/SCons/Builder.py", line 518:
    target, source = self.emitter(target=tlist, source=slist, env=env)
  File "C:\msys64\tmp\mypaint\scons-local-2.3.4/SCons/Builder.py", line 344:
    target, source = e(target, source, env)
  File "C:\msys64\tmp\mypaint\scons-local-2.3.4/SCons/Tool/link.py", line 79:
    tgt.attributes.shared = 1

@mingwandroid
Copy link

You don't want to install MSVC, honestly. MSYS2 is all about Open Source code generators, tools and libraries. I gave up on scons about ten years ago since it didn't even grok cross compilation, but AFAIR you need to tell scons to use mingw tools..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment