[Android] Build dependencies - can't make progress - [SOLVED]
#1
Hi guys,

I've been meaning to test some PRs so I've setup Ubuntu (VMPlayer) and trying to compile. I can't seem to understand what's wrong. I have followed the android README
and did not forget any parts. I also made sure to be up to date with regards to the change with zipalign and all the build-tools.

Here's my configure command line:
Code:
sudo ./configure --with-tarballs=/opt/xbmc-tarballs --host=arm-linux-androideabi --with-sdk-path=/opt/android-sdk-linux --with-ndk=/opt/android-ndk-r10d --with-toolchain=/opt/arm-linux-androideabi-4.8-vanilla/android-14 --prefix=/opt/xbmc-depends
As you can see, SDK is at /opt/android-sdk-linux (seems to be 21.1.2 or so..)
NDK is at /opt/android-ndk-r10d

I have created the toolchain like in the readme of course with relevant dirs.

Here's my config.log. There are two things that bug me. The first is that CC_FOR_BUILD is set to /usr/bin/gcc (while CC is the cross compiler in the toolchain).
The second thing is that when I run make I actually see it using /usr/bin/gcc which I believe is the wrong thing.

Also, sometimes running it with -j4 will not compile some dependencies. If I use make -C /native/<package> that one will compile.

Eventually I got to this point:
Code:
vogue@ubuntu:~/xbmc/tools/depends$ sudo make
[sudo] password for vogue:
make -C native
make[1]: Entering directory `/home/vogue/xbmc/tools/depends/native'
make -C m4-native
make[2]: Entering directory `/home/vogue/xbmc/tools/depends/native/m4-native'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/vogue/xbmc/tools/depends/native/m4-native'
make -C gettext-native
make[2]: Entering directory `/home/vogue/xbmc/tools/depends/native/gettext-native'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/vogue/xbmc/tools/depends/native/gettext-native'
make -C autoconf-native
make[2]: Entering directory `/home/vogue/xbmc/tools/depends/native/autoconf-native'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/vogue/xbmc/tools/depends/native/autoconf-native'
make -C automake-native
make[2]: Entering directory `/home/vogue/xbmc/tools/depends/native/automake-native'
make -C x86_64-linux-gnu-native
make[3]: Entering directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native'
Making all in lib
make[4]: Entering directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/lib'
Making all in Automake
make[5]: Entering directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/lib/Automake'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/lib/Automake'
Making all in am
make[5]: Entering directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/lib/am'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/lib/am'
make[5]: Entering directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/lib'
make[5]: Nothing to be done for `all-am'.
make[5]: Leaving directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/lib'
make[4]: Leaving directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/lib'
Making all in .
make[4]: Entering directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native'
Making all in contrib
make[4]: Entering directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/contrib'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/contrib'
Making all in doc
make[4]: Entering directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/doc'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/doc'
Making all in m4
make[4]: Entering directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/m4'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/m4'
Making all in tests
make[4]: Entering directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/tests'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native/tests'
make[3]: Leaving directory `/home/vogue/xbmc/tools/depends/native/automake-native/x86_64-linux-gnu-native'
make[2]: Leaving directory `/home/vogue/xbmc/tools/depends/native/automake-native'
make -C libtool-native
make[2]: Entering directory `/home/vogue/xbmc/tools/depends/native/libtool-native'
make -C x86_64-linux-gnu-native
make[3]: Entering directory `/home/vogue/xbmc/tools/depends/native/libtool-native/x86_64-linux-gnu-native'
make  all-recursive
make[4]: Entering directory `/home/vogue/xbmc/tools/depends/native/libtool-native/x86_64-linux-gnu-native'
make[5]: Entering directory `/home/vogue/xbmc/tools/depends/native/libtool-native/x86_64-linux-gnu-native'
make[5]: Leaving directory `/home/vogue/xbmc/tools/depends/native/libtool-native/x86_64-linux-gnu-native'
make[4]: Leaving directory `/home/vogue/xbmc/tools/depends/native/libtool-native/x86_64-linux-gnu-native'
make[3]: Leaving directory `/home/vogue/xbmc/tools/depends/native/libtool-native/x86_64-linux-gnu-native'
make[2]: Leaving directory `/home/vogue/xbmc/tools/depends/native/libtool-native'
make -C pkg-config-native
make[2]: Entering directory `/home/vogue/xbmc/tools/depends/native/pkg-config-native'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/vogue/xbmc/tools/depends/native/pkg-config-native'
make -C yasm-native
make[2]: Entering directory `/home/vogue/xbmc/tools/depends/native/yasm-native'
make -C x86_64-linux-gnu-native
make[3]: Entering directory `/home/vogue/xbmc/tools/depends/native/yasm-native/x86_64-linux-gnu-native'
make[3]: Circular x86insn_nasm.gperf <- x86insn_nasm.gperf dependency dropped.
make[3]: Circular x86insn_gas.gperf <- x86insn_gas.gperf dependency dropped.
make  all-recursive
make[4]: Entering directory `/home/vogue/xbmc/tools/depends/native/yasm-native/x86_64-linux-gnu-native'
Making all in po
make[5]: Entering directory `/home/vogue/xbmc/tools/depends/native/yasm-native/x86_64-linux-gnu-native/po'
make[5]: Leaving directory `/home/vogue/xbmc/tools/depends/native/yasm-native/x86_64-linux-gnu-native/po'
Making all in .
make[5]: Entering directory `/home/vogue/xbmc/tools/depends/native/yasm-native/x86_64-linux-gnu-native'
make[5]: Circular x86insn_nasm.gperf <- x86insn_nasm.gperf dependency dropped.
make[5]: Circular x86insn_gas.gperf <- x86insn_gas.gperf dependency dropped.
make[5]: Leaving directory `/home/vogue/xbmc/tools/depends/native/yasm-native/x86_64-linux-gnu-native'
make[4]: Leaving directory `/home/vogue/xbmc/tools/depends/native/yasm-native/x86_64-linux-gnu-native'
make[3]: Leaving directory `/home/vogue/xbmc/tools/depends/native/yasm-native/x86_64-linux-gnu-native'
make[2]: Leaving directory `/home/vogue/xbmc/tools/depends/native/yasm-native'
make -C cmake-native
make[2]: Entering directory `/home/vogue/xbmc/tools/depends/native/cmake-native'
make -C x86_64-linux-gnu-native
make[3]: Entering directory `/home/vogue/xbmc/tools/depends/native/cmake-native/x86_64-linux-gnu-native'
make[3]: *** No targets specified and no makefile found.  Stop.
make[3]: Leaving directory `/home/vogue/xbmc/tools/depends/native/cmake-native/x86_64-linux-gnu-native'
make[2]: *** [x86_64-linux-gnu-native/bin/cmake] Error 2
make[2]: Leaving directory `/home/vogue/xbmc/tools/depends/native/cmake-native'
make[1]: *** [cmake-native] Error 2
make[1]: Leaving directory `/home/vogue/xbmc/tools/depends/native'
make: *** [native/.installed-x86_64-linux-gnu-native] Error 2
vogue@ubuntu:~/xbmc/tools/depends$

