linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* v4l-utils  undefined symbol: dvb_dev_alloc
@ 2019-10-12 17:28 _ _ _ _ _
  2019-10-12 18:02 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 4+ messages in thread
From: _ _ _ _ _ @ 2019-10-12 17:28 UTC (permalink / raw)
  To: linux-media; +Cc: Clangers

I've been waiting for a working version of DVB-S2 capable tools and utilities to appear in a stable release of Mint\x10, but  it hasn't happened yet, so I decided to build the latest stable v4l-utils from source.

I built v4l-utils version 1.18.0 on Linux Mint 18.3

the compilation process appeared to run through OK with only 9 warnings (see below), but the resulting executables fail due to a lib ref issue.
configure: WARNING: doxygen not found - will not generate any doxygen documentation
configure: WARNING: libelf library not available
configure: WARNING: Qt5 or higher is not available
configure: WARNING: ALSA library not available
  CC       control/libv4lconvert_la-libv4lcontrol.lo
control/libv4lcontrol.c: In function ‘v4lcontrol_create’:
control/libv4lcontrol.c:728:3: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
   ftruncate(shm_fd, V4LCONTROL_SHM_SIZE);
   ^
libtool: warning: relinking 'libv4l2.la'
libtool: warning: relinking 'v4l2convert.la'
libtool: warning: relinking 'libv4l1.la'
libtool: warning: relinking 'v4l1compat.la'

Most of these look insignificant but the fifth one looks a bit worrying.

End result :-

stupiduser@somehost ~ $ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 2016060

stupiduser@somehost ~ $ dvbv5-scan -V
dvbv5-scan version 1.18.0

stupiduser@somehost ~ $ dvbv5-scan /usr/share/dvb/dvb-s/Astra-28.2E
dvbv5-scan: symbol lookup error: dvbv5-scan: undefined symbol: dvb_dev_alloc

stupiduser@somehost ~ $ dvb-fe-tool -m -a0 
dvb-fe-tool: symbol lookup error: dvb-fe-tool: undefined symbol: dvb_dev_alloc

- - - - - - - - 

I've appended a bunch of links that refer to C versus C++ declarations.

Is it really necessary for me "a user" to change all the source code references to the suggested form just to get it work. 
Surely there must be a stupid mistake that I've made instead.



Refs to the compiler declaration issues:

https://stackoverflow.com/questions/53322164/linking-shared-library-libdvbv5-undefined-reference

https://stackoverflow.com/questions/18877437/undefined-reference-to-errors-when-linking-static-c-library-with-c-code

https://stackoverflow.com/questions/1041866/what-is-the-effect-of-extern-c-in-c/1041880#1041880

https://github.com/gjasny/v4l-utils/blob/master/lib/libdvbv5/dvb-fe.c




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: v4l-utils  undefined symbol: dvb_dev_alloc
  2019-10-12 17:28 v4l-utils undefined symbol: dvb_dev_alloc _ _ _ _ _
@ 2019-10-12 18:02 ` Mauro Carvalho Chehab
  2019-10-12 18:47   ` _ _ _ _ _
  2019-10-13 18:45   ` _ _ _ _ _
  0 siblings, 2 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2019-10-12 18:02 UTC (permalink / raw)
  To: clangers; +Cc: linux-media

Em Sat, 12 Oct 2019 18:28:41 +0100
_ _ _ _ _ <clangers@toucansurf.com> escreveu:

> I've been waiting for a working version of DVB-S2 capable tools and utilities to appear in a stable release of Mint\x10, but  it hasn't happened yet, so I decided to build the latest stable v4l-utils from source.
> 
> I built v4l-utils version 1.18.0 on Linux Mint 18.3
> 
> the compilation process appeared to run through OK with only 9 warnings (see below), but the resulting executables fail due to a lib ref issue.
> configure: WARNING: doxygen not found - will not generate any doxygen documentation
> configure: WARNING: libelf library not available
> configure: WARNING: Qt5 or higher is not available
> configure: WARNING: ALSA library not available
>   CC       control/libv4lconvert_la-libv4lcontrol.lo
> control/libv4lcontrol.c: In function ‘v4lcontrol_create’:
> control/libv4lcontrol.c:728:3: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
>    ftruncate(shm_fd, V4LCONTROL_SHM_SIZE);
>    ^
> libtool: warning: relinking 'libv4l2.la'
> libtool: warning: relinking 'v4l2convert.la'
> libtool: warning: relinking 'libv4l1.la'
> libtool: warning: relinking 'v4l1compat.la'
> 
> Most of these look insignificant but the fifth one looks a bit worrying.

Shouldn't have any real consequence. it is just because there's nothing
like:

	ret = ftruncate(...)
	if (ret) {
		/* some error handling logic */
	}

> 
> End result :-
> 
> stupiduser@somehost ~ $ gcc --version
> gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 2016060
> 
> stupiduser@somehost ~ $ dvbv5-scan -V
> dvbv5-scan version 1.18.0
> 
> stupiduser@somehost ~ $ dvbv5-scan /usr/share/dvb/dvb-s/Astra-28.2E
> dvbv5-scan: symbol lookup error: dvbv5-scan: undefined symbol: dvb_dev_alloc
> 
> stupiduser@somehost ~ $ dvb-fe-tool -m -a0 
> dvb-fe-tool: symbol lookup error: dvb-fe-tool: undefined symbol: dvb_dev_alloc

Probably you have an older version of DVB libraries installed on
your machine. It is trying to use the older library when you try
to run it.

There are some ways of solving it:

1) Make configure to override the old library with:

	./configure --prefix=/usr

(the default is to install it at /usr/local)

2) Ensure that the dynamic linker will use the libraries from
/usr/local

Depending on how your distro is set, you could need to add a
new file at /etc/ld.so.conf.d/, in order to teach the dynamic
linker to use the /usr/local/lib directory to seek for libraries.

For example, create a "/etc/ld.so.conf.d/local.conf" file, and make the
system use it by running, as root:

	# echo "/usr/local/lib" > /etc/ld.so.conf.d/local.conf
	# ldconfig 

PS.: You may need to remove a previous install of the V4L and DVB
libs, in order to avoid any conflicts.

3) use the environment var LD_LIBRARY_PATH in order to add 
/usr/local/lib to the list of directories it will seek for a 
library.

Thanks,
Mauro

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: v4l-utils  undefined symbol: dvb_dev_alloc
  2019-10-12 18:02 ` Mauro Carvalho Chehab
@ 2019-10-12 18:47   ` _ _ _ _ _
  2019-10-13 18:45   ` _ _ _ _ _
  1 sibling, 0 replies; 4+ messages in thread
From: _ _ _ _ _ @ 2019-10-12 18:47 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media

Great, I'll try what you suggest.
Regards
Carl

> On 12 Oct 2019, at 19:02, Mauro Carvalho Chehab <mchehab+samsung@kernel.org> wrote:
> 
> Em Sat, 12 Oct 2019 18:28:41 +0100
> _ _ _ _ _ <clangers@toucansurf.com> escreveu:
> 
>> I've been waiting for a working version of DVB-S2 capable tools and utilities to appear in a stable release of Mint\x10, but  it hasn't happened yet, so I decided to build the latest stable v4l-utils from source.
>> 
>> I built v4l-utils version 1.18.0 on Linux Mint 18.3
>> 
>> the compilation process appeared to run through OK with only 9 warnings (see below), but the resulting executables fail due to a lib ref issue.
>> configure: WARNING: doxygen not found - will not generate any doxygen documentation
>> configure: WARNING: libelf library not available
>> configure: WARNING: Qt5 or higher is not available
>> configure: WARNING: ALSA library not available
>>  CC       control/libv4lconvert_la-libv4lcontrol.lo
>> control/libv4lcontrol.c: In function ‘v4lcontrol_create’:
>> control/libv4lcontrol.c:728:3: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
>>   ftruncate(shm_fd, V4LCONTROL_SHM_SIZE);
>>   ^
>> libtool: warning: relinking 'libv4l2.la'
>> libtool: warning: relinking 'v4l2convert.la'
>> libtool: warning: relinking 'libv4l1.la'
>> libtool: warning: relinking 'v4l1compat.la'
>> 
>> Most of these look insignificant but the fifth one looks a bit worrying.
> 
> Shouldn't have any real consequence. it is just because there's nothing
> like:
> 
> 	ret = ftruncate(...)
> 	if (ret) {
> 		/* some error handling logic */
> 	}
> 
>> 
>> End result :-
>> 
>> stupiduser@somehost ~ $ gcc --version
>> gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 2016060
>> 
>> stupiduser@somehost ~ $ dvbv5-scan -V
>> dvbv5-scan version 1.18.0
>> 
>> stupiduser@somehost ~ $ dvbv5-scan /usr/share/dvb/dvb-s/Astra-28.2E
>> dvbv5-scan: symbol lookup error: dvbv5-scan: undefined symbol: dvb_dev_alloc
>> 
>> stupiduser@somehost ~ $ dvb-fe-tool -m -a0 
>> dvb-fe-tool: symbol lookup error: dvb-fe-tool: undefined symbol: dvb_dev_alloc
> 
> Probably you have an older version of DVB libraries installed on
> your machine. It is trying to use the older library when you try
> to run it.
> 
> There are some ways of solving it:
> 
> 1) Make configure to override the old library with:
> 
> 	./configure --prefix=/usr
> 
> (the default is to install it at /usr/local)
> 
> 2) Ensure that the dynamic linker will use the libraries from
> /usr/local
> 
> Depending on how your distro is set, you could need to add a
> new file at /etc/ld.so.conf.d/, in order to teach the dynamic
> linker to use the /usr/local/lib directory to seek for libraries.
> 
> For example, create a "/etc/ld.so.conf.d/local.conf" file, and make the
> system use it by running, as root:
> 
> 	# echo "/usr/local/lib" > /etc/ld.so.conf.d/local.conf
> 	# ldconfig 
> 
> PS.: You may need to remove a previous install of the V4L and DVB
> libs, in order to avoid any conflicts.
> 
> 3) use the environment var LD_LIBRARY_PATH in order to add 
> /usr/local/lib to the list of directories it will seek for a 
> library.
> 
> Thanks,
> Mauro


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: v4l-utils  undefined symbol: dvb_dev_alloc
  2019-10-12 18:02 ` Mauro Carvalho Chehab
  2019-10-12 18:47   ` _ _ _ _ _
