RE: PicoLisp on mac osx : bug

2013-11-21 Thread Denis Fourt
Good news and thanks for the information for the font-menu.

Denis

> From: jon.klei...@usit.uio.no
> To: picolisp@software-lab.de
> Subject: Re: PicoLisp on mac osx : bug
> Date: Thu, 21 Nov 2013 09:31:50 +0100
>
> Hi Denis,
>
> Thanks a lot! This works very fine, both on OSX 10.6.8 and 10.8.5. I
> shall update the gl.tgz on my <http://folk.uio.no/jkleiser/pico/> a
> little later.
> You mentioned that you didn't understand what to do with the
> font-menu.l. I tested it on both of my Macs. The font menu pops up when
> I use a real mouse and click the right mouse button. However, if I use
> the Ctrl key together with a normal (left button) click, nothing happens.
>
> /Jon
>
> On 21-11-13 00:01 , Denis Fourt wrote:
>> Hello again,
>>
>> Jon : I have modified the makefile from your gl lib. I use mac os 10.6 with 
>> gcc 4.2. Here is the diff output so changes will be easier to understand. I 
>> tried to attach the files, but it seems I have not succeeded, sorry. So, 
>> posting again and with you permission Jon, I would send to your own mail box 
>> my new version of your makefile if you liked. Here is the diff:
>>
>> --- a/gl/Makefile
>> +++ b/gl/Makefile
>> @@ -17,7 +17,7 @@ ifeq ($(shell uname), FreeBSD)
>> else
>> ifeq ($(shell uname), Darwin)
>> & export MACOSX_DEPLOYMENT_TARGET=10.4 & only for PPC Mac
>> - DYNAMIC-LIB-FLAGS = -dynamiclib -undefined dynamic_lookup -framework GLUT
>> + DYNAMIC-LIB-FLAGS = -m32 -dynamiclib -undefined dynamic_lookup -framework 
>> OpenGL -framework GLUT
>> STRIP = :
>> else
>> ifeq ($(shell uname -o), Cygwin)
>> @@ -35,8 +35,8 @@ endif
>> all: $(lib)/gl $(lib)/glu $(lib)/glut
>>
>> .c.o:
>> - gcc -c -O -pipe \
>> - -falign-functions -fomit-frame-pointer \
>> + 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 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: jon.klei...@usit.uio.no
>>> To: picolisp@software-lab.de
>>> 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 
>>>&g

Re: PicoLisp on mac osx : bug

2013-11-21 Thread Jon Kleiser

Hi Denis,

Thanks a lot! This works very fine, both on OSX 10.6.8 and 10.8.5. I 
shall update the gl.tgz on my <http://folk.uio.no/jkleiser/pico/> a 
little later.
You mentioned that you didn't understand what to do with the 
font-menu.l. I tested it on both of my Macs. The font menu pops up when 
I use a real mouse and click the right mouse button. However, if I use 
the Ctrl key together with a normal (left button) click, nothing happens.


/Jon

On 21-11-13 00:01 , Denis Fourt wrote:

Hello again,

Jon : I have modified the makefile from your gl lib. I use mac os 10.6 with gcc 
4.2. Here is the diff output so changes will be easier to understand. I  tried 
to attach the files, but it seems I have not succeeded, sorry. So, posting 
again and with you permission Jon, I would send to your own mail box my new 
version of your makefile if you liked. Here is the diff:

--- a/gl/Makefile
+++ b/gl/Makefile
@@ -17,7 +17,7 @@ ifeq ($(shell uname), FreeBSD)
  else
  ifeq ($(shell uname), Darwin)
&  export MACOSX_DEPLOYMENT_TARGET=10.4 &  only for PPC Mac
-   DYNAMIC-LIB-FLAGS = -dynamiclib -undefined dynamic_lookup -framework 
GLUT
+   DYNAMIC-LIB-FLAGS = -m32 -dynamiclib -undefined dynamic_lookup 
-framework OpenGL -framework GLUT
STRIP = :
  else
  ifeq ($(shell uname -o), Cygwin)
@@ -35,8 +35,8 @@ endif
  all: $(lib)/gl $(lib)/glu $(lib)/glut
  
  .c.o:

-   gcc -c -O -pipe \
-   -falign-functions -fomit-frame-pointer \
+   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 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: jon.klei...@usit.uio.no
To: picolisp@software-lab.de
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: a...@software-lab.de
To: picolisp@software-lab.de
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 
OpenG

RE: PicoLisp on mac osx : bug

2013-11-20 Thread Denis Fourt
Hello again,

Jon : I have modified the makefile from your gl lib. I use mac os 10.6 with gcc 
4.2. Here is the diff output so changes will be easier to understand. I  tried 
to attach the files, but it seems I have not succeeded, sorry. So, posting 
again and with you permission Jon, I would send to your own mail box my new 
version of your makefile if you liked. Here is the diff:

--- a/gl/Makefile
+++ b/gl/Makefile
@@ -17,7 +17,7 @@ ifeq ($(shell uname), FreeBSD)
 else
 ifeq ($(shell uname), Darwin)
    & export MACOSX_DEPLOYMENT_TARGET=10.4   & only for PPC Mac
-   DYNAMIC-LIB-FLAGS = -dynamiclib -undefined dynamic_lookup -framework 
GLUT
+   DYNAMIC-LIB-FLAGS = -m32 -dynamiclib -undefined dynamic_lookup 
-framework OpenGL -framework GLUT
    STRIP = :
 else
 ifeq ($(shell uname -o), Cygwin)
@@ -35,8 +35,8 @@ endif
 all: $(lib)/gl $(lib)/glu $(lib)/glut
 
 .c.o:
-   gcc -c -O -pipe \
-   -falign-functions -fomit-frame-pointer \
+   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 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: jon.klei...@usit.uio.no
> To: picolisp@software-lab.de
> 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: a...@software-lab.de
>>> To: picolisp@software-lab.de
>>> 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.
>>>
>>&g

RE: PicoLisp on mac osx : bug

2013-11-20 Thread Denis Fourt
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: jon.klei...@usit.uio.no
> To: picolisp@software-lab.de
> 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: a...@software-lab.de
>>> To: picolisp@software-lab.de
>>> 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:picolisp@software-lab.de?subject=Unsubscribe  
>   

Re: PicoLisp on mac osx : bug

2013-11-19 Thread Jon Kleiser

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: a...@software-lab.de
To: picolisp@software-lab.de
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:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp on mac osx : bug

2013-11-19 Thread Tomas Hlavaty
Hi Denis,

> 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).

there is a mercurial repository, so it should be pretty easy to create a
patch, even with git:

$ cd /tmp
$ git clone hg::https://code.google.com/p/picolisp/
$ cd picolisp
..create your change...
$ git add...
$ git commit...
$ git format-patch...

and if you send the patch to the mailing list, it will be clear what
changes _exactly_ you have made and where.

Alex (the author of picolisp) doesn't use any version system, but still
would at least better understand the changes you made.

Also any error messages help understanding.

> 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. 

You cannot link 64 bit libraries to 32 bit executable.  On Linux, you
can install 32 bit version of the necessary libraries link with the
picolisp 32 bit executable but I am not sure how does it work on OSX.

> 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).

There seem to be a picolisp version available out of the box as Alex
mentions:

>> 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.

>>> 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.

We had this discussion some time ago on this mailing list IIRC because I
had to add (or probably remove?) the -m32 switch to compile on ARM I
think.  Alex was not satisfied with the solution so if anybody wants to
compile picolisp on ARM he has to modify the Makefile manually like you
did.

>>> The problem arises on 64 bits macs which support both kind of binaries
>>> : 64 seems to be the default.

I think the problem is that the -m32 switch is not recognised
universally bu gcc on all platforms, so sometimes it should be there and
sometimes it shouldn't, even though we want to _always_ build 32 bit
executable no matter what platform.

It would be nice though if this fix was incorporated in the Makefile for
all platforms where picolisp is compilable so that people do not have to
spend time fixing this all over again:-)

Cheers,

Tomas
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


RE: PicoLisp on mac osx : bug

2013-11-19 Thread Denis Fourt
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).

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: a...@software-lab.de
> To: picolisp@software-lab.de
> 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:picolisp@software-lab.de?subject=Unsubscribe  
>   PԔ � &j)mX�����zV�u�.n7�

Re: PicoLisp on mac osx : bug

2013-11-18 Thread Alexander Burger
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:picolisp@software-lab.de?subject=Unsubscribe