You are not logged in.

#1 2017-08-21 12:17:01

kfl62
Member
From: Luna de Sus, Cluj, Romania
Registered: 2011-10-03
Posts: 11

[SOLVED] openwrt compiling issue

Can't compile openwrt ...

make[3]: Entering directory '/home/kfl62/work/openwrt/tools/automake'
(cd /home/kfl62/work/openwrt/build_dir/host/automake-1.15; AUTOM4TE=/home/kfl62/work/openwrt/staging_dir/host/bin/autom4te AUTOCONF=/home/kfl62/work/openwrt/staging_dir/host/bin/autoconf AUTOMAKE=/home/kfl62/work/openwrt/staging_dir/host/bin/automake ACLOCAL=/home/kfl62/work/openwrt/staging_dir/host/bin/aclocal AUTOHEADER=/home/kfl62/work/openwrt/staging_dir/host/bin/autoheader LIBTOOLIZE=/home/kfl62/work/openwrt/staging_dir/host/bin/libtoolize LIBTOOL=/home/kfl62/work/openwrt/staging_dir/host/bin/libtool M4=/home/kfl62/work/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.
make[3]: *** [Makefile:51: /home/kfl62/work/openwrt/build_dir/host/automake-1.15/.configured] Error 255
make[3]: Leaving directory '/home/kfl62/work/openwrt/tools/automake'
make[2]: *** [tools/Makefile:135: tools/automake/compile] Error 2
make[2]: Leaving directory '/home/kfl62/work/openwrt'
make[1]: *** [tools/Makefile:133: /home/kfl62/work/openwrt/staging_dir/target-mips_34kc_musl-1.1.16/stamp/.tools_install_yynyynynynyyyyyyynyyyyyyyyyyyyynyyyyynnyynynyyyynnnyy] Error 2
make[1]: Leaving directory '/home/kfl62/work/openwrt'
make: *** [/home/kfl62/work/openwrt/include/toplevel.mk:194: world] Error 2

I used openwrt some time ago and it worked fine.
I done a clean install

git clone https://github.com/openwrt/openwrt.git
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make -j1 V=s

I don't know what I'm doing wrong?
I installed In a virtulbox openSuSE Tumbleweed, just for try, and compiling openwrt works fine.

PS.
I installed as you see above, required packages also, as I was saying I also installed on a virtualbox running on my machine  openSuSE Tumbleweed and I got a working openwrt.
I presume it's a (gcc) compiler problem. Last year before I unfortunately deleted the openwrt build system it was working.

Last edited by kfl62 (2017-08-30 11:51:23)

Offline

#2 2017-08-21 13:05:19

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,784
Website

Re: [SOLVED] openwrt compiling issue

Mod note: Moving to AUR Issues.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

#3 2017-08-21 13:45:06

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [SOLVED] openwrt compiling issue

WorMzy: He does not use a PKGBUILD from the AUR. He does not use a PKGBUILD at all.

Offline

#4 2017-08-21 14:20:14

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] openwrt compiling issue

It's not in the official repos, therefore it belongs in AUR wink


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2017-08-21 15:11:44

kfl62
Member
From: Luna de Sus, Cluj, Romania
Registered: 2011-10-03
Posts: 11

Re: [SOLVED] openwrt compiling issue

I am glad, my question generated such interest, but I really don't care where its placed, I just want an answer, if you know any!

Offline

#6 2017-08-21 15:27:31

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [SOLVED] openwrt compiling issue

Well, you did not write what you actually did, so we can only guess. I guess there are missing dependencies.

Offline

#7 2017-08-22 14:20:40

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] openwrt compiling issue

Looks like he did edit some things in.

Did you configure a target before running make devconfig ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#8 2017-08-23 07:38:39

kfl62
Member
From: Luna de Sus, Cluj, Romania
Registered: 2011-10-03
Posts: 11

Re: [SOLVED] openwrt compiling issue

I wrote already, I make a clean "default" install...

git clone https://github.com/openwrt/openwrt.git
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make -j1 V=s

Something wrong with gcc

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 7.1.1 20170630 (GCC) 

