Closed vyuh closed 2 years ago
Update: I just compiled PolyML on a Termux device. I used a newer release of PolyML from https://github.com/polyml/polyml/releases/tag/v5.8.2, and used commands ./configure --prefix $HOME/polyml --with-pic; make; make install
. Things worked this time. I'm including some of the terminal transcript below. I hope this information helps someone to add PolyML to Termux Packages.
.
.
SNIP
.
.
Use: basis/PrettyPrinter.sml
Use: basis/ASN1.sml
Use: basis/Statistics.ML
Use: basis/InitialPolyML.ML
Use: basis/FinalPolyML.sml
Use: basis/TopLevelPolyML.sml
/bin/sh ./libtool --tag=CC --mode=link gcc -O3 -o poly polyexport.o libpolymain/libpolymain.la libpolyml/libpolyml.la -lffi -lgmp -lm -lstdc++ -lgcc
libtool: link: gcc -O3 -o .libs/poly polyexport.o libpolymain/.libs/libpolymain.a libpolyml/.libs/libpolyml.so -lffi -lgmp -lm -lstdc++ -lgcc -Wl,-rpath -Wl,/data/data/com.termux/files/home/polyml/lib
make[2]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2'
Making all in modules
make[2]: Entering directory '/data/data/com.termux/files/home/polyml-5.8.2/modules'
Making all in IntInfAsInt
make[3]: Entering directory '/data/data/com.termux/files/home/polyml-5.8.2/modules/IntInfAsInt'
echo "use \"./ROOT.sml\";" | ../../poly -q -error-exit
WARNING: linker: /data/data/com.termux/files/home/polyml-5.8.2/.libs/poly: unsupported flags DT_FLAGS_1=0x8000001
make[3]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2/modules/IntInfAsInt'
make[3]: Entering directory '/data/data/com.termux/files/home/polyml-5.8.2/modules'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2/modules'
make[2]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2/modules'
make[1]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2'
~/polyml-5.8.2 $ make install
Making install in libpolyml
make[1]: Entering directory '/data/data/com.termux/files/home/polyml-5.8.2/libpolyml'
make[2]: Entering directory '/data/data/com.termux/files/home/polyml-5.8.2/libpolyml'
/data/data/com.termux/files/usr/bin/mkdir -p '/data/data/com.termux/files/home/polyml/lib'
/bin/sh ../libtool --mode=install /data/data/com.termux/files/usr/bin/install -c libpolyml.la '/data/data/com.termux/files/home/polyml/lib'
libtool: install: /data/data/com.termux/files/usr/bin/install -c .libs/libpolyml.so.12.0.0 /data/data/com.termux/files/home/polyml/lib/libpolyml.so.12.0.0
libtool: install: (cd /data/data/com.termux/files/home/polyml/lib && { ln -s -f libpolyml.so.12.0.0 libpolyml.so.12 || { rm -f libpolyml.so.12 && ln -s libpolyml.so.12.0.0 libpolyml.so.12; }; })
libtool: install: (cd /data/data/com.termux/files/home/polyml/lib && { ln -s -f libpolyml.so.12.0.0 libpolyml.so || { rm -f libpolyml.so && ln -s libpolyml.so.12.0.0 libpolyml.so; }; })
libtool: install: /data/data/com.termux/files/usr/bin/install -c .libs/libpolyml.lai /data/data/com.termux/files/home/polyml/lib/libpolyml.la
libtool: install: /data/data/com.termux/files/usr/bin/install -c .libs/libpolyml.a /data/data/com.termux/files/home/polyml/lib/libpolyml.a
libtool: install: chmod 644 /data/data/com.termux/files/home/polyml/lib/libpolyml.a
libtool: install: ranlib /data/data/com.termux/files/home/polyml/lib/libpolyml.a
libtool: finish: PATH="/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:/sbin" ldconfig -n /data/data/com.termux/files/home/polyml/lib
/data/data/com.termux/files/home/polyml-5.8.2/libtool: 1: eval: ldconfig: Permission denied
----------------------------------------------------------------------
Libraries have been installed in:
/data/data/com.termux/files/home/polyml/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator run these commands:
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/data/data/com.termux/files/usr/bin/mkdir -p '/data/data/com.termux/files/home/polyml/lib/pkgconfig'
/data/data/com.termux/files/usr/bin/install -c -m 644 polyml.pc '/data/data/com.termux/files/home/polyml/lib/pkgconfig'
make[2]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2/libpolyml'
make[1]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2/libpolyml'
Making install in libpolymain
make[1]: Entering directory '/data/data/com.termux/files/home/polyml-5.8.2/libpolymain'
make[2]: Entering directory '/data/data/com.termux/files/home/polyml-5.8.2/libpolymain'
/data/data/com.termux/files/usr/bin/mkdir -p '/data/data/com.termux/files/home/polyml/lib'
/bin/sh ../libtool --mode=install /data/data/com.termux/files/usr/bin/install -c libpolymain.la '/data/data/com.termux/files/home/polyml/lib'
libtool: install: /data/data/com.termux/files/usr/bin/install -c .libs/libpolymain.lai /data/data/com.termux/files/home/polyml/lib/libpolymain.la
libtool: install: /data/data/com.termux/files/usr/bin/install -c .libs/libpolymain.a /data/data/com.termux/files/home/polyml/lib/libpolymain.a
libtool: install: chmod 644 /data/data/com.termux/files/home/polyml/lib/libpolymain.a
libtool: install: ranlib /data/data/com.termux/files/home/polyml/lib/libpolymain.a
libtool: finish: PATH="/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:/sbin" ldconfig -n /data/data/com.termux/files/home/polyml/lib
/data/data/com.termux/files/home/polyml-5.8.2/libtool: 1: eval: ldconfig: Permission denied
----------------------------------------------------------------------
Libraries have been installed in:
/data/data/com.termux/files/home/polyml/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator run these commands:
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2/libpolymain'
make[1]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2/libpolymain'
Making install in .
make[1]: Entering directory '/data/data/com.termux/files/home/polyml-5.8.2'
make[2]: Entering directory '/data/data/com.termux/files/home/polyml-5.8.2'
/data/data/com.termux/files/usr/bin/mkdir -p '/data/data/com.termux/files/home/polyml/bin'
/bin/sh ./libtool --mode=install /data/data/com.termux/files/usr/bin/install -c polyimport poly '/data/data/com.termux/files/home/polyml/bin'
libtool: install: /data/data/com.termux/files/usr/bin/install -c .libs/polyimport /data/data/com.termux/files/home/polyml/bin/polyimport
libtool: install: /data/data/com.termux/files/usr/bin/install -c .libs/poly /data/data/com.termux/files/home/polyml/bin/poly
/data/data/com.termux/files/usr/bin/mkdir -p '/data/data/com.termux/files/home/polyml/bin'
/data/data/com.termux/files/usr/bin/install -c polyc '/data/data/com.termux/files/home/polyml/bin'
/data/data/com.termux/files/usr/bin/mkdir -p '/data/data/com.termux/files/home/polyml/share/man/man1'
/data/data/com.termux/files/usr/bin/install -c -m 644 poly.1 polyimport.1 polyc.1 '/data/data/com.termux/files/home/polyml/share/man/man1'
make[2]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2'
make[1]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2'
Making install in modules
make[1]: Entering directory '/data/data/com.termux/files/home/polyml-5.8.2/modules'
Making install in IntInfAsInt
make[2]: Entering directory '/data/data/com.termux/files/home/polyml-5.8.2/modules/IntInfAsInt'
make[3]: Entering directory '/data/data/com.termux/files/home/polyml-5.8.2/modules/IntInfAsInt'
/data/data/com.termux/files/usr/bin/mkdir -p /data/data/com.termux/files/home/polyml/lib/polyml/modules
/data/data/com.termux/files/usr/bin/install -c -m 644 IntInfAsInt /data/data/com.termux/files/home/polyml/lib/polyml/modules
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2/modules/IntInfAsInt'
make[2]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2/modules/IntInfAsInt'
make[2]: Entering directory '/data/data/com.termux/files/home/polyml-5.8.2/modules'
make[3]: Entering directory '/data/data/com.termux/files/home/polyml-5.8.2/modules'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2/modules'
make[2]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2/modules'
make[1]: Leaving directory '/data/data/com.termux/files/home/polyml-5.8.2/modules'
~/polyml-5.8.2 $ ~/polyml/bin/poly
WARNING: linker: /data/data/com.termux/files/home/polyml/bin/poly: unsupported flags DT_FLAGS_1=0x8000001
Poly/ML 5.8.2 Release
> 3+5;
val it = 8: int
> ~/polyml-5.8.2 $
This issue/PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@vyuh, would you be interested to create a PR here to add the package. Thanks!
Package description
Poly/ML is an implementation of Standard ML Programming Language (SML97). It supports Functional Programming and Algebraic Data Types.
Link to home page and sources
Additional information
I tried to build it on a Termux device. I followed the instructions on Download Page and ran into the following error. It is mainly about
text relocations (DT_TEXTREL) found in 64-bit ELF file
. The build command I used was./configure --prefix $HOME/polyml --with-pic;make -j4 && make install