Version française
Home     About     Download     Resources     Contact us    
Browse thread
lablgl on Mac OS X
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: L.G. Meredith <lgreg.meredith@g...>
Subject: lablgl on Mac OS X
All,

Back in Aug there was thread regarding getting lablgl up on Mac OS X (Tiger)
[1]. i've been trying to successfully install it for about a day. i'd gotten
to the point reached in the thread of installing it by hand before i started
trolling the forums. It seems to build and install ok, but segfaults on all
the examples i've tried. Anybody have any clues?

Best wishes in the New Year,

--greg

[1] From: N.P.S.S...<http://groups.google.com/groups/unlock?msg=1312deab4535f0e1&_done=/group/fa.caml/browse_thread/thread/3ffbeef4c9019d79/d4486a114f020dff%3Fq%3Dlablgl%2Bon%2BMac%2BOS%2BX%26rnum%3D1>
@westminster.ac.uk
> I am trying to setup *lablgl* via Godi on *Mac **OS **X* Tiger (10.4)
> and Godi does not seem to know where to find include files.

I don't know how to solve it with godi. The directory-based approach
of conf-glut does not match the OSX architecture.

On the other hand, it is very easy to install *lablGL* by hand:
just unpack, and do
   cp Makefile.config.osx Makefile.config
   make all opt install

Cheers,
 Jacques Garrigue

[2] L-G-Merediths-Computer:~/Desktop/work/src/devtools/ocaml/lablgl-1.02lgm$
make clean
cd src && make clean
rm -f *.cm* *.a *.o *.so *.lib *.obj *.exe *.opt *_tags.c *_tags.h *~ \
    *.dll var2def var2switch lablgltop lablgl
cd Togl/src && make clean
rm -f *.cm* *.o *.obj *.so *.lib *.a *.dll *.exe *.opt *_tags.c \
    *_tags.h *~ lablgltop lablgl
rm -f Togl/togl.o
cd LablGlut/src && make clean
rm -f *.cm* *.o *.obj *.a lib*.lib *.so *.dll *.exe *.opt \
     *_tags.c *_tags.h *~ lablgluttop lablglut
L-G-Merediths-Computer:~/Desktop/work/src/devtools/ocaml/lablgl-1.02 lgm$
make all
cd src && make all LIBDIR="`ocamlc -where`"
ocamlc.opt -pp camlp4o var2def.ml -o var2def
ocamlc.opt -pp camlp4o var2switch.ml -o var2switch
ocamlrun ../src/var2def < gl_tags.var > gl_tags.h
ocamlrun ../src/var2switch -table GL_ < gl_tags.var > gl_tags.c
ocamlc.opt -c -w s -ccopt "-c -O  " ml_gl.c
ml_gl.c: In function 'ml_glGetString':
ml_gl.c:218: warning: pointer targets in passing argument 1 of
'lablgl_copy_string_check' differ in signedness
ocamlrun ../src/var2def < glu_tags.var > glu_tags.h
ocamlrun ../src/var2switch GLU_ < glu_tags.var > glu_tags.c
ocamlc.opt -c -w s -ccopt "-c -O  " ml_glu.c
ml_glu.c: In function 'ml_gluGetString':
ml_glu.c:96: warning: pointer targets in passing argument 1 of
'lablgl_copy_string_check' differ in signedness
ocamlrun ../src/var2def < raw_tags.var > raw_tags.h
ocamlc.opt -c -w s -ccopt "-c -O  " ml_raw.c
ocamlc.opt -c -w s -ccopt "-c -O  " ml_glarray.c
ocamlc.opt -c -w s -ccopt "-c -O  " ml_glutess.c
ocamlmklib -o lablgl ml_gl.o    ml_glu.o    ml_raw.o ml_glarray.o
ml_glutess.o -framework OpenGL
ocamlc.opt -c -w s -I +labltk raw.mli
ocamlc.opt -c -w s -I +labltk raw.ml
ocamlc.opt -c -w s -I +labltk gl.mli
ocamlc.opt -c -w s -I +labltk gl.ml
ocamlc.opt -c -w s -I +labltk glLight.mli
ocamlc.opt -c -w s -I +labltk glLight.ml
ocamlc.opt -c -w s -I +labltk glList.mli
ocamlc.opt -c -w s -I +labltk glList.ml
ocamlc.opt -c -w s -I +labltk glMap.mli
ocamlc.opt -c -w s -I +labltk glMap.ml
ocamlc.opt -c -w s -I +labltk glMat.mli
ocamlc.opt -c -w s -I +labltk glMat.ml
ocamlc.opt -c -w s -I +labltk glMisc.mli
ocamlc.opt -c -w s -I +labltk glMisc.ml
ocamlc.opt -c -w s -I +labltk glPix.mli
ocamlc.opt -c -w s -I +labltk glPix.ml
ocamlc.opt -c -w s -I +labltk glClear.mli
ocamlc.opt -c -w s -I +labltk glClear.ml
ocamlc.opt -c -w s -I +labltk glTex.mli
ocamlc.opt -c -w s -I +labltk glTex.ml
ocamlc.opt -c -w s -I +labltk glDraw.mli
ocamlc.opt -c -w s -I +labltk glDraw.ml
ocamlc.opt -c -w s -I +labltk glFunc.mli
ocamlc.opt -c -w s -I +labltk glFunc.ml
ocamlc.opt -c -w s -I +labltk gluMisc.mli
ocamlc.opt -c -w s -I +labltk gluMisc.ml
ocamlc.opt -c -w s -I +labltk gluNurbs.mli
ocamlc.opt -c -w s -I +labltk gluNurbs.ml
ocamlc.opt -c -w s -I +labltk gluQuadric.mli
ocamlc.opt -c -w s -I +labltk gluQuadric.ml
ocamlc.opt -c -w s -I +labltk gluTess.mli
ocamlc.opt -c -w s -I +labltk gluTess.ml
ocamlc.opt -c -w s -I +labltk gluMat.mli
ocamlc.opt -c -w s -I +labltk gluMat.ml
ocamlc.opt -c -w s -I +labltk glArray.mli
ocamlc.opt -c -w s -I +labltk glArray.ml
ocamlmklib -o lablgl raw.cmo gl.cmo        glLight.cmo    glList.cmo
glMap.cmo glMat.cmo    glMisc.cmo    glPix.cmo    glClear.cmo glTex.cmo
glDraw.cmo    glFunc.cmo    gluMisc.cmo gluNurbs.cmo    gluQuadric.cmo
gluTess.cmo    gluMat.cmo glArray.cmo -framework OpenGL
cd Togl/src && make all
ocamlrun ../../src/var2def < togl_tags.var > togl_tags.h
ocamlrun ../../src/var2switch TOGL_ < togl_tags.var > togl_tags.c
ocamlc.opt -c -w s -ccopt "-c -O -I../../src -ITogl -I/usr/local/include
-I/usr/X11R6/include -I.  " ml_togl.c
cd Togl && make togl.o CC="ocamlc.opt" CFLAGS='-c -ccopt "-c -O -I../../src
-ITogl -I/usr/local/include -I/usr/X11R6/include -I.   "'
ocamlc.opt -c -ccopt "-c -O -I../../src -ITogl -I/usr/local/include
-I/usr/X11R6/include -I.   " togl.c
ocamlmklib -o togl ml_togl.o    Togl/togl.o -framework OpenGL
-L/usr/X11R6/lib -lGL -lXmu
ocamlc.opt -c -w s -I +labltk -I ../../src togl.mli
ocamlc.opt -c -w s -I +labltk -I ../../src togl.ml
ocamlmklib -o togl togl.cmo -framework OpenGL  -L/usr/X11R6/lib -lGL -lXmu
ocamlmktop  -I . -I +labltk -I ../../src -o lablgltop \
  labltk.cma lablgl.cma togl.cma
