From: prem <prem.mallappa@gmail.com>
To: 9fans@9fans.net
Subject: Re: [9fans] Has Anyone compiled 9vx on snow leopard ?
Date: Mon, 1 Mar 2010 09:49:34 +0000 [thread overview]
Message-ID: <9ca4b3ec-0811-414a-9bc0-c63f3fb39562@t34g2000prm.googlegroups.com> (raw)
In-Reply-To: <a9328362-f0e8-4203-b6ff-bc9ee838c64e@z1g2000prc.googlegroups.com>
On Feb 26, 8:20Â pm, olegf...@gmail.com (Oleg Finkelshteyn) wrote:
> > I am trying to get 9vx compiled on SnowLeopard 10.6.2
>
> Andre has some problems posting to 9fans, but he says this should fix
> your problem:http://qcx.be/attic/9vx-osx-fix.patch
>
> -Oleg
Thanks for the patch,
I had to comment out some more stuff to get it working.. for anyone
interested following is the patch. This patch doesn't do much
otherthan making everything to compile as a 32-bit. This however only
solves the compilation part. 9vx crashes while launching acme,
resizing window etc (i.e nearly unusable). and this is true for the
9vx.OSX.gz binary in the mercurial repository.
=============diff -r c7e9b5edb8d4 src/9vx/Makefrag
--- a/src/9vx/Makefrag Sun Dec 27 09:49:22 2009 -0800
+++ b/src/9vx/Makefrag Sun Feb 28 11:43:12 2010 +0530
@@ -132,7 +132,7 @@
screen.o \
draw.o \
)
-PLAN9_osx_LIBS = -ggdb -framework Carbon -framework QuickTime
+PLAN9_osx_LIBS = -m32 -ggdb -framework Carbon -framework QuickTime
PLAN9_GUI_OBJS = $(PLAN9_$(PLAN9GUI)_OBJS)
diff -r c7e9b5edb8d4 src/9vx/a/dat.h
--- a/src/9vx/a/dat.h Sun Dec 27 09:49:22 2009 -0800
+++ b/src/9vx/a/dat.h Sun Feb 28 11:43:12 2010 +0530
@@ -1,3 +1,6 @@
+#if defined(__APPLE__)
+#define _XOPEN_SOURCE
+#endif
#include <ucontext.h>
#include "libvx32/vx32.h"
diff -r c7e9b5edb8d4 src/Makefrag
--- a/src/Makefrag Sun Dec 27 09:49:22 2009 -0800
+++ b/src/Makefrag Sun Feb 28 11:43:12 2010 +0530
@@ -5,6 +5,10 @@
#COMMON_CFLAGS = -g -MD -std=gnu99 -I. $(CFLAGS)
COMMON_LDFLAGS = -g -L. $(LDFLAGS)
+ifeq ($(OS),darwin)
+COMMON_CFLAGS := -m32 $(COMMON_CFLAGS)
+endif
+
# Host environment compiler options
HOST_CC := $(CC) -fno-inline
HOST_LD := $(LD)
@@ -52,15 +56,24 @@
# Include Makefrags for subdirectories
+# Don't try to build libvxc,vxrun,vxlinux,vxa,hash,micro or test on
darwin. It's broken beyond repair currently.
+
+ifneq ($(OS),darwin)
include libvxc/Makefrag
+endif
+
include libvx32/Makefrag
+ifneq ($(OS),darwin)
include vxrun/Makefrag
include vxlinux/Makefrag
include vxa/Makefrag # VXA decoders
include hash/Makefrag # cryptographic hash algorithms
include micro/Makefrag # microbenchmarks
+endif
include 9vx/Makefrag # Plan 9 VX
+ifneq ($(OS),darwin)
include test/Makefrag # vx32 tests
+endif
DEPS_FILES := $(wildcard */*.d */*/*.d */*/*/*.d)
CLEAN_FILES += .deps $(DEPS_FILES)
diff -r c7e9b5edb8d4 src/libvx32/Makefrag
--- a/src/libvx32/Makefrag Sun Dec 27 09:49:22 2009 -0800
+++ b/src/libvx32/Makefrag Sun Feb 28 11:43:12 2010 +0530
@@ -1,8 +1,8 @@
-ifeq ($(ARCH),x86_64)
-VX32_RUN = run64.o
-else
+#ifeq ($(ARCH),x86_64)
+#VX32_RUN = run64.o
+#else
VX32_RUN = run32.o
-endif
+#endif
ifeq ($(OS),darwin)
VX32_RUN := $(VX32_RUN) darwin-asm.o
diff -r c7e9b5edb8d4 src/libvx32/darwin.c
--- a/src/libvx32/darwin.c Sun Dec 27 09:49:22 2009 -0800
+++ b/src/libvx32/darwin.c Sun Feb 28 11:43:12 2010 +0530
@@ -7,6 +7,9 @@
#include <string.h>
#include <signal.h>
#include <assert.h>
+#if defined(__APPLE__)
+#define _XOPEN_SOURCE
+#endif
#include <ucontext.h>
#include <ucontext.h>
#include <architecture/i386/table.h>
diff -r c7e9b5edb8d4 src/libvx32/sig.c
--- a/src/libvx32/sig.c Sun Dec 27 09:49:22 2009 -0800
+++ b/src/libvx32/sig.c Sun Feb 28 11:43:12 2010 +0530
@@ -1,4 +1,7 @@
#include <sys/signal.h>
+#if defined(__APPLE__)
+#define _XOPEN_SOURCE
+#endif
#include <ucontext.h>
#include <stdio.h>
#include <stdlib.h>
diff -r c7e9b5edb8d4 src/libvx32/vx32impl.h
--- a/src/libvx32/vx32impl.h Sun Dec 27 09:49:22 2009 -0800
+++ b/src/libvx32/vx32impl.h Sun Feb 28 11:43:12 2010 +0530
@@ -1,6 +1,10 @@
#ifndef VX32_IMPL_H
#define VX32_IMPL_H
+#if defined (__APPLE__) && !defined (_XOPEN_SOURCE)
+#define _XOPEN_SOURCE
+#endif
+
#include <setjmp.h>
#include <sys/signal.h>
#include <ucontext.h>
========================
next prev parent reply other threads:[~2010-03-01 9:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-26 9:43 prem
2010-02-26 15:16 ` Oleg Finkelshteyn
2010-03-02 17:02 ` [9fans] compiler warnings for libavl/avl.c EBo
2010-03-02 17:12 ` erik quanstrom
2010-03-02 17:40 ` EBo
2010-03-02 17:50 ` Edward E Elzey
2010-03-02 17:52 ` erik quanstrom
2010-03-02 18:41 ` EBo
2010-03-04 18:10 ` Russ Cox
2010-03-01 9:49 ` [9fans] Has Anyone compiled 9vx on snow leopard ? prem
2010-03-01 9:49 ` prem [this message]
2010-03-01 10:30 ` John Stalker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9ca4b3ec-0811-414a-9bc0-c63f3fb39562@t34g2000prm.googlegroups.com \
--to=prem.mallappa@gmail.com \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).