[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[pkg-wine-party] Bug#733605: marked as done (wine: FTBFS on hurd-i386)



Your message dated Sun, 18 Jan 2015 16:36:09 -0500
with message-id <CANTw=MMrRa4bPfFQ2WnQTzEws1O+fJC1q1u-8_-ZmR7F_v-9ZA@mail.gmail.com>
and subject line Re: [pkg-wine-party] Bug#733605: Bug#733605: GNU/Hurd wine build almost fixed upstream
has caused the Debian Bug report #733605,
regarding wine: FTBFS on hurd-i386
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
733605: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733605
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: wine
Version: 1.6.1-8
Severity: important
Tags: patch
User: debian-hurd@lists.debian.org
Usertags: hurd

Hi,

Currently wine-1.6.1 FTBFS on GNU/Hurd, see
https://buildd.debian.org/status/fetch.php?pkg=wine&arch=hurd-i386&ver=1.6.1-8&stamp=1388378306

Attached is a patch enabling the build:

- dlls/mountmgr.sys/diskarb.c and dlls/ntdll/directory.c: Define
PATH_MAX to 4096 since it is not available for GNU/Hurd. A better
solution using dynamic string allocation will be provided in a separate
patch.

- libs/wine/ldt.c: Add LDT support for GNU/Hurd

- dlls/ntdll/signal_i386.c: Add i386 signal handling support for GNU/Hurd

Applications tested (but slow to start) include clock, notepad and wordpad.

Thanks!


--- a/dlls/mountmgr.sys/diskarb.c
+++ b/dlls/mountmgr.sys/diskarb.c
@@ -37,6 +37,9 @@
 
 #ifdef HAVE_DISKARBITRATION_DISKARBITRATION_H
 
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
 static void appeared_callback( DADiskRef disk, void *context )
 {
     CFDictionaryRef dict = DADiskCopyDescription( disk );
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -3204,6 +3204,9 @@
     RtlFreeHeap( GetProcessHeap(), 0, info );
 }
 
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
 static NTSTATUS read_changes_apc( void *user, PIO_STATUS_BLOCK iosb, NTSTATUS status, void **apc )
 {
     struct read_changes_info *info = user;
--- a/libs/wine/ldt.c
+++ b/libs/wine/ldt.c
@@ -80,6 +80,11 @@
 
 #endif  /* linux */
 
+#ifdef __GNU__
+#include <mach/i386/mach_i386.h>
+#include <mach/mach_traps.h>
+#endif  /* GNU */
+
 #if defined(__svr4__) || defined(_SCO_DS)
 #include <sys/sysi86.h>
 #ifndef __sun__
@@ -203,6 +208,52 @@
 #elif defined(__APPLE__)
     if ((ret = i386_set_ldt(index, (union ldt_entry *)entry, 1)) < 0)
         perror("i386_set_ldt");
+#elif defined(__GNU__)
+    {
+      /*
+mach/i386/mach_i386.defs:
+type    descriptor_t    =       struct[2] of int;
+type    descriptor_list_t =     array[*] of descriptor_t;
+
+include/winnt.h:
+typedef struct _LDT_ENTRY {
+    WORD        LimitLow;
+    WORD        BaseLow;
+    union {
+        struct {
+            BYTE    BaseMid;
+            BYTE    Flags1;
+            BYTE    Flags2;
+            BYTE    BaseHi;
+        } Bytes;
+        struct {
+            unsigned    BaseMid: 8;
+            unsigned    Type : 5;
+            unsigned    Dpl : 2;
+            unsigned    Pres : 1;
+            unsigned    LimitHi : 4;
+            unsigned    Sys : 1;
+            unsigned    Reserved_0 : 1;
+            unsigned    Default_Big : 1;
+            unsigned    Granularity : 1;
+            unsigned    BaseHi : 8;
+        } Bits;
+    } HighWord;
+} LDT_ENTRY, *PLDT_ENTRY;
+
+       */
+        LDT_ENTRY entry_copy = *entry;
+	//	thread_t target_thread = 1;
+	// FIXME: Check the conversion */
+	//ret = i386_set_ldt(target_thread, index, (descriptor_list_t)&entry_copy, 1);
+	ret = i386_set_ldt(mach_thread_self(), sel, (descriptor_list_t)&entry_copy, 1);
+        if (ret != KERN_SUCCESS)
+        {
+            perror("i386_set_ldt");
+            fprintf( stderr, "i386_set_ldt failed\n" );
+            exit(1);
+        }
+    }
 #else
     fprintf( stderr, "No LDT support on this platform\n" );
     exit(1);
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -235,6 +235,36 @@
 #define FPU_sig(context)     NULL  /* FIXME */
 #define FPUX_sig(context)    NULL  /* FIXME */
 
+#elif defined (__GNU__)
+
+#include <sys/ucontext.h>
+
+typedef ucontext_t SIGCONTEXT;
+
+#define EAX_sig(context)     ((context)->uc_mcontext.gregs[REG_EAX])
+#define EBX_sig(context)     ((context)->uc_mcontext.gregs[REG_EBX])
+#define ECX_sig(context)     ((context)->uc_mcontext.gregs[REG_ECX])
+#define EDX_sig(context)     ((context)->uc_mcontext.gregs[REG_EDX])
+#define ESI_sig(context)     ((context)->uc_mcontext.gregs[REG_ESI])
+#define EDI_sig(context)     ((context)->uc_mcontext.gregs[REG_EDI])
+#define EBP_sig(context)     ((context)->uc_mcontext.gregs[REG_EBP])
+#define ESP_sig(context)     ((context)->uc_mcontext.gregs[REG_ESP])
+
+#define CS_sig(context)      ((context)->uc_mcontext.gregs[REG_CS])
+#define DS_sig(context)      ((context)->uc_mcontext.gregs[REG_DS])
+#define ES_sig(context)      ((context)->uc_mcontext.gregs[REG_ES])
+#define SS_sig(context)      ((context)->uc_mcontext.gregs[REG_SS])
+#define FS_sig(context)      ((context)->uc_mcontext.gregs[REG_FS])
+#define GS_sig(context)      ((context)->uc_mcontext.gregs[REG_GS])
+
+#define EFL_sig(context)     ((context)->uc_mcontext.gregs[REG_EFL])
+#define EIP_sig(context)     ((context)->uc_mcontext.gregs[REG_EIP])
+#define TRAP_sig(context)    ((context)->uc_mcontext.gregs[REG_TRAPNO])
+#define ERROR_sig(context)   ((context)->uc_mcontext.gregs[REG_ERR])
+
+#define FPU_sig(context)     ((FLOATING_SAVE_AREA*)(&(context)->uc_mcontext.fpregs.fp_reg_set.fpchip_state))
+#define FPUX_sig(context)    NULL
+
 #elif defined (__OpenBSD__)
 
 typedef struct sigcontext SIGCONTEXT;

--- End Message ---
--- Begin Message ---
version: 1.7.34-1

On Sat, Feb 15, 2014 at 5:07 PM, Michael Gilbert wrote:
>> The patch for PATH_MAX does not yet seem to be accepted. Is it possible
>> that the patch below can be applied, together with the upstream changes,
>> in Debian until the PATH_MAX issue is resolved upstream?
>
> I would prefer to wait for everything to be upstreamed.

It looks like upstream 1.7.34 finalized hurd support, and the latest
wine-development upload built without problems on hurd-i386 [0].

Whether it behaves correctly has not been tested (I don't use hurd).
If there are any problems there, please open new upstream bugs.

Best wishes,
Mike

[0] https://buildd.debian.org/status/logs.php?pkg=wine-development&arch=hurd-i386

--- End Message ---

Reply to: