MSYS build Linux

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

MSYS build Linux

赵鹏�
Hi All:

    I am using msys on windows 7 to build linux for mips loongson target. I have build binutils and gcc for mips loongson target successfully. But when I build linux 2.6.43 with:

make ARCH=mips  CROSS_COMPILE=mips64el-linux- -j 8

I get error:

$ make ARCH=mips CROSS_COMPILE=mips64el-linux- -j 8
  CHK     include/linux/version.h
  HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep.c:108:22: fatal error: sys/mman.h: No such file or director
y
 #include <sys/mman.h>
                      ^
compilation terminated.
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2


What's the problem? Thanks a lot!

        fiveight
        [hidden email]
          2013-12-13
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: MSYS build Linux

Keith Marshall
On 14/12/13 11:58, 赵鹏翀 wrote:
> Hi All:
>
>     I am using msys on windows 7 to build linux for mips loongson target. I have build binutils and gcc for mips loongson target successfully. But when I build linux 2.6.43 with:
>
> make ARCH=mips  CROSS_COMPILE=mips64el-linux- -j 8

So, your build system is non-standard, in terms of the GNU format we
employ: for a cross-compile, we would anticipate something like

  $ configure --host=mips64el-linux --build=i686-pc-mingw32 ...
  $ make -j 8

> I get error:
>
> $ make ARCH=mips CROSS_COMPILE=mips64el-linux- -j 8
>   CHK     include/linux/version.h
>   HOSTCC  scripts/basic/fixdep
> scripts/basic/fixdep.c:108:22: fatal error: sys/mman.h: No such file or director
> y
>  #include <sys/mman.h>
>                       ^
> compilation terminated.
> make[1]: *** [scripts/basic/fixdep] Error 1
> make: *** [scripts_basic] Error 2
>
>
> What's the problem? Thanks a lot!

Looks like you're missing (at least) the sys/mman.h header, from the
include path of your cross compiler.  (I do hope you're not trying to
use MinGW or MSYS headers, in place of the proper MIPS headers).

That you're doing this under MSYS, is really irrelevant; when cross
compiling, you need a complete suite of cross tools, including the
header files, which are specific to the target architecture.  If you
continue to experience issues, you would be better off seeking advice on
a MIPS focussed list; there's nothing related to MinGW, in respect of
this processor.

--
Regards,
Keith.

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: MSYS build Linux

Peter Rosin
On 2013-12-14 17:37, Keith Marshall wrote:

> On 14/12/13 11:58, 赵鹏翀 wrote:
>> Hi All:
>>
>>     I am using msys on windows 7 to build linux for mips loongson target. I have build binutils and gcc for mips loongson target successfully. But when I build linux 2.6.43 with:
>>
>> make ARCH=mips  CROSS_COMPILE=mips64el-linux- -j 8
>
> So, your build system is non-standard, in terms of the GNU format we
> employ: for a cross-compile, we would anticipate something like
>
>   $ configure --host=mips64el-linux --build=i686-pc-mingw32 ...
>   $ make -j 8
>
>> I get error:
>>
>> $ make ARCH=mips CROSS_COMPILE=mips64el-linux- -j 8
>>   CHK     include/linux/version.h
>>   HOSTCC  scripts/basic/fixdep

Notice HOSTCC, not CC.

>> scripts/basic/fixdep.c:108:22: fatal error: sys/mman.h: No such file or director
>> y
>>  #include <sys/mman.h>
>>                       ^
>> compilation terminated.
>> make[1]: *** [scripts/basic/fixdep] Error 1
>> make: *** [scripts_basic] Error 2
>>
>>
>> What's the problem? Thanks a lot!
>
> Looks like you're missing (at least) the sys/mman.h header, from the
> include path of your cross compiler.  (I do hope you're not trying to
> use MinGW or MSYS headers, in place of the proper MIPS headers).
>
> That you're doing this under MSYS, is really irrelevant; when cross
> compiling, you need a complete suite of cross tools, including the
> header files, which are specific to the target architecture.  If you
> continue to experience issues, you would be better off seeking advice on
> a MIPS focussed list; there's nothing related to MinGW, in respect of
> this processor.

This is the wrong conclusion, I think.

I believe fixdep to be a helper program, that is supposed to be built
with the native compiler (HOSTCC would not be my selected naming, by
the way), which probably fails since the native compiler is in all
likelihood MinGW gcc (and not MSYS gcc). Thus all sorts of POSIX stuff,
like sys/mman.h, is missing. Boom.

Cheers,
Peter


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe