Build Failure:

Discuss the technical details of Gargoyle and ongoing development

Moderator: Moderators

Post Reply
tcpmux
Posts: 14
Joined: Thu Jan 07, 2016 8:34 pm

Build Failure:

Post by tcpmux »

Hi, when I run ./build.sh I eventually recv error:

Code: Select all

/home/christopher/Build/gargoyle-commit-73868cc0/alix-src/build_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c: In function 'rsa_get_exponent':
/home/christopher/Build/gargoyle-commit-73868cc0/alix-src/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)
                     ^~
scripts/Makefile.host:134: recipe for target 'tools/lib/rsa/rsa-sign.o' failed
make[5]: *** [tools/lib/rsa/rsa-sign.o] Error 1
Makefile:1195: recipe for target 'tools-only' failed
Do I need a particular version of compiler or libssl-dev installed on my system? I am running Debian stretch and install libssl-dev from the stretch repo. I did not see an INSTALL file in the source so not sure about deps required. It took at "git archive" of commit 73868cc0. My goal is to compile gl-ar150 image (so I have an image compiled by my self).

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Build Failure:

Post by ispyisail »

64bit

Code: Select all

sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Build Failure:

Post by Lantis »

Also you should use “make” rather than invoking the build script directly unless you know what you are doing
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

tcpmux
Posts: 14
Joined: Thu Jan 07, 2016 8:34 pm

Re: Build Failure:

Post by tcpmux »

Hi, I receive the same error after I

- install the packages you instructed
- delete the source-code/build-directory and reextract it from a source tarball
- use 'make' instead of ./build.sh

I'm no C coding wizard, but looking at the error it seems like it must have something to do with openssl library version. Do you build using Jessie, or some Ubuntu release...?

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Build Failure:

Post by Lantis »

Ubuntu

You haven’t included enough error information to diagnose properly.
Also, which version are you trying to build?
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

tcpmux
Posts: 14
Joined: Thu Jan 07, 2016 8:34 pm

Re: Build Failure:

Post by tcpmux »

Which version of Ubuntu?

Let me know what information you need from me. I am building gargoyle commit 19bea592, a very recent commit from the git repository. These are the last few pages of make output:

Code: Select all

make[5]: Entering directory '/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
*** Default configuration is based on 'sandbox_defconfig'
make[5]: Leaving directory '/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10'
make -C /home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10 tools-only  HOSTCFLAGS="-I/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/staging_dir/host/include -I/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/staging_dir/host/usr/include -O2 -I/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/staging_dir/host/include -I/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/staging_dir/host/usr/include" HOSTLDFLAGS="-L/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/staging_dir/host/lib -L/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/staging_dir/host/usr/lib"
make[5]: Entering directory '/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10'
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/config.h
  UPD     include/config.h
  GEN     include/autoconf.mk
  GEN     include/autoconf.mk.dep
make[5]: sdl-config: Command not found
make[5]: sdl-config: Command not found
make[5]: sdl-config: Command not found
  CHK     include/config/uboot.release
  UPD     include/config/uboot.release
make[5]: sdl-config: Command not found
  CHK     include/generated/version_autogenerated.h
  UPD     include/generated/version_autogenerated.h
make[5]: sdl-config: Command not found
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
make[5]: sdl-config: Command not found
  HOSTCC  tools/img2srec
In file included from /home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10/include/compiler.h:46:0,
                 from /home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10/include/libfdt_env.h:12,
                 from <command-line>:0:
/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/staging_dir/host/include/byteswap.h:2:2: warning: #include_next is a GCC extension
 #include_next <byteswap.h>
  ^~~~~~~~~~~~
  HOSTCC  tools/aisimage.o
  HOSTCC  tools/atmelimage.o
  WRAP    tools/common/bootm.c
  HOSTCC  tools/common/bootm.o
  WRAP    tools/common/image-fit.c
  HOSTCC  tools/common/image-fit.o
  WRAP    tools/common/image-sig.c
  HOSTCC  tools/common/image-sig.o
  WRAP    tools/common/image.c
  HOSTCC  tools/common/image.o
  HOSTCC  tools/default_image.o
  HOSTCC  tools/dumpimage.o
  HOSTCC  tools/fit_check_sign.o
  HOSTCC  tools/fit_common.o
  HOSTCC  tools/fit_image.o
  HOSTCC  tools/fit_info.o
  HOSTCC  tools/gpimage-common.o
  HOSTCC  tools/gpimage.o
  HOSTCC  tools/image-host.o
  HOSTCC  tools/imagetool.o
  HOSTCC  tools/imximage.o
  HOSTCC  tools/kwbimage.o
  WRAP    tools/lib/crc32.c
  HOSTCC  tools/lib/crc32.o
In file included from /home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10/include/compiler.h:46:0,
                 from /home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10/include/libfdt_env.h:12,
                 from <command-line>:0:
/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/staging_dir/host/include/byteswap.h:2:2: warning: #include_next is a GCC extension
 #include_next <byteswap.h>
  ^~~~~~~~~~~~
  WRAP    tools/lib/fdtdec.c
  HOSTCC  tools/lib/fdtdec.o
  WRAP    tools/lib/fdtdec_common.c
  HOSTCC  tools/lib/fdtdec_common.o
  WRAP    tools/lib/libfdt/fdt.c
  HOSTCC  tools/lib/libfdt/fdt.o
  WRAP    tools/lib/libfdt/fdt_ro.c
  HOSTCC  tools/lib/libfdt/fdt_ro.o
  WRAP    tools/lib/libfdt/fdt_rw.c
  HOSTCC  tools/lib/libfdt/fdt_rw.o
  WRAP    tools/lib/libfdt/fdt_strerror.c
  HOSTCC  tools/lib/libfdt/fdt_strerror.o
  WRAP    tools/lib/libfdt/fdt_wip.c
  HOSTCC  tools/lib/libfdt/fdt_wip.o
  WRAP    tools/lib/md5.c
  HOSTCC  tools/lib/md5.o
In file included from /home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10/include/compiler.h:46:0,
                 from /home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10/include/libfdt_env.h:12,
                 from <command-line>:0:
/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/staging_dir/host/include/byteswap.h:2:2: warning: #include_next is a GCC extension
 #include_next <byteswap.h>
  ^~~~~~~~~~~~
  WRAP    tools/lib/rsa/rsa-checksum.c
  HOSTCC  tools/lib/rsa/rsa-checksum.o
  WRAP    tools/lib/rsa/rsa-sign.c
  HOSTCC  tools/lib/rsa/rsa-sign.o
In file included from tools/lib/rsa/rsa-sign.c:1:0:
/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c: In function 'rsa_remove':
/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/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/christopher/Build/gargoyle-commit-19bea592/ramips-src/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/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c: In function 'rsa_sign_with_key':
/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:213:2: warning: implicit declaration of function 'EVP_MD_CTX_cleanup' [-Wimplicit-function-declaration]
  EVP_MD_CTX_cleanup(context);
  ^~~~~~~~~~~~~~~~~~
/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c: In function 'rsa_get_exponent':
/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/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)
                     ^~
scripts/Makefile.host:134: recipe for target 'tools/lib/rsa/rsa-sign.o' failed
make[6]: *** [tools/lib/rsa/rsa-sign.o] Error 1
Makefile:1195: recipe for target 'tools-only' failed
make[5]: *** [tools-only] Error 2
make[5]: Leaving directory '/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10'
Makefile:46: recipe for target '/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10/.built' failed
make[4]: *** [/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/build_dir/host/u-boot-2014.10/.built] Error 2
make[4]: Leaving directory '/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/tools/mkimage'
tools/Makefile:122: recipe for target 'tools/mkimage/compile' failed
make[3]: *** [tools/mkimage/compile] Error 2
make[3]: Leaving directory '/home/christopher/Build/gargoyle-commit-19bea592/ramips-src'
tools/Makefile:121: recipe for target '/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyynyyyyyyyyynyyyyynnyyynnyynnnyy' failed
make[2]: *** [/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyynyyyyyyyyynyyyyynnyyynnyynnnyy] Error 2
make[2]: Leaving directory '/home/christopher/Build/gargoyle-commit-19bea592/ramips-src'
/home/christopher/Build/gargoyle-commit-19bea592/ramips-src/include/toplevel.mk:181: recipe for target 'world' failed
make[1]: *** [world] Error 2
make[1]: Leaving directory '/home/christopher/Build/gargoyle-commit-19bea592/ramips-src'
find: ‘bin’: No such file or directory
find: ‘’: No such file or directory
find: ‘’: No such file or directory
ls: cannot access 'bin': No such file or directory
Plenty of pages of makefile output before that.

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Build Failure:

