Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 644464 - media-tv/v4l-utils-1.14.1 : /.../ld: sdlcam-sdlcam.o: undefined reference to symbol jpeg_set_quality@@LIBJPEG_6.2
Summary: media-tv/v4l-utils-1.14.1 : /.../ld: sdlcam-sdlcam.o: undefined reference to ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: James Le Cuirot
URL:
Whiteboard:
Keywords:
: 656522 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-01-13 14:49 UTC by Toralf Förster
Modified: 2021-01-05 21:44 UTC (History)
18 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,17.55 KB, text/plain)
2018-01-13 14:50 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,274.10 KB, text/plain)
2018-01-13 14:50 UTC, Toralf Förster
Details
environment (environment,93.01 KB, text/plain)
2018-01-13 14:50 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,23.97 KB, application/x-bzip)
2018-01-13 14:50 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,13.70 KB, application/x-bzip)
2018-01-13 14:50 UTC, Toralf Förster
Details
media-tv:v4l-utils-1.14.1:20180113-141538.log (media-tv:v4l-utils-1.14.1:20180113-141538.log,131.63 KB, text/plain)
2018-01-13 14:50 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,32.58 KB, application/x-bzip)
2018-01-13 14:50 UTC, Toralf Förster
Details
Patch contrib/test/Makefile.am (0001-sdlcam-Only-build-if-using-libjpeg.patch,1.26 KB, patch)
2018-01-14 20:19 UTC, Chris Mayo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2018-01-13 14:49:59 UTC
/bin/sh ../../libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -I../.. -D_REENTRANT -I/usr/include/SDL2 -O2 -pipe -march=native -Wall  -lSDL2_image -lSDL2 -lm -ldl -lrt -Wl,-O1 -Wl,--as-needed -o sdlcam sdlcam-sdlcam.o ../../lib/libv4l2/libv4l2.la  ../../lib/libv4lconvert/libv4lconvert.la 
libtool: link: x86_64-pc-linux-gnu-gcc -I../.. -D_REENTRANT -I/usr/include/SDL2 -O2 -pipe -march=native -Wall -Wl,-O1 -Wl,--as-needed -o .libs/sdlcam sdlcam-sdlcam.o  -lSDL2_image -lSDL2 -lm -ldl -lrt ../../lib/libv4l2/.libs/libv4l2.so ../../lib/libv4lconvert/.libs/libv4lconvert.so
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: sdlcam-sdlcam.o: undefined reference to symbol 'jpeg_set_quality@@LIBJPEG_6.2'
/usr/lib64/libjpeg.so.62: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:558: sdlcam] Error 1

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0-desktop-plasma_libressl_20180106-201622

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.2.0 *

Available Python interpreters, in order of preference:
  [1]   python3.5
  [2]   python3.6 (fallback)
  [3]   python2.7 (fallback)
  [4]   pypy3 (fallback)
  [5]   pypy (fallback)
Available Ruby profiles:
  [1]   ruby22 (with Rubygems) *
java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.6.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpv media-tv/v4l-utils
[ebuild  N    ] media-tv/v4l-utils-1.12.5  USE="qt5"
Comment 1 Toralf Förster gentoo-dev 2018-01-13 14:50:02 UTC
Created attachment 514642 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2018-01-13 14:50:05 UTC
Created attachment 514644 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2018-01-13 14:50:08 UTC
Created attachment 514646 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2018-01-13 14:50:11 UTC
Created attachment 514648 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2018-01-13 14:50:13 UTC
Created attachment 514650 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2018-01-13 14:50:16 UTC
Created attachment 514652 [details]
media-tv:v4l-utils-1.14.1:20180113-141538.log
Comment 7 Toralf Förster gentoo-dev 2018-01-13 14:50:19 UTC
Created attachment 514654 [details]
temp.tbz2
Comment 8 Chris Mayo 2018-01-14 20:19:55 UTC
Created attachment 514814 [details, diff]
Patch contrib/test/Makefile.am

Sent upstream.

Patching contrib/test/Makefile.am, obviously needs an eautoreconf to use in ebuild.
Comment 9 Attila Tóth 2018-01-16 13:59:16 UTC
I'm missing an -ljpeg here for linking the sdlcam binary in contrib/test...
Comment 10 Wojciech Myrda 2018-02-14 19:17:03 UTC
Its been a month when patch is available. Any reason it is not in the tree yet?

