Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 86874 - x11-libs/fox-1.2.6-r2.ebuild ignores make.conf CXXFLAGS, resulting in huge libraries with poor performance.
Summary: x11-libs/fox-1.2.6-r2.ebuild ignores make.conf CXXFLAGS, resulting in huge li...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Ryan Phillips (RETIRED)
Depends on: 74872
Blocks: cflags
  Show dependency tree
Reported: 2005-03-27 09:05 UTC by Ferris McCormick (RETIRED)
Modified: 2005-05-23 10:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

Add a patchfile and modify ebuild to use it: Use our CXXFLAGS instead of fox's. (fox-1.2.6.patch,1.92 KB, patch)
2005-03-28 09:44 UTC, Ferris McCormick (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ferris McCormick (RETIRED) gentoo-dev 2005-03-27 09:05:35 UTC
The ebuild for fox-1.2.6-r2 ignores the CXXFLAGS from make.conf:  For example, my CFLAGS and CXXFLAGS are:
CFLAGS="-mcpu=ultrasparc -O2 -mtune=ultrasparc -pipe"
but the build for fox compiles like this:

c++ -DPACKAGE=\"fox\" -DVERSION=\"1.2.6\" -DHAVE_DLFCN_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SELECT_H=1 -DWORDS_BIGENDIAN=1 -DHAVE_PNG_H=1 -DHAVE_TIFF_H=1 -DHAVE_ZLIB_H=1 -DHAVE_BZLIB_H=1 -DHAVE_VSSCANF=1 -DHAVE_LIBDL=1 -I. -I. -I../include -I../include -I/usr/include/freetype2 -I/usr/include -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include -DHAVE_XFT_H=1 -DHAVE_XSHM_H=1 -D_GNU_SOURCE -DHAVE_JPEG_H=1 -DHAVE_PNG_H=1 -DHAVE_TIFF_H=1 -DHAVE_ZLIB_H=1 -DHAVE_BZ2LIB_H=1 -DHAVE_XCURSOR_H=1 -Wall -W -Wmissing-prototypes -Woverloaded-virtual -Wformat -DHAVE_GL_H=1 -DSUN_OGL_NO_VERTEX_MACROS -DHPOGL_SUPPRESS_FAST_API -DHAVE_GLU_H=1 -c FXColorWheel.cpp -o FXColorWheel.o >/dev/null 2>&1

So, for example, I am saying compile for an ultrasparc at -O2, but fox is actually compiling at -O0 for
'-mcpu=v7' (e.g., a sparc station 2).

On sparc, at least, this results in huge libraries with dreadful performance. 
Certainly, the resulting fox widget set is not close to production quality (on a sparc system).

Please see:
for a discussion.
Comment 1 Ferris McCormick (RETIRED) gentoo-dev 2005-03-28 09:44:06 UTC
Created attachment 54685 [details, diff]
Add a patchfile and modify ebuild to use it:  Use our CXXFLAGS instead of fox's.

This patch (1) creates a patch file for to force it to use our
CXXFLAGS instead of
fox's idea of what CXXFLAGS should be;
(2) modifies fox-1.2.6-r2.ebuild to apply the patch and to do necessary
autoconf, libtoolize;
(3) Add -DNDEBUG to CXXFLAGS unless USE=debug.

USE:  In /usr/portage/x11-libs/fox:   patch -p0 -z- -b < fox-1.2.6.patch

It's not pretty, but it works on sparc, at least, and resulting version of fox
appears to work fine.

There must be better solutions, but this timy change shows what the problem is
and one way to fix it.
(Without the libtoolize line, the build fails with a version mismatch.)

Notice also that just adding '--enable-release' to the configure flags will not
work, because the CXXFLAGS fox chooses
in that case are architecture-specific (and not sparc-appropriate).)

Comment 2 Ferris McCormick (RETIRED) gentoo-dev 2005-04-20 08:38:59 UTC
I note in passing that Yaakov S's improvements at Bug 88924 take care of this.  So from my point of view, it is no linger an issue.
Comment 3 Ryan Phillips (RETIRED) gentoo-dev 2005-05-23 10:16:22 UTC
Yakoov's ebuilds have been committed and masked.