bugMyPaint - Bugs: bug #20399, [OSX] scons: prefix=/somewhere...

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #20399: [OSX] scons: prefix=/somewhere installs stuff and shouldn't. [ALL] --install-sandbox must not be relative

Submitted by:  Ryan Schmidt <ryandesign>
Submitted on:  Wed Jan 2 17:57:42 2013  
Severity: 3 - NormalPriority: 5 - Normal
Status: Works For MePrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Release: 1.1.0Planned Release: None
Operating System: OS X 10.8

(Jump to the original submission Jump to the original submission)

Thu Jul 17 16:51:00 2014, comment #6:

Triaging old bugs in preparation for shutting down the old tracker, please excuse the noise and probable misapprehensions...

Okay, it looks as if the Macports build has a workaround or a local patch for this, which is good. I'd kinda like to know if it's still happening with more recent gtk3 versions of MyPaint from git (master, specifically!), but ideally as a new bug reported on github.

For now, I'm marking this as Works For Me and closing it. Hope that's OK.

[This is a canned response, please forgive the broken formatting: it's one of the many things Gna! unfortunately does not do well.]

This bug tracker will shortly be moving to Github. As part of this process, we are reviewing old bug reports on gna.org.

This bug was marked as "Ready for Test" or "Works for Me" some time ago, but was still classified as Open and no feedback has been submitted since then.
I am therefore assuming that the problem has been fixed to everyone's satisfaction (or was't reproducible by anybody else).

If you believe that this bug still affects the most recent git master of MyPaint (and thus the next release), please feel free to open a new issue on
Github about it. Our new issue trackers are:


Andrew Chadwick <achadwick>
Project Administrator
Fri Jan 4 18:52:45 2013, comment #5:

The problem occurs with both scons 2.0.1 and scons 2.2.0, regardless of whether I specify prefix=/opt/local when I run scons. /opt/local/ is the default prefix in SConstruct when the OS is darwin (a.k.a. OS X).

The problem does not occur if I edit SConstruct and change it so that...

...nor if I run scons with prefix=/usr/local or prefix=some nonexistent directory inside the MacPorts work directory (which is where MacPorts will allow ports to write things at build time). Setting prefix=/nonexistent/directory (a nonexistent directory that MacPorts will not allow ports to write to) results in an error right away before anything is built:

I'm not quite sure what to make of all this but I can certainly set prefix to a nonexistent directory in the work directory to avoid the problem for now.


Thank you for the tip about using an absolute --install-sandbox. I thought I had tried that before, and I tried it again now to verify that it doesn't work right for me: it tries to chmod directories outside of the sandbox, which fails.

The MacPorts sandbox directory is called "destroot" and is created at the same level as (not inside of) the source directory. Trying to use that gives a permission error. It correctly installs mypaint inside the sandbox, but then tries to chmod the corresponding parent directory outside of the sandbox, which MacPorts does not permit:

Following instead the direction in the README that it must be a directory under the source directory, I get instead a file-not-found error. Same problem, but it's installing a different file. It succeeds installing mypaint and chmod'ing its parent directory in the sandbox, then installs mypaint-brush.h in the sandbox and fails when trying to chmod its nonexistent parent directory outside of the sandbox:

DEBUG: Executing command line: cd "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_MyPaint/MyPaint/work/mypaint-1.1.0" && /opt/local/bin/scons install python_binary=/opt/local/bin/python2.7 python_config=/opt/local/bin/python2.7-config prefix=/opt/local --install-sandbox=/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_MyPaint/MyPaint/work/mypaint-1.1.0/destroot
Install file: "mypaint" as "destroot/opt/local/bin/mypaint"
Chmod("destroot/opt/local/bin/mypaint", 0755)
Install file: "brushlib/glib/mypaint-brush.h" as "destroot/opt/local/include/libmypaint/glib/mypaint-brush.h"
Chmod("destroot/opt/local/include/libmypaint/glib/mypaint-brush.h", 0644)
Chmod("/opt/local/include/libmypaint/glib", 0755)
scons: *** [destroot/opt/local/include/libmypaint/glib/mypaint-brush.h] /opt/local/include/libmypaint/glib: No such file or directory
scons: building terminated because of errors.