Besides, why do we force disabling jpeg while building v4l-utils? It builds just fine with that library. Shouldn't users have jpeg flag available instead?
Comment 11 Wojciech Myrda 2018-02-14 19:21:29 UTC
Portage now also says following after installation:

 * QA Notice: new icons were found installed but GTK+ icon cache
 * has not been updated:
 *   /usr/share/icons/hicolor/24x24/apps/qv4l2.png
 *   /usr/share/icons/hicolor/16x16/apps/qv4l2.png
 *   /usr/share/icons/hicolor/64x64/apps/qv4l2.png
 *   /usr/share/icons/hicolor/scalable/apps/qv4l2.svg
 *   /usr/share/icons/hicolor/32x32/apps/qv4l2.png
 * Please make sure to call gnome2_icon_cache_update()
 * in pkg_postinst() and pkg_postrm() phases of appropriate pkgs.

so slight addition to the end of the ebuild would be welcomed:

pkg_postinst() {
          gnome2_icon_cache_update()
}
pkg_postrm()  {
          gnome2_icon_cache_update()
}
Comment 12 Andrew Ammerlaan gentoo-dev 2018-02-24 10:09:42 UTC
I added the patch in comment 8, but it just gives me the exact same error again. Are there some extra steps necessary for applying this patch?
(yes, I checked that user patches were applied)

/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: sdlcam-sdlcam.o: undefined reference to symbol 'jpeg_set_quality@@LIBJPEG_6.2'
/usr/lib64/libjpeg.so.62: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Comment 13 Attila Tóth 2018-02-24 10:49:53 UTC
(In reply to Andrew Ammerlaan from comment #12)
> I added the patch in comment 8, but it just gives me the exact same error
> again. Are there some extra steps necessary for applying this patch?
> (yes, I checked that user patches were applied)
> 
> /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../x86_64-pc-linux-gnu/bin/
> ld: sdlcam-sdlcam.o: undefined reference to symbol
> 'jpeg_set_quality@@LIBJPEG_6.2'
> /usr/lib64/libjpeg.so.62: error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status

I think comment 8 patch is not enough on its own. See comment 9: -ljpeg is also required while linking - where you are experiencing difficulties.
Comment 14 Chris Mayo 2018-02-24 20:16:04 UTC
It is necessary to create a new ebuild. As noted in comment 8 eautoreconf (and therefore inherit autotools) is needed, e.g.:

src_prepare() {
	default
	eautoreconf
}


Patch is now marked accepted in patchwork:
https://patchwork.linuxtv.org/patch/46467/

but not yet committed.
Comment 15 Andrew Ammerlaan gentoo-dev 2018-02-24 21:00:02 UTC
Thank you, that worked. Sorry to bother you guys with this, I did not know what this eautoreconf referenced in comment 8 was, I do now :)
Comment 16 mael 2018-04-12 07:01:00 UTC
This exact bug is still existent with gcc-7.3.0-r1. when we can expect a solution? :-)
Comment 17 Thomas Capricelli 2018-09-30 19:27:34 UTC
Not the same symbol, but really looks like the same problem

libtool: link: x86_64-pc-linux-gnu-gcc -I../.. -D_REENTRANT -I/usr/include/SDL2 -march=native -pipe -O2 -Wl,-O1 -Wl,--as-needed -o .libs/sdlcam sdlcam-sdlcam.o  -lSDL2_image -lSDL2 -lm -ldl -lrt ../../lib/libv4l2/.libs/libv4l2.so ../../lib/libv4lconvert/.libs/libv4lconvert.so
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: sdlcam-sdlcam.o: undefined reference to symbol 'jpeg_set_defaults@@LIBJPEG_6.2'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libjpeg.so.62: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:558: sdlcam] Error 1

I'm using sys-devel/gcc-7.3.0-r3 and media-libs/libjpeg-turbo-2.0.0
Comment 18 Thomas Capricelli 2018-09-30 20:09:14 UTC
Even applying the patch for Makefile.am and patching the ebuild for autoreconf, and it's still not working. Where should this -ljpeg be added ? Can someone fix this ebuild, please.. ?
Comment 19 Thomas Capricelli 2018-09-30 20:19:16 UTC
1.12.5 is ok. Please remove, hard-mask or whatever the 1.14 ebuild, that will help anyone trying to emerge this package.
Comment 20 johannes.walcher 2018-12-17 10:00:06 UTC
for me it worked fine after removing "--without-jpeg \" from the econf.
Comment 21 Attila Tóth 2019-03-10 10:53:01 UTC
1.16.3-r1 works for me. It has --with-jpeg instead of --without-jpeg and also has xdg_icon_cache_update for postinst and postrm.
Comment 22 James Le Cuirot gentoo-dev 2020-12-27 16:48:19 UTC
*** Bug 656522 has been marked as a duplicate of this bug. ***
Comment 23 James Le Cuirot gentoo-dev 2020-12-27 16:50:18 UTC
I don't think this is an issue, at least as of 1.20. We always pass --with-jpeg and the upstream Makefile only builds sdlcam when libjpeg is present now.