Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 286097 - sys-libs/db-4.8.24 fails unless USE="nocxx" on IRIX
Summary: sys-libs/db-4.8.24 fails unless USE="nocxx" on IRIX
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All IRIX
: Highest normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on: 210151
Blocks:
  Show dependency tree
 
Reported: 2009-09-23 14:30 UTC by Stuart Shelton
Modified: 2011-12-15 18:14 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2009-09-23 14:30:43 UTC
... with USE="-* tcl test", the db build fails with:

cc-1035 CC: ERROR File = ./dbstl_common.h, Line = 58
  #error directive:  "No appropriate TLS modifier defined."

  #error "No appropriate TLS modifier defined."
   ^

cc-1035 CC: ERROR File = /usr/opt/gentoo/var/tmp/portage/sys-libs/db-4.8.24/work/db-4.8.24/build_unix/../dist/../stl/dbstl_resource_manager.h, Line = 144
  #error directive:  "A multi-threaded build of STL for Berkeley DB requires
          thread local storage.  None is configured."

  #error "A multi-threaded build of STL for Berkeley DB requires thread local storage.  None is configured."
   ^

2 errors detected in the compilation of "/usr/opt/gentoo/var/tmp/portage/sys-libs/db-4.8.24/work/db-4.8.24/build_unix/../dist/../stl/dbstl_container.cpp".
make: *** [dbstl_container.lo] Error 1
 * ERROR: sys-libs/db-4.8.24 failed:
 *   make failed
 *
 * Call stack:
 *               ebuild.sh:  51: <call call-ebuildshell 'src_compile'>
 *             environment: 743: <call src_compile>
 *             environment:5091:     emake || die "make failed"


This occurs regardless of the presence or absence of -D_SGI_MP_SOURCE in C(PP)FLAGS, and after looking at config.log appears to be because the IRIX C++ compiler doesn't understand '__thread'.

Should there be a pthreads equivalent?

I've just tried the build again with USE="-* nocxx", and this succeeded!  With C++ support, though, all USE combinations fail.

I also see that, at the start of the build process, the following notices are output:

>>> Unpacking source...
>>> Unpacking db-4.8.24.tar.gz to /usr/opt/gentoo/var/tmp/portage/sys-libs/db-4.8.24/work
 * Applying db-4.8-libtool.patch ...                                                                                                                                                         [ ok ]
 * Applying db-4.8.24-java-manifest-location.patch ...                                                                                                                                       [ ok ]
 * Applying db-4.6-interix.patch ...                                                                                                                                                         [ ok ]
 * QA Notice: 'libtoolize' called by src_unpack: sys-libs/db-4.8.24
 * Use autotools.eclass instead of calling 'libtoolize' directly.
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `aclocal'.
libtoolize: copying file `aclocal/libtool.m4'
libtoolize: copying file `aclocal/ltoptions.m4'
libtoolize: copying file `aclocal/ltsugar.m4'
libtoolize: copying file `aclocal/ltversion.m4'
libtoolize: copying file `aclocal/lt~obsolete.m4'
libtoolize: Consider adding `-I aclocal' to ACLOCAL_AMFLAGS in Makefile.am.
 * Applying db-4.6-jni-check-prefix-first.patch ...                                                                                                                                          [ ok ]
 * Applying db-4.3-listen-to-java-options.patch ...                                                                                                                                          [ ok ]
sed: can't read dist/RELEASE: No such file or directory
Comment 1 Stuart Shelton 2009-10-09 13:49:20 UTC
(This is probably another of those cases where, if "nocxx" isn't specified, the entire thing tries to build with $CXX - which isn't c99 compliant.  If "nocxx" is specified then the library is instead built with $CC, which is c99 compliant, and succeeds.  Other than getting upstream developers to understand that you can't apply C standards to the C++ language in a portable way, I'm not sure what else can be done about this.  It may be possible to hack the Makefile to correctly use $CC and $CXX where appropriate (assuming that the C++ code can be built without c99 support) but this could be a long job...)
Comment 2 Stuart Shelton 2009-10-09 14:28:10 UTC
Nope, my bad - having looked at it again, the C API is correctly built with the C compiler, and the process fails when trying to build the C++ API with the C++ compiler, but using threading code which is obviously not compatible with IRIX :(

I guess the "nocxx" option should be hard-coded for this package for CHOST == *-irix*
Comment 3 Fabian Groffen gentoo-dev 2009-10-09 15:06:26 UTC
package.use.force in the IRIX profile sounds like a cleaner solution to me
Comment 4 Fabian Groffen gentoo-dev 2009-10-09 15:11:32 UTC
done.
Comment 5 Stuart Shelton 2009-10-19 10:09:50 UTC
Can we filter this more?

db-4.6.x && db-4.7.x build correctly without USE=nocxx, so for these builds the 'nocxx' flag shouldn't be forced - only db-4.5.x and db-4.8.x have this requirement.

(I've not come across package.use.force before...)
Comment 6 Stuart Shelton 2009-10-29 12:26:17 UTC
Could someone take a look at this, please - because I have to keep editing package.use.force after each sync!

The following diff should be applied:

--- package.use.force
+++ package.use.force
@@ -4,4 +4,5 @@
 
 # Fabian Groffen <grobian@gentoo.org> (09 Oct 2009)
 # CXX bindings don't compile due to incompatible threading code, bug #286097
-sys-libs/db nocxx
+<sys-libs/db-4.6 nocxx
+>=sys-libs/db-4.8 nocxx

... because db-4.6 and db-4.7 are prefectly happy to build with C++ support - it's only db-4.5 (and presumably earlier?) and db-4.8 which don't work.
Comment 7 Fabian Groffen gentoo-dev 2011-12-15 18:14:48 UTC
We are sorry to close this bug.  We lack the man-power and devotion to support mips-irix in the tree.