STLport on Android

Developers
Emmanuel
2009-09-08
2013-05-13
  • Emmanuel

    Emmanuel - 2009-09-08

    Hello,

    Stlport on Android seems to work great! See http://umbel.mooo.com/
    Is there any plan to insert this port officially into STLport? Indeed there seem to be some expectation about that.

    Thanks a lot!

    Emmanuel Etiévent

     
    • Petr Ovtchenkov

      Petr Ovtchenkov - 2009-09-09

      I don't remember contacts about STLport on Android. Without contribution  I will not think about this issue.

       
  • get38

    get38 - 2010-02-01

    i have a working copy of the port on android system
    it is based on John Ripley work (see http://umbel.mooo.com/ and his git browser)
    if John Ripley has not asked for its integration in your supported tree, may i ask it for him ?
    If ok, how can i send you the sources i have ?
    i am really interesting in having the STLport maintained for android platforms (and i bet the number of interested people will grow with the rise of android phones)

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2010-03-05

    STLport build (mainline and STLport-5.2 branch) with android NDK 1.5 r1 and 1.6 r1. Tests (at least STLport-5.2 branch) compiled/linked too. Run not tested.

    Note, that I has no interest in android, so if activity for this platform remains at the same level, then support of android will follow support of VAX.

     
  • Emmanuel

    Emmanuel - 2010-03-10

    Hi!

    It's true that C++ is not the language of choice on Android. However, while Android is getting more and more popular, many people need to port their existing C++ libraries.
    Indeed, if you have a look on the android-ndk group, 10 pages of topics deal with the Stl:
    http://groups.google.com/group/android-ndk/search?group=android-ndk&q=stl&qt_g=Search+this+group

    So what are precisely the criteria to have the Android StlPort version kept? To run the tests, to have some people maintain it, …?
    I use now the 5.2 version from your git repository (3/5/2010), and it works fine for me (of course this is far from a complete test coverage).

    Thanks a lot for StlPort, and for your advice!
    Emmanuel

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2010-03-10

    Android is outside my personal interests, support (4e68a3e or 36ece22) was inspired by https://sourceforge.net/tracker/?func=detail&aid=2943782&group_id=146814&atid=766246
    Unfortunate, author of patch just made initial submit, and quickly disappear.

    > So what are precisely the criteria to have the Android StlPort version kept? To run the tests, to have some people maintain it, …?

    Monitor Android-related issues (NDK, …) from one side and STLport commits from other side; check the build of library and tests; check that resulting library is work indeed (STLport's unit tests are useful for this). Of cause there will be problems: point to problem is useful, direction to solution will reduce time before fix.

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2010-03-10

    BTW, I know that Android may has better support for C++. Just do proper build cross toolchain for Android (not the rocket science, IMO). The situation with wchar/mbstate (i.e. with real absent of wchar/mbstate/iconv) is worse.

     
  • Emmanuel

    Emmanuel - 2010-04-01

    Do you think that for Android using the Android.mk would be a good idea instead of the STLport makefiles (because these have to be corrected to have the STLport work as a shared library: see the patch page for details.). Or it would be too difficult to integrate it (getting the name of source files, using the STLport compilation options)?

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2010-04-05

    > … see the patch page for details
    I see. You don't answer the question I asked. Instead you suggest cargo cult.

     
  • Emmanuel

    Emmanuel - 2010-04-06

    Sorry, I'm lost, could you tell me what is the question you asked?

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2010-04-06

    To understand, what wrong with shared object load under Android:

    > Road map:
    >
    >  1. Build and use _any_ own shared library (as simple as possible) on Android.
    > Just C, without C++.
    > 2. If (1) work, let's discuss c++-related issues of shared libs (i.e. exceptions, ctor/dtor of statics/globals, __at_exit).

    Why:
    I suspect that Android OS (well, it's dynamic loader) allow load shared objects from predefined place only (which is protected) or with predefined names. Of cause, may be I made mistake in PIC/pic, architecture, startup code, frames, exceptions…

     
  • Emmanuel

    Emmanuel - 2010-04-08

    Indeed, Android uses /system/lib when linking a native executable (readonly by default, but can be remounted read-write), and the application directory for java applications. Though, since 1.6, we can specify other directories with LD_LIBRARY_PATH, like:
    adb  shell 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp; /data/local/tmp/stl_unit_test'
    I tried either way, but I managed to make it work only when I compiled with the Android.mk.

    Also, the error message is different when the library is not found (just "could not load needed library 'libstlport.so'") and when it's really found ("shndx=0 && value=0x00000001. We do not handle this yet", which should be related to thumb/arm code problems,  http://groups.google.com/group/android-ndk/browse_thread/thread/5d4192c6f0826598 , but I didn't manage to make it work either with arm only or thumb only: always SIGILL illegal instruction, at the real beginning of the executable - just 4 steps with gdb).
    To answer your question thorougtly, I'm going to try with a simplistic "hello shared object" C program.

    It's totally true that I don't know what the compilation options used by the Ndk mean (they are reported in the patch page) and what are the reasons which lead to them. It looks like some options are necessary, and beyond the problem of shared libraries, I guess that some other options have been choosen to be well adapted to the Android system (for instance, I noticed the compilation is much faster).

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2010-04-12

    Here somebody (well, John Ripley) worry about copyright on job he don't do. Very worry about. Below a conversation. (only quotes removed).

    Subject: (Again) Copyright on Android STLport
    From: "John Ripley" <…>
    Date: 2010-04-05 22:06

    Message body follows:

    I have no interest in pursuing the lack of copyright
    tracking that's going on with the Android STLport effort,
    but I've given you fair warning about it. I don't really
    care that my changes are now in mainline, but the other
    authors might, and Google is pretty good at spotting these
    things. I know the license is liberal, but it does state
    that modifications must be annotated and tracked, and that's
    all been stripped.

    In short: I don't care, I don't want to get involved, I'm
    not going to inform anyone, but don't be surprised if one of
    the bigger players (Google) figures it out at some point.

    Subject: Re: (Again) Copyright on Android STLport
    From: "Petr Ovtchenkov" <complement@users.sourceforge.net>
    Date: 2010-04-06 11:54

    Message body follows:

    Mr. John Ripley,

    You message is very important for me. Great thanks.

    But I misunderstand the word "(again)" in subject:
    this was first letter you wrote to me or to
    STLport-related forums/mail list/tickets tracking.

    > I have no interest in pursuing the lack of copyright
    tracking that's going on with the Android STLport
    effort,
    > but I've given you fair warning about it.

    ?? Google's copyright in STLport? Reasons? You _MUST_
    show first that here code _from_ android.

    > I don't really
    > care that my changes are now in mainline,

    There is no _You_ changes in mainline or in any
    branch. I reject suggested patch and and re-wrote
    compilation for Android from scratch.

    > but the other
    authors might, and Google is pretty good at spotting
    these
    > things.

    Here no code from Google. NDK not shipout with
    STLport.

    > I know the license is liberal, but it does state
    > that modifications must be annotated and tracked,
    and that's
    > all been stripped.

    No NDK modification was made, NDK not shipout with
    STLport.

    > In short: I don't care, I don't want to get
    involved, I'm
    > not going to inform anyone, but don't be surprised
    if one of
    > the bigger players (Google) figures it out at some
    point.

    If you would contact with me, take into account notes
    about build integration and platform support, then, of
    cause, you name would be under 'STLport supports
    Android'.

    Hmm. Looks I play in the same sandbox where you play
    before. The sand remains the same, but I don't want to
    put here memorial tablet "J. Ripley played this sand".
    Sorry. I should think about my behaviour.

    With best regards,

      - Petr Ovtchenkov

    Subject: Re: (Again) Copyright on Android STLport
    From: John Ripley <…>
    Date: 2010-04-12 02:10:08

    I hope that you have just unknowingly included code from unknown sources,
    and do not actually believe it's entirely yours. Otherwise you couldn't
    explain this:

    Compare:
    http://stlport.git.sourceforge.net/git/gitweb.cgi?p=stlport/stlport;a=blob;f=stlport/stl/config/_android.h;hb=36ece22c78c0117c6da605cedb6bd1805179939c
    with:
    http://code.google.com/p/gears/source/browse/trunk/third_party/stlport/stlport/stl/config/_android.h

    See history of both. See that the google.com version is about 1.5 years old,
    is written by an author with a strangely similar name to mine (jripley), and
    is very, very similar code. I know I wrote some of the code that's now in
    mainline because *I was working at Google when I wrote it.*

    I'll leave it at that. I no longer work at Google and I have no interest in
    following up with this, but be aware that Google has automated tools that
    may or may not eventually figure out that something weird is going on. You
    need to figure out how you've manage to end up with a lot of code from them
    without any history tracking it.

    Subject: Re: (Again) Copyright on Android STLport
    From: "Petr Ovtchenkov" <complement@users.sourceforge.net>
    Date: 2010-04-12 10:20:24

    Message body follows:

    > I hope that you have just unknowingly included code
    from unknown sources,
    > and do not actually believe it's entirely yours.
    Otherwise you couldn't
    > explain this:

    > Compare:
    >
    http://stlport.git.sourceforge.net/git/gitweb.cgi?p=stlport/stlport;a=blob;f=stlport/stl/config/_android.h;hb=36ece22c78c0117c6da605cedb6bd1805179939c
    > with:
    >
    http://code.google.com/p/gears/source/browse/trunk/third_party/stlport/stlport/stl/config/_android.h

    Ok. Then you can compare both with
    stlport/stl/config/stl_mycomp.h. And pay attention to
    history.

    Then you may compare two 'Hello, world!' programs. Or
    something like stdio.h in two UNIX implementations.

    Of cause, you args are bit stronger, then arguments of
    SCO.

    WBR,

      - ptr

    Subject: Re: (Again) Copyright on Android STLport
    From: John Ripley <…@gmail.com>
    Date: 2010-04-12 10:24:56

    Fine, I've shown that you've taken patches from other people without
    verifying their source. That's only one example of many files. Your response
    is childish.

    Best of luck to you.

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2010-04-12

    And my comment to incindent above:

    Because

    - personally I have no interest to Android
    - I have no interest in lawyer experience
    - I have no interest to make PR to John Ripley, who use STLport but never try to return code back to STLport

    I suspect that so-called 'Android support' will be removed from STLport.

     
  • get38

    get38 - 2010-04-12

    hello
    excuse-me, but i don't really understand what the trouble is… ?
    John Ripley has done some work, as John Ripley (I can't see anywhere that the work was done as "Google"). Very well and many thanks for his work (and, by the way, many thanks to you for your work and maintenance of the stlport sources ;o) )
    the work of John Ripley was released on the net, recuperated by other people and used as inspiration to integrate android port in the last stlport sources

    furthermore, the stlport/README contains :
    " * Permission to modify the code and to distribute modified code is granted,
    * provided the above notices are retained, and a notice that the code was
    * modified is included with the above copyright notice."

    it would be really interesting to integrate android port, now that more people seems to use it (looking at the google group on android-ndk) :o)

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2010-04-12

    > furthermore, the stlport/README contains :
    > " * Permission to modify the code and to distribute modified code is granted,
    > * provided the above notices are retained, and a notice that the code was
    > * modified is included with the above copyright notice."

    Yes.

    > it would be really interesting to integrate android port, now that more people
    > seems to use it (looking at the google group on android-ndk) :o)

    No resistance from my side.

    STLport remains open for contributors. I only will review condribution (mainly to avoid conflicts with project development). Authorship of non-trivial additions aways published in our project.

     
  • Anonymous - 2010-08-04

    What is the latest status on this. Is Android supported by STLPort? Are there commercial Android applications using STLPort?

     

Log in to post a comment.