Failure to cross compile GStreamer v1.14 with config/cross-lin-arm.cbc

Matthew Thyer matthew.thyer at adelaide.edu.au
Tue Apr 24 07:57:53 UTC 2018


Greetings gstreamer-devel list,

I'm wishing to build and package GStreamer v1.14 (or later) for the ARM32 hard-float architecture (for Raspberry Pi 2, 3, 3B+). I mean the GNU Triplet: arm-linux-gnueabihf. I'm doing this in an Ubuntu docker container in an up-to-date Ubuntu 16.04 LTS x86_64 VM to ensure a clean environment.
I see that "config/linux.config" doesn't actually support the hard-float ARMv7 variant but just to get familiar with the process I've decided to test the cross compilation using the "config/cross-lin-arm.cbc" configuration (which I believe will build for arm-linux-gnueabi).

The build fails during stage 62 of 78 which is the linking during the compilation of openssl-1.1.0h. The error messages of the failure are:
[(62/78) openssl -> compile ]
Running command 'make CC="$CC $CFLAGS" LDFLAG="$LDFLAGS -fPIC" CFLAG="$CFLAGS -fPIC -DOPENSSL_PIC"'
[snip...]
rm -f apps/openssl
make -f ./Makefile.shared -e \
       PERL="/usr/bin/perl" SRCDIR=. \
       APPNAME=apps/openssl OBJECTS="apps/app_rand.o apps/apps.o apps/asn1pars.o apps/ca.o apps/ciphers.o apps/cms.o apps/crl.o apps/crl2p7.o apps/dgst.o apps/dhparam.o apps/dsa.o apps/dsaparam.o apps/ec.o apps/ecparam.o apps/enc.o apps/engine.o apps/errstr.o apps/gendsa.o apps/genpkey.o apps/genrsa.o apps/nseq.o apps/ocsp.o apps/openssl.o apps/opt.o apps/passwd.o apps/pkcs12.o apps/pkcs7.o apps/pkcs8.o apps/pkey.o apps/pkeyparam.o apps/pkeyutl.o apps/prime.o apps/rand.o apps/rehash.o apps/req.o apps/rsa.o apps/rsautl.o apps/s_cb.o apps/s_client.o apps/s_server.o apps/s_socket.o apps/s_time.o apps/sess_id.o apps/smime.o apps/speed.o apps/spkac.o apps/srp.o apps/ts.o apps/verify.o apps/version.o apps/x509.o" \
       LIBDEPS=' '" -L. -lssl -L. -lcrypto"' -ldl -pthread ' \
       CC='arm-linux-gnueabi-gcc  -Wall -g -O2 -march=armv7-a  -Wl,-rpath-link=/root/git/cerbero/build/dist/linux_armv7/lib  -Wall -g -O2 -march=armv7-a  -Wl,-rpath-link=/root/git/cerbero/build/dist/linux_armv7/lib ' CFLAGS='-DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DOPENSSLDIR="\"/root/git/cerbero/build/dist/linux_armv7/ssl\"" -DENGINESDIR="\"/root/git/cerbero/build/dist/linux_armv7/lib/engines-1.1\"" -Wall -O3 -pthread  ' \
       LDFLAGS='' \
       link_app.linux-shared
