Bug#875085: oce: FTBFS with glibc 2.26: xlocale.h: no such file or directory

Steve Langasek steve.langasek at canonical.com
Sat Sep 9 20:15:24 UTC 2017


Package: oce
Version: 0.17.2-2
Severity: important
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu artful ubuntu-patch

Dear maintainers,

Ubuntu has moved to glibc 2.26, which now causes oce to fail to build from
source because it expects xlocale.h to be present and this header has been
removed upstream.

This header is non-standard and doesn't appear to provide any real value to
oce, which (correctly) treats locale_t as an opaque object anyway.  I've
therefore applied the attached patch in Ubuntu to stop using xlocale.h at
all on glibc systems.

I don't know a timeline for glibc 2.26 in Debian, but when it does arrive
this will of course become a serious bug.  You may wish to consider applying
this patch.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
diff -Nru oce-0.17.2/debian/patches/no-xlocale.h-for-glibc-2.26.patch oce-0.17.2/debian/patches/no-xlocale.h-for-glibc-2.26.patch
--- oce-0.17.2/debian/patches/no-xlocale.h-for-glibc-2.26.patch	1969-12-31 16:00:00.000000000 -0800
+++ oce-0.17.2/debian/patches/no-xlocale.h-for-glibc-2.26.patch	2017-09-09 13:06:35.000000000 -0700
@@ -0,0 +1,22 @@
+Description: Omit xlocale.h, not needed and not available in glibc 2.26
+ glibc 2.26 has dropped the non-standard xlocale.h header, which was only
+ used to get a definition of locale_t which should be treated opaquely by
+ oce anyway.  Drop the HAVE_LOCALE_H declaration and let locale_t fall back
+ to void *.
+Author: Steve Langasek <steve.langasek at ubuntu.com>
+Forwarded: no
+Last-Update: 2017-09-09
+
+--- oce-0.17.2.orig/src/Standard/Standard_CLocaleSentry.hxx
++++ oce-0.17.2/src/Standard/Standard_CLocaleSentry.hxx
+@@ -29,10 +29,6 @@
+     #define HAVE_XLOCALE_H
+   #endif
+ 
+-  //! We check _GNU_SOURCE for glibc extensions here and it is always defined by g++ compiler.
+-  #if defined(_GNU_SOURCE) && !defined(__ANDROID__)
+-    #define HAVE_XLOCALE_H
+-  #endif
+ #endif // ifndef HAVE_LOCALE_H
+ 
+ #ifdef HAVE_XLOCALE_H
diff -Nru oce-0.17.2/debian/patches/series oce-0.17.2/debian/patches/series
--- oce-0.17.2/debian/patches/series	2017-04-14 13:33:49.000000000 -0700
+++ oce-0.17.2/debian/patches/series	2017-09-09 13:00:45.000000000 -0700
@@ -1,3 +1,4 @@
 split-export.patch
 speedup-BRepMesh_test.patch
 do_not_add_drawexe.patch
+no-xlocale.h-for-glibc-2.26.patch


More information about the debian-science-maintainers mailing list