Android Status

Joakim via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jan 2 19:35:30 PST 2017


On Monday, 2 January 2017 at 11:47:52 UTC, Ignacious wrote:
> On Monday, 2 January 2017 at 03:08:10 UTC, Joakim wrote:
>> On Sunday, 1 January 2017 at 09:34:24 UTC, Ignacious wrote:
>>>>
>>>> Can you try
>>>>
>>>> sudo apt-get install libconfig9
>>>>
>>>> I don't know if that will install something different, but 
>>>> it's the command I see others using online.  Otherwise, 
>>>> check if the libconfig++9 package you installed included 
>>>> libconfig.so.9, which is what ldc is linked against.  If 
>>>> not, install the package that provides that library.  The 
>>>> wiki mentions installing libconfig-dev, you could always 
>>>> just install that if nothing else works.
>>>>
>>>
>>>
>>> That is what I used to get it on there in the first place... 
>>> but the ldc compiler still could not find it.
>>>
>>> The problem seems to be where ldc2 is looking for 
>>> libconfig.so.9 rather than it being installed or not.
>>>
>>> How do I either know where it is looking for where to put it?
>>
>> You said you installed libconfig++9, which an apt search shows 
>> me is a different package than libconfig9, that includes a 
>> library named differently.  As I said, are you sure that 
>> particular libconfig.so.9 library is installed?
>>
>> If it is, manually adding its path to LD_LIBRARY_PATH is the 
>> way to make sure it's found.
>
> Ok, I didn't realize they were different packages.
>
> I now get the error
>
> ./bin/ldmd2: error while loading shared libraries: 
> libncursesw.so.6: cannot open shared object file: No such file 
> or directory
>
> and trying to install libncursesw is missing. I tried 
> installing libncurses5 and it worked, but, of course, not 
> version 6 or whatever. tried various things... nothing works.
>
> ./bin/ldc2: error while loading shared libraries: 
> libncursesw.so.6: cannot open shared object file: No such file 
> or directory
>
> I downloaded the sources. I had to install gcc, make, then I 
> did ./configure --enable-widec 
> (http://arstechnica.com/civis/viewtopic.php?f=20&t=1161942), 
> then ran make.. I end up getting the errors
>
> make[1]: Leaving directory `/mnt/b/c/test'
> cd misc && make DESTDIR="" all
> make[1]: Entering directory `/mnt/b/c/misc'
> WHICH_XTERM=xterm-new \
>         ticdir=/usr/share/terminfo \
>         /bin/sh ./gen_edit.sh >run_tic.sed
> echo '** adjusting tabset paths'
> ** adjusting tabset paths
> sed -f run_tic.sed ../misc/terminfo.src >terminfo.tmp
> make[1]: Leaving directory `/mnt/b/c/misc'
> cd c++ && make DESTDIR="" all
> make[1]: Entering directory `/mnt/b/c/c++'
> cp ./etip.h.in etip.h
> sh ./edit_cfg.sh ../include/ncurses_cfg.h etip.h
> substituting autoconf'd values from ../include/ncurses_cfg.h 
> into etip.h
> ... CPP_HAS_PARAM_INIT 0
> ... CPP_HAS_STATIC_CAST 0
> ... ETIP_NEEDS_MATH_EXCEPTION 0
> ... ETIP_NEEDS_MATH_H 0
> ... HAVE_BUILTIN_H 0
> ... HAVE_GPP_BUILTIN_H 0
> ... HAVE_GXX_BUILTIN_H 0
> ... HAVE_IOSTREAM 0
> ... HAVE_TYPEINFO 0
> ... HAVE_VALUES_H 0
> ... IOSTREAM_NAMESPACE 0
> cd ../objects;   -I../c++ -I../include -I. -DHAVE_CONFIG_H  
> -D_GNU_SOURCE -DNDEBUG -I. -I../include  -c ../c++/cursesf.cc
> /bin/sh: 1: -I../c++: not found
> make[1]: *** [../objects/cursesf.o] Error 127
> make[1]: Leaving directory `/mnt/b/c/c++'
> make: *** [all] Error 2
>
> So, now I do not know what to do next.
>
>
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> E: Unable to locate package libncurses6
>
> (This is why I hate working linux, so much obfuscation... so 
> many potential points of failure)

Yeah, not a good idea to build from source yourself.  Try the 
advice here, ie see if you can install a package with that 
library or just symlink to the older library if not:

http://askubuntu.com/questions/771047/erlang-error-while-loading-shared-libraries-libncursesw-so-6

Every system has these problems, whether Windows, linux, or OS X. 
Linux makes it really easy to install packages and libraries, but 
then you can hit this issue where Debian/Ubuntu doesn't provide 
the latest versions of packages like Arch does, which is where I 
compiled the cross-compiler.

> Also, once I go through all this trouble, I have to do it again 
> for the arm verson(using x86-64 ldc)? Can I install on the same 
> system or will the libraries conflict and I'll have to go 
> through all this mess again?

I'm not sure what you mean, there is no other ARM version.  All 
you have to do is download the cross-compiler and run it.  The 
cross-compiler is a linux/x64 binary that comes with a 
pre-compiled standard library for ARM.  Once you can run this 
cross-compiler build I provided, by setting up the needed 
libraries, you should be able to build Android binaries or apks 
just by using the cross-compiler, by following these instructions:

http://wiki.dlang.org/Build_LDC_for_Android#Build_a_command-line_executable
http://wiki.dlang.org/Build_LDC_for_Android#Build_a_sample_OpenGL_Android_app_ported_to_D

However, you will also want to install the Android SDK for 
Windows, which requires Java, if you want to build an apk in the 
usual way, as mentioned in the wiki:

http://developer.android.com/sdk/index.html

Alternately, you could package an apk from scratch using OpenSSL, 
if you don't want all that SDK crap like me:

https://github.com/termux/termux-packages/issues/63#issuecomment-184115581

Unfortunately, there is no dead-simple way to get this Android 
toolchain setup.


More information about the Digitalmars-d-learn mailing list