Skip to content
Snippets Groups Projects
Commit 6c4ed4aa authored by Andreas Metzler's avatar Andreas Metzler
Browse files

Fix FTBFS when large stacks are disabled.

nonlinuxlargestack.diff Fix FTBFS when large stacks are disabled.
Bug-report, diagnosis and patch by Pino Toscano. Closes: #680509
parent 697afb48
No related branches found
No related tags found
No related merge requests found
openexr (1.6.1-6) unstable; urgency=low
* nonlinuxlargestack.diff Fix FTBFS when large stacks are disabled.
Bug-report, diagnosis and patch by Pino Toscano. Closes: #680509
-- Andreas Metzler <ametzler@debian.org> Sat, 07 Jul 2012 08:58:08 +0200
openexr (1.6.1-5) unstable; urgency=low
* Update package short description, openexr does not contain a viewer.
......
From pino@debian.org Sat Jul 7 08:25:02 2012
Message-ID: <20120706125937.25992.73298.reportbug__33605.2071572796$1341580533$gmane$org@localhost.localdomain>
From: Pino Toscano <pino@debian.org>
Subject: Bug#680509: openexr: FTBFS on non-linux (or
when disabling large stacks)
Date: Fri, 06 Jul 2012 14:59:37 +0200
Reply-To: Pino Toscano <pino@debian.org>, 680509@bugs.debian.org
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1502726251752548908=="
To: Debian Bug Tracking System <submit@bugs.debian.org>
X-Debian-PR-Message: report 680509
X-Debian-PR-Package: src:openexr
X-Debian-PR-Keywords: patch
X-Debian-PR-Source: openexr
X-Mailer: reportbug 6.4
Archived-At: <http://permalink.gmane.org/gmane.linux.debian.devel.phototools/4727>
This is a multi-part MIME message sent by reportbug.
--===============1502726251752548908==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Source: openexr
Version: 1.6.1-5
Severity: serious
Tags: patch
Justification: fails to build from source (but built successfully in the past)
Hi,
most probably due to GCC 4.7, openexr does not compile when large
stacks are disabled, which is done by default on any non-Linux
architecture (see also configure.ac).
The problem can also be seen in a recent rebuild on hurd-i386[1],
or just when trying to compile it on e.g. kfreebsd; for example on
kfreebsd-amd64:
| g++ -DHAVE_CONFIG_H -I. -I. -I../config -I/usr/include/OpenEXR -I.. -I../config -D_FORTIFY_SOURCE=2 -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -c ImfHuf.cpp -fPIC -DPIC -o .libs/ImfHuf.o
| In file included from ImfHuf.cpp:50:0:
| ./ImfAutoArray.h: In instantiation of 'Imf::AutoArray<T, size>::AutoArray() [with T = int; int size = 65537]':
| ImfHuf.cpp:298:34: required from here
| ./ImfAutoArray.h:60:39: error: 'memset' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
| In file included from /usr/include/string.h:642:0,
| from ImfHuf.cpp:52:
| /usr/include/x86_64-kfreebsd-gnu/bits/string3.h:77:1: note: 'void* memset(void*, int, size_t)' declared here, later in the translation unit
| In file included from ImfHuf.cpp:50:0:
| ./ImfAutoArray.h: In instantiation of 'Imf::AutoArray<T, size>::AutoArray() [with T = long unsigned int*; int size = 65537]':
| ImfHuf.cpp:299:38: required from here
| ./ImfAutoArray.h:60:39: error: 'memset' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
| In file included from /usr/include/string.h:642:0,
| from ImfHuf.cpp:52:
| /usr/include/x86_64-kfreebsd-gnu/bits/string3.h:77:1: note: 'void* memset(void*, int, size_t)' declared here, later in the translation unit
| In file included from ImfHuf.cpp:50:0:
| ./ImfAutoArray.h: In instantiation of 'Imf::AutoArray<T, size>::AutoArray() [with T = long unsigned int; int size = 65537]':
| ImfHuf.cpp:361:36: required from here
| ./ImfAutoArray.h:60:39: error: 'memset' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
| In file included from /usr/include/string.h:642:0,
| from ImfHuf.cpp:52:
| /usr/include/x86_64-kfreebsd-gnu/bits/string3.h:77:1: note: 'void* memset(void*, int, size_t)' declared here, later in the translation unit
| In file included from ImfHuf.cpp:50:0:
| ./ImfAutoArray.h: In instantiation of 'Imf::AutoArray<T, size>::AutoArray() [with T = Imf::{anonymous}::HufDec; int size = 16384]':
| ImfHuf.cpp:1050:37: required from here
| ./ImfAutoArray.h:60:39: error: 'memset' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
| In file included from /usr/include/string.h:642:0,
| from ImfHuf.cpp:52:
| /usr/include/x86_64-kfreebsd-gnu/bits/string3.h:77:1: note: 'void* memset(void*, int, size_t)' declared here, later in the translation unit
| make[3]: *** [ImfHuf.lo] Error 1
Attached there is a patch that fixes the issue, by including <cstring>
in ImfAutoArray.h only with no large stacks enabled, and making sure
to call memset from the std namespace.
(Note: it seems openexr 1.7.0 will no more memset() the data array
in the "no large stacks" implementation.)
[1] https://buildd.debian.org/status/fetch.php?pkg=openexr&arch=hurd-i386&ver=1.6.1-5%2Bb1&stamp=1337862561
Thanks,
--
Pino
--===============1502726251752548908==
Content-Type: text/x-diff; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="non-linux.diff"
--- a/IlmImf/ImfAutoArray.h
+++ b/IlmImf/ImfAutoArray.h
@@ -46,6 +46,10 @@
#include "OpenEXRConfig.h"
+#if !defined (HAVE_LARGE_STACK)
+#include <cstring>
+#endif
+
namespace Imf {
@@ -57,7 +61,7 @@
{
public:
- AutoArray (): _data (new T [size]) {memset(_data, 0, size * sizeof(T));}
+ AutoArray (): _data (new T [size]) {::std::memset(_data, 0, size * sizeof(T));}
~AutoArray () {delete [] _data;}
operator T * () {return _data;}
--===============1502726251752548908==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Pkg-phototools-devel mailing list
Pkg-phototools-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-phototools-devel
--===============1502726251752548908==--
......@@ -2,3 +2,4 @@ fix_gcc4.3_ftbfs.diff
CVE-2009-1720-1.diff
CVE-2009-1720-2.diff
CVE-2009-1721.diff
nonlinuxlargestack.diff
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment