Compile HDK nodes on mac H11

   8402   8   2
User Avatar
Member
2199 posts
Joined: July 2005
Online
I'm trying to compile some hdk sops on a mac with H11 and I get the following errors every time

MacBookPro-6:HoudiniTools simon$ hcustom SOP_Star.C
Making SOP_Star.o and /Users/simon/Library/Preferences/houdini/11.0/dso/SOP_Star.dylib from SOP_Star.C
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h: In function ‘int32 SYS_AtomicImpl::test_and_add(int32*, int)’:
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h:345: error: ‘__sync_fetch_and_add’ was not declared in this scope
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h: In function ‘int32 SYS_AtomicImpl::compare_and_swap(int32*, int32, int32)’:
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h:351: error: ‘__sync_val_compare_and_swap’ was not declared in this scope
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h: In function ‘int64 SYS_AtomicImpl::test_and_set64(int64*, int64)’:
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h:358: error: ‘__sync_lock_test_and_set’ was not declared in this scope
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h: In function ‘int64 SYS_AtomicImpl::test_and_add64(int64*, int64)’:
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h:365: error: ‘__sync_fetch_and_add’ was not declared in this scope
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h: In function ‘int64 SYS_AtomicImpl::compare_and_swap64(int64*, int64, int64)’:
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h:372: error: ‘__sync_val_compare_and_swap’ was not declared in this scope
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h: In function ‘void SYS_AtomicImpl::store(int32*, int32, SYS_MemoryOrder)’:
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h:389: error: ‘__sync_synchronize’ was not declared in this scope
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h:399: error: ‘__sync_lock_release’ was not declared in this scope
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h:405: error: ‘__sync_lock_test_and_set’ was not declared in this scope
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h: In function ‘int32 SYS_AtomicImpl::load(const int32*, SYS_MemoryOrder)’:
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h:428: error: ‘__sync_synchronize’ was not declared in this scope
/Library/Frameworks/Houdini.framework/Versions/11.0.733/Resources/toolkit/include/SYS/SYS_AtomicImpl.h:435: error: ‘__sync_val_compare_and_swap’ was not declared in this scope
Compile failed

None of the errors are in the source code they seem to be in the Houdini framework, what gives?
The trick is finding just the right hammer for every screw
User Avatar
Member
345 posts
Joined:
Offline
Hi Simon,
I think this is due to write permission errors.
This link might help:
http://forums.odforce.net/index.php?/topic/12325-compiling-problem-mac-os-10-6-4/ [forums.odforce.net]

Cheers,
kuba
User Avatar
Member
2199 posts
Joined: July 2005
Online
Well I've tried the suggested changing permissions but still get the same errors. Never had this problem in H10, seems to be new to H11.

The errors I'm getting seem to be very different from the ones in that odForce thread.
The trick is finding just the right hammer for every screw
User Avatar
Member
7725 posts
Joined: July 2005
Offline
Make sure that the g++ in your path is a version 4.2 and 64-bit.
User Avatar
Member
2199 posts
Joined: July 2005
Online
Any ideas how to update it?
Do I have to completely update Xcode and if so is it part of xcode 4?
The trick is finding just the right hammer for every screw
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Hey Simon ,

I installed xcode 3.2.6 running on OSX6.6. I also then followed this

http://lisuxes.blogspot.com/2010/10/hdk-in-mac-using-hcustom.html [lisuxes.blogspot.com]

Next I moved star.C out of frameworks and constructed my own dir structure inside my user dir.

Rob
Gone fishing
User Avatar
Member
2199 posts
Joined: July 2005
Online
Got it to work, cheers.

One thing though I went down the .bashrc route from the linked blog post (I didn't have one so just made one) and find I have to manually source it in before compiling. Any ideas how to get that to happen automatically when the houdini shell starts?
The trick is finding just the right hammer for every screw
User Avatar
Member
7725 posts
Joined: July 2005
Offline
I have my .bash_profile source my .bashrc.

# ~/.bash_profile
if ; then
source ${HOME}/.bashrc
fi
User Avatar
Member
2199 posts
Joined: July 2005
Online
Perfect, cheers.
The trick is finding just the right hammer for every screw
  • Quick Links