Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

armhf compile failed with "sorry, unimplemented: Thumb-1 hard-float VFP ABI" #311

Closed
coderiderlin opened this issue Aug 3, 2017 · 1 comment

Comments

@coderiderlin
Copy link

this failure cuz by armhf gcc compiler doesn't support cflag "-arch=armv6" option.

e@ubuntu32:~$ arm-linux-gnueabihf-gcc -static-libgcc -c -fPIC -march=armv6 -ffunction-sections -fdata-sections -I/home/e/projects/frida/build/fs-linux-armhf/include -Wall -Os -pipe -g3 test.c
test.c: In function ‘foo’:
**test.c:1:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI**
 int foo() { return 0; }
 ^

it passed while remove the "-march=armv6" option.
but it turns out another error in the end:

Libraries have been installed in:
   /home/e/projects/frida/build/fs-linux-armhf/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[3]: Leaving directory '/home/e/projects/frida/build/fs-tmp-linux-armhf/libgee/gee'
make[2]: Leaving directory '/home/e/projects/frida/build/fs-tmp-linux-armhf/libgee/gee'
make[2]: Entering directory '/home/e/projects/frida/build/fs-tmp-linux-armhf/libgee'
make[3]: Entering directory '/home/e/projects/frida/build/fs-tmp-linux-armhf/libgee'
make[3]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/home/e/projects/frida/build/fs-linux-armhf/lib/pkgconfig'
 /usr/bin/install -p -m 644 gee-0.8.pc '/home/e/projects/frida/build/fs-linux-armhf/lib/pkgconfig'
make[3]: Leaving directory '/home/e/projects/frida/build/fs-tmp-linux-armhf/libgee'
make[2]: Leaving directory '/home/e/projects/frida/build/fs-tmp-linux-armhf/libgee'
make[1]: Leaving directory '/home/e/projects/frida/build/fs-tmp-linux-armhf/libgee'
rm -f -r build/fs-tmp-linux-armhf/json-glib
(. build/fs-meson-env-linux-x86.rc && . build/fs-config-linux-armhf.site && python3 /home/e/projects/frida/releng/meson/meson.py --prefix $frida_prefix --libdir $frida_prefix/lib --default-library static --buildtype minsize --cross-file build/fs-linux-armhf.txt build/fs-tmp-linux-armhf/json-glib json-glib)
The Meson build system
Version: 0.41.0.dev1
Source dir: /home/e/projects/frida/json-glib
Build dir: /home/e/projects/frida/build/fs-tmp-linux-armhf/json-glib
Build type: cross build
Project name: json-glib

Meson encountered an error in file meson.build, line 1, column 0:
**Compiler arm-linux-gnueabihf-gcc can not compile programs.**
Makefile.sdk.mk:325: recipe for target 'build/fs-tmp-linux-armhf/json-glib/build.ninja' failed
make: *** [build/fs-tmp-linux-armhf/json-glib/build.ninja] Error 1

my compiler version:

Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabihf/5/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-armhf-cross/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-armhf-cross --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-armhf-cross --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libgcj --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-multilib --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=arm-linux-gnueabihf --program-prefix=arm-linux-gnueabihf- --includedir=/usr/arm-linux-gnueabihf/include
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 
@coderiderlin
Copy link
Author

coderiderlin commented Aug 4, 2017

problem solved by replace "-march=armv6" to "-marm" in releng/setup-env.sh

case $host_platform in
  linux)
    case $host_arch in
      x86)
        host_arch_flags="-m32"
        host_toolprefix="/usr/bin/"
        ;;
      x86_64)
        host_arch_flags="-m64"
        host_toolprefix="/usr/bin/"
        ;;
      arm)
        host_arch_flags="-march=armv5t"
        host_toolprefix="arm-linux-gnueabi-"

        meson_host_cpu="armv5t"
        ;;
      armhf)
        host_arch_flags="-marm"
        host_toolprefix="arm-linux-gnueabihf-"

        meson_host_cpu="armv6hf"
        ;;
      mips)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant