[pkg-wine-party] ntdll.dll.so: invalid ELF header after building wine 1.0.1 from the source package

Yves Salathe ysalathe at student.ethz.ch
Tue Feb 9 12:22:16 UTC 2010


I have a strange problem with libwine when I build Wine version 1.0.1
from the source package in Debian GNU/Linux lenny (amd64). I have
installed all the build-deps.

After successfully building the packages with "debuild" and installing
wine-bin and libwine, 
I get the following  error when I try to run wine (e.g. when trying to
run winecfg or any other application). 

wine: failed to initialize: /usr/lib/wine/ntdll.dll.so: invalid ELF

To check whether this is really the case, I tried: 

readelf -h /usr/lib/wine/ntdll.dll.so 

it reports: 

readelf: Error: Not an ELF file - it has the wrong magic bytes at the

However, if I instead install the binary package from the Debian
repository I see that this file should indeed be an ELF32.

I worked around the problem by removing the linker option
"--image-base,0x7bc00000" from the variable EXTRADLLFLAGS in the files: 

Afterwards, ntdll.dll.so in the homemade libwine package is a real ELF32
and wine runs. But I think that there may be some problems with that
workaround and I do not understand why the native source package is
built in a wrong way on my machine.

I have the same problem when I try to compile the upstream versions of
Wine (see the following discussion:

Can you help me?


More information about the pkg-wine-party mailing list