Newlib won't compile

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.
Post Reply
uglyoldbob
Member
Member
Posts: 62
Joined: Tue Feb 13, 2007 10:46 am

Newlib won't compile

Post by uglyoldbob »

I am using Ubuntu 7.10 to compile and port newlib (or try to compile). I am using the wiki entry for it, but I have run into a problem. It seems that the environment variable ($AR) is getting cleared before lib.a is processed. I configured it like this: ../newlib-1.15.0/configure --prefix=/home/thomas/DoorsOsNewlib/ --target=i386-elf
Let me know if you guys see anything I can maybe try.

Code: Select all

make[6]: [lib_a-setjmp.o] Error 127 (ignored)
rm -f lib.a
cru lib.a lib_a-memchr.o lib_a-memcmp.o lib_a-memcpy.o lib_a-memset.o lib_a-strchr.o lib_a-memmove.o lib_a-strlen.o lib_a-setjmp.o 
make[6]: cru: Command not found
make[6]: *** [lib.a] Error 127
make[6]: Leaving directory `/home/thomas/DoorsOs/build-newlib/i386-elf/newlib/libc/machine/i386'
Making all in .
make[6]: Entering directory `/home/thomas/DoorsOs/build-newlib/i386-elf/newlib/libc/machine'
rm -f lib.a
ln i386/lib.a lib.a >/dev/null 2>/dev/null || \
         cp i386/lib.a lib.a
cp: cannot stat `i386/lib.a': No such file or directory
make[6]: *** [lib.a] Error 1
make[6]: Leaving directory `/home/thomas/DoorsOs/build-newlib/i386-elf/newlib/libc/machine'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/thomas/DoorsOs/build-newlib/i386-elf/newlib/libc/machine'
Making all in .
make[5]: Entering directory `/home/thomas/DoorsOs/build-newlib/i386-elf/newlib/libc'
rm -f libc.a
rm -rf tmp
mkdir tmp
cd tmp; \
         for i in argz/lib.a stdlib/lib.a ctype/lib.a search/lib.a stdio/lib.a  string/lib.a signal/lib.a time/lib.a locale/lib.a reent/lib.a  errno/lib.a misc/lib.a     machine/lib.a ; do \
            x ../$i; \
         done; \
         rc ../libc.a *.o
/bin/sh: x: not found
/bin/sh: x: not found
/bin/sh: x: not found
/bin/sh: x: not found
/bin/sh: x: not found
/bin/sh: x: not found
/bin/sh: x: not found
/bin/sh: x: not found
/bin/sh: x: not found
/bin/sh: x: not found
/bin/sh: x: not found
/bin/sh: x: not found
/bin/sh: x: not found
/bin/sh: rc: not found
make[5]: *** [libc.a] Error 127
make[5]: Leaving directory `/home/thomas/DoorsOs/build-newlib/i386-elf/newlib/libc'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/thomas/DoorsOs/build-newlib/i386-elf/newlib/libc'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/thomas/DoorsOs/build-newlib/i386-elf/newlib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/thomas/DoorsOs/build-newlib/i386-elf/newlib'
make[1]: *** [all-target-newlib] Error 2
make[1]: Leaving directory `/home/thomas/DoorsOs/build-newlib'
make: *** [all] Error 2
thomas@epperson:~/DoorsOs/build-newlib$ 

I have an 80386SX 20MHz 2MB RAM.
It is my testbed platform. Only has the 3.5" and 5.25" floppy drives.
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Post by jnc100 »

AR=ar make?

Just guessing. I assume it finds ar during the configure step? I assume (also) that you have ar and its called ar.

Regards,
John.
uglyoldbob
Member
Member
Posts: 62
Joined: Tue Feb 13, 2007 10:46 am

Post by uglyoldbob »

Well I tried replacing all instances of the variables using $(AR) (which was set to blank at some point during the build cycle) to ar manually and it fixed some errors but there were still a host of more errors.
I think it is related to how the configure script is run (in this case one of the tools used in configure is probably not working properly).
I have an 80386SX 20MHz 2MB RAM.
It is my testbed platform. Only has the 3.5" and 5.25" floppy drives.
uglyoldbob
Member
Member
Posts: 62
Joined: Tue Feb 13, 2007 10:46 am

Post by uglyoldbob »

The problem has been solved. I created a separate directory and placed the source and build folders in that. It compiles just fine now.
I have an 80386SX 20MHz 2MB RAM.
It is my testbed platform. Only has the 3.5" and 5.25" floppy drives.
Post Reply