Post by ispyisail »

For your first build you should just build a default build first.

Then move on form there.............

Code: Select all

make FULL_BUILD=true
or

Code: Select all

make FULL_BUILD=true ar71xx

tcpmux
Posts: 14
Joined: Thu Jan 07, 2016 8:34 pm

Re: Build Failure:

Post by tcpmux »

ispyisail wrote:For your first build you should just build a default build first.

Then move on form there.............

Code: Select all

make FULL_BUILD=true
or

Code: Select all

make FULL_BUILD=true ar71xx
Thank you, I re-extracted the source code (for a clean build), and then followed you instruction. I am still getting the exact same error.

ispyisail, could you please tell me exactly what version of libssl-dev is installed on the system you use for building?

Code: Select all

apt-cache show libssl-dev

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Build Failure:

Post by ispyisail »

Code: Select all

user@Linux:~$ apt-cache show libssl-dev
Package: libssl-dev
Architecture: amd64
Version: 1.0.1f-1ubuntu2.23
Multi-Arch: same
Priority: optional
Section: libdevel
Source: openssl
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian OpenSSL Team <pkg-openssl-devel@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 6186
Depends: libssl1.0.0 (= 1.0.1f-1ubuntu2.23), zlib1g-dev
Recommends: libssl-doc
Filename: pool/main/o/openssl/libssl-dev_1.0.1f-1ubuntu2.23_amd64.deb
Size: 1074882
MD5sum: d7968cc775dd6f85dec47b03c5ba2042
SHA1: 6d4fc238ef0ad67163e17faef25700ebcf51a029
SHA256: 70659cc36258c23356efa1e0c6e7b87db8b276c841156b997cf494147636a8e4
Description-en: Secure Sockets Layer toolkit - development files
 This package is part of the OpenSSL project's implementation of the SSL
 and TLS cryptographic protocols for secure communication over the
 Internet.
 .
 It contains development libraries, header files, and manpages for libssl
 and libcrypto.
Description-md5: 27044468897c45b271f879c7c6e135fe
Supported: 5y

Package: libssl-dev
Priority: optional
Section: libdevel
Installed-Size: 6162
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian OpenSSL Team <pkg-openssl-devel@lists.alioth.debian.org>
Architecture: amd64
Source: openssl
Version: 1.0.1f-1ubuntu2
Depends: libssl1.0.0 (= 1.0.1f-1ubuntu2), zlib1g-dev
Recommends: libssl-doc
Filename: pool/main/o/openssl/libssl-dev_1.0.1f-1ubuntu2_amd64.deb
Size: 1066212
MD5sum: 321724885048f9a78d0e93887a7eb296
SHA1: e337538bed6e5765a0a85c4ca2af1d0deefd6ce0
SHA256: ed199dc9131923fa3c911202f165402b1310f50dcdfab987f6f5c2669fc698cc
Description-en: Secure Sockets Layer toolkit - development files
 This package is part of the OpenSSL project's implementation of the SSL
 and TLS cryptographic protocols for secure communication over the
 Internet.
 .
 It contains development libraries, header files, and manpages for libssl
 and libcrypto.
Description-md5: 27044468897c45b271f879c7c6e135fe
Multi-Arch: same
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 9m

user@Linux:~$

Post Reply