Re: [Flightgear-devel] CVS on OS X

2007-07-01 Thread Tatsuhiro Nishioka
Hi Hans,

On Jun 29, 2007, at 10:05 AM, Hans Fugal wrote:

 On 6/28/07, Tatsuhiro Nishioka [EMAIL PROTECTED] wrote:
 Now I'm working on building both 0.9.11-pre1 and cvs head.
 I had some errors in linking osgViewer (when building fgfs cvs-head/
 OSG-svn head)
 OSG-2.0 seems OK so I'll go with it for cvs-head for a while.
 By the way, do you know which revision/tag is suitable for building
 0.9.11-pre1?

 I was able to build and run the 0.9.11-pre1 tarball without any
 changes at all (using the 0.9.11-pre1 SimGear and macports plib). I
 don't recall for sure, but I probably already had the alut.h fix in
 place.

I checked out the source files including 0.9.11-pre1, SimGear-0.3.11- 
pre1, and Plib-1.8.4. SimGear-0.3.11 doesn't include the alut.h fix,  
so it works with self-compiled freeglut as you wrote before, but I  
don't think many users will do that so I decide to provide patches  
for Mac OS X users separately.
This way, the changes I made don't affect neither the original source  
files or Apple's ALUT framework.

Though I'm very glad about your contribution to Mac OS X port, I need  
to tell you some potential problems in posting patches. Mac OS X port  
is a bit complicated since it must support both PPC/Intel Macs, so  
the Mac port has patches for both PPC/Intel Macs. This means that the  
patches you will create might affect the existing patches that are  
provided separately. so If you post the patches to the original  
source files, I'd like you to consult the patches for Mac OS X port  
to avoid conflicts. The patches for Mac OS X are available at:

Patches for 0.9.11-pre1 (in progress)
http://macflightgear.svn.sourceforge.net/viewvc/macflightgear/ 
branches/0.9.11-pre1/patches/

Patches for fgfs-cvs/OSG
http://macflightgear.svn.sourceforge.net/viewvc/macflightgear/trunk/ 
patches/

# patches for automake / configure will never have conflicts with the  
existing patches since Mac OS X port doesn't use these at this moment.

I'm currently working on changing the patches for 0.9.11-pre1 so some  
cannot be applied as it is,
but will be fixed soon.

Anyway, I'm very happy to have developers for Mac OS X.
Hope it helps you.

Tat

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] CVS on OS X

2007-07-01 Thread Hans Fugal
On 7/1/07, Tatsuhiro Nishioka [EMAIL PROTECTED] wrote:
 Hi Hans,

 On Jun 29, 2007, at 10:05 AM, Hans Fugal wrote:

  On 6/28/07, Tatsuhiro Nishioka [EMAIL PROTECTED] wrote:
  Now I'm working on building both 0.9.11-pre1 and cvs head.
  I had some errors in linking osgViewer (when building fgfs cvs-head/
  OSG-svn head)
  OSG-2.0 seems OK so I'll go with it for cvs-head for a while.
  By the way, do you know which revision/tag is suitable for building
  0.9.11-pre1?
 
  I was able to build and run the 0.9.11-pre1 tarball without any
  changes at all (using the 0.9.11-pre1 SimGear and macports plib). I
  don't recall for sure, but I probably already had the alut.h fix in
  place.

 I checked out the source files including 0.9.11-pre1, SimGear-0.3.11-
 pre1, and Plib-1.8.4. SimGear-0.3.11 doesn't include the alut.h fix,
 so it works with self-compiled freeglut as you wrote before, but I
 don't think many users will do that so I decide to provide patches
 for Mac OS X users separately.
 This way, the changes I made don't affect neither the original source
 files or Apple's ALUT framework.

Ok, it's as I suspected then. I'm not sure what alut.h fix you're
referring to - the only one I know of is to put it in place, or not
use it in the first place. If there is a SimGear workaround that would
be nice, because it wouldn't require fiddling around with Apple's
framework, which is bound to cause headaches (i.e. on security
upgrades it will no longer exist).

 Though I'm very glad about your contribution to Mac OS X port, I need
 to tell you some potential problems in posting patches. Mac OS X port
 is a bit complicated since it must support both PPC/Intel Macs, so

