Newlib build error on ix86-linux
Jose Miguel Goncalves
jose.goncalves@inov.pt
Sat Jun 21 00:02:00 GMT 2003
J. Johnston wrote:
> Jose Miguel Goncalves wrote:
>
>> J. Johnston wrote:
>>
>>> José Miguel Gonçalves wrote:
>>>
>>>> Hi all,
>>>>
>>>> I am trying to build newlib natively on a Linux PC and I am getting
>>>> errors.
>>>> I am building it using the latest newlib sources from CVS, with a
>>>> Mandrake 9.1 distribution and gcc 2.96.
>>>>
>>>> More details:
>>>>
>>>> $ mkdir newlib-build
>>>> $ cd newlib-build
>>>> $ ../newlib-src/configure --prefix=/usr/local/newlib
>>>> --srcdir=../newlib-src
>>>> ...
>>>> $ make all-target-newlib
>>>> ...
>>>> gcc -I/home/jmpg/newlib-build/i686-pc-linux-gnu/newlib/targ-include
>>>> -I../../../newlib-src/newlib/./libc/include -DPACKAGE=\"newlib\"
>>>> -DVERSION=\"1.11.0\" -I.
>>>> -I../../../../../newlib-src/newlib/libc/argz -O2
>>>> -DMB_CAPABLE -Wall -D_I386MACH_ALLOW_HW_INTERRUPTS
>>>> -D_LOOSE_KERNEL_NAMES
>>>> -DHAVE_FCNTL -DWANT_IO_POS_ARGS -DWANT_IO_LONG_DBL -fPIC
>>>> -D_I386MACH_NEED_SOTYPE_FUNCTION -DMISSING_SYSCALL_NAMES
>>>> -fno-builtin -O2 -g
>>>> -O2 -O2 -g -O2 -c
>>>> ../../../../../newlib-src/newlib/libc/argz/argz_add.c -fPIC
>>>> -DPIC -o .libs/argz_add.o
>>>> In file included from
>>>> ../../../../../newlib-src/newlib/libc/argz/argz_add.c:8:
>>>> /home/jmpg/newlib-build/i686-pc-linux-gnu/newlib/targ-include/sys/types.h:53:24:
>>>>
>>>> sys/config.h: No such file or directory
>>>> /home/jmpg/newlib-build/i686-pc-linux-gnu/newlib/targ-include/sys/types.h:54:27:
>>>>
>>>> machine/types.h: No such file or directory
>>>> make[4]: *** [argz_add.lo] Error 1
>>>>
>>>> Any help would be appreciated.
>>>>
>>>> José Goncalves
>>>>
>>>
>>> Jose,
>>>
>>> Use absolute paths in your configure statement. Configuration is
>>> getting the
>>> relative directories wrong. Notice the difference in relative paths for
>>> the newlib-src directory when specifying the argz directory vs the
>>> libc directory in your
>>> compile. If you specify an absolute path for the location of
>>> configure, you don't need
>>> to specify --srcdir.
>>>
>>> -- Jeff J.
>>>
>>
>> Jeff,
>>
>> I've followed your advice and give an absolute path to configure
>> Unfortunely the build stiil aborts, now in another place:
>>
>> gcc
>> -I/home/jmpg/newlib-cvs/build/i686-pc-linux-gnu/newlib/targ-include
>> -I/home/jmpg/newlib-cvs/src/newlib/./libc/include -DPACKAGE=\"newlib\"
>> -DVERSION=\"1.11.0\" -I. -I/home/jmpg/newlib-cvs/src/newlib/libc/stdio
>> -O2 -DMB_CAPABLE -Wall -D_I386MACH_ALLOW_HW_INTERRUPTS
>> -D_LOOSE_KERNEL_NAMES -DHAVE_FCNTL -DWANT_IO_POS_ARGS
>> -DWANT_IO_LONG_DBL -fPIC -D_I386MACH_NEED_SOTYPE_FUNCTION
>> -DMISSING_SYSCALL_NAMES -fno-builtin -O2 -g -O2 -O2 -g -O2 -c
>> /home/jmpg/newlib-cvs/src/newlib/libc/stdio/findfp.c -fPIC -DPIC -o
>> .libs/findfp.o
>> In file included from
>> /home/jmpg/newlib-cvs/build/i686-pc-linux-gnu/newlib/targ-include/sys/lock.h:7,
>>
>> from
>> /home/jmpg/newlib-cvs/src/newlib/libc/stdio/findfp.c:25:
>> /usr/include/bits/libc-lock.h:27:36: linuxthreads/internals.h: No such
>> file or directory
>> make[4]: *** [findfp.lo] Error 1
>>
>> José Gonçalves
>>
>
> What level of glibc are you using? Newlib turns on the _LIBC flag to get
> some special definitions but this flag is used for building glibc and
> header files are within their rights to expect to drag things in the
> from the glibc
> sources. Meshing newlib and glibc header files so they work in harmony
> will be an
> on-going job. Can you send me a copy of your
> /usr/include/bits/libc-lock.h?
>
> -- Jeff J.
>
Jeff,
I'm using glibc 2.3.1.
I attach my "/usr/include/bits/libc-lock.h" header file.
José
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libc-lock.h
URL: <http://sourceware.org/pipermail/newlib/attachments/20030621/a544c707/attachment.h>
More information about the Newlib
mailing list