[Mypaint-discuss] scons - can't compile MyPaint, g++ options of unknown origin
scons uses weird options causing compilation fail: -OPT:Olimit=0 and -march=core2 -O2 -fplugin=/usr/lib64/llvm/dragonegg.so Second line is probably from /etc/portage/make.conf, but even after commenting line with variable CFLAGS, these options are added. The first one causes error: cc1plus: error: argument to ‘-O’ should be a non-negative integer And the second: cc1plus: error: cannot load plugin /usr/lib64/llvm/dragonegg.so /usr/lib64/llvm/dragonegg.so: undefined symbol: tree_map_base_marked_p What can be problem and how to fix it? I'm using Gentoo with clang and CFLAGS=-march=core2 -O2 -fplugin=/usr/lib64/llvm/dragonegg.so CXXFLAGS=${CFLAGS} in /etc/portage/make.conf SCONS $ scons --debug=presub scons: Reading SConscript files ... Gentoo: /etc/gentoo-release exists. Must be on a Gentoo based system. building for 'python2.7' (use scons python_binary=xxx to change) using 'python-config-2.7' (use scons python_config=xxx to change) Building with action: rm -f libmypaint-tests.so libmypaint.so libmypaintlib.so rm -f libmypaint-tests.so libmypaint.so libmypaintlib.so Enabling i18n for brushlib in full application build Building with action: swig -Wall -o mypaintlib_wrap.cpp -noproxydel -python -c++ mypaintlib.i swig -Wall -o mypaintlib_wrap.cpp -noproxydel -python -c++ mypaintlib.i Building with action: rm -f _mypaintlib.so rm -f _mypaintlib.so set umask to 0022 (was 0022) scons: done reading SConscript files. scons: Building targets ... Building lib/mypaintlib_wrap.os with action: $SHCXX -o $TARGET -c $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM $SOURCES g++ -o lib/mypaintlib_wrap.os -c -Wall -Wno-sign-compare -Wno-write-strings -Wall -O3 -g -pthread -fno-strict-aliasing -OPT:Olimit=0 -march=core2 -O2 -fplugin=/usr/lib64/llvm/dragonegg.so -fwrapv -Xlinker -export-dynamic -fPIC -DHAVE_GETTEXT -Ilib -I/usr/include/json-c -Ibrushlib -Ibrushlib/tests -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libpng15 -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/pygtk-2.0 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 lib/mypaintlib_wrap.cpp cc1plus: error: argument to ‘-O’ should be a non-negative integer cc1plus: error: cannot load plugin /usr/lib64/llvm/dragonegg.so /usr/lib64/llvm/dragonegg.so: undefined symbol: tree_map_base_marked_p scons: *** [lib/mypaintlib_wrap.os] Error 1 scons: building terminated because of errors. SCONS -- Daniel Tracerneo Ziółkowski ___ Mypaint-discuss mailing list Mypaint-discuss@gna.org https://mail.gna.org/listinfo/mypaint-discuss
Re: [Mypaint-discuss] scons - can't compile MyPaint, g++ options of unknown origin
On 9 March 2013 20:07, Daniel Ziólkowski ziolko...@gmail.com wrote: scons uses weird options causing compilation fail: -OPT:Olimit=0 and -march=core2 -O2 -fplugin=/usr/lib64/llvm/dragonegg.so Second line is probably from /etc/portage/make.conf, but even after commenting line with variable CFLAGS, these options are added. The first one causes error: cc1plus: error: argument to ‘-O’ should be a non-negative integer And the second: cc1plus: error: cannot load plugin /usr/lib64/llvm/dragonegg.so /usr/lib64/llvm/dragonegg.so: undefined symbol: tree_map_base_marked_p What can be problem and how to fix it? I'm using Gentoo with clang and CFLAGS=-march=core2 -O2 -fplugin=/usr/lib64/llvm/dragonegg.so CXXFLAGS=${CFLAGS} in /etc/portage/make.conf The MyPaint scons file does neither add -OPT:Olimit=0 nor -march=core2 -O2 -fplugin=/usr/lib64/llvm/dragonegg.so. It will capture CFLAGS/CXXFLAGS from the environment, so please first try to unset CFLAGS and unset CXXFLAGS before trying to build. Furthermore, it will use cflags as specified by its dependencies in their pkg-config files. So try to do pkg-config --cflags json-c python gtk-2.0 lcms-2.0 (note: names of the dependencies are from my head, check with the scons file for the exact names). Could also grep your pkg-config files for this strange -OPT thing. Hope that helps, Jon -- Jon Nordby - www.jonnor.com ___ Mypaint-discuss mailing list Mypaint-discuss@gna.org https://mail.gna.org/listinfo/mypaint-discuss