9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] vx32 compilation for osx
@ 2014-05-10 11:15 arisawa
  2014-05-10 12:40 ` erik quanstrom
  0 siblings, 1 reply; 6+ messages in thread
From: arisawa @ 2014-05-10 11:15 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello,

9vx for osx is for i386
-bash$ file /usr/local/9vx/9vx.OSX
/usr/local/9vx/9vx.OSX: Mach-O executable i386
-bash$ 

to compile to 64bit, I tried to _make_ on mountain lion.
however the compilation fails.

-bash$ cd /Users/arisawa/src/vx32-0.12/src 
-bash$ make
make: vx32-gcc: Command not found
make: vx32-gcc: Command not found
gcc -m32 -c -nostdinc -Ilibvxc/include -g -O3 -MD -std=gnu99 -I.  -m80387 -mfp-ret-in-387 -o libvxc/abort.o libvxc/abort.c
...
gcc -m32 -c -nostdinc -Ilibvxc/include -g -O3 -MD -std=gnu99 -I.  -m80387 -mfp-ret-in-387 -o libvxc/vx32/ffs.o libvxc/vx32/ffs.S
libvxc/vx32/ffs.S:44:Unknown pseudo-op: .type
libvxc/vx32/ffs.S:44:Rest of line ignored. 1st junk character valued 102 (f).
make: *** [libvxc/vx32/ffs.o] Error 1
-bash$ 

anyone succeed in compiling to 64bit?
any suggestion?

Kenji Arisawa




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] vx32 compilation for osx
  2014-05-10 11:15 [9fans] vx32 compilation for osx arisawa
@ 2014-05-10 12:40 ` erik quanstrom
  2014-05-10 13:59   ` arisawa
  0 siblings, 1 reply; 6+ messages in thread
From: erik quanstrom @ 2014-05-10 12:40 UTC (permalink / raw)
  To: 9fans

> 9vx for osx is for i386

9vx depends on 386 features.  it does
not extend to amd64.

- erik



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] vx32 compilation for osx
  2014-05-10 12:40 ` erik quanstrom
@ 2014-05-10 13:59   ` arisawa
  2014-05-10 14:02     ` Aram Hăvărneanu
  0 siblings, 1 reply; 6+ messages in thread
From: arisawa @ 2014-05-10 13:59 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

thanks erik.
it seems osx marvericks dislike i386….

2014/05/10 21:40、erik quanstrom <quanstro@quanstro.net> のメール:

>> 9vx for osx is for i386
> 
> 9vx depends on 386 features.  it does
> not extend to amd64.
> 
> - erik
> 




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] vx32 compilation for osx
  2014-05-10 13:59   ` arisawa
@ 2014-05-10 14:02     ` Aram Hăvărneanu
  2014-05-10 14:20       ` erik quanstrom
  0 siblings, 1 reply; 6+ messages in thread
From: Aram Hăvărneanu @ 2014-05-10 14:02 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

It's easy to make it use clang directly (instead of gcc wrapper) and
compile it in 32-bit mode, the larger issue is that it uses an
obsolete devdraw implementation that doesn't compile in Mavericks any
more...

-- 
Aram Hăvărneanu



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] vx32 compilation for osx
  2014-05-10 14:02     ` Aram Hăvărneanu
@ 2014-05-10 14:20       ` erik quanstrom
  2014-05-10 21:24         ` Jeff Sickel
  0 siblings, 1 reply; 6+ messages in thread
From: erik quanstrom @ 2014-05-10 14:20 UTC (permalink / raw)
  To: 9fans

On Sat May 10 10:04:09 EDT 2014, aram.h@mgk.ro wrote:
> It's easy to make it use clang directly (instead of gcc wrapper) and
> compile it in 32-bit mode, the larger issue is that it uses an
> obsolete devdraw implementation that doesn't compile in Mavericks any
> more...

are you sure that there are (full) 32-bit apis for cocoa?  the even larger
issue is that 9vx may be completely unsupportable with mavricks.
help me old by 10 8 krufted executable, you're my only hope.

- erik



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] vx32 compilation for osx
  2014-05-10 14:20       ` erik quanstrom
@ 2014-05-10 21:24         ` Jeff Sickel
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Sickel @ 2014-05-10 21:24 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

The issue on the OS X version is that Apple announced, 5 years or more ago,
that the 32-bit Carbon APIs were end of life and being decommissioned.
9vx uses those Carbon graphics APIs, so it stands to reason that when
Apple released Mavericks, those APIs were no longer supported or included
with the system.

There are three options:

 1) implement draterm-cocoa drawing techniques
 2) implement p9p’s devdraw interface and use devdraw-cocoa
 3) utilize the inferno drawing variant with the diff
% hg diff emu mkfiles
diff -r d8a878d9e6a1 emu/MacOSX/win.c
--- a/emu/MacOSX/win.c	Thu May 01 12:08:59 2014 +0100
+++ b/emu/MacOSX/win.c	Sat May 10 16:22:46 2014 -0500
@@ -573,10 +573,12 @@
 	QDBeginCGContext(GetWindowPort(theWindow), &context);
 	
 	// The sub-image is relative to our whole screen image.
-	CGImageRef subimg = CGImageCreateWithImageInRect(fullScreenImage, rbounds);
+	CGImageRef subimg = CGRectEqualToRect(rbounds, bounds) ?
+		CGImageCreateCopy(fullScreenImage):
+		CGImageCreateWithImageInRect(fullScreenImage, rbounds);
 	
 	// Drawing the sub-image is relative to the window.
-	rbounds.origin.y = winRect.bottom - winRect.top - r.min.y - rbounds.size.height;
+	rbounds.origin.y = winRect.bottom - winRect.top - rbounds.origin.y - rbounds.size.height;
 	CGContextDrawImage(context, rbounds, subimg);
 	CGImageRelease(subimg);
 	QDEndCGContext(GetWindowPort(theWindow), &context);
diff -r d8a878d9e6a1 mkfiles/mkfile-MacOSX-386
--- a/mkfiles/mkfile-MacOSX-386	Thu May 01 12:08:59 2014 +0100
+++ b/mkfiles/mkfile-MacOSX-386	Sat May 10 16:22:46 2014 -0500
@@ -24,7 +24,6 @@
 		-pipe\
 		-fno-strict-aliasing\
 		-no-cpp-precomp\
-		-mno-fused-madd\
 		-I$ROOT/MacOSX/386/include\
 		-I$ROOT/include\
 		$COPTFLAGS $CDEBUGFLAGS\




On May 10, 2014, at 9:20 AM, erik quanstrom <quanstro@quanstro.net> wrote:

> On Sat May 10 10:04:09 EDT 2014, aram.h@mgk.ro wrote:
>> It's easy to make it use clang directly (instead of gcc wrapper) and
>> compile it in 32-bit mode, the larger issue is that it uses an
>> obsolete devdraw implementation that doesn't compile in Mavericks any
>> more...
> 
> are you sure that there are (full) 32-bit apis for cocoa?  the even larger
> issue is that 9vx may be completely unsupportable with mavricks.
> help me old by 10 8 krufted executable, you're my only hope.
> 
> - erik
> 




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-05-10 21:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-10 11:15 [9fans] vx32 compilation for osx arisawa
2014-05-10 12:40 ` erik quanstrom
2014-05-10 13:59   ` arisawa
2014-05-10 14:02     ` Aram Hăvărneanu
2014-05-10 14:20       ` erik quanstrom
2014-05-10 21:24         ` Jeff Sickel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).