IDAES / idaes-ext

IDAES developer repo for those building the idaes binary solvers and related tools.
Other
8 stars 11 forks source link

Ipopt Compiling ARM64 Android Termux #236

Closed defencedog closed 1 year ago

defencedog commented 1 year ago

I am highly successful in compiling engineering libraries on Android & as a chemical enginner wanted to run idaes on my jupyter. So far idaes is installed via pip successfully now solver stuff remains. I have already compiled lapack as well

[  7%] Built target blas
[100%] Built target lapack
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /data/data/com.termux/files/usr/local/lib/cmake/lapack-3.10.1/lapack-targets.cmake
-- Installing: /data/data/com.termux/files/usr/local/lib/cmake/lapack-3.10.1/lapack-targets-relwithdebinfo.cmake
-- Installing: /data/data/com.termux/files/usr/local/lib/pkgconfig/lapack.pc
-- Installing: /data/data/com.termux/files/usr/local/lib/cmake/lapack-3.10.1/lapack-config.cmake
-- Installing: /data/data/com.termux/files/usr/local/lib/cmake/lapack-3.10.1/lapack-config-version.cmake
-- Installing: /data/data/com.termux/files/usr/local/lib/pkgconfig/blas.pc
-- Installing: /data/data/com.termux/files/usr/local/lib/libblas.a
-- Installing: /data/data/com.termux/files/usr/local/lib/liblapack.a

Now while configuring ipopt I have no clue as to the last error could not find dsyev when trying to link with LAPACK. Plz instruct

~/Ipopt $ FC=/data/data/com.termux/files/usr/bin/aarch64-linux-android-gfortran-11 MATHLIB=m ./configure --prefix=$PREFIX/local
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking for a BSD-compatible install... /data/data/com.termux/files/usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /data/data/com.termux/files/usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking dependency style of g++... gcc3
checking whether g++ understands -c and -o together... yes
checking for gfortran... gfortran
checking whether the compiler supports GNU Fortran 77... yes
checking whether gfortran accepts -g... yes
checking how to get verbose linking output from gfortran... -v
checking for Fortran 77 libraries of gfortran...  -L/data/data/com.termux/files/usr/lib/gcc/aarch64-linux-android/11.3.0 -L/data/data/com.termux/files/usr/lib -L/data/data/com.termux/files/usr/lib/gcc/aarch64-linux-android/11.3.0/../../.. -lgfortran -lm -ldl
checking for dummy main to link with Fortran 77 libraries... none
checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore
checking whether gfortran understands -c and -o together... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /data/data/com.termux/files/usr/bin/sed
checking for grep that handles long lines and -e... /data/data/com.termux/files/usr/bin/grep
checking for egrep... /data/data/com.termux/files/usr/bin/grep -E
checking for fgrep... /data/data/com.termux/files/usr/bin/grep -F
checking for ld used by gcc... /data/data/com.termux/files/usr/bin/ld
checking if the linker (/data/data/com.termux/files/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /data/data/com.termux/files/usr/bin/nm -B
checking the name lister (/data/data/com.termux/files/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 32768
checking how to convert aarch64-unknown-linux-gnu file names to aarch64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert aarch64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /data/data/com.termux/files/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /data/data/com.termux/files/usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /data/data/com.termux/files/usr/bin/dd
checking how to truncate binary pipes... /data/data/com.termux/files/usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking the archiver (ar) interface... ar
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/data/data/com.termux/files/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /data/data/com.termux/files/usr/bin/ld
checking if the linker (/data/data/com.termux/files/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/data/data/com.termux/files/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/data/data/com.termux/files/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for gfortran option to produce PIC... -fPIC
checking if gfortran PIC flag -fPIC works... yes
checking if gfortran static flag -static works... no
checking if gfortran supports -c -o file.o... yes
checking if gfortran supports -c -o file.o... (cached) yes
checking whether the gfortran linker (/data/data/com.termux/files/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: libtool version info: -version-number 3:14:10
configure: Assuming that CXXLIBS is -lc++.
configure: configuring doxygen documentation options
checking for doxygen... no
checking for latex... no
checking for dot... NO
checking for library containing cos... -lm
checking for pkgconf... no
checking for pkg-config... pkg-config
checking pkg-config is at least version 0.16.0... yes: 0.29.2
configure: pkg-config path is "/data/data/com.termux/files/usr/local/lib/pkgconfig:"
checking for LAPACK... configure: WARNING: lapack.pc and blas.pc present, but could not find dsyev when trying to link with LAPACK.
no (generic module (lapack.pc blas.pc))
configure: error: Required package LAPACK not found.
defencedog commented 1 year ago

Ok this worked I have my IPOPT working well in idaes Do install gcc-default-11 from TUR repo Configure / build command you can use CC=clang as well FC=gfortran-11 CC=gcc-11 ./configure --prefix=/data/data/com.termux/files/usr/local/ --with-lapack="-L/data/data/com.termux/files/usr/include/openblas/ -lopenblas" --with-mumps="-L/data/data/com.termux/files/usr/local/lib/ -lcoinmumps -I/data/data/com.termux/files/usr/local/include/coin-or/mumps/" --build=aarch64-linux-android && make -j4