Issue with Linker can't find lib's.

Ghalib Khan ghalib.khan@exaleapsemi.com
Wed Jun 26 03:42:00 GMT 2019


Hi,
We are actually trying to build riscv linux cross compilation tool(build:x86_64, host: x86_64, target:riscv64).
Initially, a custom path was given for prefix instead of /usr. If i mention /usr path it's trying to modify my local machine fille's, what should i do, Here is the Error............

/usr/bin/install: cannot remove '/usr/include/limits.h': Permission denied
make[2]: *** [/usr/include/limits.h] Error 1
make[1]: *** [install-headers] Error 2

Can you send glibc configuration, which means how to build the whole glibc.

Thanks
________________________________
From: Andreas Schwab <schwab@suse.de>
Sent: 25 June 2019 3:23 PM
To: Ghalib Khan
Cc: binutils@sourceware.org
Subject: Re: Issue with Linker can't find lib's.

On Jun 25 2019, Ghalib Khan <ghalib.khan@exaleapsemi.com> wrote:

> build-glibc-linux
>  $ ./configure \
>  CC="riscv64-unknown-linux-gnu-gcc " \
>  CXX="riscv64-unknown-linux-gnu-g++ " \
>  CFLAGS=" -mcmodel=medlow -g -O2 " \
>  CXXFLAGS=" -mcmodel=medlow -g -O2 " \
>  ASFLAGS=" -mcmodel=medlow " \
>  --host=riscv64-unknown-linux-gnu \
>  --prefix=$(INSTALL_DIR) \

prefix should be /usr, ie. the host path.

>  --with-sysroot=$(INSTALL_DIR)/sysroot \
>  --disable-werror \
>  --enable-shared \
>  --enable-obsolete-rpc \
>  --with-headers=$(INSTALL_DIR)/include  \
>  --disable-multilib \
>  --enable-add-ons \
>  --enable-kernel=$(linux_version) \
>   \
>  --libdir=$(INSTALL_DIR)/sysroot/usr/lib libc_cv_slibdir=$(INSTALL_DIR)/sysroot/lib libc_cv_rtlddir=$(INSTALL_DIR)/sysroot/lib

Same here, these need to be host paths.

> build-glibc-linux-headers
>  ./configure \
>  CC="riscv64-unknown-linux-gnu-gcc " \
>  --host=riscv64-unknown-linux-gnu \
>  --prefix=$(INSTALL_DIR)/sysroot/usr  \

Likewise.

Andreas.

--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



More information about the Binutils mailing list