Hi folks,
Looking to adopt libvpx Cygwin (and Mingw cross) package to fix CVE, if I can
get tests to build and run, and pass distro acceptance criteria.
Previous maintainer built up to 1.7 ABI 5 in 2018:
https://cygwin.com/packages/summary/libvpx-src.html
but latest release tests will not build test_rc_interface.exe - please see
attached log, Fedora source for libvpx.ver, and patch to allow _FORTIFY_SOURCE=2.
I am still digging in the Makefiles, but feel I must be missing something
obvious about the test builds, like do they not support or include build tree
library search?
The shared library is built manually in the cygport recipe linked from the above
web page, but tests are usually built against static libs, and some test
programs are built properly: test_libvpx (135MB) and test_intra_pred_speed.
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss...@webmproject.org.
To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msgid/webm-discuss/d7ac02b4-e8f9-4245-9215-6c964bc234ac%40Shaw.ca.
Hi Brian,On Tue, Oct 17, 2023 at 4:43 PM Brian Inglis <Brian....@shaw.ca> wrote:Hi folks,
Looking to adopt libvpx Cygwin (and Mingw cross) package to fix CVE, if I can
get tests to build and run, and pass distro acceptance criteria.
Previous maintainer built up to 1.7 ABI 5 in 2018:
https://cygwin.com/packages/summary/libvpx-src.html
but latest release tests will not build test_rc_interface.exe - please see
attached log, Fedora source for libvpx.ver, and patch to allow _FORTIFY_SOURCE=2.
I am still digging in the Makefiles, but feel I must be missing something
obvious about the test builds, like do they not support or include build tree
library search?make V=1 will add a little more detail to the log.
The shared library is built manually in the cygport recipe linked from the above
web page, but tests are usually built against static libs, and some test
programs are built properly: test_libvpx (135MB) and test_intra_pred_speed.Can you share the script being used to do the build? A static build works locally for me and cygwin will fail with --enable-shared, but I see libvpx.dll.a referenced in the log:2023-10-17T17:06:29.6518816Z /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: ./libvpxrc.a(vp9_aq_cyclicrefresh.c.o): in function `vp9_cyclic_refresh_free':
2023-10-17T17:06:29.6525109Z /usr/src/debug/libvpx-1.13.1-1/vp9/encoder/vp9_aq_cyclicrefresh.c:55: multiple definition of `vp9_cyclic_refresh_free'; ./libvpx.dll.a(cygvpx_8_dll_d000554.o):(.text+0x0): first defined here
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss...@webmproject.org.
Duh!
Answering some of my own questions running commands from re-reading the README:
$ LIBVPX_TEST_DATA_PATH=../libvpx-test-data make -n testdata
for t in libs examples tools docs; do \
make --no-print-directory target=$t testdata || exit $?;\
done
echo " [DOWNLOAD] ../libvpx-test-data/bus_352x288_420_f20_b8.yuv"
( \
trap 'rm -f ../libvpx-test-data/bus_352x288_420_f20_b8.yuv' INT TERM; \
curl="curl -S -s --retry 1 -L -o
../libvpx-test-data/bus_352x288_420_f20_b8.yuv
https://storage.googleapis.com/downloads.webmproject.org/test_data/libvpx/bus_352x288_420_f20_b8.yuv";
\
$curl; ret=$?; \
case "$ret" in \
18) $curl -C - ;; \
*) exit $ret ;; \
esac \
)
...
[ -x "$(which sha1sum)" ] && sha1sum=sha1sum;\
[ -x "$(which shasum)" ] && sha1sum=shasum;\
[ -x "$(which sha1)" ] && sha1sum=sha1;\
if [ -n "${sha1sum}" ]; then\
set -e;\
echo "Checking test data:";\
answers the where question:
https://storage.googleapis.com/downloads.webmproject.org/test_data/libvpx/
and the sha1 question:
note that under Cygwin (only?), if `which` returns nothing `test -x` is true:
$ for sh in bash dash sh; do
echo $sh:; $sh -vxc '[ -x ]; echo $?'; $sh -vxc 'test -x; echo $?'; done
bash:
[ -x ]; echo $?
+ '[' -x ']'
+ echo 0
0
test -x; echo $?
+ test -x
+ echo 0
0
dash:
+ [ -x ]
+ echo 0
0
+ test -x
+ echo 0
0
sh:
+ [ -x ]
+ echo 0
0
+ test -x
+ echo 0
0
so test the expected path explicitly e.g.
$ test -x /usr/bin/sha1sum; echo $?
0
$ test -x /usr/bin/sha1; echo $?
1
or use which rc to test for executable existence e.g.
$ for sha in sha1sum shasum sha1; do sha1sum=$(which $sha) && break; done
$ echo $sha1sum
/usr/bin/sha1sum
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
On 2023-10-25 22:27, Brian Inglis wrote:
> Hi folks,
>
> That seems to have done the trick.
> The shared library (cygvpx-8.dll, to avoid collisions with Mingw cross-builds of
> libvpx-8.dll, or native Windows builds) is relinked with the vpxenc/dec
> utilities and the test_... programs remain static, which is normal in these builds.
> Both unstripped and stripped utilities display --help normally.
>
> $ du libvpx-1.13.1-1.x86_64/{build,inst/usr/bin}/*.{dll,exe}
> 23M libvpx-1.13.1-1.x86_64/build/cygvpx-8.dll
> 26M libvpx-1.13.1-1.x86_64/build/test_intra_pred_speed.exe
> 158M libvpx-1.13.1-1.x86_64/build/test_libvpx.exe
> 33M libvpx-1.13.1-1.x86_64/build/test_rc_interface.exe
> 3.3M libvpx-1.13.1-1.x86_64/build/vpxdec.exe
> 3.5M libvpx-1.13.1-1.x86_64/build/vpxenc.exe
> 3.4M libvpx-1.13.1-1.x86_64/inst/usr/bin/cygvpx-8.dll
> 680K libvpx-1.13.1-1.x86_64/inst/usr/bin/vpxdec.exe
> 700K libvpx-1.13.1-1.x86_64/inst/usr/bin/vpxenc.exe
> $ ldd libvpx-1.13.1-1.x86_64/build/vpxenc
> ntdll.dll => /mnt/c/WINDOWS/SYSTEM32/ntdll.dll (0x7fffc0890000)
> KERNEL32.DLL => /mnt/c/WINDOWS/System32/KERNEL32.DLL (0x7fffbea00000)
> KERNELBASE.dll => /mnt/c/WINDOWS/System32/KERNELBASE.dll (0x7fffbe350000)
> cygvpx-8.dll =>
> /usr/src/libvpx/libvpx-1.13.1-1.x86_64/build/cygvpx-8.dll (0x583910000)
> cygwin1.dll => /usr/bin/cygwin1.dll (0x7fffafd10000)
> cygstdc++-6.dll => /usr/bin/cygstdc++-6.dll (0x57b190000)
> cyggcc_s-seh-1.dll => /usr/bin/cyggcc_s-seh-1.dll (0x50caa0000)
> $ ldd libvpx-1.13.1-1.x86_64/inst/usr/bin/vpxdec
> ntdll.dll => /mnt/c/WINDOWS/SYSTEM32/ntdll.dll (0x7fffc0890000)
> KERNEL32.DLL => /mnt/c/WINDOWS/System32/KERNEL32.DLL (0x7fffbea00000)
> KERNELBASE.dll => /mnt/c/WINDOWS/System32/KERNELBASE.dll (0x7fffbe350000)
> cygvpx-8.dll =>
> /usr/src/libvpx/libvpx-1.13.1-1.x86_64/inst/usr/bin/cygvpx-8.dll (0x583910000)
> cygwin1.dll => /usr/bin/cygwin1.dll (0x7fffafd10000)
> cygstdc++-6.dll => /usr/bin/cygstdc++-6.dll (0x57b190000)
> cyggcc_s-seh-1.dll => /usr/bin/cyggcc_s-seh-1.dll (0x50caa0000)
>
> It also appears that 1.4GB of tests were downloaded.
>
> Where is this done in the makefiles or scripts, and from where, as I need to
> note that change for this release, as this is non-standard, but understandable.
> It is not a problem for me, although some others may expect the test files to be
> included in the source package, to allow offline builds and test, which may be
> debatable in this case.
>
> I also noticed that there was a failure to find *sha1* using `which` rather than
> the usual sha...sum utilities, and it appears that .md5 may have been downloaded
> and used instead.
>
> The tests took 4-5 hours to run both locally and in CI, and generated nearly 6MB
> of logs with only 5 failed tests in CI and 2 locally shown below.
> Are any of those test failures particularly significant?
>
> 2023-10-25T22:02:32.5192787Z [ FAILED ] C/AddNoiseTest.CheckNoiseAdded/1,
> where GetParam() = (4.4, 0x100700050) (0 ms)
> 2023-10-25T22:02:32.5937058Z [ FAILED ] 1 test, listed below:
> 2023-10-25T22:02:32.5937965Z [ FAILED ] C/AddNoiseTest.CheckNoiseAdded/1,
> where GetParam() = (4.4, 0x100700050)
> 2023-10-25T22:02:32.5940641Z 1 FAILED TEST
> 2023-10-25T22:50:15.5461070Z [ FAILED ]
> VP9FrameSizeTestsLarge.TestInvalidSizes (4681 ms)
> 2023-10-25T23:08:42.1763744Z [ FAILED ] 1 test, listed below:
> 2023-10-25T23:08:42.1764436Z [ FAILED ] VP9FrameSizeTestsLarge.TestInvalidSizes
> 2023-10-25T23:08:42.1765185Z 1 FAILED TEST
> 2023-10-25T23:08:49.8589827Z [ FAILED ] VP9FrameSizeTestsLarge.ValidSizes
> (4767 ms)
> 2023-10-25T23:27:35.7948274Z [ FAILED ] SSE2/AddNoiseTest.CheckNoiseAdded/1,
> where GetParam() = (4.4, 0x1008fb000) (0 ms)
> 2023-10-25T23:27:35.8472764Z [ FAILED ] 2 tests, listed below:
> 2023-10-25T23:27:35.8473611Z [ FAILED ] VP9FrameSizeTestsLarge.ValidSizes
> 2023-10-25T23:27:35.8474641Z [ FAILED ] SSE2/AddNoiseTest.CheckNoiseAdded/1,
> where GetParam() = (4.4, 0x1008fb000)
> 2023-10-25T23:27:35.8475565Z 2 FAILED TESTS
> 2023-10-26T00:05:24.2865417Z [ FAILED ]
> VP9/RealtimeTest.IntegerOverflowLarge/0, where GetParam() = (0x100c7c9b8, 0)
> (4699 ms)
> 2023-10-26T00:09:14.0673899Z [ FAILED ] 1 test, listed below:
> 2023-10-26T00:09:14.0675351Z [ FAILED ]
> VP9/RealtimeTest.IntegerOverflowLarge/0, where GetParam() = (0x100c7c9b8, 0)
> 2023-10-26T00:09:14.0676513Z 1 FAILED TEST
>
> 15:59:20.817070 00:00:00.000085 [ FAILED ] C/AddNoiseTest.CheckNoiseAdded/1,
> where GetParam() = (4.4, 0x100700050) (0 ms)
> 15:59:20.891232 00:00:00.000019 [ FAILED ] 1 test, listed below:
> 15:59:20.891251 00:00:00.000019 [ FAILED ] C/AddNoiseTest.CheckNoiseAdded/1,
> where GetParam() = (4.4, 0x100700050)
> 15:59:20.891294 00:00:00.000013 1 FAILED TEST
> 17:29:23.984830 00:00:00.000042 [ FAILED ]
> SSE2/AddNoiseTest.CheckNoiseAdded/1, where GetParam() = (4.4, 0x1008fb000) (28 ms)
> 17:29:24.051839 00:00:00.000021 [ FAILED ] 1 test, listed below:
> 17:29:24.051863 00:00:00.000024 [ FAILED ]
> SSE2/AddNoiseTest.CheckNoiseAdded/1, where GetParam() = (4.4, 0x1008fb000)
> 17:29:24.051912 00:00:00.000014 1 FAILED TEST
>
> Thanks for any help you can provide in allowing us to get this updated package
> released.
> The tests took 4-5 hours to run both locally and in CI, and generated nearly 6MB
> of logs with only 5 failed tests in CI and 2 locally shown below.
> Are any of those test failures particularly significant?
>
On Thu, Oct 26, 2023 at 7:30 PM Brian Inglis <Brian....@shaw.ca> wrote:> The tests took 4-5 hours to run both locally and in CI, and generated nearly 6MB
> of logs with only 5 failed tests in CI and 2 locally shown below.
> Are any of those test failures particularly significant?
>It would be helpful to see the error text of the failures. The size related ones should pass on all platforms, unless there's an allocation issue. I'm running a version now.