if I install in a virtualbox Archlinux and downgrade to date 2017.03.01 works fine

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release
Thread model: posix
gcc version 6.3.1 20170109 (GCC) 

It's annoying to be forced, to start a virtualbox when I want to compile a software for my router.
How I told already it also works on openSuSE Tumbleweed, which is also a "rolling release"

Last edited by kfl62 (2017-08-23 07:56:55)

Offline

#9 2017-08-23 09:11:26

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] openwrt compiling issue

Nothing wrong with gcc, but there were changes in arch linux gcc defaults .

Compare the 2 "configured with" lines and you'll see what i mean.
Verify what differences there are with suse tumbleweed gcc  configuration.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#10 2017-08-23 13:45:21

kfl62
Member
From: Luna de Sus, Cluj, Romania
Registered: 2011-10-03
Posts: 11

Re: [SOLVED] openwrt compiling issue

openSuSE Tumbleweed gcc

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/7/lto-wrapper
OFFLOAD_TARGET_NAMES=hsa:nvptx-none
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go --enable-offload-targets=hsa,nvptx-none=/usr/nvptx-none, --without-cuda-driver --enable-checking=release --disable-werror --with-gxx-include-dir=/usr/include/c++/7 --enable-ssp --disable-libssp --disable-libvtv --disable-libcc1 --enable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-7 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
gcc version 7.1.1 20170629 [gcc-7-branch revision 249772] (SUSE Linux) 

Offline

#11 2017-08-25 12:54:29

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] openwrt compiling issue

Convert the settings on the "configured with" lines into a 3 column table (gcc 6.3.1-arch, gcc 7.1.1 arch & gcc 7.1.1 suse ) and arrange the rows so shared settings are listed first.
Post the resulting table.

Last edited by Lone_Wolf (2017-08-25 12:54:51)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#12 2017-08-26 04:39:41

doublej472
Member
Registered: 2017-08-26
Posts: 1

Re: [SOLVED] openwrt compiling issue

Someone posted a patch here that fixed this particular issue for me, it might help you out as well. It looks like it ended up being a problem with perl.

Offline

#13 2017-08-26 16:53:53

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] openwrt compiling issue

Than you for steering this thread back in the right direction, doublej472 .

Kfl62, I was wrong assuming the error was caused by gcc .
There's a known problem between automake 1.15 and earlier versus perl 5.22+ , see [1] , [2] .
It was fixed in automake 1.15.1 .

(cd /home/kfl62/work/openwrt/build_dir/host/automake-1.15;
AUTOM4TE=/home/kfl62/work/openwrt/staging_dir/host/bin/autom4te
AUTOCONF=/home/kfl62/work/openwrt/staging_dir/host/bin/autoconf
AUTOMAKE=/home/kfl62/work/openwrt/staging_dir/host/bin/automake
ACLOCAL=/home/kfl62/work/openwrt/staging_dir/host/bin/aclocal AUTOHEADER=/home/kfl62/work/openwrt/staging_dir/host/bin/autoheader
LIBTOOLIZE=/home/kfl62/work/openwrt/staging_dir/host/bin/libtoolize
LIBTOOL=/home/kfl62/work/openwrt/staging_dir/host/bin/libtool M4=/home/kfl62/work/openwrt/staging_dir/host/bin/m4
AUTOPOINT=true STAGING_DIR="" ./bootstrap.sh)

openwrt doesn't use the system installed autotools, but a special one they provide.
I suggest you apply the patch on the openwrt-provided autotools version.

[1] http://git.savannah.gnu.org/cgit/automa … 2d8302955e
[2] https://bugs.archlinux.org/task/50710


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#14 2017-08-27 04:31:09

kfl62
Member
From: Luna de Sus, Cluj, Romania
Registered: 2011-10-03
Posts: 11

Re: [SOLVED] openwrt compiling issue

Thanks for patches, after I applied the patch, I have an other error ...

In file included from tools/lib/rsa/rsa-sign.c:1:0:
/home/kfl62/work/openwrt/build_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c: In function 'rsa_remove':
/home/kfl62/work/openwrt/build_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:156:2: warning: 'ERR_remove_thread_state' is deprecated [-Wdeprecated-declarations]
  ERR_remove_thread_state(NULL);
  ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509_vfy.h:20:0,
                 from /usr/include/openssl/x509.h:309,
                 from /usr/include/openssl/pem.h:17,
                 from /home/kfl62/work/openwrt/build_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:13,
                 from tools/lib/rsa/rsa-sign.c:1:
/usr/include/openssl/err.h:247:1: note: declared here
 DEPRECATEDIN_1_1_0(void ERR_remove_thread_state(void *))
 ^
In file included from tools/lib/rsa/rsa-sign.c:1:0:
/home/kfl62/work/openwrt/build_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c: In function 'rsa_sign_with_key':
/home/kfl62/work/openwrt/build_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:213:2: warning: implicit declaration of function 'EVP_MD_CTX_cleanup'; did you mean 'EVP_MD_CTX_create'? [-Wimplicit-function-declaration]
  EVP_MD_CTX_cleanup(context);
  ^~~~~~~~~~~~~~~~~~
  EVP_MD_CTX_create
/home/kfl62/work/openwrt/build_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c: In function 'rsa_get_exponent':
/home/kfl62/work/openwrt/build_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:279:21: error: dereferencing pointer to incomplete type 'RSA {aka struct rsa_st}'
  if (BN_num_bits(key->e) > 64)
                     ^~
make[5]: *** [scripts/Makefile.host:134: tools/lib/rsa/rsa-sign.o] Error 1
make[4]: *** [Makefile:1195: tools-only] Error 2
make[4]: Leaving directory '/home/kfl62/work/openwrt/build_dir/host/u-boot-2014.10'
make[3]: *** [Makefile:48: /home/kfl62/work/openwrt/build_dir/host/u-boot-2014.10/.built] Error 2
make[3]: Leaving directory '/home/kfl62/work/openwrt/tools/mkimage'
make[2]: *** [tools/Makefile:135: tools/mkimage/compile] Error 2
make[2]: Leaving directory '/home/kfl62/work/openwrt'
make[1]: *** [tools/Makefile:133: /home/kfl62/work/openwrt/staging_dir/target-mips_34kc_musl-1.1.16/stamp/.tools_install_yynyynynynyyyyyyynyyyyyyyyyyyyynyyyyynnyynynyyyynnnyy] Error 2
make[1]: Leaving directory '/home/kfl62/work/openwrt'
make: *** [/home/kfl62/work/openwrt/include/toplevel.mk:194: world] Error 2

No luck...

note:
After some digging I found an other path for this problem  http://git.lede-project.org/70b104f , after I apply this patch too, compiling goes further but now stops at /tools/cmake with ...

[ 10%] Building C object Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/vtls/openssl.c.o
/home/kfl62/work/openwrt/build_dir/host/cmake-3.6.1/Utilities/cmcurl/lib/vtls/openssl.c: In function 'get_cert_chain':
/home/kfl62/work/openwrt/build_dir/host/cmake-3.6.1/Utilities/cmcurl/lib/vtls/openssl.c:2482:13: error: dereferencing pointer to incomplete type 'X509 {aka struct x509_st}'
     cinf = x->cert_info;
             ^~
/home/kfl62/work/openwrt/build_dir/host/cmake-3.6.1/Utilities/cmcurl/lib/vtls/openssl.c:2484:30: error: dereferencing pointer to incomplete type 'X509_CINF {aka struct x509_cinf_st}'
     j = asn1_object_dump(cinf->signature->algorithm, bufp, CERTBUFFERSIZE);
                              ^~
/home/kfl62/work/openwrt/build_dir/host/cmake-3.6.1/Utilities/cmcurl/lib/vtls/openssl.c:2510:20: error: dereferencing pointer to incomplete type 'EVP_PKEY {aka struct evp_pkey_st}'
       switch(pubkey->type) {
                    ^~
make[6]: *** [Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/build.make:2559: Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/vtls/openssl.c.o] Error 1
make[6]: Leaving directory '/home/kfl62/work/openwrt/build_dir/host/cmake-3.6.1'
make[5]: *** [CMakeFiles/Makefile2:1489: Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/all] Error 2
make[5]: Leaving directory '/home/kfl62/work/openwrt/build_dir/host/cmake-3.6.1'
make[4]: *** [Makefile:161: all] Error 2
make[4]: Leaving directory '/home/kfl62/work/openwrt/build_dir/host/cmake-3.6.1'
make[3]: *** [Makefile:30: /home/kfl62/work/openwrt/build_dir/host/cmake-3.6.1/.built] Error 2
make[3]: Leaving directory '/home/kfl62/work/openwrt/tools/cmake'
make[2]: *** [tools/Makefile:135: tools/cmake/compile] Error 2
make[2]: Leaving directory '/home/kfl62/work/openwrt'
make[1]: *** [tools/Makefile:133: /home/kfl62/work/openwrt/staging_dir/target-mips_34kc_musl-1.1.16/stamp/.tools_install_yynyynynynyyyyyyynyyyyyyyyyyyyynyyyyynnyynynyyyynnnyy] Error 2
make[1]: Leaving directory '/home/kfl62/work/openwrt'
make: *** [/home/kfl62/work/openwrt/include/toplevel.mk:194: world] Error 2

No luck again ...

Last edited by kfl62 (2017-08-28 07:44:24)

Offline

#15 2017-08-28 15:01:38

kfl62
Member
From: Luna de Sus, Cluj, Romania
Registered: 2011-10-03
Posts: 11

Re: [SOLVED] openwrt compiling issue

Finally I succeeded.

Steps:
1. Apply patch https://git.lede-project.org/?p=source. … 2745aeaf77
2. Apply patch https://git.lede-project.org/?p=source. … 94bf3eb756
3. Edit "tools/cmake/Makefile" and change "PKG_VERSION:=3.9.1" and change related lines, do not forget to delete "tools/cmake/patches/110-..."

That is all smile

Last edited by kfl62 (2017-08-29 05:02:35)

Offline

#16 2017-11-13 09:01:49

vostok4
Member
Registered: 2010-12-16
Posts: 70

Re: [SOLVED] openwrt compiling issue

Hi, I'm struggling with the same problem: compiling OpenWRT on modern Arch! Thank you for the patch for OpenSSL-1.0 support, that got me a long way forward. Now I'm having an issue where linking tools/mkimage is failing:

  HOSTLD  tools/dumpimage
tools/lib/rsa/rsa-sign.o: In function `rsa_get_params':
rsa-sign.c:(.text+0x6c1): undefined reference to `RSA_get0_key'
rsa-sign.c:(.text+0x76b): undefined reference to `RSA_get0_key'
collect2: error: ld returned 1 exit status
make[5]: *** [scripts/Makefile.host:127: tools/dumpimage] Error 1
make[4]: *** [Makefile:1195: tools-only] Error 2
make[4]: Leaving directory '/opt/openwrt/openwrt-dd/build_dir/host/u-boot-2014.10'
make[3]: *** [Makefile:48: /opt/openwrt/openwrt-dd/build_dir/host/u-boot-2014.10/.built] Error 2
make[3]: Leaving directory '/opt/openwrt/openwrt-dd/tools/mkimage'
make[2]: *** [tools/Makefile:136: tools/mkimage/compile] Error 2
make[2]: Leaving directory '/opt/openwrt/openwrt-dd'
make[1]: *** [tools/Makefile:134: /opt/openwrt/openwrt-dd/staging_dir/target-aarch64_cortex-a53+neon-vfpv4_musl-1.1.16/stamp/.tools_install_yynyynynynyyyyyyynyyyynyyyyyyyyynyyyyynnyynynnyyynnnyy] Error 2
make[1]: Leaving directory '/opt/openwrt/openwrt-dd'
make: *** [/opt/openwrt/openwrt-dd/include/toplevel.mk:194: world] Error 2

Did you run into this? I've used all your steps so far.

Offline

Board footer

Powered by FluxBB