Page 1 of 1

cross compiler building error

Posted: Mon Sep 14, 2015 4:03 pm
by Sampiedev007
hi,

i m following the video indicated by osdev wiki(cross compiler page).
after installing cygwin and needed packages(GCC,G++..), i downloaded source of gcc-4.9.2 and binutils-2.25.

i make 'till command make but then when running make install i have some trouble:

Code: Select all

/bin/sh: line 3: cd: ./etc: No such file or directory
Makefile:4131: recipe for target 'install-etc' failed
make[1]: *** [install-etc] Error 1
this is line 4131 from the makefile if it can help.

Code: Select all

install-etc: installdirs
	@: $(MAKE); $(unstage)
	@r=`${PWD_COMMAND}`; export r; \
	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
	$(HOST_EXPORTS) \
        (cd $(HOST_SUBDIR)/etc && \
	  $(MAKE) $(FLAGS_TO_PASS)  install)

thanks for your help.

Re: cross compiler building error

Posted: Tue Sep 15, 2015 6:59 am
by hometue
Hi

I am not sure if I can help (pretty sure I am not very experienced either), but I am sure people will need an exact list of commands you ran during your build process to know what is wrong. And by that I mean copy and paste the output in the terminal window.

Also while having a look at the wiki I noticed someone else also had issues with binutils 2.25, creating a removed edit in the cross-compiler page advising others to not use that version as it seems to have building issues. Just wanted to point that out in case your process was correct and there is indeed issues with that version of binutils.

Re: cross compiler building error

Posted: Tue Sep 15, 2015 8:36 am
by Sampiedev007
thx for your clarification i m new here.

Code: Select all

tar -xzf gcc-4.9.2.tar.gz
tar -xzf binutils-2.25.tar.gz

export PREFIX="$HOME/opt/cross"
export TARGET=i686-elf
export PATH="$PREFIX/bin:$PATH"

mkdir build-binutils

cd build-binutils

../binutils-2.25/configure --target=$TARGET --prefix=$PREFIX  --with-sysroot --disable-nls --disable-werror

make
make install
        
thx for your help