Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

compile wine for 32-bit Windows app on amd64 multilib

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
m27315
Apprentice
Apprentice
User avatar
Posts: 253
Joined: Fri Dec 10, 2004 3:39 am
Location: 2 workstations down

compile wine for 32-bit Windows app on amd64 multilib

  • Quote

Post by m27315 » Fri Feb 07, 2014 6:15 am

Hi,

I'm trying to compile wine outside of portage to help pin-point the particular git-commit that broke my favorite app. (The particular app works for wine-1.5.31 in portage, but not for 1.6.0 in portage.)

Currently, I'm trying to follow these instructions for Regression Testing:

Code: Select all

$ git clone git://source.winehq.org/git/wine.git ~/wine-git
$ cd ~/wine-git
$ git checkout wine-1.5.31
$ export CC='x86_64-pc-linux-gnu-gcc -m32'  # trying to build 32-bit version
$ ./configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --with-alsa --without-capi --with-cms --with-cups --with-curses --with-dbus --without-fontconfig --with-gnutls --without-gphoto --without-gsm --without-gstreamer --without-hal --with-jpeg --with-ldap --with-mpg123 --with-gettext --without-openal --without-opencl --with-opengl --without-osmesa --with-oss --with-png --with-pthread --without-sane --disable-tests --with-freetype --without-v4l --with-x --with-xcomposite --with-xinerama --with-xml --with-xslt CCAS=as --disable-win64
The config line works in the Gentoo ebuild, but not outside of it. I must be missing some additional variable, because the corresponding ebuild builds without errors. However, the above line fails looking for a suitable libpng:

Code: Select all

hecking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking whether make sets $(MAKE)... yes
checking for i686-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc -m32
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-pc-linux-gnu-gcc -m32 accepts -g... yes
...
checking cups/cups.h usability... yes
checking cups/cups.h presence... yes
checking for cups/cups.h... yes
checking for -lcups... libcups.so.2
checking for -ljpeg... libjpeg.so.8
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for -lpng... not found
configure: error: libpng development files not found, PNG won't be supported.
This is an error since --with-png was requested.
Any suggestions? Why isn't the configure script finding my 32-bit version of libpng?

Code: Select all

$ sudo find /usr/lib32 /usr/lib64 -name 'libpng*.so*' -print
/usr/lib32/libpng12.so.0
/usr/lib32/libpng.so
/usr/lib32/libpng15.so.15.15.0
/usr/lib32/libpng15.so
/usr/lib32/libpng15.so.15
/usr/lib64/libpng12.so.0
/usr/lib64/libpng16.so
/usr/lib64/libpng.so
/usr/lib64/libpng16.so.16.8.0
/usr/lib64/libpng16.so.16
/usr/lib64/libpng15.so.15
I'd really like to get this working, so I can find what caused my app to stop working. ... The strange thing is that the wine-1.5.31 ebuild appears to build a 32-bit version of wine in parallel with the 64-bit, so I should have all the necessary development libraries already installed.

Any suggestions?

Thanks!
Top
m27315
Apprentice
Apprentice
User avatar
Posts: 253
Joined: Fri Dec 10, 2004 3:39 am
Location: 2 workstations down

Missing libpng-1.6 from 32-bit baselibs

  • Quote

Post by m27315 » Fri Feb 07, 2014 6:52 am

See [bug=499952]Bug #499952[/bug] for missing 32-bit libpng. I'm not sure how wine-1.5.31 works reliably currently on Gentoo multilib. ...
Top
darklegion
Guru
Guru
Posts: 468
Joined: Sun Nov 14, 2004 1:47 am

Re: compile wine for 32-bit Windows app on amd64 multilib

  • Quote

Post by darklegion » Tue Feb 11, 2014 4:07 pm

You shouldn't need all of those 32-bit specific flags. Unless I'm misunderstanding what you are trying to do, the wine build system should build a 32-bit wine automatically on 64-bit systems. If you want anything else, i.e pure wine64 or a Wow64 setup (32bit and 64bit hybrid) then you need to do what is listed here: http://wiki.winehq.org/Wine64

There still might be an issue with libpng of course, though.
Top
m27315
Apprentice
Apprentice
User avatar
Posts: 253
Joined: Fri Dec 10, 2004 3:39 am
Location: 2 workstations down

2 builds?

  • Quote

Post by m27315 » Tue Feb 11, 2014 5:33 pm

Maybe I'm doing it wrong, but the above, basic wine build only creates a 32-bit or 64-bit build - not both.

Looking at the Gentoo wine build log, it seems to launch 2 parallel configure && make && make install runs - one 32-bit, the other 64-bit. (If you look carefully in a build log, you'll see the 32-bit and 64-bit output lines intermingled.)

I can duplicate the 64-bit build outside of portage using the Regression Testing instructions, except my 32-bit Windows app complains about wrong ELF type, so I'm assuming I must have 32-bit also. And, the 32-bit fails because of the missing libpng.

I'm guessing that libpng-1.6 is required, since I have the 64-bit version of it, and I have 32-bit versions of libpng-1.5 and -1.2, and it will build for 64-bit but not for 32-bit due to missing libpng.

Based on the above bug report, I've decided to wait until Pacho has build the latest emul package with libpng-1.6 32-bit before pursuing further. Who knows? Maybe that will fix my original app compatibility issue too? :)

Thanks!
Top
darklegion
Guru
Guru
Posts: 468
Joined: Sun Nov 14, 2004 1:47 am

Re: 2 builds?

  • Quote

Post by darklegion » Fri Feb 14, 2014 6:50 am

m27315 wrote:Maybe I'm doing it wrong, but the above, basic wine build only creates a 32-bit or 64-bit build - not both.
Just for the record you can build it this way if you want both builds, as listed on the wine64 link:

Code: Select all

mkdir wine64
cd wine64
../configure --enable-win64
make 
mkdir ../wine32
cd ../wine32
../configure --with-wine64=../wine64
make
Make sure you type wine64 and not win64 when building the 32-bit version.
Top
m27315
Apprentice
Apprentice
User avatar
Posts: 253
Joined: Fri Dec 10, 2004 3:39 am
Location: 2 workstations down

missing development libraries

  • Quote

Post by m27315 » Fri Feb 14, 2014 5:23 pm

Thanks, @darklegion! Using the above instructions, the 64-bit version compiles just fine, but the 32-bit version fails the configure phase again. Well, it technically succeeds, but it warns that it will not be very functional:

Code: Select all

$ mkdir wine64
$ cd wine64
$ ../configure --enable-win64
$ make
$ mkdir ../wine32
$ cd ../wine32
$ ../configure --with-wine64=../wine64
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
...
configure: libhal 32-bit development files not found, no legacy dynamic device support.
configure: libgphoto2 32-bit development files not found, digital cameras won't be supported.
configure: gstreamer-0.10 base plugins 32-bit development files not found, gstreamer support disabled
configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.
configure: libcapi20 32-bit development files not found, ISDN won't be supported.
configure: libgsm 32-bit development files not found, gsm 06.10 codec won't be supported.
configure: libopenal 32-bit development files not found (or too old), OpenAL won't be supported.

configure: WARNING: libpng 32-bit development files not found, PNG won't be supported.

configure: Finished.  Do 'make' to compile Wine.
Hoping this might still be useful, even though it does not have libpng 32-bit support, I wrapped the build and app-test in a regression testing script:

Code: Select all

#!/bin/sh
cd ~/wine-git || exit 1
git reset --hard HEAD || exit 2
git clean -fd . || exit 3
MY_WINE=/home/my_home/my_wine
rm -rf "${MY_WINE}"
mkdir -p "${MY_WINE}" || exit 4
mkdir build_wine64 || exit 11
cd build_wine64 || exit 12
../configure --enable-win64 prefix="${MY_WINE}" || exit 13
make -j8 || exit 14
mkdir ../build_wine32 || exit 21
cd ../build_wine32 || exit 22
../configure --with-wine64=../build_wine64 prefix="${MY_WINE}" || exit 23
make -j8 && make install || exit 24
cd ../build_wine64 || exit 31
make install || exit 32

export WINEVERPATH="${MY_WINE}"
export PATH="${MY_WINE}/bin:$PATH"
export WINESERVER="${MY_WINE}/bin/wineserver"
export WINELOADER="${MY_WINE}/bin/wine"
export WINEDLLPATH="${MY_WINE}/lib/wine/fakedlls"
export LD_LIBRARY_PATH="${MY_WINE}/lib:$LD_LIBRARY_PATH"

wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Adobe/Adobe\ Audition\ 3.0/Audition.exe || exit 41
Not surprisingly, it dies. The curious thing is that I am building the wine 1.5.31 tag, and this exact same WINEPREFIX works fine using the Gentoo wine-1.5.31 ebuild. Why? ... I need to understand why this works for Gentoo, so I can isolate the regression between the Gentoo ebuilds for 1.5.31 and 1.6+. I guess I need to duplicate the Gentoo config switches and source patches next? ... But, I'm still hoping this will all go away when the updated emul packages are released.

Any thoughts or help is greatly appreciated.
Top
Farmboy
n00b
n00b
Posts: 22
Joined: Sun Jul 10, 2011 5:20 pm

  • Quote

Post by Farmboy » Fri Feb 14, 2014 8:51 pm

Hi m27315,
I was in the same boat as you are trying to build 32 bit wine from git with Gentoo amd64 stable.
I was able to solve the problem by switching to a true multilib system without any emul-linux packages.

As wine configure complains it doesnt find the libpng development files.
This doesnt mean only the libraries but the header files and matching libraries.

Unfortunately Gentoo installs 64bit libpng 1.6(with headers) but the the emul-linux package comes with libpng 1.5.
A true multilib system will install a 32bit and 64 bit libpng 1.6 so wine will not complain.

I dont know what the wine ebuild does maybe it builds without png.

Switching to true multilib is a bit tricky at the moment as not all ebuilds that build libraries have stabilised yet.
First you need to unmask the abi_x86_32 keyword and remove all emul-linux packages and applications that depends on them.
Add ABI_X86="64 32" to your make.conf if you havent already.
Now you need to rebuild you world and unmask unstable packages till everything compiles again. That will take a bit of time.
Some ebuilds needed for wine only have a multilib supporting ebuild in overlays, for instance: libgcrypt libgpg-error libxslt and (probably) mesa
Top
Post Reply

7 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy