bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/30177] New: build failed on arrch64


From: fatalfeel at hotmail dot com
Subject: [Bug binutils/30177] New: build failed on arrch64
Date: Mon, 27 Feb 2023 11:24:11 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=30177

            Bug ID: 30177
           Summary: build failed on arrch64
           Product: binutils
           Version: 2.39
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: fatalfeel at hotmail dot com
  Target Milestone: ---

binutils 2.25.1 x86_64 & aarch64 both build pass
binutils after 2.26 cross compile to aarch64 target failed

my system is ubuntu 16.04 x86_64 and 18.04 x86_64 

~~~build script
CPU_NUM=$(grep -c processor /proc/cpuinfo)
echo "CPU number = "$CPU_NUM

rm -rf /root/binutils-2.39
cd $HOME
export PATH=$PATH:/opt/ivot/aarch64-ca53-linux-gnueabihf-8.4.01/bin
export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ivot/aarch64-ca53-linux-gnueabihf-8.4.01/lib
export AR=aarch64-ca53-linux-gnu-ar
export AS=aarch64-ca53-linux-gnu-as
export CC=aarch64-ca53-linux-gnu-gcc
export CXX=aarch64-ca53-linux-gnu-g++
export LD=aarch64-ca53-linux-gnu-ld

tar -xvf ./binutils-2.39.tar.xz
cd binutils-2.39
./configure --host=x86_64-linux-gnu --target=aarch64-linux-gnu
--prefix=$HOME/binutils-2.39/build --program-prefix=""
make -j$CPU_NUM && make install

~~failed message
make[2]: Leaving directory '/root/binutils-2.39/zlib'
make[2]: Entering directory '/root/binutils-2.39/bfd'
Making info in po
make[3]: Entering directory '/root/binutils-2.39/bfd/po'
make[3]: Nothing to be done for 'info'.
make[3]: Leaving directory '/root/binutils-2.39/bfd/po'
make[3]: Entering directory '/root/binutils-2.39/bfd'
make[3]: Circular doc/bfd.stamp <- doc/bfd.texi dependency dropped.
  GEN      doc/aoutx.stamp
/lib/ld-linux-aarch64.so.1: No such file or directory
Makefile:2492: recipe for target 'doc/aoutx.stamp' failed
make[3]: *** [doc/aoutx.stamp] Error 1
make[3]: Leaving directory '/root/binutils-2.39/bfd'
Makefile:1932: recipe for target 'info-recursive' failed
make[2]: *** [info-recursive] Error 1
make[2]: Leaving directory '/root/binutils-2.39/bfd'
Makefile:3057: recipe for target 'all-bfd' failed
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory '/root/binutils-2.39'
Makefile:1003: recipe for target 'all' failed
make: *** [all] Error 2
root@homelinux:~/binutils-2.39#

~~~~fix method
gedit ~/binutils-2.39/config.guess
~find
x86_64:Linux:*:*)
set_cc_for_build
LIBCABI=$LIBC
if test "$CC_FOR_BUILD" != no_compiler_found; then
    if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
      (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
      grep IS_X32 >/dev/null
    then
      LIBCABI=${LIBC}x32
    fi
fi
GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
~this all change to
x86_64:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC

after fix now build for aarch64 ok

////////////////
////////////////with another try
////////////////
~edit configure
if test "${build}" != "${host}" ; then
  AR_FOR_BUILD=${AR_FOR_BUILD-ar}
  AS_FOR_BUILD=${AS_FOR_BUILD-as}
  CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
  CXX_FOR_BUILD=${CXX_FOR_BUILD-g++}
  GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
  GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
  DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
  LD_FOR_BUILD=${LD_FOR_BUILD-ld}
  NM_FOR_BUILD=${NM_FOR_BUILD-nm}
  RANLIB_FOR_BUILD=${RANLIB_FOR_BUILD-ranlib}
  WINDRES_FOR_BUILD=${WINDRES_FOR_BUILD-windres}
  WINDMC_FOR_BUILD=${WINDMC_FOR_BUILD-windmc}
  echo "111111"
  echo "${build} ${host}"
else
  AR_FOR_BUILD="\$(AR)"
  AS_FOR_BUILD="\$(AS)"
  CC_FOR_BUILD="\$(CC)"
  CXX_FOR_BUILD="\$(CXX)"
  GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
  GOC_FOR_BUILD="\$(GOC)"
  DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
  LD_FOR_BUILD="\$(LD)"
  NM_FOR_BUILD="\$(NM)"
  RANLIB_FOR_BUILD="\$(RANLIB)"
  WINDRES_FOR_BUILD="\$(WINDRES)"
  WINDMC_FOR_BUILD="\$(WINDMC)"
  echo "111111"
  echo "${build} ${host}"
fi

~and
rm -rf /root/binutils-2.39
cd $HOME
export PATH=$PATH:/opt/ivot/aarch64-ca53-linux-gnueabihf-8.4.01/bin
export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ivot/aarch64-ca53-linux-gnueabihf-8.4.01/lib
export AR=aarch64-ca53-linux-gnu-ar
export AS=aarch64-ca53-linux-gnu-as
export CC=aarch64-ca53-linux-gnu-gcc
export CXX=aarch64-ca53-linux-gnu-g++
export LD=aarch64-ca53-linux-gnu-ld

tar -xvf ./binutils-2.39.tar.xz
cd binutils-2.39
./configure --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=aarch64-linux-gnu --prefix=$HOME/binutils-2.39/build
--program-prefix=""

~~error
checking whether we are cross compiling... configure: error: in
`/root/binutils-2.39':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]