Kodi Community Forum

Full Version: Libiconv missing - unable to compile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I'm trying to compile but no success. Configure output:

Code:
Checking support/features
  checking for cc execinfo.h ...                    ok
  checking for cc -mmmx ...                         ok
  checking for cc -msse2 ...                        ok
  checking for cc getloadavg ...                    ok
  checking for cc atomic64 ...                      ok
  checking for cc lockowner ...                     ok
  checking for cc qsort_r ...                       ok
  checking for cc recvmmsg ...                      ok
  checking for cc libiconv ...                      fail
  checking for py module gzip ...                   ok
  checking for bzip2 ...                            ok
  checking for pkg openssl  ...                     ok
  checking for cc linux/dvb/version.h ...           ok
  checking for pkg zlib  ...                        ok
  checking for pkg liburiparser  ...                ok
  checking for pkg avahi-client  ...                ok
  checking for pkg libavcodec >=52.96.0 ...         ok
  checking for pkg libavutil >=50.43.0 ...          ok
  checking for pkg libavformat >=53.10.0 ...        ok
  checking for pkg libswscale >=0.13.0 ...          ok
  checking for cc sys/inotify.h ...                 ok
  fetching dvb-scan files ...                       ok
  checking for pkg dbus-1  ...                      ok

There is no any libiconv in debian or ubuntu. There is libiconv-hook I assumed it;s the same so I installed it and tried to compile. Unfortunately, it doesn't compile:

Code:
CC              src/descrambler/ffdecsa/ffdecsa_interface.o
src/plumbing/transcoding.c: In function ‘transcoder_stream_audio’:
src/plumbing/transcoding.c:309:3: error: implicit declaration of function ‘avcodec_decode_audio3’ [-Werror=implicit-function-declaration]
   if ((length = avcodec_decode_audio3(ictx, samples, &len, &packet)) <= 0) {
   ^
src/plumbing/transcoding.c:411:5: error: implicit declaration of function ‘avcodec_encode_audio’ [-Werror=implicit-function-declaration]
     length = avcodec_encode_audio(octx,
     ^
src/plumbing/transcoding.c: In function ‘transcoder_stream_video’:
src/plumbing/transcoding.c:673:3: error: implicit declaration of function ‘avcodec_encode_video’ [-Werror=implicit-function-declaration]
   length = avcodec_encode_video(octx, out, len, vs->vid_enc_frame);
   ^
CC              src/descrambler/ffdecsa/ffdecsa_int.o
CC              src/descrambler/ffdecsa/ffdecsa_mmx.o
CC              src/descrambler/ffdecsa/ffdecsa_sse2.o
CC              src/descrambler/libaesdec/libaesdec.o
CC              src/dbus.o
CC              src/version.o
cc1: all warnings being treated as errors
Makefile:367: polecenia dla obiektu '/home/michal/tvheadend/tvheadend/build.linux/src/plumbing/transcoding.o' nie powiodły się
make: *** [/home/michal/tvheadend/tvheadend/build.linux/src/plumbing/transcoding.o] Błąd 1
make: *** Oczekiwanie na niezakończone zadania....

Please tell mi WHAT IS ICONV? Where to get it (sources?) or maybe problem is in anything else? If you used some not widely available libraries, didn't you consider to add it to your code?
libiconv is missing on my system and TVH compiles absolutely fine with no errors.

But I'm guessing you're not using English as your main language? and libiconv seems to be related to international character encoding.

"For historical reasons, international text is often encoded using a language or country dependent character encoding. With the advent of the internet and the frequent exchange of text across countries - even the viewing of a web page from a foreign country is a "text exchange" in this context -, conversions between these encodings have become important. They have also become a problem, because many characters which are present in one encoding are absent in many other encodings. To solve this mess, the Unicode encoding has been created. It is a super-encoding of all others and is therefore the default encoding for new text formats like XML.
Still, many computers still operate in locale with a traditional (limited) character encoding. Some programs, like mailers and web browsers, must be able to convert between a given text encoding and the user's encoding. Other programs internally store strings in Unicode, to facilitate internal processing, and need to convert between internal string representation (Unicode) and external string representation (a traditional encoding) when they are doing I/O. GNU libiconv is a conversion library for both kinds of applications."

So it may be related to your issue.
Ok but compilation error is related to some transcoding stuff. All dependencies are ok (except libiconv). So what's the problem?

implicit declaration of function ‘avcodec_encode_video’ so avcodec_encode_video is not found, some other library missing/wrong version?

https://code.google.com/p/dolphin-emu/is...il?id=5851 according to this, that function is deprecated so it's probably dropped in modern distros?

I installed tvh from deb and I just noticed that requesting transcoded stream causes segmentation fault in tvh, now I finally know why - tvh seems to use stuff already dropped from libav, at least on Debian
It's a bug in tvheadend and has nothing to do with libiconv, which is actually not needed, this is the relevant bug report: https://tvheadend.org/issues/2269

If you compile with --disable-libav it works, but you lose transcoding.
I don't really need transcoding. But what's the problem with libav and how to solve it? There are no "avcodec_encode_video" and "avcodec_encode_audio" in my libav dev library and it causes problems with compilation. And segmentation fault at runtime.
They're not in your libav anymore, but tvheadend still relies on them, since they were in older libav versions. "./configure --disable-libav" solves the compilation error.
Seems you are right, so I can only suggest for dev to fix this or embed their own libav
Did it work if you compiled with ./configure --disable-libav?
I'll try and let you know. But what if I want to have transcoding support? I suspected something like this (disable transcoding) but configure --help didn't display option for disable transcoding. Then I didn't try anymore because I found your deb repo and installed deb taken from it. However, I noticed some autostart issues with systemd on Debian Sid (init.d script hangs), so I disabled autostart and I don't use init.d script to start (I don't really need tvheadend to be started automatically).

Also how Wheezy (debian) packages was compiled? Without transcoding or with older libav?
I think the Wheezy packages are compiled with transcoding enabled, the libav version shipped in Wheezy is compatible.
Ok, but transcoding will not work with newer libav on Sid
Correct.
How to get it working on most recent systems? Does it work on Ubuntu? Ubuntu includes newer version than Debian (Ubuntu trusty comes with 6:11~beta1-2 today)
There's a PR which will support libav11 beta but for now there's no way to make it work, that's just the way it is.
Libav 11 is already stable (11-1 in Debian Sid and Jessie - testing). So if I understand correctly, I need libav10 to get transcoding working with tvh, 11 is not supported yet.
Pages: 1 2