make INSTALLDIR="`ocamlc.opt -where`/lablGL" real-lablgl
generate lablgl
echo "#!/bin/sh" > lablgl
echo "# toplevel with lablGL and Togl" >> lablgl
if test -f dlltogl.so; then \
    echo 'exec ocaml -I +labltk -I
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
lablgl.cma labltk.cma togl.cma $*' >> lablgl; \
 else echo 'exec
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL/lablgltop"
-I +labltk -I
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
$*' >> lablgl; fi
chmod 755 lablgl
cd LablGlut/src && make
ocamlc.opt -c -w s -ccopt "-c -O   -I../../src" wrap_gl.c
ocamlc.opt -c -w s -ccopt "-c -O   -I../../src" wrap_glut.c
wrap_glut.c: In function 'ml_glutBitmapLength':
wrap_glut.c:425: warning: pointer targets in passing argument 2 of
'glutBitmapLength' differ in signedness
wrap_glut.c: In function 'ml_glutStrokeLength':
wrap_glut.c:431: warning: pointer targets in passing argument 2 of
'glutStrokeLength' differ in signedness
ocamlmklib -o lablglut wrap_gl.o    wrap_glut.o -framework GLUT -framework
OpenGL
ocamlc.opt -c -w s  glut.mli
ocamlc.opt -c -w s  glut.ml
ocamlmklib -o lablglut glut.cmo -framework GLUT -framework OpenGL
ocamlmktop  -I . -I ../../src  -o lablgluttop \
  lablglut.cma lablgl.cma
