Hello, Jon : I have modified the makefile from your gl lib. I use mac os 10.6 with gcc 4.2. I include my new version of your makefile and the diff output so changes will be easier to understand. I force building and linking with 32 bits binaries, which is what pil 32 expects.
Do no forget, I am no Makefile/gcc specialist. It seems that two "-m32" are required. There may be a more elegant solution and I am not aware on the impact on 32 bits darwins or other gcc. I have been able to run all the tests except that I have not understood what to do with the font-menu. Tomas : thanks for the link to the repository and all the information. In that case, I believe there is no problem with picolisp. I may (I should) nevertheless try this gcc.l code, when I have the time. Thanks to all, Denis ---------------------------------------- > From: [email protected] > To: [email protected] > Subject: Re: PicoLisp on mac osx : bug > Date: Wed, 20 Nov 2013 08:49:10 +0100 > > Hi Denis, > > It's not clear to me exactly what you did to get OpenGL working with > pil32 on Mac. > > On 19-11-13 16:05 , Denis Fourt wrote: >> Hello Alexander, >> >> Yes, I installed pil32 and Jon Kleiser's library. I built everything but the >> small test program could not find the gl functions wrappers. >> >> So I modified the gl lib makefile and everything works : now I have a pil32 >> running with openGL on mac os 10.6 (so not need for the emulator). > > The "gl lib makefile" that you modified, is that the one here > <http://folk.uio.no/jkleiser/pico/gl/Makefile> ? > How did you modify it? I'd be glad to have OpenGL working with pil32 on > Mac again. > > /Jon > >> BUT: >> >> 1) The changes I made are surely not perfect, they are likely to cause some >> troubles on the other OSs or other (older?) versions of mac os x. So I have >> just explained them here, because they could be useful for another user or >> to correctly fix the makefile (sorry I cannot help more). >> >> 2) I have been curious to understand how to link pil32 with C code, so I had >> a look at the gcc.l file and the Darwin section might not run on a 64 bits >> mac, because it uses the same arguments for gcc as the gl makefile. >> >> So, no problem on my side, but it would be nice if someone else could issue >> a proper fix (unless the real 64 bits for mac osx will be soon available). >> >> Thanks, >> >> Denis >> >> ---------------------------------------- >>> From: [email protected] >>> To: [email protected] >>> Subject: Re: PicoLisp on mac osx : bug >>> Date: Tue, 19 Nov 2013 08:27:51 +0100 >>> >>> Hello Denis, >>> >>> I have no Mac myself, but let me ask for understanding the problem. >>> >>>> I downloaded and installed Picolisp 32 bits on mac os 10.6. Everything >>>> went all right. Then I tried to install the library for openGL and I had >>>> to modify the makefile to build a 32 bits lib. >>> I assume that you mean Jon Kleiser's library in "gl.tgz", right? This is >>> currently the only way to get openGl on pil32. >>> >>> Another possibility might be running the pil64 emulator on the Mac. >>> Should be built automatically if you 'make' in the src64 directory. In >>> pil64 you can use "lib/openGl.l", but unfortunately the emulator is much >>> slower than native executables. >>> >>> >>>> ********** >>>> DYNAMIC-LIB-FLAGS = -m32 -dynamiclib -undefined dynamic_lookup -framework >>>> OpenGL -framework GLUT >>>> ********** >>>> >>>> I do not believe the -framework OpenGL is required, but it may be cleaner >>>> >>>> ********** >>>> c.o: >>>> gcc -c -O -m32 -pipe \ >>>> -falign-functions -fomit-frame-pointer -fno-strict-aliasing \ >>>> -W -Wimplicit -Wreturn-type -Wunused -Wformat \ >>>> -Wuninitialized -Wstrict-prototypes \ >>>> -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $*.c >>>> ********** >>>> >>>> I had the -m32. I had the -fno-strict-aliasing, I do not know if it is >>>> required, but PicoLisp need it and there is some code in the pico.h file >>>> which is included. >>>> >>>> I am no makefile specialist. Adding -m32 will impact compilation on >>>> the other platforms. There may be better ways to fix it too. >>>> >>>> The lib/gcc.l file may need a similar fix, but I have not try to use >>>> it. >>>> >>>> The problem arises on 64 bits macs which support both kind of binaries >>>> : 64 seems to be the default. >>> So this is what I don't understand. What exactly is the problem? >>> >>> ♪♫ Alex >>> > > -- > UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe >
