Ubuntu 12.04 (version#2, drop previous mail)

Eric Pouech eric.pouech at orange.fr
Tue May 1 04:32:10 CDT 2012


> This is the downside people in this thread are complaining about: 
> compiling 32-bit programs on a 64-bit Ubuntu install is now slightly 
> more difficult.  However, Wine is currently the _only_ piece of 
> software I've encountered that needs to be built for both arches on 
> the same machine in order to be usable.  We are beautiful special 
> snowflakes here: Wine developers who aren't using the build daemons is 
> about the extent of the current use case.
<snip>
>
> I'm beginning to have memories of what happened when we removed gcc 
> from the default install.  Setting up a 32-bit chroot for building 
> Wine should not be complicated -- I'll present a script to make it 
> even easier soon.  You can build in a single command and even use 
> things like ccache and the like to speed it up.
>
to summarize:
ubuntu doesn't do anything to support developers
     as it implies using ubuntu build daemons, not developers' machine 
(and all the relevant environment)
     as it implies to use chroot even on a multi lib arch => multi arch 
is then for users, not developers

bye bye ubuntu then

for the sake of record (I won't even dare to send it to wine-patches) a 
workaround ubuntu recvmsg breakage in order to get ptrace API to be 
usable on 12.04

diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
index 8a01d22..6c8e759 100644
--- a/dlls/ntdll/server.c
+++ b/dlls/ntdll/server.c
@@ -1016,6 +1016,37 @@ void server_init_process(void)
      send_server_task_port();
  #endif
  #if defined(__linux__) && defined(HAVE_PRCTL)
+    /* work around Ubuntu's recvmsg breakage */
+    if (!server_pid)
+    {
+        int zfd;
+        struct flock fl;
+        char    tmp[4096];
+        strcpy(tmp, wine_get_server_dir());
+        strcat(tmp, "/");
+        strcat(tmp, LOCKNAME);
+
+        if ((zfd = open( tmp, O_RDONLY )) == -1)
+            fatal_error( "no lock present %s.\n", tmp );
+
+        fl.l_type   = F_WRLCK;
+        fl.l_whence = SEEK_SET;
+        fl.l_start  = 0;
+        fl.l_len    = 1;
+        if (fcntl( zfd, F_GETLK, &fl ) != -1)
+        {
+            if (fl.l_type == F_WRLCK)
+            {
+                /* the file is locked */
+                fprintf(stderr, "getting server_pid from lock %d\n", 
fl.l_pid);
+                server_pid = fl.l_pid;
+            }
+            fatal_error( "cannot get pid from lock (lock isn't locked)\n");
+        }
+        else
+            fatal_error( "cannot get pid from lock\n");
+        close(zfd);
+    }
      /* work around Ubuntu's ptrace breakage */
      if (server_pid != -1) prctl( 0x59616d61 /* PR_SET_PTRACER */, 
server_pid );
  #endif

-- 
Eric Pouech
"The problem with designing something completely foolproof is to underestimate the ingenuity of a complete idiot." (Douglas Adams)




More information about the wine-devel mailing list