make INSTALLDIR="`ocamlc.opt -where`/lablGL" real-lablglut
generate lablglut
echo "#!/bin/sh" > lablglut
echo "# toplevel with lablGL and LablGlut" >> lablglut
if test -f dlllablglut.so; then \
    echo 'exec ocaml -I
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
lablgl.cma lablglut.cma $*' >> lablglut; \
 else echo 'exec
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL/lablgluttop"
-I
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
$*' >> lablglut; fi
chmod 755 lablglut
L-G-Merediths-Computer:~/Desktop/work/src/devtools/ocaml/lablgl-1.02 lgm$
make opt
cd src && make opt
ocamlopt.opt -c -I +labltk raw.ml
ocamlopt.opt -c -I +labltk gl.ml
ocamlopt.opt -c -I +labltk glLight.ml
ocamlopt.opt -c -I +labltk glList.ml
ocamlopt.opt -c -I +labltk glMap.ml
ocamlopt.opt -c -I +labltk glMat.ml
ocamlopt.opt -c -I +labltk glMisc.ml
ocamlopt.opt -c -I +labltk glPix.ml
ocamlopt.opt -c -I +labltk glClear.ml
ocamlopt.opt -c -I +labltk glTex.ml
ocamlopt.opt -c -I +labltk glDraw.ml
ocamlopt.opt -c -I +labltk glFunc.ml
ocamlopt.opt -c -I +labltk gluMisc.ml
ocamlopt.opt -c -I +labltk gluNurbs.ml
ocamlopt.opt -c -I +labltk gluQuadric.ml
ocamlopt.opt -c -I +labltk gluTess.ml
ocamlopt.opt -c -I +labltk gluMat.ml
ocamlopt.opt -c -I +labltk glArray.ml
ocamlmklib -o lablgl raw.cmx gl.cmx        glLight.cmx    glList.cmx
glMap.cmx glMat.cmx    glMisc.cmx    glPix.cmx    glClear.cmx glTex.cmx
glDraw.cmx    glFunc.cmx    gluMisc.cmx gluNurbs.cmx    gluQuadric.cmx
gluTess.cmx    gluMat.cmx glArray.cmx -framework OpenGL
cd Togl/src && make opt
ocamlopt.opt -c -I +labltk -I ../../src togl.ml
ocamlmklib -o togl togl.cmx -framework OpenGL  -L/usr/X11R6/lib -lGL -lXmu
cd LablGlut/src && make opt
ocamlopt.opt -c  glut.ml
ocamlmklib -o lablglut glut.cmx -framework GLUT -framework OpenGL
L-G-Merediths-Computer:~/Desktop/work/src/devtools/ocaml/lablgl-1.02 lgm$ su
Password:
L-G-Merediths-Computer:/Users/lgm/Desktop/work/src/devtools/ocaml/lablgl-
1.02 root# make install
cd src && make install
if test -d
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL";
then : ; else mkdir -p
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL";
fi
cp build.ml raw.ml gl.ml        glLight.ml    glList.ml    glMap.ml glMat.ml
glMisc.ml    glPix.ml    glClear.ml glTex.ml    glDraw.ml    glFunc.ml
gluMisc.ml gluNurbs.ml    gluQuadric.ml    gluTess.ml    gluMat.ml
glArray.ml raw.mli gl.mli        glLight.mli    glList.mli    glMap.mli
glMat.mli    glMisc.mli    glPix.mli    glClear.mli glTex.mli    glDraw.mli
glFunc.mli    gluMisc.mli gluNurbs.mli    gluQuadric.mli    gluTess.mli
gluMat.mli glArray.mli"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
cp liblablgl.a"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
cd
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
&& ranlib liblablgl.a
if test -f dlllablgl.so; then cp
dlllablgl.so"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/stublibs";
fi
cp raw.cmi gl.cmi        glLight.cmi    glList.cmi    glMap.cmi glMat.cmi
glMisc.cmi    glPix.cmi    glClear.cmi glTex.cmi    glDraw.cmi    glFunc.cmi
gluMisc.cmi gluNurbs.cmi    gluQuadric.cmi    gluTess.cmi    gluMat.cmi
glArray.cmi lablgl.cma"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
cp lablgl.cmxa lablgl.a raw.cmx gl.cmx        glLight.cmx    glList.cmx
glMap.cmx glMat.cmx    glMisc.cmx    glPix.cmx    glClear.cmx glTex.cmx
glDraw.cmx    glFunc.cmx    gluMisc.cmx gluNurbs.cmx    gluQuadric.cmx
gluTess.cmx    gluMat.cmx
glArray.cmx"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
cd
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
&& ranlib lablgl.a
cd Togl/src && make install
cp togl.mli togl.ml
libtogl.a"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
cd
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
&& ranlib libtogl.a
cp dlltogl.so"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/stublibs"
cp lablgl "/usr/local/bin"
cp togl.cmi togl.cma
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
cp togl.cmxa togl.a
togl.cmx"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
cd
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
&& ranlib togl.a
cd LablGlut/src && make install
if test -d
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL";
then : ; else mkdir -p
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL";
fi
cp glut.ml glut.mli"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
cp liblablglut.a"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
cd
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
&& ranlib liblablglut.a
cp dlllablglut.so"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/stublibs"
cp lablglut "/usr/local/bin"
cp glut.cmi lablglut.cma"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
cp lablglut.cmxa lablglut.a
glut.cmx"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
cd
"/Users/lgm/Desktop/work/src/devtools/ocaml/godi/lib/ocaml/std-lib/lablGL"
&& ranlib lablglut.a
L-G-Merediths-Computer:/Users/lgm/Desktop/work/src/devtools/ocaml/lablgl-
1.02 root# exit
L-G-Merediths-Computer:~/Desktop/work/src/devtools/ocaml/lablgl-1.02 lgm$ cd
Togl/
L-G-Merediths-Computer:~/Desktop/work/src/devtools/ocaml/lablgl-1.02/Togl
lgm$ ls
examples    src
L-G-Merediths-Computer:~/Desktop/work/src/devtools/ocaml/lablgl-1.02/Togl
lgm$ cd examples/
L-G-Merediths-Computer:~/Desktop/work/src/devtools/ocaml/lablgl-1.02/Togl/examples
lgm$ ls
Makefile    checker.ml    gears.ml    morph3d.ml    scene.ml    tennis.ml
texturesurf.ml
README        double.ml    gears_a.ml    planet.ml    simple.ml
tesselate.ml
L-G-Merediths-Computer:~/Desktop/work/src/devtools/ocaml/lablgl-1.02/Togl/examples
lgm$ lablgl simple.ml
Segmentation fault
L-G-Merediths-Computer:~/Desktop/work/src/devtools/ocaml/lablgl-1.02/Togl/examples
lgm$

--
L.G. Meredith
Partner
Biosimilarity LLC

505 N 72nd St
Seattle, WA 98103

+1 206.650.3740