cross compilation doubt

This is a discussion on cross compilation doubt within the Linux Programming forums, part of the Platform Specific Boards category; Hello All, I have a C program , which uses some of the socket options related to multicast operation. Now ...

  1. #1
    Registered User
    Join Date
    Mar 2008
    Location
    India
    Posts
    113

    cross compilation doubt

    Hello All,

    I have a C program , which uses some of the socket options related to multicast operation.

    Now when i compile this in linux machine it does work properly.

    But when i compile this for mips-linux it does not work .

    In linux box iam compiling using a gcc compiler .

    For mips-linux iam compiling using the mips-linux-gcc .

    Except above step iam not doing any other change while compiling .

    is this the issue ? should i add any other things also to my Makefile.

    Basically all opensource gives me the configure file and i used to mention as
    --host=mips-linux and --with-kernel-support like i used include the header files of that source with --include options but with this source i donot have the configure file .

    is this the problem ?

    i use this source SourceForge.net: igmpproxy

    please let me know where am i missing the link.

    regards
    vrk

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    If there is no configure file, then yes, you need to find some other way to tell the build process to use the cross-compiler for that application. This may mean modifying some makefile or shell-script, but without looking at the particular build system, I can't say.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Mar 2008
    Location
    India
    Posts
    113
    the working model is compiled in the fedora 8 with x86 architecture, kernel version is 2.6.-28 ( i guess ).

    where as the mips one is with mips-linux kernel version 2.6.8

    is this the information which you mean of "build system" ?

    If you need any other information please let me know.

    I can post that.

    thanks for your relevant and immediate response.

    regards

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    No by build system I mean whatever method you use to build the application on the host system - "make" would be a typical build system, but there are people who write shell-scripts or some such to compile their code. Since I am not familiar with the actual application you are trying to build, I can't say how it is being built.

    If it's using make, then it probably means you have to define CC (or CXX) to match your cross-compiler. In other variants of build system, you would have to do somehting similar, but it's hard to describe without being familiar with that particular build-system.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Registered User
    Join Date
    Mar 2008
    Location
    India
    Posts
    113
    iam using the make utility only.

    when iam compiling for the fedora CC would gcc

    When iam doing for the mips it would be mips-linux-gcc

    compiles well in both case

    In the later case it runs with out showing any errors
    but it does not give the proper result as it gives the former case

    i hope iam making sense here.

    As i posted in my first time iam using the source forge :igmp proxy

    even you can have look at that Makefile to get the clear picture.


    regards
    vlrk

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by vlrk View Post
    iam using the make utility only.

    when iam compiling for the fedora CC would gcc

    When iam doing for the mips it would be mips-linux-gcc

    compiles well in both case

    In the later case it runs with out showing any errors
    but it does not give the proper result as it gives the former case

    i hope iam making sense here.

    As i posted in my first time iam using the source forge :igmp proxy

    even you can have look at that Makefile to get the clear picture.


    regards
    vlrk
    Ok, so, it appears that you ARE using the right compiler, but the proxy server is not working - is that right?

    If so, it would be VERY helpful if you gave us some hint as to WHAT is not working within the server? Does it crash, or does it just not behave the way you expect it to (in what way is it different?)

    I know I could get the code, but to be honest, I think understanding what is wrong is your task, not mine. I presume you are doing this for a reason - you probably even get paid to solve this [or expect to gain financially from it in the future, perhaps].

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  7. #7
    Registered User
    Join Date
    Mar 2008
    Location
    India
    Posts
    113
    first of all thanks for all the responses.

    I know you people are very busy but to tell you frankly iam desparetlely looking for some hints in resolving this issue.

    Yes you are right the proxy is not working .

    Basically i use this for the streaming of video between the server and client.

    When i compile this in a fedora linux machine and installs it in linux mahine,and run in the below design it works fine.

    windows pc ( server ) ---> wan --> eth0 ---> fedora linux --->eth1-->private lan--->windoes pc ( client /host ).

    But when i compile the same and keep that image inthe mips box ( replace fedora with mips box and eth1 with br 0 . this br 0 is the gateway to all the lan connections it has on that box ) no streaming between server and client.


    my preliminary doubt is in compilation only i.e bcz i am missing to add the kernel support which i used add with configure script like --host=mips-linux and --include , i feel it did not got the correct libraries and in turn its not working .

    please let me know your views

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. all about cross compilation
    By munna_dude in forum Linux Programming
    Replies: 1
    Last Post: 08-27-2008, 05:15 AM
  2. Minimax, URGENT :(
    By Dark-MX0Z in forum C++ Programming
    Replies: 6
    Last Post: 11-14-2007, 06:29 AM
  3. Cross platform XML library
    By Josh Kasten in forum C++ Programming
    Replies: 2
    Last Post: 04-09-2007, 05:04 PM
  4. Inconsistent Compilation
    By GlassEyeSlim in forum Linux Programming
    Replies: 2
    Last Post: 02-23-2006, 06:43 PM
  5. MS VC++ Crash on compilation
    By Magos in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 08-23-2003, 08:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21