URL:
  <http://gna.org/bugs/?20754>

                 Summary: brushlib: CFLAGS not respected (more generally, we
need a consistent way of passing CFLAGS, LDFLAGS etc.)
                 Project: MyPaint
            Submitted by: achadwick
            Submitted on: Sun 21 Apr 2013 08:30:26 PM GMT
                Severity: 2 - Minor
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.1.0+git 8ae515a
         Planned Release: None
        Operating System: Linux unstable/Sid @now

    _______________________________________________________

Details:

If MyPaint is compiled and run with CFLAGS=-O1, hilarity ensues:


$ scons --clean; CFLAGS=-O0 scons
$ ./mypaint 

We are not correctly installed or compiled!
script: "./mypaint"

Traceback (most recent call last):
  File "./mypaint", line 186, in <module>
    = get_paths()
  File "./mypaint", line 116, in get_paths
    from lib import mypaintlib
  File "/home/andrewc/Development/MyPaint/lib/mypaintlib.py", line 26, in
<module>
    _mypaintlib = swig_import_helper()
  File "/home/andrewc/Development/MyPaint/lib/mypaintlib.py", line 18, in
swig_import_helper
    import _mypaintlib
ImportError: /home/andrewc/Development/MyPaint/_mypaintlib.so: undefined
symbol:
_ZN10BufferCompIL20BufferCompOutputType1ELj16384E15DarkenBlendModeE9blendfuncE


(Not sure if my over-clever templating stuff for genericizing blend modes is
at fault here. If somebody with better C++ chops than me could have a look at
it, I'd be much obliged.)

This was in essence reported in Debian bug
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704935 , and I'm working on a
fix for stable 1.1.0 downstream. Presumably it's due to inconsistent use of
optimization flags.


Chasing the cause of the error reveals a few facts:

1. the bulk of brushlib, and its tests, do not respect CFLAGS, and just uses
the default -O3 for that type of build
2. CFLAGS are respected when building mypaint's _mypaintlib.so (and that's
it).

This is inconsistent and breaks some downstream builds, albeit not in a way
that can't be worked around downstream too.


(As an aside, should we go the route of

http://www.freebsd.org/doc/en/books/porters-handbook/book.html#using-scons

, i.e. using Environment(**ARGUMENTS) - trailing command-line options to scons
- instead of os.environ? If we're calling third part apps like scons,
presumably we have no option.)




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?20754>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Mypaint-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-bugs

Reply via email to