Giter Club home page Giter Club logo

stand's People

Contributors

rhardih avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

stand's Issues

STAND unable to locate python2, resulting builds fail (see "Actions" tab)

I recently needed BAD to build copies of the GDAL for x86_64 using r18b Android-23, and noticed that STAND didn't have an image for that particular combination. Using STANDBY, I launched a build, but notice it failed with "buildx failed with: ERROR: failed to solve: process "/bin/sh -c ./ndk.sh" did not complete successfully: exit code: 100". I cloned the repo and determined that python2 was unable to be found by the ndk standalone build scripts.

Builds require access to Python2, however in the more recent Ubuntu images, calling "python" will no longer get you the default python interpreter. Instead, we explicitly call whichever version we want (or we install the python-is-python3 metapackage if we are okay with defaulting to python3).

Since we want to explicitly use python2 ('make-standalone-toolchain' script require python2), we need to force the container to see python2 as python. There is no metapackage 'python-is-python2', so that is not an option. I've tried using an alias with the shell option 'expand_aliases', however this also did not work. The solution is to create a simple shell script inside the docker file to redirect to python2.

In the dockerfile, simply add the following after COPY ndk.sh . :

RUN echo '#!/usr/bin/python2' > /usr/bin/python && chmod +x /usr/bin/python

@rhardih I tested this change locally, and the toolchain build completed successfully. Would you mind testing it and adding it to the repo? I would like to pull that particular stand image for use with BAD in the near future :) I can create a pull request if you feel it's necessary, though it is literally just that single line.

Feature Request: STAND with support for CMAKE /w NDK

STAND appears to have been built around supporting autotools for building various libraries in BAD. This works fine for many components, but the following have since abandoned autotools for CMAKE:

GEOS (3.10 and later only support CMAKE)
GDAL (3.6.0 only supports CMAKE)
PROJ (Post 8.2.1 only supports CMAKE)

When building with CMAKE (and targeting Android), you need to specify the NDK toolchain file using the following parameters:

    -DCMAKE_TOOLCHAIN_FILE=${NDK_ROOT}/build/cmake/android.toolchain.cmake \
    -DANDROID_NDK=${NDK_ROOT}                               \
    -DANDROID_ABI=armeabi-v7a                               \
    -DANDROID_PLATFORM=android-19                           \
    -DANDROID_STL=c++_shared                                \
    -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${LIB1_DIRECTORY}/libs/armeabi-v7a       \
    ${LIB1_DIRECTORY}

STAND appears to not include the toolchain file, and the NDK directory structure appears to be laid out differently than the source archive (android-ndk-r23c-linux.zip).

Would it be possible to build a set of STAND images which support CMAKE?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.