On Wed, Mar 27, 2019 at 11:25:56AM +0100, Antoine Jacoutot wrote:
> On Tue, Mar 26, 2019 at 08:25:40PM -0400, Josh Grosse wrote:
> > I'm trying to figure out a root cause, but am struggling
> > because my usual method of preventing stripped modules
> > fails when I build shotwell.  Setting $INSTALL_STRIP 
> > doesn't have an effect during make fake.
> > 
> > Size mismatch warnings between libstdc++ and libc++abi occur
> > when the application is started, and after displaying thumbnails
> > a segfault in libc++abi occurs when the user clicks on any
> > thumbnail.
> > 
> > A console log, backtrace, and dmesg follow.  Any suggestions for capturing
> > better data would be appreciated.
> > 
> > Thanks in advance.
> 
> The problem comes from libraw which hardcodes -lstdc++.
> Libs: -L${libdir} -lraw -lstdc++

That should do it.
While here, bring a patch from FreeBSD.

OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/libraw/Makefile,v
retrieving revision 1.40
diff -u -p -r1.40 Makefile
--- Makefile    24 Oct 2018 14:28:05 -0000      1.40
+++ Makefile    27 Mar 2019 10:42:23 -0000
@@ -3,7 +3,7 @@
 COMMENT =              library for reading RAW files
 
 DISTNAME =             LibRaw-0.18.13
-REVISION =             0
+REVISION =             1
 PKGNAME =              ${DISTNAME:L}
 CATEGORIES =           graphics
 
Index: patches/patch-internal_dcraw_common_cpp
===================================================================
RCS file: patches/patch-internal_dcraw_common_cpp
diff -N patches/patch-internal_dcraw_common_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-internal_dcraw_common_cpp     27 Mar 2019 10:42:23 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+OpenBSD has its own strnlen and strcasestr.
+
+Index: internal/dcraw_common.cpp
+--- internal/dcraw_common.cpp.orig
++++ internal/dcraw_common.cpp
+@@ -51,6 +51,7 @@ int CLASS fcol (int row, int col)
+   if (filters == 9) return xtrans[(row+6) % 6][(col+6) % 6];
+   return FC(row,col);
+ }
++#if !defined(__OpenBSD__)
+ static size_t local_strnlen(const char *s, size_t n)
+ {
+   const char *p = (const char *)memchr(s, 0, n);
+@@ -58,6 +59,7 @@ static size_t local_strnlen(const char *s, size_t n)
+ }
+ /* add OS X version check here ?? */
+ #define strnlen(a,b) local_strnlen(a,b)
++#endif
+ 
+ #ifdef LIBRAW_LIBRARY_BUILD
+ static int stread(char *buf, size_t len, LibRaw_abstract_datastream *fp)
+@@ -74,7 +76,7 @@ static int stread(char *buf, size_t len, LibRaw_abstra
+ #define stmread(buf,maxlen,fp) stread(buf,MIN(maxlen,sizeof(buf)),fp)
+ #endif
+ 
+-#ifndef __GLIBC__
++#if !defined(__GLIBC__) && !defined(__OpenBSD__)
+ char *my_memmem (char *haystack, size_t haystacklen,
+             char *needle, size_t needlelen)
+ {
Index: patches/patch-internal_libraw_x3f_cpp
===================================================================
RCS file: /cvs/ports/graphics/libraw/patches/patch-internal_libraw_x3f_cpp,v
retrieving revision 1.6
diff -u -p -r1.6 patch-internal_libraw_x3f_cpp
--- patches/patch-internal_libraw_x3f_cpp       18 May 2018 06:04:33 -0000      
1.6
+++ patches/patch-internal_libraw_x3f_cpp       27 Mar 2019 10:42:23 -0000
@@ -2,6 +2,7 @@ $OpenBSD: patch-internal_libraw_x3f_cpp,
 
 fix non-constant-expression cannot be narrowed from type 'int' to 'int16_t'
 (aka 'short') with clang6
+
 Index: internal/libraw_x3f.cpp
 --- internal/libraw_x3f.cpp.orig
 +++ internal/libraw_x3f.cpp
Index: patches/patch-libraw_pc_in
===================================================================
RCS file: patches/patch-libraw_pc_in
diff -N patches/patch-libraw_pc_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libraw_pc_in  27 Mar 2019 10:42:23 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+
+Index: libraw.pc.in
+--- libraw.pc.in.orig
++++ libraw.pc.in
+@@ -7,5 +7,5 @@ Name: libraw
+ Description: Raw image decoder library (non-thread-safe)
+ Requires: @PACKAGE_REQUIRES@
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -lraw -lstdc++@PC_OPENMP@
++Libs: -L${libdir} -lraw @PC_OPENMP@
+ Cflags: -I${includedir}/libraw


Reply via email to