Compiling emacs on Mac OS X

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling emacs on Mac OS X

Filipe Cabecinhas
Hi all!

I'm trying to compile emacs on Mac OS X using clang but I may have hit a bug...

clang on linux compiles it well (not exactly the same config, though).

clang on Mac OS X, compiling the console or the Cocoa version always creates a defective temacs (something akin to a "stage 1 emacs"), which always blows up with a Bus Error.

Any clues on how to approach this to find out what the bug is? One ideia (from IRC) was to try compiling only one .c filewith clang... Anyone knows a tool which tests the files one at the time? There are lots of .c linked in temacs...

Regards,

  F



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Compiling emacs on Mac OS X

Mike Stump
On Dec 9, 2009, at 9:22 AM, Filipe Cabecinhas wrote:
> clang on Mac OS X, compiling the console or the Cocoa version always creates a defective temacs (something akin to a "stage 1 emacs"), which always blows up with a Bus Error.

I suspect track these sorts of problems down by having two build trees, one with clang and one with gcc.  You can then copy *.o from gcc into the clang tree, finish building temacs, and then verify it works, if it works, you can then start binary stepping half of the .o files over and so on, until you whittle it down to a single (or a group) of .o files, that must be replaced by the files from gcc, inorder for temacs to work.  Usually, this process results in a single file.  That .ii is then the testcase.  Harder is to describe what about the file is bad.  To do that, I'd normally split the file into two bits, one compiled with clang and one compiled with gcc.  Again, binary search that code for the code that much be compiled by gcc for temacs to work, then, that cut down bit is the final testcase.
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Compiling emacs on Mac OS X

Filipe Cabecinhas
Hi.

I finally found the file: src/fns.c

I'll try reducing it with delta until I don't have a segfault and ping
you back again.

Many thanks ;-)

   F

On 12/9/09 18:40, Mike Stump wrote:
> On Dec 9, 2009, at 9:22 AM, Filipe Cabecinhas wrote:
>> clang on Mac OS X, compiling the console or the Cocoa version always creates a defective temacs (something akin to a "stage 1 emacs"), which always blows up with a Bus Error.
>
> I suspect track these sorts of problems down by having two build trees, one with clang and one with gcc.  You can then copy *.o from gcc into the clang tree, finish building temacs, and then verify it works, if it works, you can then start binary stepping half of the .o files over and so on, until you whittle it down to a single (or a group) of .o files, that must be replaced by the files from gcc, inorder for temacs to work.  Usually, this process results in a single file.  That .ii is then the testcase.  Harder is to describe what about the file is bad.  To do that, I'd normally split the file into two bits, one compiled with clang and one compiled with gcc.  Again, binary search that code for the code that much be compiled by gcc for temacs to work, then, that cut down bit is the final testcase.
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev