[Bf-cycles] Building OSL for Blender

Kevin Atkinson kevin.atkinson at gmail.com
Sat Jan 31 13:05:08 CET 2015


Hi Sergey,

Thanks for the reply.

>Is it OSL which has issues with compilation or it's blender which fails to
link against OSL library you built?

It's compilation of the patched version of OSL that is used in Blender.
The libraries actually compile without errors, but anything that links
against them (e.g., the test executables in OSL or Blender) will have
missing symbols.  All the missing symbols are from the C++ standard
library.  So it's lots of this:

*Linking CXX executable accum_test*

*Undefined symbols for architecture x86_64:*

*  "std::string::find_first_of(char const*, unsigned long, unsigned long)
const", referenced from:*

*      OpenImageIO::v1_4::Strutil::get_rest_arguments(std::string const&,
std::string&, std::map<std::string, std::string, std::less<std::string>,
std::allocator<std::pair<std::string const, std::string> > >&) in
libOpenImageIO.a(strutil.cpp.o)*

*  "std::string::find(char, unsigned long) const", referenced from:*

*      bool boost::char_separator<char, std::char_traits<char>
>::operator()<__gnu_cxx::__normal_iterator<char const*, std::string>,
std::string>(__gnu_cxx::__normal_iterator<char const*, std::string>&,
__gnu_cxx::__normal_iterator<char const*, std::string>, std::string&) in
libOpenImageIO.a(strutil.cpp.o)*

*  "std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char>
>::str() const", referenced from:*

*      OpenImageIO::v1_4::ustring::getstats(bool) in
libOpenImageIO.a(ustring.cpp.o)*

*      OpenImageIO::v1_4::Strutil::wordwrap(OpenImageIO::v1_4::string_view,
int, int) in libOpenImageIO.a(strutil.cpp.o)*

*      std::string OpenImageIO::v1_4::Strutil::format<long long>(char
const*, long long const&) in libOpenImageIO.a(strutil.cpp.o)*

*      std::string OpenImageIO::v1_4::Strutil::format<int, double, char
const*>(char const*, int const&, double const&, char const* const&) in
libOpenImageIO.a(strutil.cpp.o)*

*      std::string OpenImageIO::v1_4::Strutil::format<int, int>(char
const*, int const&, int const&) in libOpenImageIO.a(strutil.cpp.o)*

*      std::string OpenImageIO::v1_4::Strutil::format<int>(char const*, int
const&) in libOpenImageIO.a(strutil.cpp.o)*

*      std::string OpenImageIO::v1_4::Strutil::format<int, int,
double>(char const*, int const&, int const&, double const&) in
libOpenImageIO.a(strutil.cpp.o)*

      ...

All the libraries that I link OSL to are the prebuilt ones for mac in
darwin-9.x.universal.  I'm using clang 6.0 on Mavericks.



On Sat, Jan 31, 2015 at 5:23 AM, Sergey Sharybin <sergey.vfx at gmail.com>
wrote:

> Hi,
>
> That's a bit vague information. Is it OSL which has issues with
> compilation or it's blender which fails to link against OSL library you
> built?
>
> In any case, having an exact error messages would help.
>
> On Sat, Jan 31, 2015 at 7:41 AM, Kevin Atkinson <kevin.atkinson at gmail.com>
> wrote:
>
>> I'm using OSL gabor noise for displacements in Blender, and I've been
>> noticing nasty circle artifacts, coming from the rather coarse thresholding
>> of the gaussian kernel.  I've been doing experiments with the gabor noise
>> code outside of blender, and got very good results by simply changing the
>> line
>>
>> static const float Gabor_Truncate = 0.02f;
>>
>>
>> to
>>
>>
>> static const float Gabor_Truncate = 0.0002f;
>>
>>
>> This causes the search radius for impulses to be about half again as large, at some performance cost.  But not bad for reducing the artifact magnitude by a factor of a hundred.
>>
>>
>> I'd like to get this working in Blender just for my own use and further testing, but I'm having trouble building OSL for blender.  I've checked out the "blender-fixes" branch, but I get linking errors because for some reason it doesn't link to the C++ standard library.
>>
>>
>> I don't know much about CMake, and I am under the gun a bit, so I'm trying to to get in touch with whoever built the mac OSL library for blender to see if they have any suggestions.  Would that be Lukas Tönne?
>>
>>
>> Many thanks, and any help much appreciated,
>>
>>
>> Kevin Atkinson
>>
>>
>>
>>
>> _______________________________________________
>> Bf-cycles mailing list
>> Bf-cycles at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-cycles
>>
>>
>
>
> --
> With best regards, Sergey Sharybin
>
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-cycles/attachments/20150131/c7ef5af3/attachment.htm 


More information about the Bf-cycles mailing list