Re: Cog build fails on 10.6

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Cog build fails on 10.6

Eliot Miranda-2
 
Hi Henrik,

    see the thread [Vm-dev] Error compiling cog for MacOS 10.6 round about July 30th.

HTH
Eliot

On Thu, Aug 12, 2010 at 7:29 AM, Henrik Johansen <[hidden email]> wrote:
In sqUnixVMProfile.c, it fails on include of ucontext.h , it's deprecated and (as long as you're not using the functions, as implied by the "to get register defines in sys/ucontext.h" comment) sys/ucontext.h should be included instead.

Googled a bit, and it seems RedHat 7.3 throws a fit instead if you do that though...
http://code.google.com/p/google-perftools/issues/detail?id=218

Any change of a workaround? ;)

Cheers,
Henry

Reply | Threaded
Open this post in threaded view
|

Re: Cog build fails on 10.6

Henrik Sperre Johansen
 
On 12.08.2010 19:31, Eliot Miranda wrote:
Hi Henrik,

    see the thread [Vm-dev] Error compiling cog for MacOS 10.6 round about July 30th.

HTH
Eliot

On Thu, Aug 12, 2010 at 7:29 AM, Henrik Johansen <[hidden email]> wrote:
In sqUnixVMProfile.c, it fails on include of ucontext.h , it's deprecated and (as long as you're not using the functions, as implied by the "to get register defines in sys/ucontext.h" comment) sys/ucontext.h should be included instead.

Googled a bit, and it seems RedHat 7.3 throws a fit instead if you do that though...
http://code.google.com/p/google-perftools/issues/detail?id=218

Any change of a workaround? ;)

Cheers,
Henry

Ah yes, I missed your post there and just remembered the conclusion as "Use 10.5 as platform". :/

My point was, it's just the context manipulation functions (get/set/make/swap) in ucontext.h which are deprecated.
The ucontext struct and its fields, defined in sys/ucontext.h (and used in histogramSIGPROFhandler), is not.

Thus I fail to see why one would have to find an entirely new way to do this on OSX (or if one even exists), instead of changing the include.

Cheers,
Henry
Reply | Threaded
Open this post in threaded view
|

Re: Cog build fails on 10.6

Eliot Miranda-2
 


On Thu, Aug 12, 2010 at 10:52 AM, Henrik Sperre Johansen <[hidden email]> wrote:
On 12.08.2010 19:31, Eliot Miranda wrote:
Hi Henrik,

    see the thread [Vm-dev] Error compiling cog for MacOS 10.6 round about July 30th.

HTH
Eliot

On Thu, Aug 12, 2010 at 7:29 AM, Henrik Johansen <[hidden email]> wrote:
In sqUnixVMProfile.c, it fails on include of ucontext.h , it's deprecated and (as long as you're not using the functions, as implied by the "to get register defines in sys/ucontext.h" comment) sys/ucontext.h should be included instead.

Googled a bit, and it seems RedHat 7.3 throws a fit instead if you do that though...
http://code.google.com/p/google-perftools/issues/detail?id=218

Any change of a workaround? ;)

Cheers,
Henry

Ah yes, I missed your post there and just remembered the conclusion as "Use 10.5 as platform". :/

My point was, it's just the context manipulation functions (get/set/make/swap) in ucontext.h which are deprecated.
The ucontext struct and its fields, defined in sys/ucontext.h (and used in histogramSIGPROFhandler), is not.

Thus I fail to see why one would have to find an entirely new way to do this on OSX (or if one even exists), instead of changing the include.

Does changing the include to sys/ucontext.h work?  If so, mail me the patched file and I'll integrate it.
 

Cheers,
Henry

Reply | Threaded
Open this post in threaded view
|

Re: Cog build fails on 10.6

Henrik Sperre Johansen
 
On 12.08.2010 19:53, Eliot Miranda wrote:


On Thu, Aug 12, 2010 at 10:52 AM, Henrik Sperre Johansen <[hidden email]> wrote:
On 12.08.2010 19:31, Eliot Miranda wrote:
Hi Henrik,

    see the thread [Vm-dev] Error compiling cog for MacOS 10.6 round about July 30th.

HTH
Eliot

On Thu, Aug 12, 2010 at 7:29 AM, Henrik Johansen <[hidden email]> wrote:
In sqUnixVMProfile.c, it fails on include of ucontext.h , it's deprecated and (as long as you're not using the functions, as implied by the "to get register defines in sys/ucontext.h" comment) sys/ucontext.h should be included instead.

Googled a bit, and it seems RedHat 7.3 throws a fit instead if you do that though...
http://code.google.com/p/google-perftools/issues/detail?id=218

Any change of a workaround? ;)

Cheers,
Henry

Ah yes, I missed your post there and just remembered the conclusion as "Use 10.5 as platform". :/

My point was, it's just the context manipulation functions (get/set/make/swap) in ucontext.h which are deprecated.
The ucontext struct and its fields, defined in sys/ucontext.h (and used in histogramSIGPROFhandler), is not.

Thus I fail to see why one would have to find an entirely new way to do this on OSX (or if one even exists), instead of changing the include.

Does changing the include to sys/ucontext.h work?  If so, mail me the patched file and I'll integrate it.
 
It works in the sense that it will compile with 10.6 as the platform, and I can run the VM just fine.
I didn't actually _test_ the profiler yet though, tried to figure out why sqMakeMemoryNotExecutableFromTo was giving me errors in the stack page initialization instead  ...
Either way, the original mail linked to an issue describing RedHat 7.3 (and possibly older) having issues when including sys/ucontext.h instead of ucontext.h, which I why I asked if you knew of a better way than simply changing the include :)

Anyways, I've attached the file, for those interested.

Cheers,
Henry

sqUnixVMProfile.zip (4K) Download Attachment