Linux No longer able to compile from source (could not find required library)
#1
Somewhere between the 13 and 13.1 release I was no longer able to compile XBMC from source. I was able to compile v13 when it was first released (from the Gotham branch). Then, 13.1 was announced and I decided to not to try the betas/RCs so I have not attempted to compile those. When the final 13.1 version was released, I tried to compile that one, with the same procedure as I've used every time with success. But this time, it didn't work...

I'm failing in the "./configure" step with "could not find a required library". The command terminates with something like:
Code:
(...)
checking for TAGLIB... yes
checking for CDIO... yes
checking for LIBBLURAY... yes
checking for libbluray soname... libbluray.so.1
checking for bd_register_argb_overlay_proc in -lbluray... no
checking for library containing iconv_open... no
checking for library containing libiconv_open... no
configure: error: Could not find a required library. Please see the README for your platform.

Here's the full config.log file:
http://pastebin.com/nGynLkX6

I'm not sure that's the problem but I manually downloaded, compiled and installed libiconv from http://www.gnu.org/software/libiconv/, it didn't seem to help though.

In case it's relevant, I always execute the following commands (in that specific order) to compile a new XBMC version:
Code:
git clean -xfd
git reset --hard
git pull --rebase

make -C lib/taglib
sudo make -C lib/taglib install

./bootstrap
./configure --disable-debug --disable-pulse --disable-vaapi --enable-goom
make

sudo make install

Thoughts?
Reply
#2
Can't nobody help me? Sad
Reply
#3
why are you mocking around with taglib, when the error clearly tells you that iconv is the issue?
Reply
#4
(2014-06-19, 10:57)ironic_monkey Wrote: why are you mocking around with taglib, when the error clearly tells you that iconv is the issue?
Are you referring to:

Code:
make -C lib/taglib
sudo make -C lib/taglib install

this?

Because that is on the Linux instructions in the XBMC wiki, I just followed them.

Also, I have no idea what iconv is...
Reply
#5
(lib)iconv is a library performing charset conversions. it is supplied by pretty much any distro running a gnu userland. you seem to have screwed up your system by building it yourself; the library is mssing the zlib you linked it against. i suggest you remove any trace of the one you built, and use your package manager to install the library. my first suspicion would be a missing -dev package, and that you in fact have the runtime already.

also, any modern distro should supply libbluray for you. iirc debian/ubuntu has since 2009 or thereabout, and they are not exactly the fastest to jump on new and shiny stuff. self-built libraries is really not a good idea if you don't know how these things work (no offense, but you seem a bit nub'y Smile)
Reply
#6
(2014-06-19, 22:49)ironic_monkey Wrote: (lib)iconv is a library performing charset conversions. it is supplied by pretty much any distro running a gnu userland. you seem to have screwed up your system by building it yourself; the library is mssing the zlib you linked it against. i suggest you remove any trace of the one you built, and use your package manager to install the library. my first suspicion would be a missing -dev package, and that you in fact have the runtime already.

I was having this issue before even attempting to build the lib myself, so how can that be the problem?

Ho wcan I debug this and find which -dev package that would be?
Reply
#7
i dunno which distro, but search using your package manager. e.g. apt-cache search iconv.

but studying config.log a bit more, this is the cause of your sorrow:

/usr/lib/gcc/x86_64-linux-gnu/4.4.7/../../../x86_64-linux-gnu/libxml2.so: undefined reference to `gzopen64@ZLIB_1.2.3.3'

your libxml2 seems broken. it's not linked to its dependencies (in this case zlib). you could perhaps try

LDFLAGS=-lz ./configure <stuff>

also do a

ldd
/usr/lib/gcc/x86_64-linux-gnu/4.4.7/../../../x86_64-linux-gnu/libxml2.so and pastebin the output.
Reply
#8
Here you go:

Code:
$ ldd /usr/lib/gcc/x86_64-linux-gnu/4.4.7/../../../x86_64-linux-gnu/libxml2.so
        linux-vdso.so.1 (0x00007ffff41ff000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb56e5fb000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007fb56e3e4000)
        liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fb56e1c0000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb56debf000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb56db16000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fb56eb71000)
Reply
#9
hrmf.

readelf -Ws /usr/lib/libz.so.1 | grep gzopen64
Reply
#10
I think I've managed to do it...

Before seeing your latest reply I did a sudo apt-get install zlib1g, which also installed zlib1g-dev. The configure command ran successfully... I'm going to try to compile it now.

I still tried that last command but I got this:

Code:
$ readelf -Ws /usr/lib/libz.so.1 | grep gzopen64
readelf: Error: '/usr/lib/libz.so.1': No such file

So I tried this:

Code:
$ readelf -Ws /lib/x86_64-linux-gnu/libz.so.1 | grep gzopen64
    64: 000000000000d920    13 FUNC    GLOBAL DEFAULT   13 gzopen64@@ZLIB_1.2.3.3
Reply
#11
that's very weird. your first output shows that it has resolved libz.so.1 as /usr/lib/libz.so.1

could it be a stale ld.so.cache? i.e. sudo ldconfig, ldd again, see if path changed.
Reply
#12
Yes, it changed. It probably changed when I upgraded zlib1g.

I'm compiling it right now... I'll report back if I'm successful.

Thanks a lot. I wouldn't know what to do if it weren't for your help Smile
Reply
#13
yay \o/
Reply
#14
Dammit, didn't work...

I get "undefined reference" to libiconv, libiconv_open and libiconv_close during compilation...
Reply
#15
Now I really got it working, hopefully everything is fine...

Just compiled and installed. Ran XBMC, played a video, it seems OK.

What I did was a "make uninstall" on my manually downloaded iconv. That seems to do the trick Smile
Reply

Logout Mark Read Team Forum Stats Members Help
No longer able to compile from source (could not find required library)0