Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
szhou42
Member
Posts: 67 Joined: Thu Apr 28, 2016 12:40 pm
Contact:
Post
by szhou42 » Mon Aug 22, 2016 1:47 pm
I am following this tutorial
http://wiki.osdev.org/Porting_Newlib .
Everything is fine until I do this
Code: Select all
Making install in doc
make[3]: Entering directory `/home/vagrant/test/build-newlib/i686-pc-simpleos/newlib/doc'
make[4]: Entering directory `/home/vagrant/test/build-newlib/i686-pc-simpleos/newlib/doc'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/home/vagrant/test/build-newlib/i686-pc-simpleos/newlib/doc'
make[3]: Leaving directory `/home/vagrant/test/build-newlib/i686-pc-simpleos/newlib/doc'
Making install in .
make[3]: Entering directory `/home/vagrant/test/build-newlib/i686-pc-simpleos/newlib'
make[4]: Entering directory `/home/vagrant/test/build-newlib/i686-pc-simpleos/newlib'
make[4]: Nothing to be done for `install-exec-am'.
/bin/mkdir -p '/home/vagrant/cross//usr/i686-pc-simpleos/lib'
/usr/bin/install -c -m 644 libm.a libc.a '/home/vagrant/cross//usr/i686-pc-simpleos/lib'
( cd '/home/vagrant/cross//usr/i686-pc-simpleos/lib' && i686-pc-simpleos-ranlib libm.a )
/bin/bash: line 5: i686-pc-simpleos-ranlib: command not found
make[4]: *** [install-toollibLIBRARIES] Error 127
make[4]: Leaving directory `/home/vagrant/test/build-newlib/i686-pc-simpleos/newlib'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/home/vagrant/test/build-newlib/i686-pc-simpleos/newlib'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/vagrant/test/build-newlib/i686-pc-simpleos/newlib'
make[1]: *** [install-target-newlib] Error 2
make[1]: Leaving directory `/home/vagrant/test/build-newlib'
make: *** [install] Error 2
vagrant@vagrant-ubuntu-trusty-32:~/test/build-newlib$ i686-pc-simpleos-ranlib
Usage: i686-pc-simpleos-ranlib [options] archive
Generate an index to speed access to archives
The options are:
@<file> Read options from <file>
-D Use zero for symbol map timestamp
-U Use actual symbol map timestamp (default)
-t Update the archive's symbol map timestamp
-h --help Print this help message
-v --version Print version information
i686-pc-simpleos-ranlib: supported targets: elf32-i386 elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex
Why is it saying i686-pc-simpleos-ranlib: command not found? I can run this i686-pc-simpleos-ranlib anywhere without problems.
Octacone
Member
Posts: 1138 Joined: Fri Aug 07, 2015 6:13 am
Post
by Octacone » Mon Aug 22, 2016 2:19 pm
Make sure your i686 compiler is actually exported.
If it says not found, then it is not there.
Try replacing that with your actual path to it and see if that works out.
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
szhou42
Member
Posts: 67 Joined: Thu Apr 28, 2016 12:40 pm
Contact:
Post
by szhou42 » Mon Aug 22, 2016 2:27 pm
octacone wrote: Make sure your i686 compiler is actually exported.
If it says not found, then it is not there.
Try replacing that with your actual path to it and see if that works out.
Hi, I have exported the path where i686-pc-simpleos-ranlib is in, and I tried running i686-pc-simpleos-ranlib anywhere, absolutely no problems.
I exported it by adding this line into ~/.profile
export PATH="$HOME/cross/bin:$PATH"
------------------------------------------
edit:
weird, it works if I replace i686-pc-simpleos-ranlib with the absolute path
Octacone
Member
Posts: 1138 Joined: Fri Aug 07, 2015 6:13 am
Post
by Octacone » Mon Aug 22, 2016 2:43 pm
szhou42 wrote:
edit:
weird, it works if I replace i686-pc-simpleos-ranlib with the absolute path
There you go. You probably did not export your path correctly.
Take a look at:
http://askubuntu.com/questions/60218/ho ... to-my-path
Don't forget to add wanted binary name at the end of your path:
/home/yourUserName/opt/cross/bin/
i386-elf-gcc (from my makefile, replace with your info)
OS: Basic OS
About: 32 Bit Monolithic Kernel Written in C++ and Assembly, Custom FAT 32 Bootloader
szhou42
Member
Posts: 67 Joined: Thu Apr 28, 2016 12:40 pm
Contact:
Post
by szhou42 » Mon Aug 22, 2016 11:16 pm
octacone wrote: szhou42 wrote:
edit:
weird, it works if I replace i686-pc-simpleos-ranlib with the absolute path
There you go. You probably did not export your path correctly.
Take a look at:
http://askubuntu.com/questions/60218/ho ... to-my-path
Don't forget to add wanted binary name at the end of your path:
/home/yourUserName/opt/cross/bin/
i386-elf-gcc (from my makefile, replace with your info)
Thank you octacone