Failure compiling Wine 9.0

Trying to compile Wine 9.0 as root under Rocky 9.3 I get:

config.status: executing tools/makedep commands
config.status: executing Makefile commands
makedep: error: open amstream.idl : Operation not permitted
config.status: error: could not create Makefile

amstream.idl is installed as part of the wine source package.
I also get Operation not permitted if I run winetools as an ordinary user but not as root.

I cannot find an explanation of “Operation not permitted” anywhere.

Good morning, just out of curiosity, did you do the entire compiling process as root? is it using a makefile? I am not familiar with the package source you are trying to compile, sometimes if you start the process as root some files will be unreachable by normal users, generally speaking only the make install process should be performed with root privileges. I’d need the whole error log in order to provide more insightful feedback, though.

1 Like

Thanks for getting back to me.
The entire process from tar -xf to ./configure was done as root.
I did this for two reasons:

  1. I wanted to install as root,
  2. Anything I do with wine as an ordinary user fails with “Operation not
    permitted”.

I am attaching configure.log (which looks pretty ordinary until the end).
Cheers,
Stephen

(Attachment config.log is missing)

Attachment config.log was rejected. It is too big to copy/paste.
I can see nothing in it of any interest.
The last line just says “configure: exit 1”
The only other information is that in my previous post.

you could extract the .tar.gz file as your user, extract with tar -xzvf file.tar.gz, cd into the created dir, do your ./configure and make as your user and then do sudo make install and see if you stumble upon the same error.

As a general rule, you should never compile as root. Also as a general rule, it’s much better to either build an RPM or rebuild a source RPM that may already have your software than trying to compile something by hand, if you can help it. In this case, wine 9 can be rebuilt from Fedora 39.

Using mock from EPEL, chaining vkd3d and wine into mock builds wine packages.

% dnf install epel-release -y
% crb enable
% dnf install mock -y
% wget https://kojipkgs.fedoraproject.org//packages/vkd3d/1.10/1.fc39/src/vkd3d-1.10-1.fc39.src.rpm \
  https://kojipkgs.fedoraproject.org//packages/wine/9.0/2.fc39/src/wine-9.0-2.fc39.src.rpm
% mock -r rocky+epel-9-x86_64 --chain vkd3d-1.10-1.fc39.src.rpm wine-9.0-2.fc39.src.rpm

It produces these RPMs:

libvkd3d-1.10-1.el9.x86_64.rpm
libvkd3d-debuginfo-1.10-1.el9.x86_64.rpm
libvkd3d-devel-1.10-1.el9.x86_64.rpm
libvkd3d-shader-1.10-1.el9.x86_64.rpm
libvkd3d-shader-debuginfo-1.10-1.el9.x86_64.rpm
libvkd3d-shader-devel-1.10-1.el9.x86_64.rpm
libvkd3d-utils-1.10-1.el9.x86_64.rpm
libvkd3d-utils-debuginfo-1.10-1.el9.x86_64.rpm
libvkd3d-utils-devel-1.10-1.el9.x86_64.rpm
mingw32-vkd3d-1.10-1.el9.noarch.rpm
mingw32-vkd3d-debuginfo-1.10-1.el9.noarch.rpm
mingw64-vkd3d-1.10-1.el9.noarch.rpm
mingw64-vkd3d-debuginfo-1.10-1.el9.noarch.rpm
vkd3d-1.10-1.el9.src.rpm
vkd3d-compiler-1.10-1.el9.x86_64.rpm
vkd3d-compiler-debuginfo-1.10-1.el9.x86_64.rpm
vkd3d-debuginfo-1.10-1.el9.x86_64.rpm
vkd3d-debugsource-1.10-1.el9.x86_64.rpm
wine-9.0-2.el9.src.rpm
wine-9.0-2.el9.x86_64.rpm
wine-alsa-9.0-2.el9.x86_64.rpm
wine-alsa-debuginfo-9.0-2.el9.x86_64.rpm
wine-arial-fonts-9.0-2.el9.noarch.rpm
wine-cms-9.0-2.el9.x86_64.rpm
wine-common-9.0-2.el9.noarch.rpm
wine-core-9.0-2.el9.x86_64.rpm
wine-core-debuginfo-9.0-2.el9.x86_64.rpm
wine-courier-fonts-9.0-2.el9.noarch.rpm
wine-debuginfo-9.0-2.el9.x86_64.rpm
wine-debugsource-9.0-2.el9.x86_64.rpm
wine-desktop-9.0-2.el9.noarch.rpm
wine-devel-9.0-2.el9.x86_64.rpm
wine-devel-debuginfo-9.0-2.el9.x86_64.rpm
wine-filesystem-9.0-2.el9.noarch.rpm
wine-fixedsys-fonts-9.0-2.el9.noarch.rpm
wine-fonts-9.0-2.el9.noarch.rpm
wine-ldap-9.0-2.el9.x86_64.rpm
wine-marlett-fonts-9.0-2.el9.noarch.rpm
wine-ms-sans-serif-fonts-9.0-2.el9.noarch.rpm
wine-pulseaudio-9.0-2.el9.x86_64.rpm
wine-pulseaudio-debuginfo-9.0-2.el9.x86_64.rpm
wine-small-fonts-9.0-2.el9.noarch.rpm
wine-smartcard-9.0-2.el9.x86_64.rpm
wine-smartcard-debuginfo-9.0-2.el9.x86_64.rpm
wine-symbol-fonts-9.0-2.el9.noarch.rpm
wine-systemd-9.0-2.el9.noarch.rpm
wine-system-fonts-9.0-2.el9.noarch.rpm
wine-tahoma-fonts-9.0-2.el9.noarch.rpm
wine-tahoma-fonts-system-9.0-2.el9.noarch.rpm
wine-times-new-roman-fonts-9.0-2.el9.noarch.rpm
wine-times-new-roman-fonts-system-9.0-2.el9.noarch.rpm
wine-twain-9.0-2.el9.x86_64.rpm
wine-twain-debuginfo-9.0-2.el9.x86_64.rpm
wine-webdings-fonts-9.0-2.el9.noarch.rpm
wine-wingdings-fonts-9.0-2.el9.noarch.rpm
wine-wingdings-fonts-system-9.0-2.el9.noarch.rpm

This demonstrates the issue I have building as an ordinary user.

After tar xvf wine-9.0.tar.xz and cd wine-9.0, I get:

[scldad@spitfire wine-9.0]$ ./configure --enable-win64
checking build system type… x86_64-pc-linux-gnu
checking host system type… x86_64-pc-linux-gnu
checking whether make sets $(MAKE)… yes
checking for gcc… gcc
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… configure: error: in
/home/scldad/Downloads/wine-9.0': configure: error: cannot run C compiled programs. See config.log’ for more details

config.log says:

configure:5333: gcc -o conftest conftest.c >&5
configure:5337: $? = 0
configure:5344: ./conftest
./configure: line 5346: ./conftest: Operation not permitted
configure:5348: $? = 126
configure:5355: error: in `/home/scldad/Downloads/wine-9.0’:
configure:5357: error: cannot run C compiled programs.

Removing the --enable-win64 makes no difference.

It certainly looks like a permissions issue but I cannot guess where.
This is a very recent installation of Rocky so very little has been
changed since the installation.

Thanks again,
Stephen

Several hours later, I get the same result as with the sources
downloaded from winehq.

config.status: executing Makefile commands
makedep: error: open amstream.idl : Operation not permitted
config.status: error: could not create Makefile

There is obviously something wrong with permissions on my box but I have
no idea where to look next.

What it sounds like is you have configured your system with a security policy or in another way that is preventing users from specific operations in their home directory.

With that said, I am not getting the same behavior attempting to run configure. Instead I get stopped elsewhere as I do not have 32-bit libraries installed, as I would expect. When building the RPM packages (as I have shown earlier), this is already taken care of in the build process.

[user1@awx wine-9.0]$ ./configure
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
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 the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking for cpp... cpp
checking for ld... ld
checking whether gcc -m32 works... no
configure: error: Cannot build a 32-bit program, you need to install 32-bit development libraries.

As I’ve said, I would not try to compile manually and instead try to recompile the source RPM like I have shown. It is not recommended to try to build wine manually.

1 Like

One step forward, two steps back:-((
I compiled a “hello world” C program as myself in my home directory and tried to run the resulting binary.
Again I get the Operation not permitted.
Obviously I can execute any/all system installed binaries. Why can’t I execute one that I compile myself?
This is clearly the reason that I cannot run the configure script as it also fails at the first compilation.
What sort of security policy could do this?

It’s interesting that these are two different things

EPERM        1  /* Operation not permitted */
EACCES      13  /* Permission denied */

Try you hello world program like this:
strace ./hello
paste the output formatted as code.

Check things like if you mounted your homedir ‘noexec’ or have fapolicy, etc, etc.

[scldad@spitfire ~]$ ./testc
bash: ./testc: Operation not permitted
[scldad@spitfire ~]$ strace ./testc
execve(“./testc”, [“./testc”], 0x7ffcdfac7d80 /* 61 vars */) = -1 EPERM (Operation not permitted)
strace: exec: Operation not permitted
+++ exited with 1 +++
If I move the binary to another directory (even /usr/bin) I get the same error.

As root, /home/scldad/testc runs without error.
/home is not mounted noexec

FWIW:
[scldad@spitfire ~]$ ldd testc
/usr/bin/ldd: line 160: /lib64/ld-linux-x86-64.so.2: Operation not permitted
ldd: exited with unknown exit code (126)

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.