Add TUR repo in termux (google python3.9
is must be installed from TUR repo as its most stable & default Termus repo is rolling release mode & packages will have to bre recompiled again & again
Install a good gcc compiler with fortran
pkg i gcc-11
For clever symlinking
pkg i gcc-default-11
ln -s /apex/com.android.runtime/lib64/bionic/libm.so $PREFIX/lib/
this math lib is very important for many engineering stuff
So after above command you will have following symlink
/data/data/com.termux/files/usr/lib/libm.so
/data/data/com.termux/files/usr/local/bin
/data/data/com.termux/files/usr/local/include
/data/data/com.termux/files/usr/local/include/coin
/data/data/com.termux/files/usr/local/include/coin/ThirdParty
/data/data/com.termux/files/usr/local/include/coin-or
/data/data/com.termux/files/usr/local/include/coin-or/asl
/data/data/com.termux/files/usr/local/include/coin-or/mumps
/data/data/com.termux/files/usr/local/include/coin-or/hsl
/data/data/com.termux/files/usr/local/lib
https://stackoverflow.com/a/7619133/1162750
Checkout libraries dependancies
ldd <some lib> (.so* file extension)
Checkout build architecture
objdump -a <some lib/bin>
Search for package in repo
pkg search <keyword to search>
Discover all file installed by some package
dpkg -L <package name already installed>
Search which package provides a named file
apt-file find <some .so or .h file>
Check system environment varibles & where they point
env
Add environment vars, lib paths, include paths, bin paths to termux
Caution:Why LD_LIBRARY_PATH is bad
nano ~/.bash_profile
add these lines at top
PATH=$PATH:$PREFIX/bin:$PREFIX/local/bin
export LD_LIBRARY_PATH=$PREFIX/lib:$PREFIX/local/lib
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/local/lib/pkgconfig
export C_INCLUDE_PATH=$PREFIX/include:$PREFIX/local/include:$PREFIX/local/include/coin:$PREFIX/local/include/coin-or:$PREFIX/local/include/coin-or/asl:$PREFIX/local/include/coin-or/hsl:$PREFIX/local/include/coin-or/mumps
export CPLUS_INCLUDE_PATH=$PREFIX/include:$PREFIX/local/include:$PREFIX/local/include/coin:$PREFIX/local/include/coinor:$PREFIX/local/include/coin-or/asl:$PREFIX/local/include/coin-or/hsl:$PREFIX/local/include/coin-or/mumps
After modifying file, update environment
source ~/.bash_profile
or better restart termux
Each folder will have its own README.txt