Error at end of app install: can't open builtin library for regsvr32.exe...

Dan Kegel dank at
Fri Dec 16 22:08:19 CST 2005

On 12/15/05, Vitaliy Margolen <wine-devel at> wrote:
> > wine: cannot open builtin library for
> > L"C:\\windows\\system32\\regsvr32.exe":
> > /home/dank/wine/programs/ invalid ELF header
> >
> > This is with 0.9.3 built on fc3.
> Looks like a case of overwritten regsvr32.exe with native copy (like what
> IE6 installation will do...

Nice theory, but check this out: I can reproduce it without installing anything:

$ rm -rf .wine
$ wine/wine notepad.exe
/home/dank/.wine updated successfully.
$ find .wine -name regsvr32.exe -ls
4669487    0 lrwxrwxrwx   1 dank     dank           40 Dec 17 03:35
.wine/drive_c/windows/system32/regsvr32.exe ->
$ wine/wine .wine/drive_c/windows/system32/regsvr32.exe
wine: cannot open builtin library for
/home/dank/wine/programs/ invalid ELF header

And better yet, I *can* run if I avoid the symlink:

$ wine/wine wine/programs/
(works ok)

Or if I actually install wine:
$ wine .wine/drive_c/windows/system32/regsvr32.exe

Aha.  It looks like it might have been a clash between
the wine in the build directory and the old wine I had installed.

So I guess it's not safe to run from the build directory
if you have a copy of Wine installed on your system.
- Dan
Wine for Windows ISVs:

More information about the wine-devel mailing list