Bug 267163 - graphics/libyuv: shared library is broken: Undefined symbol "jpeg_resync_to_restart" (missing -ljpeg)
Summary: graphics/libyuv: shared library is broken: Undefined symbol "jpeg_resync_to_r...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL:
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2022-10-18 00:02 UTC by Jan Beich
Modified: 2023-05-07 05:19 UTC (History)
3 users (show)

See Also:
jbeich: merge-quarterly+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2022-10-18 00:02:43 UTC
$ echo 'int main() {}' >a.c
$ cc a.c /usr/local/lib/libyuv.so
$ ./a.out
ld-elf.so.1: /usr/local/lib/libyuv.so: Undefined symbol "jpeg_resync_to_restart"

$ make clean test WITH=LIBYUV -C graphics/libavif
[...]
73% tests passed, 3 tests failed out of 11

Total Test time (real) =   8.94 sec

The following tests FAILED:
          1 - aviftest (Failed)
          2 - avifyuv_limited (Failed)
          3 - avifyuv_rgb (Failed)

$ cat `make -V TEST_WRKSRC`/Testing/Temporary/LastTest.log
[...]
----------------------------------------------------------
1/11 Testing: aviftest
1/11 Test: aviftest
Command: "/wrkdirs/usr/ports/graphics/libavif/work/.build/tests/aviftest" "/wrkdirs/usr/ports/graphics/libavif/work/libavif-0.11.0/tests/data"
Directory: /wrkdirs/usr/ports/graphics/libavif/work/.build/tests
"aviftest" start time: Oct 18 00:00 UTC
Output:
----------------------------------------------------------
ld-elf.so.1: /usr/local/lib/libyuv.so: Undefined symbol "jpeg_resync_to_restart"
<end of output>
Test time =   0.00 sec
----------------------------------------------------------
Test Failed.
"aviftest" end time: Oct 18 00:00 UTC
"aviftest" time elapsed: 00:00:00
----------------------------------------------------------

2/11 Testing: avifyuv_limited
2/11 Test: avifyuv_limited
Command: "/wrkdirs/usr/ports/graphics/libavif/work/.build/tests/avifyuv" "-m" "limited"
Directory: /wrkdirs/usr/ports/graphics/libavif/work/.build/tests
"avifyuv_limited" start time: Oct 18 00:00 UTC
Output:
----------------------------------------------------------
ld-elf.so.1: /usr/local/lib/libyuv.so: Undefined symbol "jpeg_resync_to_restart"
<end of output>
Test time =   0.00 sec
----------------------------------------------------------
Test Failed.
"avifyuv_limited" end time: Oct 18 00:00 UTC
"avifyuv_limited" time elapsed: 00:00:00
----------------------------------------------------------

3/11 Testing: avifyuv_rgb
3/11 Test: avifyuv_rgb
Command: "/wrkdirs/usr/ports/graphics/libavif/work/.build/tests/avifyuv" "-m" "rgb"
Directory: /wrkdirs/usr/ports/graphics/libavif/work/.build/tests
"avifyuv_rgb" start time: Oct 18 00:00 UTC
Output:
----------------------------------------------------------
ld-elf.so.1: /usr/local/lib/libyuv.so: Undefined symbol "jpeg_resync_to_restart"
<end of output>
Test time =   0.00 sec
----------------------------------------------------------
Test Failed.
"avifyuv_rgb" end time: Oct 18 00:00 UTC
"avifyuv_rgb" time elapsed: 00:00:00
----------------------------------------------------------
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2022-10-18 05:08:36 UTC
^Triage: reporter is committer, assign accordingly.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-05-07 05:19:11 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=78d127100976a6e431088b58b887c297ccf87573

commit 78d127100976a6e431088b58b887c297ccf87573
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-05-07 05:10:21 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-05-07 05:18:26 +0000

    graphics/libyuv: track libjpeg dependency

    -- Found JPEG: /usr/local/lib/libjpeg.so (found version "80")
    [...]
    Error: /usr/local/bin/yuvconvert is linked to /usr/local/lib/libjpeg.so.8 from graphics/jpeg-turbo but it is not declared as a dependency
    Warning: you need USES+=jpeg

    PR:             267163

 graphics/libyuv/Makefile                         |  7 +++++++
 graphics/libyuv/files/patch-CMakeLists.txt (new) | 18 ++++++++++++++++++
 2 files changed, 25 insertions(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-05-07 05:19:12 UTC
A commit in branch 2023Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c5c27487bb1bf1e4df343a7a2f976c3cf73b5d78

commit c5c27487bb1bf1e4df343a7a2f976c3cf73b5d78
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-05-07 05:10:21 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-05-07 05:18:53 +0000

    graphics/libyuv: track libjpeg dependency

    -- Found JPEG: /usr/local/lib/libjpeg.so (found version "80")
    [...]
    Error: /usr/local/bin/yuvconvert is linked to /usr/local/lib/libjpeg.so.8 from graphics/jpeg-turbo but it is not declared as a dependency
    Warning: you need USES+=jpeg

    PR:             267163
    (cherry picked from commit 78d127100976a6e431088b58b887c297ccf87573)

 graphics/libyuv/Makefile                         |  7 +++++++
 graphics/libyuv/files/patch-CMakeLists.txt (new) | 18 ++++++++++++++++++
 2 files changed, 25 insertions(+)