Re: [Hampshire] Building 32-bit apps on 64-bit host

2009-01-06 Thread Richard Danter
2009/1/5 Adrian Bridgett adr...@smop.co.uk:
 On Mon, Jan  5, 2009 at 12:23:04 + (+), Richard Danter wrote:
 Hi all,

 I have been developing a couple of little apps to make my life easier
 at work. All has been going well until my host was upgraded to 64-bit.
 One of the libs I have to use is available only as 32-bit. The apps
 themselves are using Qt and of course they are 64-bit.

 Anyone know the correct way to build a 32-bit Qt app on a 64-bit host?

 I'd use a 32-bit chroot myself to remove any potential problem.  Or a
 VM.

I asked the same question on the Qt mailing list and got a similar answer. :)

Think I will just use another machine. Not quite as convenient, but
since I have one I may as well use it.

Thanks
Rich

-- 
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--


Re: [Hampshire] Building 32-bit apps on 64-bit host

2009-01-05 Thread Jonathan Hudson
On Mon, 5 Jan 2009 12:23:04 +
Richard Danter radan...@googlemail.com wrote:

 Hi all,

 I have been developing a couple of little apps to make my life easier
 at work. All has been going well until my host was upgraded to 64-bit.
 One of the libs I have to use is available only as 32-bit. The apps
 themselves are using Qt and of course they are 64-bit.

 Anyone know the correct way to build a 32-bit Qt app on a 64-bit host?
 I am using qmake so I hope that makes it easier!

 The host is Ubuntu 8.04 so ideally I would like to do this the Ubuntu
 way, if there is such a thing.

 Thanks
 Rich


Rich,

Doesn't really answer the question ...

The hard bit is making sure you have all the development libraries
in /usr/lib32. I've built a number of console and gtk apps on x86_64
for an ia32 target with 'CC=gcc -m32', but it may be more complex for
qt.

For gtk (and hence C, not C++),

$ CC='gcc -m32' ./configure  make

Then track down the missing 32 libraries. If you copy them off a 32bit
box, you may need to hack the path in the respective .la files
to /usr/lib32.

-jh



-- 
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--


Re: [Hampshire] Building 32-bit apps on 64-bit host

2009-01-05 Thread Jonathan Hudson
On Mon, 05 Jan 2009 18:24:05 +
Jonathan Hudson jh+h...@daria.co.uk wrote:

 On Mon, 5 Jan 2009 12:23:04 +
 Richard Danter radan...@googlemail.com wrote:

  Hi all,

 Doesn't really answer the question ...

 The hard bit is making sure you have all the development libraries
 in /usr/lib32. I've built a number of console and gtk apps on x86_64
 for an ia32 target with 'CC=gcc -m32', but it may be more complex for
 qt.

 For gtk (and hence C, not C++),

 $ CC='gcc -m32' ./configure  make

 Then track down the missing 32 libraries. If you copy them off a 32bit
 box, you may need to hack the path in the respective .la files
 to /usr/lib32.


Easier not to have any *.la files in /usr/lib32, just symlink the
highest run time .so to a bare .so, e.g.:

# cd /usr/lib32
# ln -sf libfreetype.so.6.3.18 libfreetype.so

-jh


-- 
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--


Re: [Hampshire] Building 32-bit apps on 64-bit host

2009-01-05 Thread Adrian Bridgett
On Mon, Jan  5, 2009 at 12:23:04 + (+), Richard Danter wrote:
 Hi all,
 
 I have been developing a couple of little apps to make my life easier
 at work. All has been going well until my host was upgraded to 64-bit.
 One of the libs I have to use is available only as 32-bit. The apps
 themselves are using Qt and of course they are 64-bit.
 
 Anyone know the correct way to build a 32-bit Qt app on a 64-bit host?

I'd use a 32-bit chroot myself to remove any potential problem.  Or a
VM.

I've once been bitten by a (Java of all things!) program failing to
build with obscure output (maven) with 64-bit kernel and 32-bit
userspace.

Adrian
-- 
Email: adr...@smop.co.uk  -*-  GPG key available on public key servers
Debian GNU/Linux - the maintainable distribution   -*-  www.debian.org

-- 
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--