wineasio compile problems on OSX - COM work arounds

Questions about Wine on macOS.
Locked
Dewdman42
Level 2
Level 2
Posts: 33
Joined: Thu May 15, 2008 10:53 pm

wineasio compile problems on OSX - COM work arounds

Post by Dewdman42 »

I dont know if this is the right place to post this question. I've tried already on the wineasio sourceforge forum, but no response. I think this particular question is something wine experts would know about since it looks to be borrowed code from wine. Most of the wineasio folks seem to be linux focused only.

In any case, I'm trying to compile the latest wineasio 0.90 on OSX 10.6.8. I have already built wine 1.5.4.

I get some errors immediately related to some ELF assembler code injection that I believe has to do with working around COM. Here is the error and below that is the code I think causing the problem to build. Does anyone have any ideas what I would need to tweak to get past this particular problem?

Code: Select all

gcc -c -I. -I/usr/include -I/Users/sjs/wine/wine-1.5.4/include -I/Users/sjs/wine/wine-1.5.4/include/wine -I/Users/sjs/wine/wine-1.5.4/include/wine/windows    -m32 -g -O2 -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -o asio.o asio.c
{standard input}:36:Unknown pseudo-op: .type
{standard input}:36:Rest of line ignored. 1st junk character valued 95 (_).
{standard input}:38:Unknown pseudo-op: .cfi_startproc
{standard input}:43:Unknown pseudo-op: .cfi_endproc
{standard input}:44:Unknown pseudo-op: .previous
{standard input}:48:Unknown pseudo-op: .type
I'm pretty sure this is the code causing the problem.

Code: Select all

/* ASIO drivers (breaking the COM specification) use the Microsoft variety of
 * thiscall calling convention which gcc is unable to produce.  These macros
 * add an extra layer to fixup the registers. Borrowed from config.h and the
 * wine source code.
 */

/* From config.h */
#define __ASM_DEFINE_FUNC(name,suffix,code) asm(".text\n\t.align 4\n\t.globl " #name suffix "\n\t.type " #name suffix ",@function\n" #name suffix ":\n\t.cfi_startproc\n\t" code "\n\t.cfi_endproc\n\t.previous");
#define __ASM_GLOBAL_FUNC(name,code) __ASM_DEFINE_FUNC(name,"",code)
#define __ASM_NAME(name) name
#define __ASM_STDCALL(args) ""

/* From wine source */
#ifdef __i386__  /* thiscall functions are i386-specific */

#define THISCALL(func) __thiscall_ ## func
#define THISCALL_NAME(func) __ASM_NAME("__thiscall_" #func)
#define __thiscall __stdcall
#define DEFINE_THISCALL_WRAPPER(func,args) \
    extern void THISCALL(func)(void); \
    __ASM_GLOBAL_FUNC(__thiscall_ ## func, \
                      "popl %eax\n\t" \
                      "pushl %ecx\n\t" \
                      "pushl %eax\n\t" \
                      "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#else /* __i386__ */

#define THISCALL(func) func
#define THISCALL_NAME(func) __ASM_NAME(#func)
#define __thiscall __cdecl
#define DEFINE_THISCALL_WRAPPER(func,args) /* nothing */

#endif /* __i386__ */

/* Hide ELF symbols for the COM members - No need to to export them */
#define HIDDEN __attribute__ ((visibility("hidden")))
User avatar
dimesio
Moderator
Moderator
Posts: 13218
Joined: Tue Mar 25, 2008 10:30 pm

Re: wineasio compile problems on OSX - COM work arounds

Post by dimesio »

Dewdman42 wrote:I dont know if this is the right place to post this question. I've tried already on the wineasio sourceforge forum, but no response. I think this particular question is something wine experts would know about since it looks to be borrowed code from wine. Most of the wineasio folks seem to be linux focused only.

In any case, I'm trying to compile the latest wineasio 0.90 on OSX 10.6.8. I have already built wine 1.5.4.
Wineasio is a separate project; it is not supported here.
Dewdman42
Level 2
Level 2
Posts: 33
Joined: Thu May 15, 2008 10:53 pm

Post by Dewdman42 »

apparantly its not supported anywhere
Dewdman42
Level 2
Level 2
Posts: 33
Joined: Thu May 15, 2008 10:53 pm

Post by Dewdman42 »

the reason I asked here is because this code said it was "borrowed from wine", so i'm hoping a wine expert will still be able to shed some light
jjmckenzie
Moderator
Moderator
Posts: 1153
Joined: Wed Apr 27, 2011 11:01 pm

wineasio compile problems on OSX - COM work arounds

Post by jjmckenzie »

On Tue, May 15, 2012 at 12:50 PM, Dewdman42 <[email protected]> wrote:
I dont know if this is the right place to post this question.
Why are you trying to use this? Mac sound support is through coreaudio.

James
Dewdman42
Level 2
Level 2
Posts: 33
Joined: Thu May 15, 2008 10:53 pm

Post by Dewdman42 »

the reason I asked here is because this code said it was "borrowed from wine", so i'm hoping a wine expert will still be able to shed some light
Dewdman42
Level 2
Level 2
Posts: 33
Joined: Thu May 15, 2008 10:53 pm

Post by Dewdman42 »

wine does not produce low latency audio through coreaudio. Perhaps you can tell me something I don't know about, but everyone I know using wine with audio production apps has to use wineasio in order to get low latency audio out of reaper, etc. If you know another way to try, please advise and I will gladly try it. However, to my knowledge, wineasio is the only way.
Dewdman42
Level 2
Level 2
Posts: 33
Joined: Thu May 15, 2008 10:53 pm

Post by Dewdman42 »

the COM work around code above was borrowed from wine, so I hope someone knowledgable about it can show how to make it compile on osx. thanks
User avatar
dimesio
Moderator
Moderator
Posts: 13218
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio »

apparantly its not supported anywhere
Try the mailing list mentioned in this thread: http://forum.winehq.org/viewtopic.php?t=7938

Topic closed.
Locked