Linux must support dozens of architectures.

 the Mac port has patches for both PPC/Intel Macs. This means that the
 patches you will create might affect the existing patches that are
 provided separately. so If you post the patches to the original
 source files, I'd like you to consult the patches for Mac OS X port
 to avoid conflicts. The patches for Mac OS X are available at:

I appreciate your work on the XCode port, and I'm sure the
downloadable .app will be more user-friendly and mac-like. I, on the
other hand, am a UNIX geek at heart and so I am most interested in
helping to get FlightGear to compile out of the box (and helping to
keep it that way), without requiring a separate fork. I think mostly
thanks to your past work, we're as close as I've ever seen - only one
small patch and the ALUT problem for PLIB.

I'm happy to coordinate testing with anyone who has ppc; I have an
intel mac. I did have ppc for about a year so I'm familiar with both
sides of the fence, as far as that goes.

 Patches for 0.9.11-pre1 (in progress)
 http://macflightgear.svn.sourceforge.net/viewvc/macflightgear/
 branches/0.9.11-pre1/patches/

 Patches for fgfs-cvs/OSG
 http://macflightgear.svn.sourceforge.net/viewvc/macflightgear/trunk/
 patches/

 # patches for automake / configure will never have conflicts with the
 existing patches since Mac OS X port doesn't use these at this moment.


Unfortunately at the moment I've dedicated all the hard disk space I
can to FlightGear, but I'll take a look through viewcvs.

 I'm currently working on changing the patches for 0.9.11-pre1 so some
 cannot be applied as it is,
 but will be fixed soon.

 Anyway, I'm very happy to have developers for Mac OS X.
 Hope it helps you.

Thanks!

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] CVS on OS X

2007-06-30 Thread Tatsuhiro Nishioka
Hi Hans,

 Now I'm working on building both 0.9.11-pre1 and cvs head.
 I had some errors in linking osgViewer (when building fgfs cvs-head/
 OSG-svn head)
 OSG-2.0 seems OK so I'll go with it for cvs-head for a while.
 By the way, do you know which revision/tag is suitable for building
 0.9.11-pre1?

 I was able to build and run the 0.9.11-pre1 tarball without any
 changes at all (using the 0.9.11-pre1 SimGear and macports plib). I
 don't recall for sure, but I probably already had the alut.h fix in
 place.

I see, it's maybe because I have kept the source updated so I haven't  
noticed the changes.
otherwise the plib from MacProrts fixed the problem.

I'll check this later.

Anyway, I successfully compiled the fgfs-cvs with OSG 2.0 using Xcode  
project.

I'm going to build 0.9.11-pre1 soon with my Xcode project.

Tat


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] CVS on OS X

2007-06-28 Thread Tatsuhiro Nishioka
Hi Hans,

Thanks for your contribution!

There are some workarounds that I made for Macs (Xcode project) on  
these issues.
You can check out the patches from the svn repository available from  
FlightGear Mac OS X website so take a look at that.

Since I need to make universal binary packages for Mac OS X, I  
haven't integrated the
Mac portions into configure/automake in the original source tree, but  
it's very
welcome to have configure/automake things for Macs.
Plus, I really hope that such patches will be applied into the  
repository soon.
# Or I should have a cvs account to do it myself.

anyway, about ALUT thing, I simply added the alut.h since I don't  
want to change
Apple's framework.

To avoild errors regarding to APIENTRY, I made a patch:

--- org/plib-1.8.4/src/pui/puGLUT.h 2004-02-16 05:49:03.0  
-0800
+++ PLIB/plib/src/pui/puGLUT.h  2006-11-16 07:37:01.0 -0800
@@ -32,6 +32,10 @@
#ifdef UL_MAC_OSX
# include GLUT/glut.h
+# ifndef APIENTRY
+// This is a workaround to avoid getting errors in osg/BufferObject
+#   define APIENTRY
+# endif

--- org/SimGear/simgear/compiler.h  2006-11-03 01:57:02.0  
-0800
+++ SimGear/SimGear/simgear/compiler.h  2006-11-16 01:23:06.0  
-0800
@@ -376,7 +376,9 @@
#  define SG_GLU_H OpenGL/glu.h
#  define SG_GLEXT_H OpenGL/glext.h
#  define SG_GLUT_H GLUT/glut.h
-
+#  ifndef APIENTRY
+#define APIENTRY
+#  endif
inline int (isnan)(double r) { return !(r = 0 || r = 0); }
#else
#  define SG_GL_H GL/gl.h

Hope it helps.

Now I'm working on building both 0.9.11-pre1 and cvs head.
I had some errors in linking osgViewer (when building fgfs cvs-head/ 
OSG-svn head)
OSG-2.0 seems OK so I'll go with it for cvs-head for a while.
By the way, do you know which revision/tag is suitable for building  
0.9.11-pre1?

Tat

On Jun 29, 2007, at 6:51 AM, Hans Fugal wrote:

 Here's what I had to do to compile CVS on OS X Tiger.

 Install dependencies. I got plib from macports, simgear from CVS, and
 OSG 2.0 binaries from the OSG website.

 Tiger includes OpenAL 1.1, but not ALUT, so there is no alut.h on the
 system. According to Apple[1] you should install freealut to get  
 alut.h,
 but Apple in their infinite wisdom decided to include the ALUT symbols
 in their OpenAL framework, so if you try to install freealut you get
 symbol conflicts. See [2] for the gory details. The simplest solution
 seems to be to grab alut.h from the OpenAL 1.0 distribution and put it
 in /System/Library/Frameworks/OpenAL.framework/Headers

 As mentioned in a previous email, there is a compilation problem  
 due to
 glut.h undefining APIENTRY. I hope that we can find a workaround for
 that in FlightGear source, but in the meantime the easiest fix is to
 hack your plib/pu.h to define APIENTRY after including glut.h (or hack
 glut.h to not undefine it).

 The following patch is required:

 --- a/src/Instrumentation/render_area_2d.cxx
 +++ b/src/Instrumentation/render_area_2d.cxx
 @@ -30,7 +30,8 @@
  #   include windows.h
  #endif

 -#include GL/gl.h
 +#include simgear/compiler.h
 +#include SG_GL_H

  #include render_area_2d.hxx


 Since OSG binaries are frameworks, the linkage needs to be changed to
 use -framework instead of -l. If you build OSG by hand, -l is correct,
 however you have to set OSG_LIBRARY_PATH=/usr/local/lib/ 
 osgPlugins-2.0.0
 because the make install target and the source code aren't on the same
 page as to where plugins should be installed. I have reported that to
 the OSG list and hopefully in future releases it will be fixed. In any
 case, users will rather use the binaries (frameworks) and  
 developers can
 build frameworks from SVN, so -framework seems to me to be the most
 correct.

 Whether using -l or -framework for osg libraries, I had to link in  
 osgGA
 and osgText explicitly or it would not link.


 Are we working towards total independence from plib?  If so the  
 APIENTRY
 problem will disappear on its own.

 The -framework issue I am happy to provide a patch for, as soon as  
 I can
 figure out the right way to hack the autoconf/automake stuff to do so.
 Currently src/Main/Makefile.am includes the -l phrases explicitly,  
 that
 will probably need to be changed to something more generic,  
 probably in
 configure.ac. Does anyone know the right place for this? I'm  
 inclined to
 take the OpenAL test in configure.ac as a basis.

 Thanks

 References
 1. http://developer.apple.com/qa/qa2006/qa1504.html
 2. http://opensource.creative.com/pipermail/openal/2006-August/ 
 009761.html

 -- 
 Hans Fugal
 Fugal Computing

 -- 
 ---
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 

Re: [Flightgear-devel] CVS on OS X

2007-06-28 Thread Hans Fugal
On 6/28/07, Tatsuhiro Nishioka [EMAIL PROTECTED] wrote:
 Now I'm working on building both 0.9.11-pre1 and cvs head.
 I had some errors in linking osgViewer (when building fgfs cvs-head/
 OSG-svn head)
 OSG-2.0 seems OK so I'll go with it for cvs-head for a while.
 By the way, do you know which revision/tag is suitable for building
 0.9.11-pre1?

I was able to build and run the 0.9.11-pre1 tarball without any
changes at all (using the 0.9.11-pre1 SimGear and macports plib). I
don't recall for sure, but I probably already had the alut.h fix in
place.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel