Jump to content

Compiling problems - OS X 10.9


Recommended Posts

I'm having trouble compiling some stuff on OSX 10.9. I can get this work on Linux, and I'm pretty sure I've done it before on a mac.

I can compile standalone examples with custom, but the SOP plugins give me errors. For example, the star sop returns this on running hcustom SOP_Star.C (I have write permissions):

Making SOP_Star.o and /Users/macha/Library/Preferences/houdini/12.5/dso/SOP_Star.dylib from SOP_Star.C
clang: warning: argument unused during compilation: '-rpath,@loader_path/Libraries'
Undefined symbols for architecture x86_64:
"OP_Parameters::savePresetContents(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from:
vtable for HDK_Sample::SOP_Star in SOP_Star.o
"OP_Node::saveCommand(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, double, double, char const*, OP_SaveCommandOptions const&)", referenced from:
vtable for HDK_Sample::SOP_Star in SOP_Star.o
"OP_Node::saveIntrinsicCommand(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*)", referenced from:
vtable for HDK_Sample::SOP_Star in SOP_Star.o
"OP_Node::saveDialogScriptExtraInfo(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)", referenced from:
vtable for HDK_Sample::SOP_Star in SOP_Star.o
"SOP_Node::saveIntrinsic(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, OP_SaveFlags const&)", referenced from:
vtable for HDK_Sample::SOP_Star in SOP_Star.o
"SOP_Node::saveCookedData(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, OP_Context&, int)", referenced from:
vtable for HDK_Sample::SOP_Star in SOP_Star.o
"SOP_Node::save(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, OP_SaveFlags const&, char const*)", referenced from:
vtable for HDK_Sample::SOP_Star in SOP_Star.o
"OP_Node::dumpMicroNodes(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool, int) const", referenced from:
vtable for HDK_Sample::SOP_Star in SOP_Star.o
"OP_Node::executeCommand(char const*, std::__1::basic_ostream<char, std::__1::char_traits<char> >*, std::__1::basic_ostream<char, std::__1::char_traits<char> >*) const", referenced from:
vtable for HDK_Sample::SOP_Star in SOP_Star.o
"___sincos_stret", referenced from:
HDK_Sample::SOP_Star::cookMySop(OP_Context&) in SOP_Star.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Link failed[/CODE]

Edited by Macha
Link to comment
Share on other sites

Guest mantragora

Ups, I missed that you used hcustom. :P

EDIT: But you could post you make file. Maybe there is something wrong with them?

Edited by mantragora
Link to comment
Share on other sites

I suppose hcustom uses the toolkit/makefiles. I tried to make my own makfile as in the hdk doc examples and I get the same errors. I think some of the include files in the source code are not being linked against. hcustom should work out of the box, as it does on linux. I can only think that my update to maverick messed up some stuff. Oh, why do I always feel so optimistic by shiny new updates, they usually f*** things up. Should have waited a few weeks I guess...

Edited by Macha
Link to comment
Share on other sites

Guest mantragora

OK, it's 8AM and I still haven't slept so I'm talking nonsense ;). Hcustom doesn't use make files. But if you are getting the same errors with make file it's a task for SESI guys ;). Cheers.

Link to comment
Share on other sites

I wish I could help you. I'm still on 10.7 for reasons like this :(

If you haven't reinstalled Houdini since upgrading, maybe give it a shot... I imagine the environment it sets up must be specific to the operating system version; maybe it's looking at the wrong libraries... I'm sure you've tried all this, though.

Link to comment
Share on other sites

I get the exact same thing with a clean install of Mavericks and a fresh download of houdini 12.5.533.

I'm just going to throw this out there since I'm away from my mac atm and can't try it, but after reading this:

http://mathematica.s...vericks-upgrade

it looks like the problem might be with the std library version that houdini is linked against. OS X has both libc++ and libstdc++ and they aren't compatible. 10.8 used libstdc++ and 10.9 uses libc++. Try using this flag "-mmacosx-version-min=10.8" since I think that's the version that was used to build the latest houdini or add "-stdlib=libstdc++" to the linking command.

Peter.

EDIT:

I confirmed that this works by adding "-mmacosx-version-min=10.8" to BOTH compile and link.

Edited by ophiuchus42
Link to comment
Share on other sites

You can make hcustom echo the commands it's running by using the -e option. i.e. "hcustom -e SOP_Star.C". Now before the link error you'll see the two commands it's running (both of them g++ commands). I just copied these two lines, added the "-mmacosx-version-min=10.8" option to them, and ran them directly in the terminal. To avoid running this manually I suppose you could patch hcustom (it's just a shell script) or switch over to using makefiles. I'll submit a bug report to SESI later today about this. They might have some alternative method of working around the issue.

Link to comment
Share on other sites

  • 10 months later...

I'm trying to setup xcode project too. Already spent 2 days but no luck yet. Xcode 5.1.1, mac os 10.9.4.

Tried all possible approaches:

OS X Deployment Target 10.8

Other linkers flag -stdlib=libstdc++ and -lstdc++ if different combinations

Other C and C++ Flags both contain -mmacosx-version-min=10.8

C++ Language Dialect and C++ Standard Library in all combinations

 

I can't even imagine what I missed. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...