View Issue Details

IDProjectCategoryView StatusLast Update
0000656FreeCADBugpublic2012-04-02 16:57
Reporterchinasaurli Assigned To 
Status closedResolutionfixed 
Fixed in Version0.13 
Summary0000656: WildMagic4 doesn't build on 64-bit Mac OS
Descriptionsrc/Mod/Mesh/App/WildMagic4/Wm4System.cpp relies on Carbon API calls. Since Carbon is 32-bit this is blocking my 64-bit build. It builds if you take out the offending code block, but not clear what effect this will have.
TagsNo tags attached.
FreeCAD Information



2012-03-31 18:57

administrator   ~0001840

It seems that only these functions are used:
* Wm4::System::Memcpy
* Wm4::System::Read4le
* Wm4::System::Write4le
* Wm4::System::Fclose
* Wm4::System::Read8le
* Wm4::System::Fopen
* Wm4::System::Write8le

Can you send a patch of your modifications, please?


2012-04-01 07:55

reporter   ~0001841

I'm reluctant to suggest anything since at the moment I don't have a working Mac build. I got a cmake setup to compile but the program immediately crashes with some kind of segfault. Haven't had time to look into it further.

But if you're sure System::GetPath is not used, then I suppose this crude workaround should be okay. Too bad the linker is trying to put this in if it's not needed; sounds like we could cut some things from the WildMagic includes in general?

Basically I just did:
< #ifdef __APPLE__
> #if defined(__APPLE__) & !defined(__x86_64__)

Which got me through with gcc. Obviously not ideal; will update next time I try to build; I'm on a MacBook so it's a slow process.


2012-04-02 05:46

administrator   ~0001846

Patch is applied to;a=commit;h=f72bc2579d68c1167969929de45f9f9cea357e92


2012-04-02 13:47

reporter   ~0001854

Cool, hope this works for people. A remaining issue is that I think checking for __x86_64__ is gcc specific. There must be better ways to check whether the build is 64-bit but I haven't tested them.


2012-04-02 16:57

administrator   ~0001862

On Mac the mostly used compiler is still gcc to build FreeCAD. If somebody uses the Clang compiler, Intel, Borland or something else then the FreeCAD sources need to be ported anyway. So, for now this issue is solved.

Issue History

Date Modified Username Field Change
2012-03-29 09:28 chinasaurli New Issue
2012-03-31 18:57 wmayer Note Added: 0001840
2012-04-01 07:55 chinasaurli Note Added: 0001841
2012-04-02 05:46 wmayer Note Added: 0001846
2012-04-02 05:46 wmayer Status new => closed
2012-04-02 05:46 wmayer Resolution open => fixed
2012-04-02 05:46 wmayer Fixed in Version => 0.13
2012-04-02 13:47 chinasaurli Note Added: 0001854
2012-04-02 13:47 chinasaurli Status closed => feedback
2012-04-02 13:47 chinasaurli Resolution fixed => reopened
2012-04-02 16:57 wmayer Note Added: 0001862
2012-04-02 16:57 wmayer Status feedback => closed
2012-04-02 16:57 wmayer Resolution reopened => fixed