Building ancient branches doesn't work anymore after update to ubuntu 18.04

Trying to compile my package, which I receive from git repo.
During prepare it was downloaded and packed into .tar.xz and extracted into build dir.
On make package/feeds/my_feed/my_pkg/compile i see this errors:

configure: WARNING: unrecognized options: --disable-nls
configure: loading site script /home/gorec/openwrt/include/site/mipsel
configure: error: cannot find install-sh, install.sh, or shtool in build-aux "."/build-aux

I have no configure script in my package. As i understood it's system configure script.

Please post your current Makefile

Probably it's related with ubuntu 18.04. I tested on ubuntu 16.04 and it was compiled successfully.
Someone tried to build on ubuntu 18.04?

include $(TOPDIR)/rules.mk

PKG_NAME:=my_package
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=ssh://git@gitlab.d5.lan:8082/pb/my_package.git
PKG_SOURCE_VERSION:=4dbb9bad67efc72be1edb0596018325805ca6748
PKG_MIRROR_HASH:=whatever
PKG_CAT:=xzcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

define Package/my_package
    SECTION:=utils
    CATEGORY:=Utilities
    TITLE:=My Package
    DEPENDS:=+libstdcpp +libusb-1.0 +libpthread +libblkid +libconfig +glib2 +libsigcxx +boost-system +boost-serialization
endef

define Package/my_package/description
Desription
endef

define Build/Compile
    $(call Build/Compile/Default,PORT=PORT_LEDE)
endef

define Package/my_package/install
    $(INSTALL_DIR) $(1)/bin
    $(INSTALL_DIR) $(1)/scripts
    $(INSTALL_DIR) $(1)/etc/init.d
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/$(PKG_NAME) $(1)/bin/
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/* $(1)/scripts/
    $(INSTALL_BIN) $(1)/scripts/my_package $(1)/etc/init.d/
endef

$(eval $(call BuildPackage,my_package))

Also does it necessary to point commit hash exactly or it's possible to specify branch?

I also tried to rebuild from openwrt from scratches. It doesn't work on my ubuntu after update to 18.04.

Here is log:

/openwrt$ make -j1 V=s
make[1]: Entering directory '/home/user/openwrt'
make[2]: Entering directory '/home/user/openwrt'
+ mkdir -p /home/user/openwrt/staging_dir/target-mipsel_24kc_musl-1.1.16
+ cd /home/user/openwrt/staging_dir/target-mipsel_24kc_musl-1.1.16
+ mkdir -p bin lib include stamp
mkdir -p /home/user/openwrt/build_dir/target-mipsel_24kc_musl-1.1.16/stamp
touch /home/user/openwrt/staging_dir/target-mipsel_24kc_musl-1.1.16/.prepared
+ mkdir -p /home/user/openwrt/staging_dir/host
+ cd /home/user/openwrt/staging_dir/host
+ mkdir -p bin lib include stamp
mkdir -p /home/user/openwrt/build_dir/host/stamp /home/user/openwrt/staging_dir/host/include/sys
install -m0644 /home/user/openwrt/tools/include/*.h /home/user/openwrt/staging_dir/host/include/
install -m0644 /home/user/openwrt/tools/include/sys/*.h /home/user/openwrt/staging_dir/host/include/sys/
ln -sf lib /home/user/openwrt/staging_dir/host/lib64
touch /home/user/openwrt/staging_dir/host/.prepared
make[3]: Entering directory '/home/user/openwrt/tools/flock'
make[3]: Leaving directory '/home/user/openwrt/tools/flock'
make[3]: Entering directory '/home/user/openwrt/tools/flock'
make[3]: Leaving directory '/home/user/openwrt/tools/flock'
make[3]: Entering directory '/home/user/openwrt/tools/sed'
make[3]: Leaving directory '/home/user/openwrt/tools/sed'
make[3]: Entering directory '/home/user/openwrt/tools/sed'
make[3]: Leaving directory '/home/user/openwrt/tools/sed'
make[3]: Entering directory '/home/user/openwrt/tools/patch'
make[3]: Leaving directory '/home/user/openwrt/tools/patch'
make[3]: Entering directory '/home/user/openwrt/tools/patch'
make[3]: Leaving directory '/home/user/openwrt/tools/patch'
make[3]: Entering directory '/home/user/openwrt/tools/xz'
make[3]: Leaving directory '/home/user/openwrt/tools/xz'
make[3]: Entering directory '/home/user/openwrt/tools/xz'
make[3]: Leaving directory '/home/user/openwrt/tools/xz'
make[3]: Entering directory '/home/user/openwrt/tools/tar'
make[3]: Leaving directory '/home/user/openwrt/tools/tar'
make[3]: Entering directory '/home/user/openwrt/tools/tar'
make[3]: Leaving directory '/home/user/openwrt/tools/tar'
make[3]: Entering directory '/home/user/openwrt/tools/m4'
make[3]: Leaving directory '/home/user/openwrt/tools/m4'
make[3]: Entering directory '/home/user/openwrt/tools/m4'
make[3]: Leaving directory '/home/user/openwrt/tools/m4'
make[3]: Entering directory '/home/user/openwrt/tools/autoconf'
make[3]: Leaving directory '/home/user/openwrt/tools/autoconf'
make[3]: Entering directory '/home/user/openwrt/tools/autoconf'
make[3]: Leaving directory '/home/user/openwrt/tools/autoconf'
make[3]: Entering directory '/home/user/openwrt/tools/pkg-config'
make[3]: Leaving directory '/home/user/openwrt/tools/pkg-config'
make[3]: Entering directory '/home/user/openwrt/tools/pkg-config'
make[3]: Leaving directory '/home/user/openwrt/tools/pkg-config'
make[3]: Entering directory '/home/user/openwrt/tools/automake'
(cd /home/user/openwrt/build_dir/host/automake-1.15; AUTOM4TE=/home/user/openwrt/staging_dir/host/bin/autom4te AUTOCONF=/home/user/openwrt/staging_dir/host/bin/autoconf AUTOMAKE=/home/user/openwrt/staging_dir/host/bin/automake ACLOCAL=/home/user/openwrt/staging_dir/host/bin/aclocal AUTOHEADER=/home/user/openwrt/staging_dir/host/bin/autoheader LIBTOOLIZE=/home/user/openwrt/staging_dir/host/bin/libtoolize LIBTOOL=/home/user/openwrt/staging_dir/host/bin/libtool M4=/home/user/openwrt/staging_dir/host/bin/m4 AUTOPOINT=true STAGING_DIR="" ./bootstrap.sh)
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at ./bin/automake.tmp line 3938.
Makefile:50: recipe for target '/home/user/openwrt/build_dir/host/automake-1.15/.configured' failed
make[3]: *** [/home/user/openwrt/build_dir/host/automake-1.15/.configured] Error 255
make[3]: Leaving directory '/home/user/openwrt/tools/automake'
tools/Makefile:147: recipe for target 'tools/automake/compile' failed
make[2]: *** [tools/automake/compile] Error 2
make[2]: Leaving directory '/home/user/openwrt'
tools/Makefile:145: recipe for target '/home/user/openwrt/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnny' failed
make[1]: *** [/home/user/openwrt/staging_dir/target-mipsel_24kc_musl-1.1.16/stamp/.tools_install_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnny] Error 2
make[1]: Leaving directory '/home/user/openwrt'
/home/user/openwrt/include/toplevel.mk:197: recipe for target 'world' failed
make: *** [world] Error 2

I am using Ubuntu 18.04 for builds and have encountered no problems.
Compiling works ok.

Same problem here. I am using Ubuntu 18.04 server.

I also tried to build OpenWrt in freshly installed Ubuntu 18.04 and met this error anyway.

Which perl version are you using?

I use Ubuntu 18.04 LTS (GNU/Linux 4.15.0-29-generic x86_64) and don't experience any problems.

Thats what I installed in preparation:

sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev gawk gcc-multilib flex git-core gettext libssl-dev python

I'm having this same exact problem, but the problem occurs on both Ubuntu 18.04 and Ubuntu 16.04. Was a fix to this problem ever found?

What are you building? Current 18.06 or master, or something ancient?

This regex error sounds similar as in https://github.com/openwrt/packages/issues/4657 but that incompatibility with the recent perl versions was fixed in June 2017, and should be ok in master and 18.06 (and is also backported to 17.01 branch)

I have got this problem, too. This morning before upgrading 16.04 to 18.04 I did build the same source code. The following is the detailed error logs of mine

configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."
Makefile:35: recipe for target '/home/yingx/Projects/phoenix/openwrt/trunk/build_dir/host/mklibs-0.1.35/.configured' failed
make[3]: *** [/home/yingx/Projects/phoenix/openwrt/trunk/build_dir/host/mklibs-0.1.35/.configured] Error 1
make[3]: Leaving directory '/home/yingx/Projects/phoenix/openwrt/trunk/tools/mklibs'
tools/Makefile:155: recipe for target 'tools/mklibs/compile' failed
make[2]: *** [tools/mklibs/compile] Error 2
make[2]: Leaving directory '/home/yingx/Projects/phoenix/openwrt/trunk'
tools/Makefile:154: recipe for target '/home/yingx/Projects/phoenix/openwrt/trunk/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp/.tools_install_yynyynynynyyyyyyyyyynyyyyyyyynyyyynnyyynnyynnnyyyy' failed
make[1]: *** [/home/yingx/Projects/phoenix/openwrt/trunk/staging_dir/target-arm_mpcore+vfp_uClibc-0.9.33.2_eabi/stamp/.tools_install_yynyynynynyyyyyyyyyynyyyyyyyynyyyynnyyynnyynnnyyyy] Error 2
make[1]: Leaving directory '/home/yingx/Projects/phoenix/openwrt/trunk'
/home/yingx/Projects/phoenix/openwrt/trunk/include/toplevel.mk:171: recipe for target 'world' failed
make: *** [world] Error 2

Yeah, scrolling up a little bit I also saw the following message:
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /home/yingx/Projects/phoenix/openwrt/trunk/staging_dir/host/bin/automake line 4160.

Based on that uClibc in your path, you are not building the master or 18.06 , but likely something older. Right?
15.05 is unsupported so hopefully you are not trying that.

In general, if you try building something from ancient sources, the best option may be to use a buildhost from the same time to make sure that the host tools are compatible. E.g. install ubuntu14.04 and do not update it's packages

1 Like

@hnyman You are right. My OpenWrt source is a little older and due to some vendor specific stuff we have to stay with that old source (actually very old). However, it is fine to build it based on ubuntu 16.04. I agree that I should not have upgraded to 18.04. I will try to see if I can resolve my new issues (the current one is done with the regex patch) and may roll back ubuntu 16.04 if I have got no luck. Thanks.

2 Likes

update tools/automake and tools/autoconf to lastest version.
then everything will ok

Hello lxs,
I am a noob. Can you tell me the comands to update tools/automake and tools/autoconf to latest version?
Thank you.

Hi azul,

I managed to compile it.
To update the two directories you really have to replace them with the newer version.

Let's say that you have a directory tree like this:

work
| - chaos_calmer

you want to cd into work and execute

git clone git://github.com/openwrt/openwrt
rm -rf chaos_calmer/tools/automake/ chaos_calmer/tools/autoconf/
cp -r openwrt/tools/automake chaos_calmer/tools/automake
cp -r openwrt/tools/autoconf chaos_calmer/tools/autoconf

Then restart the build.

1 Like

Building on an equally ancient OS (in a VM) is something I’ve had to do with OEM drops. In some cases, 32-bit was required.