Core dump in wavpack on sparc

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Core dump in wavpack on sparc

Graham Stephens-2
Hi all,

I initially posted this on the sparc list, but have been asked to post here.

When running "wavpack -m blah.wav" (for md5 calculation), I get a core
dump with a message of 'Bus Error'.

It works ok for other switches I have tried.

This is on OBSD v6.1 with wavpack v5.1.0, on a blade 100.


Christian Weisgerber added the following comment:

"That is most likely an unaligned access error.

The usual approach is to build a package with debugging symbols
(CFLAGS="-g" INSTALL_STRIP="") and examine the core file with gdb.

Alas, I don't have any strict alignment machines at hand any longer.
I tried to reproduce it on aarch64, but that architecture (or at
least the CPU I have) doesn't seem to actually enforce alignment
despite the #define __STRICT_ALIGNMENT in <machine/endian.h>."


Sadly I wouldn't have a clue where to start with this; the last dump I
looked at was a mainframe one about 1000 years ago. ;)

Reply | Threaded
Open this post in threaded view
|

Re: Core dump in wavpack on sparc

Juan Francisco Cantero Hurtado
On Sat, May 13, 2017 at 10:07:22AM +0100, Graham Stephens wrote:

> Hi all,
>
> I initially posted this on the sparc list, but have been asked to post here.
>
> When running "wavpack -m blah.wav" (for md5 calculation), I get a core
> dump with a message of 'Bus Error'.
>
> It works ok for other switches I have tried.
>
> This is on OBSD v6.1 with wavpack v5.1.0, on a blade 100.
>
>
> Christian Weisgerber added the following comment:
>
> "That is most likely an unaligned access error.
>
> The usual approach is to build a package with debugging symbols
> (CFLAGS="-g" INSTALL_STRIP="") and examine the core file with gdb.
>
> Alas, I don't have any strict alignment machines at hand any longer.
> I tried to reproduce it on aarch64, but that architecture (or at
> least the CPU I have) doesn't seem to actually enforce alignment
> despite the #define __STRICT_ALIGNMENT in <machine/endian.h>."
>
>
> Sadly I wouldn't have a clue where to start with this; the last dump I
> looked at was a mainframe one about 1000 years ago. ;)

Download the ports tree for OpenBSD 6.1:
$ cd /usr
$ cvs -qd [hidden email]:/cvs get -rOPENBSD_6_1 -P ports

Build the port with debug symbols:
$ cd /usr/ports/audio/wavpack
$ make clean=all
$ make CFLAGS="-g" INSTALL_STRIP="" package
$ make reinstall

Try to get a coredump:
$ wavpack -m blah.wav

If the program crashes with 'Bus Error':
$ gdb wavpack wavpack.core

In the gdb prompt, run:
> bt
> quit

Copy/paste the output. Don't remove the .core file, maybe the maintainer
will need more info.


--
Juan Francisco Cantero Hurtado http://juanfra.info

Reply | Threaded
Open this post in threaded view
|

Re: Core dump in wavpack on sparc

Graham Stephens-2


On 13/05/17 15:40, Juan Francisco Cantero Hurtado wrote:

> On Sat, May 13, 2017 at 10:07:22AM +0100, Graham Stephens wrote:
>> Hi all,
>>
>> I initially posted this on the sparc list, but have been asked to post here.
>>
>> When running "wavpack -m blah.wav" (for md5 calculation), I get a core
>> dump with a message of 'Bus Error'.
>>
>> It works ok for other switches I have tried.
>>
>> This is on OBSD v6.1 with wavpack v5.1.0, on a blade 100.
>>
>>
>> Christian Weisgerber added the following comment:
>>
>> "That is most likely an unaligned access error.
>>
>> The usual approach is to build a package with debugging symbols
>> (CFLAGS="-g" INSTALL_STRIP="") and examine the core file with gdb.
>>
>> Alas, I don't have any strict alignment machines at hand any longer.
>> I tried to reproduce it on aarch64, but that architecture (or at
>> least the CPU I have) doesn't seem to actually enforce alignment
>> despite the #define __STRICT_ALIGNMENT in <machine/endian.h>."
>>
>>
>> Sadly I wouldn't have a clue where to start with this; the last dump I
>> looked at was a mainframe one about 1000 years ago. ;)
>
> Download the ports tree for OpenBSD 6.1:
> $ cd /usr
> $ cvs -qd [hidden email]:/cvs get -rOPENBSD_6_1 -P ports
>
> Build the port with debug symbols:
> $ cd /usr/ports/audio/wavpack
> $ make clean=all
> $ make CFLAGS="-g" INSTALL_STRIP="" package
> $ make reinstall
>
> Try to get a coredump:
> $ wavpack -m blah.wav
>
> If the program crashes with 'Bus Error':
> $ gdb wavpack wavpack.core
>
> In the gdb prompt, run:
>> bt
>> quit
>
> Copy/paste the output. Don't remove the .core file, maybe the maintainer
> will need more info.
>
>

Thanks, JF.

Here we go:

