Patchwork Re: cp: cannot stat `misc/syscall-list.h': No such file or directory

login
register
mail settings
Submitter Jérôme BARDON
Date Feb. 15, 2013, 9:55 a.m.
Message ID <CAFKqv7zNznFWb+OUEJ43QUaZOfVxL_kNHp_2fgGqKW4izYtpeA@mail.gmail.com>
Download mbox | patch
Permalink /patch/220693/
State Superseded
Headers show

Comments

Jérôme BARDON - Feb. 15, 2013, 9:55 a.m.
Ok, fixes the problem for me. Here is a patch.

I don't know if you prefer the patch in the mail body or as attachment ?
             esac
====================================================================

Regards,

Jérôme


2013/2/9 Rafael C <groups.r2@gmail.com>
>
> Since I got no replies and found no previous documentation of this
> error. I tinkered with the source code and found that in
> lib/ct-ng.1.18.0/scripts/build/libc/glibc-eglibc.sh-common line 407
> the path should be:
>
> "misc/bits/syscall.h"
>
> instead of:
>
>  misc/syscall-list.h
>
> I'd have written a patch but I'm fairly new to this. I hope this
> manual fix helps others stuck with the same issue. Thanks.
>
>
> On Mon, Feb 4, 2013 at 10:13 PM, Rafael C <groups.r2@gmail.com> wrote:
> > Hi all. I'm trying to build an x86_64 toolchain  with crosstool-ng
> > 1.18.0 and ran across the following error (this didn't happen with
> > 1.17.0 on the same machine):
> >
> > cp: cannot stat `misc/syscall-list.h': No such file or directory
> >
> > Here is the pertinent portion of the log:
> >
> > [ALL  ]    `bits/stdio_lim.h' ->
> > `/opt/xtool/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sysroot/usr/include/bits/stdio_lim.h'
> > [DEBUG]    ==> Executing: 'cp' '-v' 'misc/syscall-list.h'
> > '/opt/xtool/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sysroot/usr/include/bits/syscall.h'
> > [ALL  ]    cp: cannot stat `misc/syscall-list.h': No such file or directory
> > [ERROR]
> > [ERROR]  >>
> > [ERROR]  >>  Build failed in step 'Installing C library headers & start files'
> > [ERROR]  >>        called in step '(top-level)'
> > [ERROR]  >>
> > [ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
> > [ERROR]  >>        called from:
> > do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@407]
> > [ERROR]  >>        called from:
> > do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
> > [ERROR]  >>        called from:
> > do_libc_start_files[scripts/build/libc/glibc-eglibc.sh-common@60]
> > [ERROR]  >>        called from: main[scripts/crosstool-NG.sh@632]
> > [ERROR]  >>
> > [ERROR]  >>  For more info on this error, look at the file: 'build.log'
> > [ERROR]  >>  There is a list of known issues, some with workarounds, in:
> > [ERROR]  >>      '/opt/crosstool/share/doc/crosstool-ng/ct-ng.1.18.0/B
> > - Known issues.txt'
> > [ERROR]
> > [ERROR]  (elapsed: 25:13.19)
> >
> > Any help is greatly appreciated. Thanks.
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>

--
For unsubscribe information see http://sourceware.org/lists.html#faq
Yann E. MORIN - Feb. 16, 2013, 11:56 p.m.
Jérôme, Rafael, All,

On Friday 15 February 2013 Jérôme BARDON wrote:
> Ok, fixes the problem for me. Here is a patch.
> 
> I don't know if you prefer the patch in the mail body or as attachment ?

Use 'hg email', it will send a proper patch.

> ====================================================================
> # HG changeset patch
> # User Jerome BARDON <bardon.pro@gmail.com>
> # Date 1360921600 -3600
> # Node ID fb662f18d002da9303aba2ea933c5204b789e752
> # Parent  20f2459b97bf5eb89e2f125e0aede9541e7fc049
> fix syscall-list.h in system headers

See my previous answer to your other patch for how to format a commit message.
Also, see (in the source tree):
    docs/7 - Contributing to crosstool-NG.txt

> diff -r 20f2459b97bf -r fb662f18d002 scripts/build/libc/glibc-eglibc.sh-common
> --- a/scripts/build/libc/glibc-eglibc.sh-common Mon Jan 28 21:53:18 2013 +0100
> +++ b/scripts/build/libc/glibc-eglibc.sh-common Fri Feb 15 10:46:40 2013 +0100
> @@ -404,7 +404,7 @@
>              # but it breaks arm, see
> http://sourceware.org/ml/crossgcc/2006-01/msg00091.html
>              case "${CT_ARCH}" in
>                  arm)    ;;
> -                *)  CT_DoExecLog ALL cp -v "misc/syscall-list.h"            \
> +                *)  CT_DoExecLog ALL cp -v "misc/bits/syscall.h"            \
>                                             "${CT_HEADERS_DIR}/bits/syscall.h"

OK, I've hit that too, now. It happens with newer versions of glibc,
but not on older versions.

The fix is incorrect, because it breaks older versions (eg. glibc 2.9).

I'm not sure how to properly fix it... :-(
I'll work on this later in the WE.

Thanks for the report and the reminder to update my samples! ;-)

Regards,
Yann E. MORIN.
Daniel Price - Feb. 26, 2013, 1:48 a.m.
FWIW, I've now hit this as well.

Yann--perhaps the answer is to just look for the different
possibilities in an if statement?  I wrote up a patch which implements
this, but then hit a problem cp'ing '*.pdf' later in the glibc
build... have you seen that issue as well?  For now I'm just falling
back to an older libc.

        -dp

On Sat, Feb 16, 2013 at 3:56 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Jérôme, Rafael, All,
>
> On Friday 15 February 2013 Jérôme BARDON wrote:
>> Ok, fixes the problem for me. Here is a patch.
>>
>> I don't know if you prefer the patch in the mail body or as attachment ?
>
> Use 'hg email', it will send a proper patch.
>
>> ====================================================================
>> # HG changeset patch
>> # User Jerome BARDON <bardon.pro@gmail.com>
>> # Date 1360921600 -3600
>> # Node ID fb662f18d002da9303aba2ea933c5204b789e752
>> # Parent  20f2459b97bf5eb89e2f125e0aede9541e7fc049
>> fix syscall-list.h in system headers
>
> See my previous answer to your other patch for how to format a commit message.
> Also, see (in the source tree):
>     docs/7 - Contributing to crosstool-NG.txt
>
>> diff -r 20f2459b97bf -r fb662f18d002 scripts/build/libc/glibc-eglibc.sh-common
>> --- a/scripts/build/libc/glibc-eglibc.sh-common Mon Jan 28 21:53:18 2013 +0100
>> +++ b/scripts/build/libc/glibc-eglibc.sh-common Fri Feb 15 10:46:40 2013 +0100
>> @@ -404,7 +404,7 @@
>>              # but it breaks arm, see
>> http://sourceware.org/ml/crossgcc/2006-01/msg00091.html
>>              case "${CT_ARCH}" in
>>                  arm)    ;;
>> -                *)  CT_DoExecLog ALL cp -v "misc/syscall-list.h"            \
>> +                *)  CT_DoExecLog ALL cp -v "misc/bits/syscall.h"            \
>>                                             "${CT_HEADERS_DIR}/bits/syscall.h"
>
> OK, I've hit that too, now. It happens with newer versions of glibc,
> but not on older versions.
>
> The fix is incorrect, because it breaks older versions (eg. glibc 2.9).
>
> I'm not sure how to properly fix it... :-(
> I'll work on this later in the WE.
>
> Thanks for the report and the reminder to update my samples! ;-)
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>
Yann E. MORIN - March 3, 2013, 9:13 p.m.
Jérôme, Daniel, Rafael, and All,

Sorry for the delay... :-/

On Tuesday 26 February 2013 Daniel Price wrote:
> FWIW, I've now hit this as well.
> 
> Yann--perhaps the answer is to just look for the different
> possibilities in an if statement?

Yes, that's what I'm testing now.

Furthermore, the destination file already exists, so I'll add another
change that will copy that file only if the destination file does exist.
I guess this is legacy from the linux-libc-headers era, when the kernel
was not yet capable of exporting its headers to userland. So a bit of
cleanup in this area will be welcome! :-]

> I wrote up a patch which implements
> this, but then hit a problem cp'ing '*.pdf' later in the glibc
> build... have you seen that issue as well?

Yes, I'm not too concerned about the manual building in the first place,
so I never debugged this. When the manuals fail to build, and I need to
test something else, I just disable the manuals build.

Regards,
Yann E. MORIN.

Patch

====================================================================
# HG changeset patch
# User Jerome BARDON <bardon.pro@gmail.com>
# Date 1360921600 -3600
# Node ID fb662f18d002da9303aba2ea933c5204b789e752
# Parent  20f2459b97bf5eb89e2f125e0aede9541e7fc049
fix syscall-list.h in system headers

diff -r 20f2459b97bf -r fb662f18d002 scripts/build/libc/glibc-eglibc.sh-common
--- a/scripts/build/libc/glibc-eglibc.sh-common Mon Jan 28 21:53:18 2013 +0100
+++ b/scripts/build/libc/glibc-eglibc.sh-common Fri Feb 15 10:46:40 2013 +0100
@@ -404,7 +404,7 @@ 
             # but it breaks arm, see
http://sourceware.org/ml/crossgcc/2006-01/msg00091.html
             case "${CT_ARCH}" in
                 arm)    ;;
-                *)  CT_DoExecLog ALL cp -v "misc/syscall-list.h"            \
+                *)  CT_DoExecLog ALL cp -v "misc/bits/syscall.h"            \
                                            "${CT_HEADERS_DIR}/bits/syscall.h"
                     ;;