Note - I do have a Makefile under tools/depends/native/cmake-native which is also puzzling to me.

I'm currently stuck and don't know how to proceed. Any help would be very much appreciated. It's been awhile since i've used autotools.
BTW - I've checked out master and have updated everything on git so I believe my working copy is synced properly. I also checked
configure.in and Makefile.in to see if my version is the same as the latest in github.

Here is the config.log file on pastebin:
http://pastebin.com/EjnaTSYn
Reply
#2
Try to do a "make clean" in /home/vogue/xbmc/tools/depends/native/cmake-native, "rm -rf /home/vogue/xbmc/tools/depends/native/cmake-native/x86_64-linux-gnu-native" and retry.
Reply
#3
and don't use sudo.
Reply
#4
(2015-01-26, 13:33)Koying Wrote: Try to do a "make clean" in /home/vogue/xbmc/tools/depends/native/cmake-native, "rm -rf /home/vogue/xbmc/tools/depends/native/cmake-native/x86_64-linux-gnu-native" and retry.

Hi, simple enough, thanks :-). That pulled the tarball and extracted it which now seems to build. At the end it fails because it is set to use system's CURL which cannot be found.
Not sure why this happens - after all the main configure script found CURL in /usr/bin/curl. Weird...
I've exported CURL=/usr/bin/curl and trying again...

(BTW - it's still using /usr/bin/g++ , is that OK?)

Here's the output of make -C ./native/cmake-native :
Code:
- Using system-installed CURL
-- Using system-installed ZLIB
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Could NOT find CURL (missing:  CURL_LIBRARY CURL_INCLUDE_DIR)
CMake Error at CMakeLists.txt:283 (message):
  CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!
Call Stack (most recent call first):
  CMakeLists.txt:515 (CMAKE_BUILD_UTILITIES)


-- Configuring incomplete, errors occurred!
See also "/home/vogue/xbmc/tools/depends/native/cmake-native/x86_64-linux-gnu-native/CMakeFiles/CMakeOutput.log".
See also "/home/vogue/xbmc/tools/depends/native/cmake-native/x86_64-linux-gnu-native/CMakeFiles/CMakeError.log".
---------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
---------------------------------------------
make: *** [x86_64-linux-gnu-native] Error 11
make: Leaving directory `/home/vogue/xbmc/tools/depends/native/cmake-native'
vogue@ubuntu:~/xbmc/tools/depends$

I'm even more puzzled now...

BTW - I also tried git clean and doing everything all over again and I still get this same error.
Reply
#5
sudo apt-get install libcurl4-openssl-dev
Reply
#6
(2015-01-27, 10:55)wsnipex Wrote: sudo apt-get install libcurl4-openssl-dev

thanks wsnipex. I did dump sudo and started over. Gave permissions to the necessary folders in /opt to my non-priviledged user and started again. I had a suspicion that when I run the
scripts with root some files are created by root and also the shell is different (and maybe exported variables).
I tried to export CURL_LIBRARY and still cmake fails (even though I have it in /usr/lib/).

I'll try what you suggested and update. BTW - no one seemed to answer the weird and obvious question - Is it OK that the build is using /usr/bin/gcc/g++ ?
I always thought everything compiles with the cross compiler.

again, thanks!
Reply
#7
some tools are host tools, not target tools. such as cmake. they should use the host compiler..
Reply
#8
Hi guys,

thanks for all the help. After installing libcurl from apt I can build cmake. I basically ran manually through everything under /native to see that it works (for the first time) and aside for some ordering (distribute needs python, etc.) almost everything compiles great.

I noticed a problem though with building tar 1.23 - I get an error which I believe is a bug in the source code of tar. While compiling it it complains:
Code:
#undef gets
_GL_WARN_ON_USE (gets, "fgets is a security hole - use fgets instead")
(in gnu/stdio.h)

It seems rather obvious that when you undef gets you get an error on the next line. What am I missing? :-)
I've seen this with regards to many projects failing to compile and the only solution is to basically remove that warning from stdio.h which I have.

I'm wondering how no one has encountered this problem before. Perhaps it can help someone in the future.

Again, thanks for all the help!
Reply
#9
there definitely is no need to patch anything in depends if you followed the readme for android.
Don't manually build stuff in there, just run bootstrap, configure, make from the top depends dir.
Reply
#10
(2015-01-27, 23:26)wsnipex Wrote: there definitely is no need to patch anything in depends if you followed the readme for android.
Don't manually build stuff in there, just run bootstrap, configure, make from the top depends dir.

That's what I thought too but there's no escaping it - that specific code snippet from tar's stdio.h header has a compilation issue. I don't understand how it can work.
It undefines gets and a line later warns if the symbol is defined. Weird..
Reply
#11
tbh, I don't believe that. Provide the error output you get.
Reply
#12
(2015-01-28, 18:30)wsnipex Wrote: tbh, I don't believe that. Provide the error output you get.

I started fresh by:
Code:
rm -rf ~/xbmc/tools/depends/native/tar-native/x86_64-linux-gnu-native/

Here is the problematic part of the build.
Code:
GEN    wctype.h
make  all-recursive
make[4]: Entering directory `/home/vogue/xbmc/tools/depends/native/tar-native/x86_64-linux-gnu-native/gnu'
make[5]: Entering directory `/home/vogue/xbmc/tools/depends/native/tar-native/x86_64-linux-gnu-native/gnu'
  CC     areadlink-with-size.o
/usr/bin/gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..   -I/opt/xbmc-depends/x86_64-linux-gnu-native/include   -I/opt/xbmc-depends/x86_64-linux-gnu-native/include  -c -o areadlink-with-size.o areadlink-with-size.c
  CC     argp-ba.o
/usr/bin/gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..   -I/opt/xbmc-depends/x86_64-linux-gnu-native/include   -I/opt/xbmc-depends/x86_64-linux-gnu-native/include  -c -o argp-ba.o argp-ba.c
  CC     argp-eexst.o
/usr/bin/gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..   -I/opt/xbmc-depends/x86_64-linux-gnu-native/include   -I/opt/xbmc-depends/x86_64-linux-gnu-native/include  -c -o argp-eexst.o argp-eexst.c
In file included from argp.h:24:0,
                 from argp-eexst.c:27:
./stdio.h:358:1: error: ‘gets’ undeclared here (not in a function)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
^
make[5]: *** [argp-eexst.o] Error 1
make[5]: Leaving directory `/home/vogue/xbmc/tools/depends/native/tar-native/x86_64-linux-gnu-native/gnu'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/vogue/xbmc/tools/depends/native/tar-native/x86_64-linux-gnu-native/gnu'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/vogue/xbmc/tools/depends/native/tar-native/x86_64-linux-gnu-native/gnu'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/vogue/xbmc/tools/depends/native/tar-native/x86_64-linux-gnu-native'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/vogue/xbmc/tools/depends/native/tar-native/x86_64-linux-gnu-native'
make: *** [tar-1.23/src/tar] Error 2
make: Leaving directory `/home/vogue/xbmc/tools/depends/native/tar-native'
vogue@ubuntu:~/xbmc/tools/depends$

Like I said - weird. That warn macro uses the 'gets' symbol which is then undefined. Either there's a real compilation bug or I'm missing something really obvious RoflBig Grin
Reply
#13
right, this tar really doesn't compile. BUT you don't need it, since we happily use the system installed tar.
Thats why I told you to not manually compile anything in native. If you don't have a system tar, please install it with apt-get install tar.
Reply
#14
(2015-01-29, 14:23)wsnipex Wrote: right, this tar really doesn't compile. BUT you don't need it, since we happily use the system installed tar.
Thats why I told you to not manually compile anything in native. If you don't have a system tar, please install it with apt-get install tar.

Just for the sake of completeness - Of course I have a system tar, otherwise I can't untar the tarballs Smile

Is it something I can control with configure? Maybe to do --without-PACKAGE ?

Anyway, thanks for all the help, it was a crash refreshing course in linux build systems which I forgot Smile
Reply
#15
Well as you can see here:

https://github.com/xbmc/xbmc/blob/master...kefile#L16

We only build tar when building for ios or osx (both is only possible on macs and their system tar is wonky). So i am also pretty sure that somehow you built the tar by yourself. Our buildsystem wouldn't have done that automagically.

Once more

make -C tools/depends/native/tar-native distclean

and leave it that way ...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply

Logout Mark Read Team Forum Stats Members Help
[Android] Build dependencies - can't make progress - [SOLVED]0