Native Client version

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
mitcoes
Level 1
Level 1
Posts: 7
Joined: Thu May 06, 2010 10:03 am

Native Client version

Post by mitcoes »

Native client is a Google Chrome browser tech.
http://www.naclbox.com/ has ported DosBox to this tech, and works fine.

If it is possible porting Wine to this Native Client tech Installing it as a Chrome app and using the browser as desktop can be easier for most people.

Linux users are good with configs, but OSX users usually not.

I do not know if it is possible without a lot of work, or if it would be easy, but I think it is a good idea if it works.
User avatar
André H.
Moderator
Moderator
Posts: 202
Joined: Sun Dec 07, 2008 8:33 am

Post by André H. »

IIRC i once tried it, but i think nacl disallows syscalls (or at least chrome checks for them) and Wine uses them quite a lot, that's already a major problem. Further it didn't build for various missing things.
User avatar
André H.
Moderator
Moderator
Posts: 202
Joined: Sun Dec 07, 2008 8:33 am

Post by André H. »

i tried it for fun, but it stops very early:

i686-nacl-gcc -g -O2 -o makedep makedep.o
makedep.o: In function `output_dependencies':
/home/dawncrow/dev/wine/00nacl/tools/../../tools/makedep.c:1019: undefined reference to `unlink'
/home/dawncrow/dev/wine/00nacl/tools/../../tools/makedep.c:1014: undefined reference to `unlink'
/home/dawncrow/native_client_sdk_0_5_1031/toolchain/linux_x86/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/lib/../lib32/libcrt_common.a(lib_a-unlinkr.o): In function `_unlink_r':
unlinkr.c:(.text+0x1c): undefined reference to `unlink'
/home/dawncrow/native_client_sdk_0_5_1031/toolchain/linux_x86/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/lib/../lib32/libcrt_common.a(lib_a-linkr.o): In function `_link_r':
linkr.c:(.text+0x3c): undefined reference to `link'
User avatar
DanKegel
Moderator
Moderator
Posts: 1164
Joined: Wed May 14, 2008 11:44 am

Post by DanKegel »

It won't work; even if we recompiled wine with the
nacl tools, user apps that use native code would
need recompiling, too.
User avatar
André H.
Moderator
Moderator
Posts: 202
Joined: Sun Dec 07, 2008 8:33 am

Post by André H. »

really? if you mean win32 apps than they should run on x86 at least in my understanding.
we may need something like winechrome.drv to display things, but for now there are other problems...
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

André H. Wine catchs syscall faults at times and processes them. Problem is nacl also catchs syscall faults and a syscall fault equals application termination.

So yes fix up wine and still a stack of windows applications will never work in nacl. Also then you have wine huge dependency list.

DosBox is a full blown emulator. Wine is not.

Don't underestimate how badly behavied windows applications are. Like trying to alter flags at particular memory addresses directly.

You can bet some win32 and win64 are going to do stuff the sandbox will take offence to.

Yes you have better olds making Linux applications work inside it than windows. So far no one has done a chromium inside chrome. That would be funny.
Assaf Raman
Newbie
Newbie
Posts: 1
Joined: Mon Aug 15, 2011 9:34 pm

Post by Assaf Raman »

@André H.:
Regarding this NaCl link issue:

Code: Select all

/home/pierre/lighthouse/src/corelib/io/qfilesystemengine_unix.cpp:655: undefined reference to `getcwd'
/home/pierre/native_client/toolchain/linux_x86/bin/../lib/gcc/nacl64/4.4.3/../../../../nacl64/lib/../lib32/libc.a(lib_a-unlinkr.o): In function `_unlink_r':
unlinkr.c:(.text+0x1c): undefined reference to `unlink'
/home/pierre/native_client/toolchain/linux_x86/bin/../lib/gcc/nacl64/4.4.3/../../../../nacl64/lib/../lib32/libc.a(lib_a-linkr.o): In function `_link_r': 
This solution solved the same issue for me:
http://groups.google.com/group/native-c ... 4917dd8ded
...
Try linking with -lnosys.
...
User avatar
André H.
Moderator
Moderator
Posts: 202
Joined: Sun Dec 07, 2008 8:33 am

Post by André H. »

Assaf Raman wrote:@André H.:
This solution solved the same issue for me:
http://groups.google.com/group/native-c ... 4917dd8ded
...
Try linking with -lnosys.
...
indeed that helps, but a bit later i get:

Code: Select all

../libs/wine/libwine.so: warning: the `_execve' function is not implemented and will always fail
/home/dawncrow/native_client_sdk_0_5_1031/toolchain/linux_x86/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/lib/../lib32/libnosys.a(_execve.o): In function `_execve':
_execve.c:(.text+0x1c): warning: the stub `__errno' is not thread-safe, don't use it in multi-threaded environment
/home/dawncrow/native_client_sdk_0_5_1031/toolchain/linux_x86/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/lib/../lib32/libcrt_common.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text+0xb): warning: the stub `errno' is not thread-safe, don't use it in multi-threaded environment
/home/dawncrow/native_client_sdk_0_5_1031/toolchain/linux_x86/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/lib/../lib32/libnosys.a(_execve.o): In function `_execve':
_execve.c:(.text+0x1c): undefined reference to `__errno'
/home/dawncrow/native_client_sdk_0_5_1031/toolchain/linux_x86/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/lib/../lib32/libcrt_common.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text+0xb): undefined reference to `errno'
sbrkr.c:(.text+0x62): undefined reference to `errno'
/home/dawncrow/native_client_sdk_0_5_1031/toolchain/linux_x86/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/lib/../lib32/libcrt_common.a(lib_a-writer.o): In function `_write_r':
writer.c:(.text+0xb): undefined reference to `errno'
writer.c:(.text+0x82): undefined reference to `errno'
/home/dawncrow/native_client_sdk_0_5_1031/toolchain/linux_x86/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/lib/../lib32/libcrt_common.a(lib_a-closer.o): In function `_close_r':
closer.c:(.text+0xb): undefined reference to `errno'
/home/dawncrow/native_client_sdk_0_5_1031/toolchain/linux_x86/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/lib/../lib32/libcrt_common.a(lib_a-closer.o):closer.c:(.text+0x62): more undefined references to `errno' follow
/home/dawncrow/native_client_sdk_0_5_1031/toolchain/linux_x86/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/lib/../lib32/libcrt_common.a(lib_a-_isatty.o): In function `_isatty':
_isatty.c:(.text+0x3c): undefined reference to `__errno'
_isatty.c:(.text+0x7c): undefined reference to `__errno'
/home/dawncrow/native_client_sdk_0_5_1031/toolchain/linux_x86/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/lib/../lib32/libnacl.a(close.o): In function `close':
close.c:(.text+0x7c): undefined reference to `__errno'
/home/dawncrow/native_client_sdk_0_5_1031/toolchain/linux_x86/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/lib/../lib32/libnacl.a(fstat.o): In function `fstat':
fstat.c:(.text+0x7c): undefined reference to `__errno'
/home/dawncrow/native_client_sdk_0_5_1031/toolchain/linux_x86/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/lib/../lib32/libnacl.a(lseek.o): In function `lseek':
lseek.c:(.text+0x9c): undefined reference to `__errno'
/home/dawncrow/native_client_sdk_0_5_1031/toolchain/linux_x86/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/lib/../lib32/libnacl.a(read.o):read.c:(.text+0x9c): more undefined references to `__errno' follow
../libs/wine/libwine.so: undefined reference to `___tls_get_addr'
fernandocarvalho
Level 4
Level 4
Posts: 102
Joined: Sun Oct 11, 2009 7:03 am

Post by fernandocarvalho »

I don't think that making Wine work in Google Native Client will be an easy task.
There must be a lot of work, since Wine assumes that you are in a system running a X11 server and not Chrome.
This would be great if we get a port of Wine to run in Chrome, but I think that it will take a lot of effort from the developers, since there are many restrictions in NaCl that should prevent Windows application to run on it and many of these restrictions are related to security.
asadpakistani
Newbie
Newbie
Posts: 1
Joined: Tue Mar 06, 2012 1:10 am

Well its not THT hard

Post by asadpakistani »

Wine assumes that X11 is running, but keep in mind that chrome native client is a virtual machine container so X11 CAN RUN IN IT...

So essentially the road map is to compile a a mini linux distribution for nacl with a very trimmed down x11, and then compile wine for it
Locked