make[2]: Entering directory '/root/git/cerbero/build/sources/linux_armv7/openssl-1.1.0h'
LD_LIBRARY_PATH=.: arm-linux-gnueabi-gcc -Wall -g -O2 -march=armv7-a -Wl,-rpath-link=/root/git/cerbero/build/dist/linux_armv7/lib -Wall -g -O2 -march=armv7-a -Wl,-rpath-link=/root/git/cerbero/build/dist/linux_armv7/lib -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DOPENSSLDIR="/root/git/cerbero/build/dist/linux_armv7/ssl" -DENGINESDIR="/root/git/cerbero/build/dist/linux_armv7/lib/engines-1.1" -Wall -O3 -pthread -o apps/openssl apps/app_rand.o apps/apps.o apps/asn1pars.o apps/ca.o apps/ciphers.o apps/cms.o apps/crl.o apps/crl2p7.o apps/dgst.o apps/dhparam.o apps/dsa.o apps/dsaparam.o apps/ec.o apps/ecparam.o apps/enc.o apps/engine.o apps/errstr.o apps/gendsa.o apps/genpkey.o apps/genrsa.o apps/nseq.o apps/ocsp.o apps/openssl.o apps/opt.o apps/passwd.o apps/pkcs12.o apps/pkcs7.o apps/pkcs8.o apps/pkey.o apps/pkeyparam.o apps/pkeyutl.o apps/prime.o apps/rand.o apps/rehash.o apps/req.o apps/rsa.o apps/rsautl.o apps/s_cb.o apps/s_client.o apps/s_server.o apps/s_socket.o apps/s_time.o apps/sess_id.o apps/smime.o apps/speed.o apps/spkac.o apps/srp.o apps/ts.o apps/verify.o apps/version.o apps/x509.o -L. -lssl -L. -lcrypto -ldl -pthread
./libcrypto.so: undefined reference to `_armv7_neon_probe'
./libcrypto.so: undefined reference to `bsaes_xts_encrypt'
./libcrypto.so: undefined reference to `aes_v8_decrypt'
./libcrypto.so: undefined reference to `aes_v8_ctr32_encrypt_blocks'
./libcrypto.so: undefined reference to `bsaes_ctr32_encrypt_blocks'
./libcrypto.so: undefined reference to `_armv7_tick'
./libcrypto.so: undefined reference to `aes_v8_set_decrypt_key'
./libcrypto.so: undefined reference to `bsaes_cbc_encrypt'
./libcrypto.so: undefined reference to `gcm_gmult_neon'
./libcrypto.so: undefined reference to `_armv8_sha1_probe'
./libcrypto.so: undefined reference to `aes_v8_encrypt'
./libcrypto.so: undefined reference to `aes_v8_set_encrypt_key'
./libcrypto.so: undefined reference to `_armv8_pmull_probe'
./libcrypto.so: undefined reference to `bsaes_xts_decrypt'
./libcrypto.so: undefined reference to `gcm_init_neon'
./libcrypto.so: undefined reference to `_armv8_sha256_probe'
./libcrypto.so: undefined reference to `aes_v8_cbc_encrypt'
./libcrypto.so: undefined reference to `_armv8_aes_probe'
./libcrypto.so: undefined reference to `gcm_ghash_neon'
collect2: error: ld returned 1 exit status
Makefile.shared:179: recipe for target 'link_app.gnu' failed
make[2]: *** [link_app.gnu] Error 1
make[2]: Leaving directory '/root/git/cerbero/build/sources/linux_armv7/openssl-1.1.0h'
Makefile:6002: recipe for target 'apps/openssl' failed
make[1]: *** [apps/openssl] Error 2
make[1]: Leaving directory '/root/git/cerbero/build/sources/linux_armv7/openssl-1.1.0h'
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

I have confirmed that a native compile (on a Raspberry Pi 3 running Ubuntu MATE 16.04 aarch32) does get past this stage and completes (but fails to package as I'll describe in another email).
Does anyone have a solution for this issue?
For completeness/reproducibility, my complete steps are:

  1.  docker run -it ubuntu
  2.  apt install -y sudo python3 python-dev git intltool
  3.  echo -e "[user]\n\tname = Matthew Thyer\n\temail = Matthew.Thyer at adelaide.edu.au" >~/.gitconfig
  4.  apt install -y g++-arm-linux-gnueabi
  5.  mkdir ~/git
  6.  cd ~/git
  7.  git clone git://anongit.freedesktop.org/gstreamer/cerbero
  8.  ./cerbero-uninstalled -c ~/git/cerbero/config/cross-lin-arm.cbc bootstrap
  9.  ./cerbero-uninstalled -c ~/git/cerbero/config/cross-lin-arm.cbc package gstreamer-1.0

Regards,

---
Matthew Thyer
(08) 8313 9283
4.38 Ingkarni Wardli
Adelaide University

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180424/a1033794/attachment-0001.html>


More information about the gstreamer-devel mailing list