Results 1 to 18 of 18

Thread: Shouldn't one build run in different machines?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2011
    Location
    Madrid
    Posts
    10
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Shouldn't one build run in different machines?

    I haven't had the time to look at this since yesterday, but to answer your question quickly, the application does nothing at all. The error message is
    "bash: ./MisterMand: no se puede ejecutar el fichero binario" (which is spanish for "cannot execut binary file").
    -Manu

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Shouldn't one build run in different machines?

    You have made sure that the executable bit is set?

  3. #3
    Join Date
    Mar 2011
    Location
    Madrid
    Posts
    10
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Shouldn't one build run in different machines?

    Yes, I did do that (chmod 700 ...)

  4. #4
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Shouldn't one build run in different machines?

    please show the output from the following commands:
    Qt Code:
    1. file ./MisterMand
    2. uname -a
    To copy to clipboard, switch view to plain text mode 

    btw: you can't run a 64bit executable on a 32bit machine - (unless your pc has certain virtualization capabilities, then you could run the 64bit executable in a 64bit linux guest virtual machine).
    You could build a 32bit executable on a 64bit machine by using the -march gcc compile option.
    Last edited by schnitzel; 29th March 2011 at 21:10. Reason: updated contents

  5. The following user says thank you to schnitzel for this useful post:

    portilhe (29th March 2011)

  6. #5
    Join Date
    Mar 2011
    Location
    Madrid
    Posts
    10
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Shouldn't one build run in different machines?

    The code is
    Qt Code:
    1. $ file ./MisterMand
    2. ./MisterMand: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. $ uname -a
    2. Linux nico-laptop 2.6.32-30-generic #59-Ubuntu SMP Tue Mar 1 21:30:21 UTC 2011 i686 GNU/Linux
    To copy to clipboard, switch view to plain text mode 
    I guess that means I really need to link statically, right?
    Last edited by portilhe; 29th March 2011 at 21:19.

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Shouldn't one build run in different machines?

    No, it means you need to build the program for 32 bit architecture. You are currently pouring petrol into a diesel engine and pouring petrol from another gas station will not change a thing. You need a diesel (aka 32bit binary).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #7
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Shouldn't one build run in different machines?

    Quote Originally Posted by portilhe View Post
    The code is
    Qt Code:
    1. $ file ./MisterMand
    2. ./MisterMand: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. $ uname -a
    2. Linux nico-laptop 2.6.32-30-generic #59-Ubuntu SMP Tue Mar 1 21:30:21 UTC 2011 i686 GNU/Linux
    To copy to clipboard, switch view to plain text mode 
    I guess that means I really need to link statically, right?
    not neccesarily - you *can* bundle all libs and executable together into an installer (this is a good read for you: http://doc.qt.nokia.com/4.7/deployment.html)
    but... your target architecture needs to be compatible with the produced executable. This doesn't seem to be the case in your example: 32bit target trying to run 64bit executable
    This will not work regardless of whether you build the app dynamic or static.

    arrgggh [wysota beat me to it]

  9. #8
    Join Date
    Mar 2011
    Location
    Madrid
    Posts
    10
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Shouldn't one build run in different machines?

    Thanks everyone! I shall now embark on a journey to learn how to do that (compile for 32bit on a 64bit machine).
    Cheers,
    -Manu

  10. #9
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Shouldn't one build run in different machines?

    or (if you have oodles of diskspace and a decent amount of RAM) you could install a 32bit linux guest os in a virtual machine on your 64bit linux host (check out oracle's virtualbox)

  11. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Shouldn't one build run in different machines?

    Or a chrooted build environment.

    Google for "linux compiling for 32 bits on 64 bit machine"
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QPixmap is null on other machines
    By sepehr in forum Installation and Deployment
    Replies: 6
    Last Post: 12th July 2011, 07:24
  2. Saving image fails on other machines
    By 27Loco in forum Qt Programming
    Replies: 4
    Last Post: 28th July 2010, 18:34
  3. Qt app problems on non-development machines
    By khw in forum Qt Programming
    Replies: 2
    Last Post: 11th June 2010, 19:50
  4. OSX App wont run on other machines
    By December in forum Qt Programming
    Replies: 3
    Last Post: 13th April 2007, 02:23
  5. How to Runn applications in NON Qt machines
    By sudeepdua in forum Installation and Deployment
    Replies: 4
    Last Post: 18th November 2006, 16:08

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.