GNU gdb 6.3
This GDB was configured as "sparc64-unknown-openbsd6.1"...
Core was generated by `wavpack'.
Program terminated with signal 10, Bus error.
Loaded symbols for /usr/local/bin/wavpack
Reading symbols from /usr/local/lib/libwavpack.so.0.2...done.
Loaded symbols for /usr/local/lib/libwavpack.so.0.2
Reading symbols from /usr/lib/libm.so.10.0...done.
Loaded symbols for /usr/lib/libm.so.10.0
Reading symbols from /usr/local/lib/libiconv.so.6.0...done.
Loaded symbols for /usr/local/lib/libiconv.so.6.0
Reading symbols from /usr/lib/libc.so.89.3...done.
Loaded symbols for /usr/lib/libc.so.89.3
Reading symbols from /usr/libexec/ld.so...done.
Loaded symbols for /usr/libexec/ld.so
#0  0x0000006928a1a2dc in byteReverse (buf=0xfffffffffffd1cbc "", longs=15)
     at /usr/ports/pobj/wavpack-5.1.0/wavpack-5.1.0/cli/md5.c:46
46        *(uint32 *) buf = t;
(gdb) bt
#0  0x0000006928a1a2dc in byteReverse (buf=0xfffffffffffd1cbc "", longs=15)
     at /usr/ports/pobj/wavpack-5.1.0/wavpack-5.1.0/cli/md5.c:46
#1  0x0000006928a1a51c in MD5Update (ctx=0xfffffffffffd1c88,
     buf=0x6b34a16000 "", len=262144)
     at /usr/ports/pobj/wavpack-5.1.0/wavpack-5.1.0/cli/md5.c:106
#2  0x0000006928a08818 in pack_audio (wpc=0x6b90885000,
infile=0x6bd7c58868,
     qmode=0, new_order=0x0, md5_digest_source=0xfffffffffffd2298 "")
     at /usr/ports/pobj/wavpack-5.1.0/wavpack-5.1.0/cli/wavpack.c:2308
#3  0x0000006928a06cac in pack_file (infilename=0x6bfa2b24a0 "track1.wav",
     outfilename=0x6bfa2b30e0 "track1.wv", out2filename=0x0,
     config=0xfffffffffffd23d8)
     at /usr/ports/pobj/wavpack-5.1.0/wavpack-5.1.0/cli/wavpack.c:1889
#4  0x0000006928a04c70 in main (argc=0, argv=0xfffffffffffd2ed8)
     at /usr/ports/pobj/wavpack-5.1.0/wavpack-5.1.0/cli/wavpack.c:1270
(gdb) quit

Reply | Threaded
Open this post in threaded view
|

Re: Core dump in wavpack on sparc

Stuart Henderson
This port diff switches to using libc's MD5 implementation
which I think should help. It creates a new patches/ directory,
use "patch -E -p0" to apply it (then make clean; make repackage;
make reinstall)..

Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/wavpack/Makefile,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile
--- Makefile 1 Feb 2017 22:06:14 -0000 1.22
+++ Makefile 13 May 2017 21:54:58 -0000
@@ -3,6 +3,7 @@
 COMMENT = audio codec for lossless, lossy and hybrid compression
 
 DISTNAME = wavpack-5.1.0
+REVISION = 0
 CATEGORIES = audio
 
 HOMEPAGE = http://www.wavpack.com/
@@ -28,6 +29,9 @@ CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE
  LDFLAGS="-L${LOCALBASE}/lib"
 
 DOCDIR = ${PREFIX}/share/doc/wavpack
+
+pre-configure:
+ sed -i 's,#include "md5.h",#include <md5.h>,' ${WRKSRC}/cli/*.c
 
 post-install:
  ${INSTALL_DATA_DIR} ${DOCDIR}
Index: patches/patch-cli_Makefile_in
===================================================================
RCS file: patches/patch-cli_Makefile_in
diff -N patches/patch-cli_Makefile_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-cli_Makefile_in 13 May 2017 21:54:58 -0000
@@ -0,0 +1,38 @@
+$OpenBSD$
+
+Index: cli/Makefile.in
+--- cli/Makefile.in.orig
++++ cli/Makefile.in
+@@ -107,7 +107,7 @@ am__wavpack_SOURCES_DIST = wavpack.c riff.c wave64.c c
+ am_wavpack_OBJECTS = wavpack-wavpack.$(OBJEXT) wavpack-riff.$(OBJEXT) \
+ wavpack-wave64.$(OBJEXT) wavpack-caff.$(OBJEXT) \
+ wavpack-dsdiff.$(OBJEXT) wavpack-dsf.$(OBJEXT) \
+- wavpack-utils.$(OBJEXT) wavpack-md5.$(OBJEXT) \
++ wavpack-utils.$(OBJEXT) \
+ wavpack-import_id3.$(OBJEXT) $(am__objects_1)
+ wavpack_OBJECTS = $(am_wavpack_OBJECTS)
+ am__DEPENDENCIES_1 =
+@@ -362,12 +362,12 @@ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ wavpack_SOURCES = wavpack.c riff.c wave64.c caff.c dsdiff.c dsf.c \
+- utils.c md5.c import_id3.c $(am__append_1)
++ utils.c import_id3.c $(am__append_1)
+ wavpack_CFLAGS = $(AM_CFLAGS) $(ICONV_CFLAGS) -I$(top_srcdir)/include
+ @ENABLE_RPATH_TRUE@wavpack_LDFLAGS = -rpath $(libdir)
+ wavpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
+ wvunpack_SOURCES = wvunpack.c riff.c wave64.c caff.c dsdiff.c dsf.c \
+- utils.c md5.c $(am__append_2)
++ utils.c $(am__append_2)
+ wvunpack_CFLAGS = $(AM_CFLAGS) $(ICONV_CFLAGS) -I$(top_srcdir)/include
+ @ENABLE_RPATH_TRUE@wvunpack_LDFLAGS = -rpath $(libdir)
+ wvunpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
+@@ -379,7 +379,7 @@ wvtag_SOURCES = wvtag.c utils.c import_id3.c $(am__app
+ wvtag_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
+ @ENABLE_RPATH_TRUE@wvtag_LDFLAGS = -rpath $(libdir)
+ wvtag_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
+-@ENABLE_TESTS_TRUE@wvtest_SOURCES = wvtest.c md5.c
++@ENABLE_TESTS_TRUE@wvtest_SOURCES = wvtest.c
+ @ENABLE_TESTS_TRUE@wvtest_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
+ @ENABLE_RPATH_TRUE@@ENABLE_TESTS_TRUE@wvtest_LDFLAGS = -rpath $(libdir)
+ @ENABLE_TESTS_TRUE@wvtest_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) -lpthread

Reply | Threaded
Open this post in threaded view
|

Re: Core dump in wavpack on sparc

Juan Francisco Cantero Hurtado
On Sat, May 13, 2017 at 10:57:25PM +0100, Stuart Henderson wrote:
> This port diff switches to using libc's MD5 implementation
> which I think should help. It creates a new patches/ directory,
> use "patch -E -p0" to apply it (then make clean; make repackage;
> make reinstall)..

I was adding a conditional for big_endian to md5.c. Your patch is
better.


Graham, I've uploaded this sample to test the md5 signature:
https://devio.us/~juanfra684/wavpack/sample.wav

On 6.1/i386:
"original md5 signature: 6e4170e66f3ea12a6cedd4d7f38f2c7a"


--
Juan Francisco Cantero Hurtado http://juanfra.info

Reply | Threaded
Open this post in threaded view
|

Re: Core dump in wavpack on sparc

Graham Stephens-2
In reply to this post by Stuart Henderson

> This port diff switches to using libc's MD5 implementation
> which I think should help. It creates a new patches/ directory,
> use "patch -E -p0" to apply it (then make clean; make repackage;
> make reinstall)..
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/audio/wavpack/Makefile,v
> retrieving revision 1.22
> diff -u -p -r1.22 Makefile
> --- Makefile 1 Feb 2017 22:06:14 -0000 1.22
> +++ Makefile 13 May 2017 21:54:58 -0000
> @@ -3,6 +3,7 @@
>  COMMENT = audio codec for lossless, lossy and hybrid compression
>
>  DISTNAME = wavpack-5.1.0
> +REVISION = 0
>  CATEGORIES = audio
>
>  HOMEPAGE = http://www.wavpack.com/
> @@ -28,6 +29,9 @@ CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE
>   LDFLAGS="-L${LOCALBASE}/lib"
>
>  DOCDIR = ${PREFIX}/share/doc/wavpack
> +
> +pre-configure:
> + sed -i 's,#include "md5.h",#include <md5.h>,' ${WRKSRC}/cli/*.c
>
>  post-install:
>   ${INSTALL_DATA_DIR} ${DOCDIR}
> Index: patches/patch-cli_Makefile_in
> ===================================================================
> RCS file: patches/patch-cli_Makefile_in
> diff -N patches/patch-cli_Makefile_in
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-cli_Makefile_in 13 May 2017 21:54:58 -0000
> @@ -0,0 +1,38 @@
> +$OpenBSD$
> +
> +Index: cli/Makefile.in
> +--- cli/Makefile.in.orig
> ++++ cli/Makefile.in
> +@@ -107,7 +107,7 @@ am__wavpack_SOURCES_DIST = wavpack.c riff.c wave64.c c
> + am_wavpack_OBJECTS = wavpack-wavpack.$(OBJEXT) wavpack-riff.$(OBJEXT) \
> + wavpack-wave64.$(OBJEXT) wavpack-caff.$(OBJEXT) \
> + wavpack-dsdiff.$(OBJEXT) wavpack-dsf.$(OBJEXT) \
> +- wavpack-utils.$(OBJEXT) wavpack-md5.$(OBJEXT) \
> ++ wavpack-utils.$(OBJEXT) \
> + wavpack-import_id3.$(OBJEXT) $(am__objects_1)
> + wavpack_OBJECTS = $(am_wavpack_OBJECTS)
> + am__DEPENDENCIES_1 =
> +@@ -362,12 +362,12 @@ top_build_prefix = @top_build_prefix@
> + top_builddir = @top_builddir@
> + top_srcdir = @top_srcdir@
> + wavpack_SOURCES = wavpack.c riff.c wave64.c caff.c dsdiff.c dsf.c \
> +- utils.c md5.c import_id3.c $(am__append_1)
> ++ utils.c import_id3.c $(am__append_1)
> + wavpack_CFLAGS = $(AM_CFLAGS) $(ICONV_CFLAGS) -I$(top_srcdir)/include
> + @ENABLE_RPATH_TRUE@wavpack_LDFLAGS = -rpath $(libdir)
> + wavpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
> + wvunpack_SOURCES = wvunpack.c riff.c wave64.c caff.c dsdiff.c dsf.c \
> +- utils.c md5.c $(am__append_2)
> ++ utils.c $(am__append_2)
> + wvunpack_CFLAGS = $(AM_CFLAGS) $(ICONV_CFLAGS) -I$(top_srcdir)/include
> + @ENABLE_RPATH_TRUE@wvunpack_LDFLAGS = -rpath $(libdir)
> + wvunpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
> +@@ -379,7 +379,7 @@ wvtag_SOURCES = wvtag.c utils.c import_id3.c $(am__app
> + wvtag_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
> + @ENABLE_RPATH_TRUE@wvtag_LDFLAGS = -rpath $(libdir)
> + wvtag_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
> +-@ENABLE_TESTS_TRUE@wvtest_SOURCES = wvtest.c md5.c
> ++@ENABLE_TESTS_TRUE@wvtest_SOURCES = wvtest.c
> + @ENABLE_TESTS_TRUE@wvtest_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
> + @ENABLE_RPATH_TRUE@@ENABLE_TESTS_TRUE@wvtest_LDFLAGS = -rpath $(libdir)
> + @ENABLE_TESTS_TRUE@wvtest_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) -lpthread
>

Sorry Guys, I'm having trouble here...

cd to /usr/ports/audio/wavpack
copy patch to same

Running "patch -E -p0 < wavpack.patch" returns:

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: Makefile
|===================================================================
|RCS file: /cvs/ports/audio/wavpack/Makefile,v
|retrieving revision 1.22
|diff -u -p -r1.22 Makefile
|--- Makefile 1 Feb 2017 22:06:14 -0000 1.22
|+++ Makefile 13 May 2017 21:54:58 -0000
--------------------------
Patching file Makefile using Plan A...
Hunk #1 failed at 3.
Hunk #2 failed at 29.
2 out of 2 hunks failed--saving rejects to Makefile.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: patches/patch-cli_Makefile_in
|===================================================================
|RCS file: patches/patch-cli_Makefile_in
|diff -N patches/patch-cli_Makefile_in
|--- /dev/null 1 Jan 1970 00:00:00 -0000
|+++ patches/patch-cli_Makefile_in 13 May 2017 21:54:58 -0000
--------------------------
(Creating file patches/patch-cli_Makefile_in...)
Patching file patches/patch-cli_Makefile_in using Plan A...
Empty context always matches.
Hunk #1 succeeded at 1.
done


I tried to make what changes I thought were necessary manually but
obviously failed as the repackage wouldn't work :(

Reply | Threaded
Open this post in threaded view
|

Re: Core dump in wavpack on sparc

Stuart Henderson
On 2017/05/14 09:44, Graham Stephens wrote:

>
> > This port diff switches to using libc's MD5 implementation
> > which I think should help. It creates a new patches/ directory,
> > use "patch -E -p0" to apply it (then make clean; make repackage;
> > make reinstall)..
> >
> > Index: Makefile
> > ===================================================================
> > RCS file: /cvs/ports/audio/wavpack/Makefile,v
> > retrieving revision 1.22
> > diff -u -p -r1.22 Makefile
> > --- Makefile 1 Feb 2017 22:06:14 -0000 1.22
> > +++ Makefile 13 May 2017 21:54:58 -0000
> > @@ -3,6 +3,7 @@
> >  COMMENT = audio codec for lossless, lossy and hybrid compression
> >
> >  DISTNAME = wavpack-5.1.0
> > +REVISION = 0
> >  CATEGORIES = audio
> >
> >  HOMEPAGE = http://www.wavpack.com/
> > @@ -28,6 +29,9 @@ CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE
> >   LDFLAGS="-L${LOCALBASE}/lib"
> >
> >  DOCDIR = ${PREFIX}/share/doc/wavpack
> > +
> > +pre-configure:
> > + sed -i 's,#include "md5.h",#include <md5.h>,' ${WRKSRC}/cli/*.c
> >
> >  post-install:
> >   ${INSTALL_DATA_DIR} ${DOCDIR}
> > Index: patches/patch-cli_Makefile_in
> > ===================================================================
> > RCS file: patches/patch-cli_Makefile_in
> > diff -N patches/patch-cli_Makefile_in
> > --- /dev/null 1 Jan 1970 00:00:00 -0000
> > +++ patches/patch-cli_Makefile_in 13 May 2017 21:54:58 -0000
> > @@ -0,0 +1,38 @@
> > +$OpenBSD$
> > +
> > +Index: cli/Makefile.in
> > +--- cli/Makefile.in.orig
> > ++++ cli/Makefile.in
> > +@@ -107,7 +107,7 @@ am__wavpack_SOURCES_DIST = wavpack.c riff.c wave64.c c
> > + am_wavpack_OBJECTS = wavpack-wavpack.$(OBJEXT) wavpack-riff.$(OBJEXT) \
> > + wavpack-wave64.$(OBJEXT) wavpack-caff.$(OBJEXT) \
> > + wavpack-dsdiff.$(OBJEXT) wavpack-dsf.$(OBJEXT) \
> > +- wavpack-utils.$(OBJEXT) wavpack-md5.$(OBJEXT) \
> > ++ wavpack-utils.$(OBJEXT) \
> > + wavpack-import_id3.$(OBJEXT) $(am__objects_1)
> > + wavpack_OBJECTS = $(am_wavpack_OBJECTS)
> > + am__DEPENDENCIES_1 =
> > +@@ -362,12 +362,12 @@ top_build_prefix = @top_build_prefix@
> > + top_builddir = @top_builddir@
> > + top_srcdir = @top_srcdir@
> > + wavpack_SOURCES = wavpack.c riff.c wave64.c caff.c dsdiff.c dsf.c \
> > +- utils.c md5.c import_id3.c $(am__append_1)
> > ++ utils.c import_id3.c $(am__append_1)
> > + wavpack_CFLAGS = $(AM_CFLAGS) $(ICONV_CFLAGS) -I$(top_srcdir)/include
> > + @ENABLE_RPATH_TRUE@wavpack_LDFLAGS = -rpath $(libdir)
> > + wavpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
> > + wvunpack_SOURCES = wvunpack.c riff.c wave64.c caff.c dsdiff.c dsf.c \
> > +- utils.c md5.c $(am__append_2)
> > ++ utils.c $(am__append_2)
> > + wvunpack_CFLAGS = $(AM_CFLAGS) $(ICONV_CFLAGS) -I$(top_srcdir)/include
> > + @ENABLE_RPATH_TRUE@wvunpack_LDFLAGS = -rpath $(libdir)
> > + wvunpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
> > +@@ -379,7 +379,7 @@ wvtag_SOURCES = wvtag.c utils.c import_id3.c $(am__app
> > + wvtag_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
> > + @ENABLE_RPATH_TRUE@wvtag_LDFLAGS = -rpath $(libdir)
> > + wvtag_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
> > +-@ENABLE_TESTS_TRUE@wvtest_SOURCES = wvtest.c md5.c
> > ++@ENABLE_TESTS_TRUE@wvtest_SOURCES = wvtest.c
> > + @ENABLE_TESTS_TRUE@wvtest_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
> > + @ENABLE_RPATH_TRUE@@ENABLE_TESTS_TRUE@wvtest_LDFLAGS = -rpath $(libdir)
> > + @ENABLE_TESTS_TRUE@wvtest_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) -lpthread
> >
>
> Sorry Guys, I'm having trouble here...
>
> cd to /usr/ports/audio/wavpack
> copy patch to same
>
> Running "patch -E -p0 < wavpack.patch" returns:
>
> Hmm...  Looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
> |Index: Makefile
> |===================================================================
> |RCS file: /cvs/ports/audio/wavpack/Makefile,v
> |retrieving revision 1.22
> |diff -u -p -r1.22 Makefile
> |--- Makefile 1 Feb 2017 22:06:14 -0000 1.22
> |+++ Makefile 13 May 2017 21:54:58 -0000
> --------------------------
> Patching file Makefile using Plan A...
> Hunk #1 failed at 3.
> Hunk #2 failed at 29.
> 2 out of 2 hunks failed--saving rejects to Makefile.rej
> Hmm...  The next patch looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
> |Index: patches/patch-cli_Makefile_in
> |===================================================================
> |RCS file: patches/patch-cli_Makefile_in
> |diff -N patches/patch-cli_Makefile_in
> |--- /dev/null 1 Jan 1970 00:00:00 -0000
> |+++ patches/patch-cli_Makefile_in 13 May 2017 21:54:58 -0000
> --------------------------
> (Creating file patches/patch-cli_Makefile_in...)
> Patching file patches/patch-cli_Makefile_in using Plan A...
> Empty context always matches.
> Hunk #1 succeeded at 1.
> done
>
>
> I tried to make what changes I thought were necessary manually but obviously
> failed as the repackage wouldn't work :(
>

I suspect your mail client may have mangled the diff. I would do this
to clean and fetch a fresh copy from the marc.info archive:

cd /usr/ports/audio/wavpack
rm Makefile patches/patch-*
cvs up -Pd
ftp -o- 'https://marc.info/?l=openbsd-ports&m=149471266205406&q=raw' | patch -Ep0

then clean/repackage/reinstall.

If it doesn't work, paste in the output from the "make clean" stage
onwards.

Reply | Threaded
Open this post in threaded view
|

Re: Core dump in wavpack on sparc

Juan Francisco Cantero Hurtado
In reply to this post by Graham Stephens-2
On Sun, May 14, 2017 at 09:44:33AM +0100, Graham Stephens wrote:

>
> > This port diff switches to using libc's MD5 implementation
> > which I think should help. It creates a new patches/ directory,
> > use "patch -E -p0" to apply it (then make clean; make repackage;
> > make reinstall)..
> >
> > Index: Makefile
> > ===================================================================
> > RCS file: /cvs/ports/audio/wavpack/Makefile,v
> > retrieving revision 1.22
> > diff -u -p -r1.22 Makefile
> > --- Makefile 1 Feb 2017 22:06:14 -0000 1.22
> > +++ Makefile 13 May 2017 21:54:58 -0000
> > @@ -3,6 +3,7 @@
> >  COMMENT = audio codec for lossless, lossy and hybrid compression
> >
> >  DISTNAME = wavpack-5.1.0
> > +REVISION = 0
> >  CATEGORIES = audio
> >
> >  HOMEPAGE = http://www.wavpack.com/
> > @@ -28,6 +29,9 @@ CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE
> >   LDFLAGS="-L${LOCALBASE}/lib"
> >
> >  DOCDIR = ${PREFIX}/share/doc/wavpack
> > +
> > +pre-configure:
> > + sed -i 's,#include "md5.h",#include <md5.h>,' ${WRKSRC}/cli/*.c
> >
> >  post-install:
> >   ${INSTALL_DATA_DIR} ${DOCDIR}
> > Index: patches/patch-cli_Makefile_in
> > ===================================================================
> > RCS file: patches/patch-cli_Makefile_in
> > diff -N patches/patch-cli_Makefile_in
> > --- /dev/null 1 Jan 1970 00:00:00 -0000
> > +++ patches/patch-cli_Makefile_in 13 May 2017 21:54:58 -0000
> > @@ -0,0 +1,38 @@
> > +$OpenBSD$
> > +
> > +Index: cli/Makefile.in
> > +--- cli/Makefile.in.orig
> > ++++ cli/Makefile.in
> > +@@ -107,7 +107,7 @@ am__wavpack_SOURCES_DIST = wavpack.c riff.c wave64.c c
> > + am_wavpack_OBJECTS = wavpack-wavpack.$(OBJEXT) wavpack-riff.$(OBJEXT) \
> > + wavpack-wave64.$(OBJEXT) wavpack-caff.$(OBJEXT) \
> > + wavpack-dsdiff.$(OBJEXT) wavpack-dsf.$(OBJEXT) \
> > +- wavpack-utils.$(OBJEXT) wavpack-md5.$(OBJEXT) \
> > ++ wavpack-utils.$(OBJEXT) \
> > + wavpack-import_id3.$(OBJEXT) $(am__objects_1)
> > + wavpack_OBJECTS = $(am_wavpack_OBJECTS)
> > + am__DEPENDENCIES_1 =
> > +@@ -362,12 +362,12 @@ top_build_prefix = @top_build_prefix@
> > + top_builddir = @top_builddir@
> > + top_srcdir = @top_srcdir@
> > + wavpack_SOURCES = wavpack.c riff.c wave64.c caff.c dsdiff.c dsf.c \
> > +- utils.c md5.c import_id3.c $(am__append_1)
> > ++ utils.c import_id3.c $(am__append_1)
> > + wavpack_CFLAGS = $(AM_CFLAGS) $(ICONV_CFLAGS) -I$(top_srcdir)/include
> > + @ENABLE_RPATH_TRUE@wavpack_LDFLAGS = -rpath $(libdir)
> > + wavpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
> > + wvunpack_SOURCES = wvunpack.c riff.c wave64.c caff.c dsdiff.c dsf.c \
> > +- utils.c md5.c $(am__append_2)
> > ++ utils.c $(am__append_2)
> > + wvunpack_CFLAGS = $(AM_CFLAGS) $(ICONV_CFLAGS) -I$(top_srcdir)/include
> > + @ENABLE_RPATH_TRUE@wvunpack_LDFLAGS = -rpath $(libdir)
> > + wvunpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
> > +@@ -379,7 +379,7 @@ wvtag_SOURCES = wvtag.c utils.c import_id3.c $(am__app
> > + wvtag_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
> > + @ENABLE_RPATH_TRUE@wvtag_LDFLAGS = -rpath $(libdir)
> > + wvtag_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
> > +-@ENABLE_TESTS_TRUE@wvtest_SOURCES = wvtest.c md5.c
> > ++@ENABLE_TESTS_TRUE@wvtest_SOURCES = wvtest.c
> > + @ENABLE_TESTS_TRUE@wvtest_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
> > + @ENABLE_RPATH_TRUE@@ENABLE_TESTS_TRUE@wvtest_LDFLAGS = -rpath $(libdir)
> > + @ENABLE_TESTS_TRUE@wvtest_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) -lpthread
> >
>
> Sorry Guys, I'm having trouble here...
>
> cd to /usr/ports/audio/wavpack
> copy patch to same
>
> Running "patch -E -p0 < wavpack.patch" returns:
>
> Hmm...  Looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
> |Index: Makefile
> |===================================================================
> |RCS file: /cvs/ports/audio/wavpack/Makefile,v
> |retrieving revision 1.22
> |diff -u -p -r1.22 Makefile
> |--- Makefile 1 Feb 2017 22:06:14 -0000 1.22
> |+++ Makefile 13 May 2017 21:54:58 -0000
> --------------------------
> Patching file Makefile using Plan A...
> Hunk #1 failed at 3.
> Hunk #2 failed at 29.
> 2 out of 2 hunks failed--saving rejects to Makefile.rej
> Hmm...  The next patch looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
> |Index: patches/patch-cli_Makefile_in
> |===================================================================
> |RCS file: patches/patch-cli_Makefile_in
> |diff -N patches/patch-cli_Makefile_in
> |--- /dev/null 1 Jan 1970 00:00:00 -0000
> |+++ patches/patch-cli_Makefile_in 13 May 2017 21:54:58 -0000
> --------------------------
> (Creating file patches/patch-cli_Makefile_in...)
> Patching file patches/patch-cli_Makefile_in using Plan A...
> Empty context always matches.
> Hunk #1 succeeded at 1.
> done
>
>
> I tried to make what changes I thought were necessary manually but obviously
> failed as the repackage wouldn't work :(
>

Don't copy the patch. Use "Save as" in Thunderbird.

Before of apply the patch, run "rm -rf Makefile patches" and "cvs update
-dP".


--
Juan Francisco Cantero Hurtado http://juanfra.info

Reply | Threaded
Open this post in threaded view
|

Re: Core dump in wavpack on sparc

Graham Stephens-2
In reply to this post by Stuart Henderson

> On 2017/05/14 09:44, Graham Stephens wrote:
>>
>>> This port diff switches to using libc's MD5 implementation
>>> which I think should help. It creates a new patches/ directory,
>>> use "patch -E -p0" to apply it (then make clean; make repackage;
>>> make reinstall)..
>>>
>>> Index: Makefile
>>> ===================================================================
>>> RCS file: /cvs/ports/audio/wavpack/Makefile,v
>>> retrieving revision 1.22
>>> diff -u -p -r1.22 Makefile
>>> --- Makefile 1 Feb 2017 22:06:14 -0000 1.22
>>> +++ Makefile 13 May 2017 21:54:58 -0000
>>> @@ -3,6 +3,7 @@
>>>  COMMENT = audio codec for lossless, lossy and hybrid compression
>>>
>>>  DISTNAME = wavpack-5.1.0
>>> +REVISION = 0
>>>  CATEGORIES = audio
>>>
>>>  HOMEPAGE = http://www.wavpack.com/
>>> @@ -28,6 +29,9 @@ CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE
>>>   LDFLAGS="-L${LOCALBASE}/lib"
>>>
>>>  DOCDIR = ${PREFIX}/share/doc/wavpack
>>> +
>>> +pre-configure:
>>> + sed -i 's,#include "md5.h",#include <md5.h>,' ${WRKSRC}/cli/*.c
>>>
>>>  post-install:
>>>   ${INSTALL_DATA_DIR} ${DOCDIR}
>>> Index: patches/patch-cli_Makefile_in
>>> ===================================================================
>>> RCS file: patches/patch-cli_Makefile_in
>>> diff -N patches/patch-cli_Makefile_in
>>> --- /dev/null 1 Jan 1970 00:00:00 -0000
>>> +++ patches/patch-cli_Makefile_in 13 May 2017 21:54:58 -0000
>>> @@ -0,0 +1,38 @@
>>> +$OpenBSD$
>>> +
>>> +Index: cli/Makefile.in
>>> +--- cli/Makefile.in.orig
>>> ++++ cli/Makefile.in
>>> +@@ -107,7 +107,7 @@ am__wavpack_SOURCES_DIST = wavpack.c riff.c wave64.c c
>>> + am_wavpack_OBJECTS = wavpack-wavpack.$(OBJEXT) wavpack-riff.$(OBJEXT) \
>>> + wavpack-wave64.$(OBJEXT) wavpack-caff.$(OBJEXT) \
>>> + wavpack-dsdiff.$(OBJEXT) wavpack-dsf.$(OBJEXT) \
>>> +- wavpack-utils.$(OBJEXT) wavpack-md5.$(OBJEXT) \
>>> ++ wavpack-utils.$(OBJEXT) \
>>> + wavpack-import_id3.$(OBJEXT) $(am__objects_1)
>>> + wavpack_OBJECTS = $(am_wavpack_OBJECTS)
>>> + am__DEPENDENCIES_1 =
>>> +@@ -362,12 +362,12 @@ top_build_prefix = @top_build_prefix@
>>> + top_builddir = @top_builddir@
>>> + top_srcdir = @top_srcdir@
>>> + wavpack_SOURCES = wavpack.c riff.c wave64.c caff.c dsdiff.c dsf.c \
>>> +- utils.c md5.c import_id3.c $(am__append_1)
>>> ++ utils.c import_id3.c $(am__append_1)
>>> + wavpack_CFLAGS = $(AM_CFLAGS) $(ICONV_CFLAGS) -I$(top_srcdir)/include
>>> + @ENABLE_RPATH_TRUE@wavpack_LDFLAGS = -rpath $(libdir)
>>> + wavpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
>>> + wvunpack_SOURCES = wvunpack.c riff.c wave64.c caff.c dsdiff.c dsf.c \
>>> +- utils.c md5.c $(am__append_2)
>>> ++ utils.c $(am__append_2)
>>> + wvunpack_CFLAGS = $(AM_CFLAGS) $(ICONV_CFLAGS) -I$(top_srcdir)/include
>>> + @ENABLE_RPATH_TRUE@wvunpack_LDFLAGS = -rpath $(libdir)
>>> + wvunpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
>>> +@@ -379,7 +379,7 @@ wvtag_SOURCES = wvtag.c utils.c import_id3.c $(am__app
>>> + wvtag_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
>>> + @ENABLE_RPATH_TRUE@wvtag_LDFLAGS = -rpath $(libdir)
>>> + wvtag_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
>>> +-@ENABLE_TESTS_TRUE@wvtest_SOURCES = wvtest.c md5.c
>>> ++@ENABLE_TESTS_TRUE@wvtest_SOURCES = wvtest.c
>>> + @ENABLE_TESTS_TRUE@wvtest_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
>>> + @ENABLE_RPATH_TRUE@@ENABLE_TESTS_TRUE@wvtest_LDFLAGS = -rpath $(libdir)
>>> + @ENABLE_TESTS_TRUE@wvtest_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) -lpthread
>>>
>>
>> Sorry Guys, I'm having trouble here...
>>
>> cd to /usr/ports/audio/wavpack
>> copy patch to same
>>
>> Running "patch -E -p0 < wavpack.patch" returns:
>>
>> Hmm...  Looks like a unified diff to me...
>> The text leading up to this was:
>> --------------------------
>> |Index: Makefile
>> |===================================================================
>> |RCS file: /cvs/ports/audio/wavpack/Makefile,v
>> |retrieving revision 1.22
>> |diff -u -p -r1.22 Makefile
>> |--- Makefile 1 Feb 2017 22:06:14 -0000 1.22
>> |+++ Makefile 13 May 2017 21:54:58 -0000
>> --------------------------
>> Patching file Makefile using Plan A...
>> Hunk #1 failed at 3.
>> Hunk #2 failed at 29.
>> 2 out of 2 hunks failed--saving rejects to Makefile.rej
>> Hmm...  The next patch looks like a unified diff to me...
>> The text leading up to this was:
>> --------------------------
>> |Index: patches/patch-cli_Makefile_in
>> |===================================================================
>> |RCS file: patches/patch-cli_Makefile_in
>> |diff -N patches/patch-cli_Makefile_in
>> |--- /dev/null 1 Jan 1970 00:00:00 -0000
>> |+++ patches/patch-cli_Makefile_in 13 May 2017 21:54:58 -0000
>> --------------------------
>> (Creating file patches/patch-cli_Makefile_in...)
>> Patching file patches/patch-cli_Makefile_in using Plan A...
>> Empty context always matches.
>> Hunk #1 succeeded at 1.
>> done
>>
>>
>> I tried to make what changes I thought were necessary manually but obviously
>> failed as the repackage wouldn't work :(
>>
>
> I suspect your mail client may have mangled the diff. I would do this
> to clean and fetch a fresh copy from the marc.info archive:
>
> cd /usr/ports/audio/wavpack
> rm Makefile patches/patch-*
> cvs up -Pd
> ftp -o- 'https://marc.info/?l=openbsd-ports&m=149471266205406&q=raw' | patch -Ep0
>
> then clean/repackage/reinstall.
>
> If it doesn't work, paste in the output from the "make clean" stage
> onwards.
>

Thanks Guys,

Tested and working/matching against JF's sample.

Err... however - and I apologise for not thinking ahead and mentioning
it earlier - but there's also a wvunpack program in the same package
(with the opposite functionality). It was only when I came to test it
against itself that I realised this might also be an issue. :(

Reply | Threaded
Open this post in threaded view
|

Re: Core dump in wavpack on sparc

Stuart Henderson
On 2017/05/14 14:38, Graham Stephens wrote:
> Tested and working/matching against JF's sample.

Thanks.

> Err... however - and I apologise for not thinking ahead and mentioning it
> earlier - but there's also a wvunpack program in the same package (with the
> opposite functionality). It was only when I came to test it against itself
> that I realised this might also be an issue. :(

In theory my diff should have fixed both wavpack and wvunpack.

Reply | Threaded
Open this post in threaded view
|

Re: Core dump in wavpack on sparc

Graham Stephens-2
> On 2017/05/14 14:38, Graham Stephens wrote:
>> Tested and working/matching against JF's sample.
>
> Thanks.
>
>> Err... however - and I apologise for not thinking ahead and mentioning it
>> earlier - but there's also a wvunpack program in the same package (with the
>> opposite functionality). It was only when I came to test it against itself
>> that I realised this might also be an issue. :(
>
> In theory my diff should have fixed both wavpack and wvunpack.
>

I can see in the diff you sent that wavpack and wvunpack both have md5.c
removed from the sources, but alas wvunpack -m fails with the same error
that struck wavpack originally.

Reply | Threaded
Open this post in threaded view
|

Re: Core dump in wavpack on sparc

Tim van der Molen-4
Graham Stephens (2017-05-14 23:57 +0200):

> > On 2017/05/14 14:38, Graham Stephens wrote:
> > > Tested and working/matching against JF's sample.
> >
> > Thanks.
> >
> > > Err... however - and I apologise for not thinking ahead and mentioning it
> > > earlier - but there's also a wvunpack program in the same package (with the
> > > opposite functionality). It was only when I came to test it against itself
> > > that I realised this might also be an issue. :(
> >
> > In theory my diff should have fixed both wavpack and wvunpack.
> >
>
> I can see in the diff you sent that wavpack and wvunpack both have md5.c
> removed from the sources, but alas wvunpack -m fails with the same error
> that struck wavpack originally.

Could you send a new backtrace please?

Reply | Threaded
Open this post in threaded view
|

Re: Core dump in wavpack on sparc

Juan Francisco Cantero Hurtado
In reply to this post by Stuart Henderson
On Sun, May 14, 2017 at 10:13:01PM +0100, Stuart Henderson wrote:

> On 2017/05/14 14:38, Graham Stephens wrote:
> > Tested and working/matching against JF's sample.
>
> Thanks.
>
> > Err... however - and I apologise for not thinking ahead and mentioning it
> > earlier - but there's also a wvunpack program in the same package (with the
> > opposite functionality). It was only when I came to test it against itself
> > that I realised this might also be an issue. :(
>
> In theory my diff should have fixed both wavpack and wvunpack.

I added "#error" to md5.c and looks like you missed some line in the
makefiles:

mv -f .deps/wvunpack-utils.Tpo .deps/wvunpack-utils.Po
cc -DPACKAGE_NAME=\"wavpack\" -DPACKAGE_TARNAME=\"wavpack\"
-DPACKAGE_VERSION=\"5.1.0\" -DPACKAGE_STRING=\"wavpack\ 5.1.0\"
-DPACKAGE_BUGREPORT=\"[hidden email]\" -DPACKAGE_URL=\"\"
-DPACKAGE=\"wavpack\" -DVERSION=\"5.1.0\" -DLIBWAVPACK_MAJOR=5
-DLIBWAVPACK_MINOR=1 -DLIBWAVPACK_MICRO=0
-DLIBWAVPACK_VERSION_STRING=\"5.1.0\" -DVERSION_OS=\"OpenBSD\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_FSEEKO=1 -DENABLE_DSD=1
-DOPT_ASM_X64=1 -DHAVE___BUILTIN_CLZ=1 -DHAVE___BUILTIN_CTZ=1 -I.
-I/usr/write-ports/pobj/wavpack-5.1.0/wavpack-5.1.0/cli
-I/usr/local/include
-I/usr/write-ports/pobj/wavpack-5.1.0/wavpack-5.1.0/include -O2 -pipe
-MT wvunpack-md5.o -MD -MP -MF .deps/wvunpack-md5.Tpo -c -o
wvunpack-md5.o `test -f 'md5.c' || echo
'/usr/write-ports/pobj/wavpack-5.1.0/wavpack-5.1.0/cli/'`md5.c
/usr/write-ports/pobj/wavpack-5.1.0/wavpack-5.1.0/cli/md5.c:1:2: error:
#error
*** Error 1 in cli (Makefile:919 'wvunpack-md5.o')



--
Juan Francisco Cantero Hurtado http://juanfra.info

Reply | Threaded
Open this post in threaded view
|

Re: Core dump in wavpack on sparc

Tim van der Molen-4
In reply to this post by Tim van der Molen-4
Tim van der Molen (2017-05-15 00:38 +0200):

> Graham Stephens (2017-05-14 23:57 +0200):
> > > On 2017/05/14 14:38, Graham Stephens wrote:
> > > > Tested and working/matching against JF's sample.
> > >
> > > Thanks.
> > >
> > > > Err... however - and I apologise for not thinking ahead and mentioning it
> > > > earlier - but there's also a wvunpack program in the same package (with the
> > > > opposite functionality). It was only when I came to test it against itself
> > > > that I realised this might also be an issue. :(
> > >
> > > In theory my diff should have fixed both wavpack and wvunpack.
> > >
> >
> > I can see in the diff you sent that wavpack and wvunpack both have md5.c
> > removed from the sources, but alas wvunpack -m fails with the same error
> > that struck wavpack originally.
>
> Could you send a new backtrace please?

It seems Juan Francisco has already found the problem. Please try this
diff.

Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/wavpack/Makefile,v
retrieving revision 1.22
diff -p -u -r1.22 Makefile
--- Makefile 1 Feb 2017 22:06:14 -0000 1.22
+++ Makefile 14 May 2017 23:42:25 -0000
@@ -3,6 +3,7 @@
 COMMENT = audio codec for lossless, lossy and hybrid compression
 
 DISTNAME = wavpack-5.1.0
+REVISION = 0
 CATEGORIES = audio
 
 HOMEPAGE = http://www.wavpack.com/
@@ -28,6 +29,9 @@ CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE
  LDFLAGS="-L${LOCALBASE}/lib"
 
 DOCDIR = ${PREFIX}/share/doc/wavpack
+
+pre-configure:
+ sed -i 's,#include "md5.h",#include <md5.h>,' ${WRKSRC}/cli/*.c
 
 post-install:
  ${INSTALL_DATA_DIR} ${DOCDIR}
Index: patches/patch-cli_Makefile_in
===================================================================
RCS file: patches/patch-cli_Makefile_in
diff -N patches/patch-cli_Makefile_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-cli_Makefile_in 14 May 2017 23:42:25 -0000
@@ -0,0 +1,33 @@
+$OpenBSD$
+
+Index: cli/Makefile.in
+--- cli/Makefile.in.orig
++++ cli/Makefile.in
+@@ -107,7 +107,7 @@ am__wavpack_SOURCES_DIST = wavpack.c riff.c wave64.c c
+ am_wavpack_OBJECTS = wavpack-wavpack.$(OBJEXT) wavpack-riff.$(OBJEXT) \
+ wavpack-wave64.$(OBJEXT) wavpack-caff.$(OBJEXT) \
+ wavpack-dsdiff.$(OBJEXT) wavpack-dsf.$(OBJEXT) \
+- wavpack-utils.$(OBJEXT) wavpack-md5.$(OBJEXT) \
++ wavpack-utils.$(OBJEXT) \
+ wavpack-import_id3.$(OBJEXT) $(am__objects_1)
+ wavpack_OBJECTS = $(am_wavpack_OBJECTS)
+ am__DEPENDENCIES_1 =
+@@ -144,8 +144,7 @@ wvtag_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTO
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(wvtag_CFLAGS) $(CFLAGS) \
+ $(wvtag_LDFLAGS) $(LDFLAGS) -o $@
+ am__wvtest_SOURCES_DIST = wvtest.c md5.c
+-@ENABLE_TESTS_TRUE@am_wvtest_OBJECTS = wvtest-wvtest.$(OBJEXT) \
+-@ENABLE_TESTS_TRUE@ wvtest-md5.$(OBJEXT)
++@ENABLE_TESTS_TRUE@am_wvtest_OBJECTS = wvtest-wvtest.$(OBJEXT)
+ wvtest_OBJECTS = $(am_wvtest_OBJECTS)
+ @ENABLE_TESTS_TRUE@wvtest_DEPENDENCIES =  \
+ @ENABLE_TESTS_TRUE@ $(top_builddir)/src/.libs/libwavpack.la \
+@@ -161,7 +160,7 @@ am_wvunpack_OBJECTS = wvunpack-wvunpack.$(OBJEXT) \
+ wvunpack-riff.$(OBJEXT) wvunpack-wave64.$(OBJEXT) \
+ wvunpack-caff.$(OBJEXT) wvunpack-dsdiff.$(OBJEXT) \
+ wvunpack-dsf.$(OBJEXT) wvunpack-utils.$(OBJEXT) \
+- wvunpack-md5.$(OBJEXT) $(am__objects_4)
++ $(am__objects_4)
+ wvunpack_OBJECTS = $(am_wvunpack_OBJECTS)
+ wvunpack_DEPENDENCIES = $(top_builddir)/src/.libs/libwavpack.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)

Reply | Threaded
Open this post in threaded view
|

Re: Core dump in wavpack on sparc

Stuart Henderson
On 2017/05/15 02:23, Tim van der Molen wrote:

> Tim van der Molen (2017-05-15 00:38 +0200):
> > Graham Stephens (2017-05-14 23:57 +0200):
> > > > On 2017/05/14 14:38, Graham Stephens wrote:
> > > > > Tested and working/matching against JF's sample.
> > > >
> > > > Thanks.
> > > >
> > > > > Err... however - and I apologise for not thinking ahead and mentioning it
> > > > > earlier - but there's also a wvunpack program in the same package (with the
> > > > > opposite functionality). It was only when I came to test it against itself
> > > > > that I realised this might also be an issue. :(
> > > >
> > > > In theory my diff should have fixed both wavpack and wvunpack.
> > > >
> > >
> > > I can see in the diff you sent that wavpack and wvunpack both have md5.c
> > > removed from the sources, but alas wvunpack -m fails with the same error
> > > that struck wavpack originally.
> >
> > Could you send a new backtrace please?
>
> It seems Juan Francisco has already found the problem. Please try this
> diff.

Ah good catch, here's a cleaner diff, let's just patch the automake input
files instead.

Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/wavpack/Makefile,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile
--- Makefile 1 Feb 2017 22:06:14 -0000 1.22
+++ Makefile 15 May 2017 08:14:32 -0000
@@ -3,6 +3,7 @@
 COMMENT = audio codec for lossless, lossy and hybrid compression
 
 DISTNAME = wavpack-5.1.0
+REVISION = 0
 CATEGORIES = audio
 
 HOMEPAGE = http://www.wavpack.com/
@@ -28,6 +29,17 @@ CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE
  LDFLAGS="-L${LOCALBASE}/lib"
 
 DOCDIR = ${PREFIX}/share/doc/wavpack
+
+BUILD_DEPENDS = devel/libtool \
+ ${MODGNU_AUTOCONF_DEPENDS} \
+ ${MODGNU_AUTOMAKE_DEPENDS}
+AUTOMAKE_VERSION = 1.14
+AUTOCONF_VERSION = 2.69
+
+pre-configure:
+ sed -i 's,#include "md5.h",#include <md5.h>,' ${WRKSRC}/cli/*.c
+ cd ${WRKSRC}; AUTOCONF_VERSION=${AUTOCONF_VERSION} \
+    AUTOMAKE_VERSION=${AUTOMAKE_VERSION} autoreconf -fi
 
 post-install:
  ${INSTALL_DATA_DIR} ${DOCDIR}
Index: patches/patch-cli_Makefile_am
===================================================================
RCS file: patches/patch-cli_Makefile_am
diff -N patches/patch-cli_Makefile_am
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-cli_Makefile_am 15 May 2017 08:14:32 -0000
@@ -0,0 +1,34 @@
+$OpenBSD$
+
+Defer to libc's md5 functions, the internal version fails on
+strict-alignment architectures.
+
+Index: cli/Makefile.am
+--- cli/Makefile.am.orig
++++ cli/Makefile.am
+@@ -1,6 +1,6 @@
+ bin_PROGRAMS = wavpack wvunpack wvgain wvtag
+
+-wavpack_SOURCES = wavpack.c riff.c wave64.c caff.c dsdiff.c dsf.c utils.c md5.c import_id3.c
++wavpack_SOURCES = wavpack.c riff.c wave64.c caff.c dsdiff.c dsf.c utils.c import_id3.c
+ if WINDOWS_HOST
+ wavpack_SOURCES += win32_unicode_support.c
+ endif
+@@ -10,7 +10,7 @@ wavpack_LDFLAGS = -rpath $(libdir)
+ endif
+ wavpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
+
+-wvunpack_SOURCES = wvunpack.c riff.c wave64.c caff.c dsdiff.c dsf.c utils.c md5.c
++wvunpack_SOURCES = wvunpack.c riff.c wave64.c caff.c dsdiff.c dsf.c utils.c
+ if WINDOWS_HOST
+ wvunpack_SOURCES += win32_unicode_support.c
+ endif
+@@ -42,7 +42,7 @@ wvtag_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/li
+
+ if ENABLE_TESTS
+ bin_PROGRAMS += wvtest
+-wvtest_SOURCES = wvtest.c md5.c
++wvtest_SOURCES = wvtest.c
+ wvtest_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
+ if ENABLE_RPATH
+ wvtest_LDFLAGS = -rpath $(libdir)

Reply | Threaded
Open this post in threaded view
|

Re: Core dump in wavpack on sparc

Graham Stephens-2


On 15/05/17 09:14, Stuart Henderson wrote:

> On 2017/05/15 02:23, Tim van der Molen wrote:
>> Tim van der Molen (2017-05-15 00:38 +0200):
>>> Graham Stephens (2017-05-14 23:57 +0200):
>>>>> On 2017/05/14 14:38, Graham Stephens wrote:
>>>>>> Tested and working/matching against JF's sample.
>>>>>
>>>>> Thanks.
>>>>>
>>>>>> Err... however - and I apologise for not thinking ahead and mentioning it
>>>>>> earlier - but there's also a wvunpack program in the same package (with the
>>>>>> opposite functionality). It was only when I came to test it against itself
>>>>>> that I realised this might also be an issue. :(
>>>>>
>>>>> In theory my diff should have fixed both wavpack and wvunpack.
>>>>>
>>>>
>>>> I can see in the diff you sent that wavpack and wvunpack both have md5.c
>>>> removed from the sources, but alas wvunpack -m fails with the same error
>>>> that struck wavpack originally.
>>>
>>> Could you send a new backtrace please?
>>
>> It seems Juan Francisco has already found the problem. Please try this
>> diff.
>
> Ah good catch, here's a cleaner diff, let's just patch the automake input
> files instead.
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/audio/wavpack/Makefile,v
> retrieving revision 1.22
> diff -u -p -r1.22 Makefile
> --- Makefile 1 Feb 2017 22:06:14 -0000 1.22
> +++ Makefile 15 May 2017 08:14:32 -0000
> @@ -3,6 +3,7 @@
>  COMMENT = audio codec for lossless, lossy and hybrid compression
>
>  DISTNAME = wavpack-5.1.0
> +REVISION = 0
>  CATEGORIES = audio
>
>  HOMEPAGE = http://www.wavpack.com/
> @@ -28,6 +29,17 @@ CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE
>   LDFLAGS="-L${LOCALBASE}/lib"
>
>  DOCDIR = ${PREFIX}/share/doc/wavpack
> +
> +BUILD_DEPENDS = devel/libtool \
> + ${MODGNU_AUTOCONF_DEPENDS} \
> + ${MODGNU_AUTOMAKE_DEPENDS}
> +AUTOMAKE_VERSION = 1.14
> +AUTOCONF_VERSION = 2.69
> +
> +pre-configure:
> + sed -i 's,#include "md5.h",#include <md5.h>,' ${WRKSRC}/cli/*.c
> + cd ${WRKSRC}; AUTOCONF_VERSION=${AUTOCONF_VERSION} \
> +    AUTOMAKE_VERSION=${AUTOMAKE_VERSION} autoreconf -fi
>
>  post-install:
>   ${INSTALL_DATA_DIR} ${DOCDIR}
> Index: patches/patch-cli_Makefile_am
> ===================================================================
> RCS file: patches/patch-cli_Makefile_am
> diff -N patches/patch-cli_Makefile_am
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-cli_Makefile_am 15 May 2017 08:14:32 -0000
> @@ -0,0 +1,34 @@
> +$OpenBSD$
> +
> +Defer to libc's md5 functions, the internal version fails on
> +strict-alignment architectures.
> +
> +Index: cli/Makefile.am
> +--- cli/Makefile.am.orig
> ++++ cli/Makefile.am
> +@@ -1,6 +1,6 @@
> + bin_PROGRAMS = wavpack wvunpack wvgain wvtag
> +
> +-wavpack_SOURCES = wavpack.c riff.c wave64.c caff.c dsdiff.c dsf.c utils.c md5.c import_id3.c
> ++wavpack_SOURCES = wavpack.c riff.c wave64.c caff.c dsdiff.c dsf.c utils.c import_id3.c
> + if WINDOWS_HOST
> + wavpack_SOURCES += win32_unicode_support.c
> + endif
> +@@ -10,7 +10,7 @@ wavpack_LDFLAGS = -rpath $(libdir)
> + endif
> + wavpack_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/libwavpack.la $(LIBM) $(ICONV_LIBS)
> +
> +-wvunpack_SOURCES = wvunpack.c riff.c wave64.c caff.c dsdiff.c dsf.c utils.c md5.c
> ++wvunpack_SOURCES = wvunpack.c riff.c wave64.c caff.c dsdiff.c dsf.c utils.c
> + if WINDOWS_HOST
> + wvunpack_SOURCES += win32_unicode_support.c
> + endif
> +@@ -42,7 +42,7 @@ wvtag_LDADD = $(AM_LDADD) $(top_builddir)/src/.libs/li
> +
> + if ENABLE_TESTS
> + bin_PROGRAMS += wvtest
> +-wvtest_SOURCES = wvtest.c md5.c
> ++wvtest_SOURCES = wvtest.c
> + wvtest_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include
> + if ENABLE_RPATH
> + wvtest_LDFLAGS = -rpath $(libdir)
>

(My initial problem with the diffs turned out to be the old Win/NIX eol.
You'd think I'd have learned by now).

Confirmed working, Thanks all.