OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Jul 21, 2018 7:16 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: unable to build binutils for my cross compiler
PostPosted: Wed Jan 09, 2013 12:40 pm 
Offline
Member
Member

Joined: Mon Jan 07, 2013 10:38 am
Posts: 62
hi everyone,i am trying to build binutils 2.19.1 with mingw/msys using following commands:
Code:
export PREFIX=/usr/local/cross
export TARGET=i586-elf
cd /usr/src
mkdir build-binutils
cd /usr/src/build-binutils
../binutils-x.xx/configure --target=$TARGET --prefix=$PREFIX --disable-nls
make all
make install

and im getting following errors:
Code:
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binuti
ls-2.19.1/bfd -I. -D__USE_MINGW_FSEEK    -I. -I../../binutils-2.19.1/bfd -I../..
/binutils-2.19.1/bfd/../include     -W -Wall -Wstrict-prototypes -Wmissing-proto
types -Wno-format -Werror -g -O2 -D__USE_MINGW_ACCESS -c -o archive.lo ../../bin
utils-2.19.1/bfd/archive.c
./libtool: line 2258: cygpath: command not found
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19.1/bfd -I. -D__U
SE_MINGW_FSEEK -I. -I../../binutils-2.19.1/bfd -I../../binutils-2.19.1/bfd/../in
clude -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-format -Werror -g -
O2 -D__USE_MINGW_ACCESS -c "" -o archive.o
gcc.exe: error: : No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
make[3]: *** [archive.lo] Error 1
make[3]: Leaving directory `/usr/src/build-binutils/bfd'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/usr/src/build-binutils/bfd'
make[1]: *** [install-bfd] Error 2
make[1]: Leaving directory `/usr/src/build-binutils'
make: *** [install] Error 2
/x.sh: line 8: ../gcc-4.5.0/configure: No such file or directory
make: *** No rule to make target `all-gcc'.  Stop.
make: *** No rule to make target `install-gcc'.  Stop.

i am getting the same error even for the diff binutils version,i have tried binutils-2.19.1, 2.22.0, 2.23.1
so what can be the problem ??
also my mingw's gcc compiler version is 4.6.2


Top
 Profile  
 
 Post subject: Re: unable to build binutils for my cross compiler
PostPosted: Wed Jan 09, 2013 1:29 pm 
Offline
Member
Member

Joined: Mon Jan 07, 2013 10:38 am
Posts: 62
i've also tried the command
Code:
make CFLAGS="-Os -w"

bt still the same problem persists


Last edited by dansmahajan on Wed Jan 09, 2013 1:36 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: unable to build binutils for my cross compiler
PostPosted: Wed Jan 09, 2013 1:31 pm 
Offline
Member
Member

Joined: Mon Apr 09, 2007 12:10 pm
Posts: 773
Location: London, UK
From a quick google, the 'libtool ... cygpath: command not found' error seems to be a common occurrence with older versions of msys - the only recommended solutions appear to be either not to try building whatever you are trying to build as a shared library or to upgrade your msys version. Are you using a particularly old msys?

Regards,
John.

_________________
Tysos | rpi-boot | EFI tools


Top
 Profile  
 
 Post subject: Re: unable to build binutils for my cross compiler
PostPosted: Wed Jan 09, 2013 1:37 pm 
Offline
Member
Member

Joined: Mon Jan 07, 2013 10:38 am
Posts: 62
no i am using the latest version of msys


Top
 Profile  
 
 Post subject: Re: unable to build binutils for my cross compiler
PostPosted: Wed Jan 09, 2013 1:44 pm 
Offline
Member
Member

Joined: Mon Apr 09, 2007 12:10 pm
Posts: 773
Location: London, UK
In that case perhaps try passing the '--disable-shared' option to configure?

Regards,
John.

_________________
Tysos | rpi-boot | EFI tools


Top
 Profile  
 
 Post subject: Re: unable to build binutils for my cross compiler
PostPosted: Thu Jan 10, 2013 3:03 am 
Offline
Member
Member
User avatar

Joined: Mon Jan 26, 2009 2:48 am
Posts: 792
Does MSYS support "cygpath"?

EDIT: After some Googling and testing, I think the answer is "no". Then why does libtool try to invoke it?


Top
 Profile  
 
 Post subject: Re: unable to build binutils for my cross compiler
PostPosted: Thu Jan 10, 2013 8:11 am 
Offline
Member
Member
User avatar

Joined: Wed Mar 21, 2012 3:01 pm
Posts: 920
Quote:
../binutils-x.xx/configure --target=$TARGET --prefix=$PREFIX --disable-nls


That looks like you are not providing the exact commands you use to build, could you provide those, if you still have the problem? I suspect that the configure script thinks its running under Cygwin. Do you have (or have had) Cygwin installed? Perhaps there are some environmental variables around, type 'env' in your bash and show the results here. Try passing the correct --build=whatever-msys-mingw-triple to help configure figure out what platform it is running on.


Top
 Profile  
 
 Post subject: Re: unable to build binutils for my cross compiler
PostPosted: Thu Jan 10, 2013 8:21 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9228
Location: An der schönen blauen Donau, watching muppets
Not using a several years old binutils will probably help as well.

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject: Re: unable to build binutils for my cross compiler
PostPosted: Thu Jan 10, 2013 1:08 pm 
Offline
Member
Member

Joined: Mon Jan 07, 2013 10:38 am
Posts: 62
i have tried the disable-shared and make configure-host commands but still the result is same, the same error and annoying part is i am not able to get info about this error on google


Top
 Profile  
 
 Post subject: Re: unable to build binutils for my cross compiler
PostPosted: Thu Jan 10, 2013 1:16 pm 
Offline
Member
Member

Joined: Mon Jan 07, 2013 10:38 am
Posts: 62
Quote:
That looks like you are not providing the exact commands you use to build, could you provide those, if you still have the problem? I suspect that the configure script thinks its running under Cygwin. Do you have (or have had) Cygwin installed? Perhaps there are some environmental variables around, type 'env' in your bash and show the results here. Try passing the correct --build=whatever-msys-mingw-triple to help configure figure out what platform it is running on.

no i dont have cygwin installed.
these are the result for the env command
Code:
HOMEPATH=\
APPDATA=D:\Documents and Settings\Manish\Application Data
TERM=cygwin
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 7, GenuineIntel
WINDIR=D:\WINDOWS
PT5HOME=c:\Program Files\Cisco Packet Tracer 5.3
OLDPWD=/home/Manish
USERDOMAIN=MANISH
OS=Windows_NT
ALLUSERSPROFILE=D:\Documents and Settings\All Users
VBOX_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
JRE_HOME=D:\Program Files\Java\jre7
!::=::\
TEMP=/tmp
COMMONPROGRAMFILES=D:\Program Files\Common Files
USERNAME=Manish
PROCESSOR_LEVEL=15
PATH=.:/usr/local/bin:/mingw/bin:/bin:/d/WINDOWS/system32:/d/WINDOWS:/d/WINDOWS/
System32/Wbem:/d/Program Files/Java/jdk1.7.0/bin:/d/Program Files/Microsoft Netw
ork Monitor 3/:/c/Program Files/Apache Software Foundation/apache-tomcat-6.0.32/
lib/:/d/WINDOWS/system32/WindowsPowerShell/v1.0:/c/Program Files/MinGW/bin:/c/Pr
ogram Files/NASM:.
MSYSCON=sh.exe
FP_NO_HOST_CHECK=NO
PWD=/usr/src/build-binutils
SYSTEMDRIVE=D:
JAVA_HOME=D:\Program Files\Java\jdk1.7.0
USERPROFILE=D:\Documents and Settings\Manish
CLIENTNAME=Console
PS1=\[\033]0;$MSYSTEM:\w\007
\033[32m\]\u@\h \[\033[33m\w\033[0m\]
$
LOGONSERVER=\\MANISH
PROCESSOR_ARCHITECTURE=x86
!C:=C:\msys\1.0\bin
HOME=/home/Manish
SHLVL=1
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1
HOMEDRIVE=D:
PROMPT=$P$G
MSYSTEM=MINGW32
COMSPEC=D:\WINDOWS\system32\cmd.exe
LOGNAME=Manish
TMP=/tmp
SYSTEMROOT=D:\WINDOWS
PROCESSOR_REVISION=0407
CLASSPATH=;
MAKE_MODE=unix
PROGRAMFILES=D:\Program Files
NUMBER_OF_PROCESSORS=2
SESSIONNAME=Console
HISTFILE=/home/Manish/.bash_history
COMPUTERNAME=MANISH


Top
 Profile  
 
 Post subject: Re: unable to build binutils for my cross compiler
PostPosted: Wed Feb 06, 2013 11:36 am 
Offline
Member
Member

Joined: Mon Jan 07, 2013 10:38 am
Posts: 62
[Solved]
Code:
export PREFIX=/usr/local/cross
export TARGET=i586-elf
cd /usr/src/build-binutils
../binutils-2.19.1/configure --target=$TARGET --prefix=$PREFIX --disable-nls --disable-shared -disable-libssp --disable-multilib --disable-werror
make configure-host
make
make install
cd /usr/src/build-gcc
export PATH=$PATH:$PREFIX/bin
../gcc-4.5.0/configure --target=$TARGET --prefix=$PREFIX --disable-nls --enable-languages=c --without-headers
make all-gcc
make install-gcc

above is the script that solved my problem and one thing should be kept in mind that the whole script should be executed at one go as it has caused some problems to me


Top
 Profile  
 
 Post subject: Re: unable to build binutils for my cross compiler
PostPosted: Tue Jul 30, 2013 4:36 am 
Offline

Joined: Wed May 28, 2008 10:01 pm
Posts: 1
I also faced the same error. But the above solution is not working for me. Getting the same error again.

But as said in the below thread executing the below code after configure making things correct. If this the proposed one is not working, you can try this.
Code:
echo "MAKEINFO = :" >> Makefile


viewtopic.php?f=1&t=17530


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group