endpwent import error
#1
Hello.

I am trying to build android apk from sources and have this linking error:

Quote:CPP xbmc/CompileInfo.o
AR xbmc/xbmc.a
LD libkodi.so
/opt/xbmc-depends/arm-linux-androideabi-android-17/lib/mysql/libmysqlclient.a(mf_pack.o):mf_pack.c:function unpack_dirname: error: undefined reference to 'endpwent'
collect2: error: ld returned 1 exit status
Makefile:429: recipe for target 'libkodi.so' failed
make: *** [libkodi.so] Error 1

This is strange, because 'nm /opt/android-toolchain-arm/android-17/sysroot/usr/lib/libc.so | grep endpwent' return nothing.
I am using android-ndk-r11c from official site and latest sdk version: https://dl.google.com/android/android-sd...-linux.tgz
Must I use previous version of ndk?

My build machine: Linux 4.4.0-24-generic #43-Ubuntu SMP x86_64 GNU/Linux
Reply
#2
you need https://github.com/MrMC/mrmc/blob/master...went.patch

and change the Makefile to use it
MrMC Forums : http://forum.mrmc.tv
Reply
#3
MrMC
This work, thanks you a lot.

Ready solution for someone:
Quote:build@helia:~/kodi-android/tools/depends/target/mysql$ diff -c Makefile-orig Makefile
*** Makefile-orig 2016-06-18 13:33:55.642487773 -0400
--- Makefile 2016-06-18 12:51:49.138630742 -0400
***************
*** 34,39 ****
--- 34,40 ----
cd $(PLATFORM); patch -p0 < ../04-strnlen.patch
cd $(PLATFORM); patch -p1 < ../05-mysqlclient-ios64.patch
cd $(PLATFORM); patch -p0 < ../06-fixsslcheck.patch
+ cd $(PLATFORM); patch -p1 < ../06-no-endpwent.patch
cd $(PLATFORM); $(AUTORECONF) -vif
cd $(PLATFORM); $(CONFIGURE)

Quote:build@helia:~/kodi-android/tools/depends/target/mysql$ cat 06-no-endpwent.patch
--- arm-linux-androideabi-android-17/mysys/mf_pack.c.orig 2016-03-27 10:59:19.176558034 -0400
+++ arm-linux-androideabi-android-17/mysys/mf_pack.c 2016-03-27 11:00:00.364557719 -0400
@@ -381,7 +381,7 @@ static char * NEAR_F expand_tilde(char *
{
if (path[0][0] == FN_LIBCHAR)
return home_dir; /* ~/ expanded to home */
-#ifdef HAVE_GETPWNAM
+#if defined(HAVE_GETPWNAM) && defined(HAVE_GETPWENT)
{
char *str,save;
struct passwd *user_entry;
Reply

Logout Mark Read Team Forum Stats Members Help
endpwent import error0