diff --git a/Dockerfile b/Dockerfile index 7b8432d..b77c009 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,12 +4,13 @@ FROM ubuntu:20.04 RUN apt-get update --yes && \ apt-get upgrade --yes && \ apt-get install --yes \ - build-essential && \ + build-essential autoconf && \ rm -rf /var/lib/apt/lists/* && \ rm -Rf /usr/share/doc && \ rm -Rf /usr/share/man && \ apt-get autoremove -y +RUN apt-get update --yes && apt-get install --yes libtool ADD . /crfpp WORKDIR /crfpp diff --git a/Makefile b/Makefile index 91b2948..ec7b11a 100644 --- a/Makefile +++ b/Makefile @@ -139,12 +139,12 @@ distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print -ACLOCAL = ${SHELL} /Users/taku/proj/crfpp/missing --run aclocal-1.11 +ACLOCAL = ${SHELL} /crfpp/missing --run aclocal-1.11 AMTAR = $${TAR-tar} AR = ar -AUTOCONF = ${SHELL} /Users/taku/proj/crfpp/missing --run autoconf -AUTOHEADER = ${SHELL} /Users/taku/proj/crfpp/missing --run autoheader -AUTOMAKE = ${SHELL} /Users/taku/proj/crfpp/missing --run automake-1.11 +AUTOCONF = ${SHELL} /crfpp/missing --run autoconf +AUTOHEADER = ${SHELL} /crfpp/missing --run autoheader +AUTOMAKE = ${SHELL} /crfpp/missing --run automake-1.11 AWK = awk CC = gcc CCDEPMODE = depmode=gcc3 @@ -181,7 +181,7 @@ LIBTOOL = $(SHELL) $(top_builddir)/libtool LIPO = lipo LN_S = ln -s LTLIBOBJS = -MAKEINFO = ${SHELL} /Users/taku/proj/crfpp/missing --run makeinfo +MAKEINFO = ${SHELL} /crfpp/missing --run makeinfo MANIFEST_TOOL = : MKDIR_P = /usr/local/bin/gmkdir -p NM = /usr/bin/nm @@ -201,13 +201,13 @@ PATH_SEPARATOR = : RANLIB = ranlib SED = /usr/bin/sed SET_MAKE = -SHELL = /bin/sh +SHELL = /bin/bash STRIP = strip VERSION = 0.59 -abs_builddir = /Users/taku/proj/crfpp -abs_srcdir = /Users/taku/proj/crfpp -abs_top_builddir = /Users/taku/proj/crfpp -abs_top_srcdir = /Users/taku/proj/crfpp +abs_builddir = /crfpp +abs_srcdir = /crfpp +abs_top_builddir = /crfpp +abs_top_srcdir = /crfpp ac_ct_AR = ar ac_ct_CC = gcc ac_ct_CXX = g++ @@ -237,7 +237,7 @@ host_vendor = apple htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info -install_sh = ${SHELL} /Users/taku/proj/crfpp/install-sh +install_sh = ${SHELL} /crfpp/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale diff --git a/Makefile.am b/Makefile.am index 524a3d2..ee7dd5a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,7 @@ EXTRA_DIRS = doc example sdk perl python ruby java swig bin_PROGRAMS = crf_learn crf_test ACLOCAL_AMFLAGS = -I m4 -AUTOMAKE_OPTIONS = no-dependencies +AUTOMAKE_OPTIONS = no-dependencies foreign lib_LTLIBRARIES = libcrfpp.la libcrfpp_la_SOURCES = crfpp.h thread.h libcrfpp.cpp lbfgs.cpp scoped_ptr.h param.cpp param.h encoder.cpp feature.cpp stream_wrapper.h \ feature_cache.cpp feature_index.cpp node.cpp path.cpp tagger.cpp \ diff --git a/common.h b/common.h index 4269227..c271ac9 100644 --- a/common.h +++ b/common.h @@ -213,7 +213,7 @@ class string_buffer: public std::string { string_buffer& operator<<(unsigned short int _n) { _UITOA(_n); } string_buffer& operator<<(unsigned int _n) { _UITOA(_n); } // string_buffer& operator<<(unsigned long int _n) { _UITOA(_n); } - string_buffer& operator<<(size_t _n) { _UITOA(_n); } + // string_buffer& operator<<(size_t _n) { _UITOA(_n); } string_buffer& operator<<(char _n) { push_back(_n); return *this; diff --git a/configure b/configure index 6d544e9..366a410 100755 --- a/configure +++ b/configure @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # diff --git a/docker-build.sh b/docker-build.sh index 8db18cb..ddd43ee 100644 --- a/docker-build.sh +++ b/docker-build.sh @@ -1,13 +1,17 @@ +#!/bin/bash + ARCH=`uname -m` if [[ ARCH = "x86_64" ]]; then echo "Setting amd64" export BUILD_ARCH=x86_64-unknown-linux-gnu else - echo "Setting arm64" - export BUILD_ARCH=aarch64-unknown-linux-gnu + echo "Setting arm v7" + export BUILD_ARCH=arm-unknown-linux-gnueabihf fi echo "Done" - + +chmod +x configure +autoreconf -fi ./configure --build=$BUILD_ARCH make make install diff --git a/missing b/missing index 64b5f90..0ff1942 100755 --- a/missing +++ b/missing @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash # Common stub for a few missing GNU programs while installing. scriptversion=2004-09-07.08