@ 2019-10-13 18:45   ` _ _ _ _ _
  1 sibling, 0 replies; 4+ messages in thread
From: _ _ _ _ _ @ 2019-10-13 18:45 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media

I originally built using
./configure --prefix=/usr --sysconfdir=/etc --disable-static && make

so adapting your instructions and putting /usr/lib in /etc/ld.so.conf.d/local.conf and then executing ldconfig were the essential steps that fixed it.

Thanks.

> On 12 Oct 2019, at 19:02, Mauro Carvalho Chehab <mchehab+samsung@kernel.org> wrote:
> 
> Em Sat, 12 Oct 2019 18:28:41 +0100
> _ _ _ _ _ <clangers@toucansurf.com> escreveu:
> 
>> I've been waiting for a working version of DVB-S2 capable tools and utilities to appear in a stable release of Mint\x10, but  it hasn't happened yet, so I decided to build the latest stable v4l-utils from source.
>> 
>> I built v4l-utils version 1.18.0 on Linux Mint 18.3
>> 
>> the compilation process appeared to run through OK with only 9 warnings (see below), but the resulting executables fail due to a lib ref issue.
>> configure: WARNING: doxygen not found - will not generate any doxygen documentation
>> configure: WARNING: libelf library not available
>> configure: WARNING: Qt5 or higher is not available
>> configure: WARNING: ALSA library not available
>>  CC       control/libv4lconvert_la-libv4lcontrol.lo
>> control/libv4lcontrol.c: In function ‘v4lcontrol_create’:
>> control/libv4lcontrol.c:728:3: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
>>   ftruncate(shm_fd, V4LCONTROL_SHM_SIZE);
>>   ^
>> libtool: warning: relinking 'libv4l2.la'
>> libtool: warning: relinking 'v4l2convert.la'
>> libtool: warning: relinking 'libv4l1.la'
>> libtool: warning: relinking 'v4l1compat.la'
>> 
>> Most of these look insignificant but the fifth one looks a bit worrying.
> 
> Shouldn't have any real consequence. it is just because there's nothing
> like:
> 
> 	ret = ftruncate(...)
> 	if (ret) {
> 		/* some error handling logic */
> 	}
> 
>> 
>> End result :-
>> 
>> stupiduser@somehost ~ $ gcc --version
>> gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 2016060
>> 
>> stupiduser@somehost ~ $ dvbv5-scan -V
>> dvbv5-scan version 1.18.0
>> 
>> stupiduser@somehost ~ $ dvbv5-scan /usr/share/dvb/dvb-s/Astra-28.2E
>> dvbv5-scan: symbol lookup error: dvbv5-scan: undefined symbol: dvb_dev_alloc
>> 
>> stupiduser@somehost ~ $ dvb-fe-tool -m -a0 
>> dvb-fe-tool: symbol lookup error: dvb-fe-tool: undefined symbol: dvb_dev_alloc
> 
> Probably you have an older version of DVB libraries installed on
> your machine. It is trying to use the older library when you try
> to run it.
> 
> There are some ways of solving it:
> 
> 1) Make configure to override the old library with:
> 
> 	./configure --prefix=/usr
> 
> (the default is to install it at /usr/local)
> 
> 2) Ensure that the dynamic linker will use the libraries from
> /usr/local
> 
> Depending on how your distro is set, you could need to add a
> new file at /etc/ld.so.conf.d/, in order to teach the dynamic
> linker to use the /usr/local/lib directory to seek for libraries.
> 
> For example, create a "/etc/ld.so.conf.d/local.conf" file, and make the
> system use it by running, as root:
> 
> 	# echo "/usr/local/lib" > /etc/ld.so.conf.d/local.conf
> 	# ldconfig 
> 
> PS.: You may need to remove a previous install of the V4L and DVB
> libs, in order to avoid any conflicts.
> 
> 3) use the environment var LD_LIBRARY_PATH in order to add 
> /usr/local/lib to the list of directories it will seek for a 
> library.
> 
> Thanks,
> Mauro


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-13 18:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-12 17:28 v4l-utils undefined symbol: dvb_dev_alloc _ _ _ _ _
2019-10-12 18:02 ` Mauro Carvalho Chehab
2019-10-12 18:47   ` _ _ _ _ _
2019-10-13 18:45   ` _ _ _ _ _

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).