Ryan Schmidt <ryandesign>
Fri Jan 4 17:47:16 2013, comment #4:

Docs updated to reflect requirement for sandbox paths to be absolute: https://gitorious.org/mypaint/mypaint/commit/f37699e8b8d2df4a33a925f313f1f8c1329cac84

Andrew Chadwick <achadwick>
Project Administrator
Fri Jan 4 17:34:06 2013, comment #3:

Retitled bug to reflect actual issue.

Cannot reproduce actual problem with

on Ubuntu 12.04 LTS. Building with a prefix results in no files being installed whatsoever, although it does create the prefix location if it can, which might be considered a bug.

Please check your versions, and try removing .sconsign.dblite and doing a clean rebuild.


Note that you do not have to supply a prefix during a MyPaint build. For an install you of course do have to. It's fine to build with just

then install with

and that will work fine (and just copy files). You can also skip the first step. MyPaint should be able to figure out locations at runtime.


Acknowledge the --install-sandbox thing. That's changed since the docs were written, I think (been a while since I touched that).

For now, it can be solved by using an absolute path pointing under the current directory,

which results in only one "SANDBOX" being created rather than four. I'll update the docs to reflect this.

Andrew Chadwick <achadwick>
Project Administrator
Fri Jan 4 15:00:13 2013, comment #2:

Just to clarify: my problem is not that libmypaint.a gets installed; it's that anything gets installed when I just run "scons prefix=/somewhere"; nothing should get installed until I run "scons prefix=/somewhere install". The README confirms this, and it's how other projects that use scons work.

To update MyPaint in MacPorts to 1.1.0, I ended up building MyPaint using "scons prefix=/somewhere --install-sandbox=path/to/sandbox" as mentioned in the README. This was rather inconvenient because in fact four sandboxes got created—one each in ".", "./po", "./brushlib" and "./brushlib/po". I then had to manually combine these four sandboxes into one in order to install. It worked but is highly unorthodox; I've never seen any other program build that way (and I have some familiarity with other packages—I maintain 400 packages in MacPorts). Maybe that's just how --install-sandbox works; I was unfamiliar with this option.

Ryan Schmidt <ryandesign>
Fri Jan 4 14:25:44 2013, comment #1:

Confirmed here, using

$ scons
$ scons prefix=/tmp/somewhere

I'd like to be able to say "Consider adding enable_introspection=true. This will require g-ir-scanner which on my system is packaged in gobject-introspection", however for me and even after ldconfig, libmypaint-tests.so is missing.

libmypaint.a is not required at runtime. For now, it (and its headers) could be removed if all you want is a running MyPaint program.

Andrew Chadwick <achadwick>
Project Administrator
Wed Jan 2 17:57:42 2013, original submission:

Hello, I'm the maintainer of MyPaint in MacPorts, trying to update our port to 1.1.0.

When I have MacPorts run "scons", it tries to install libmypaint.a into $prefix/lib. Things should not be getting installed when I run "scons"; that shouldn't happen until I run "scons install".

MacPorts has safeguards to ensure that kind of thing does not happen, resulting in a permission error being displayed:

I'm attaching the full log. I don't understand scons so I don't know where or why this is happening.

Ryan Schmidt <ryandesign>


Attached Files
file #16891:  main.log added by ryandesign (17kB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by achadwick (Posted a comment)
  • -unavailable- added by ryandesign (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Jul 17 16:51:00 2014achadwickStatusNeed Info=>Works For Me
    Fri Jan 4 17:34:06 2013achadwickStatusConfirmed=>Need Info
      SummaryRunning "scons" tries to install libmypaint.a=>[OSX] scons: prefix=/somewhere installs stuff and shouldn't. [ALL] --install-sandbox must not be relative
    Fri Jan 4 14:25:44 2013achadwickStatusNone=>Confirmed
    Wed Jan 2 17:57:43 2013ryandesignAttached File-=>Added main.log, #16891
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup