Problem building appleseed (undefined reference to `typeinfo for OSL_v1_9::RendererServices')


#1

Hi,
I am attemting to build Appleseed from source for a user on a supercomputing cluster. I have build the latest versions of SeExpr, OpenColorIO, OpenImageIO, OpenEXR, OSL, Xerces-C++. I am now building Appleseed, and everything compiles fine until the linking stage, when I get the following error:

…/appleseed/libappleseed.so: undefined reference to `typeinfo for OSL_v1_9::RendererServices’

Any idea ?

Thanks


#2

Hi Maxime,

It looks like you built one version of OSL but are trying to link against another. I’d say OSL 1.8 on one side vs OSL 1.9 on the other.

Which version of OSL did you build?

FYI appleseed currently relies on OSL 1.8.


#3

I built OSL 1.9.6. I am also building everything from source (not using the dependencies repository). Are you saying that appleseed does not support OSL 1.9 ?


#4

I think minor changes are in order to switch to OSL 1.9 on our side. We did these changes but they haven’t been merged yet. I recommend building and using the latest version of OSL 1.8, it should be in a branch of the OSL repo.


#5

Thanks, I will try that.


#6

Cool, keep us posted please!


#7

Are there recommended versions of the other dependencies ? I have these for other dependencies:

    ('Boost', '1.60.0'),
    ('SeExpr', '2.11'),
    ('OpenColorIO', '1.0.9'),
    ('OpenImageIO', '1.8.7'),
    ('OpenEXR', '2.2.1'),
    ('Qt', '4.8.7'),
    ('Xerces-C++', '3.1.1')

#8

That did not really help. I now get
../appleseed/libappleseed.so: undefined reference totypeinfo for OSL::RendererServices’`

Same problem, different version.


#9

Damn, I think I know what’s going on. You need to build the dependencies with RTTI enabled. Probablty not everything, but at least OSL (and quite possibly OIIO as well since it’s a dependency).

@est will probably give a more complete answer.

appleseed might actually build just fine with OSL 1.9 without any further changes, after all.

Sorry for the troubles.


#10

No worries. I recompiled OSL with RTTI and rebuilt appleseed (gotta love having 56 cores for parallel builds). It went through fine this time. So, OSL needs to be built with
-DENABLERTTI=ON

I did not need to rebuild OIIO, and found no mention of RTTI in our build logs.


#11

Interesting, glad that you got it working. Do I understand that appleseed built fully successfully and that’s your good to go?


#12

Still ironing out some linking problems (our build system did not correctly add runpath for qt libraries), but I should be able to figure them out as we’re used to dealing with those. The missing RTTI was a new one to me.

I’ve built everything with GCC 5.4.0 for what it’s worth.


#13

Great. gcc 4 to 6 are supported, even gcc 7 IIRC.


#14

Hmmm, I fixed the linking issue with Qt… but now I get a segmentation fault when starting appleseed.studio. The CLI version seems to work as far as I see…


#15

Can you show the output of ./appleseed.cli --system please?

Does ./appleseed.cli builtin:cornell_box -o cb.png correctly produces a cb.png file on disk?

If you have a few more minutes, could you check where appleseed.studio crashes, rouhgly, by running it under gdb?

Could it be linked to the RTTI thing, I wonder.


#16

Ahead of you for GDB. Here’s the stack trace:

Program received signal SIGSEGV, Segmentation fault.
0x00007fffeb9fdd8b in llvm::cl::Option::setArgStr(llvm::StringRef) () from /cvmfs/soft.computecanada.ca/nix/store/9an9khg2bjcmvvx1chrps0q9s5iwdgha-llvm-3.9.0-lib/lib/libLLVM-3.9.so
(gdb) bt
#0  0x00007fffeb9fdd8b in llvm::cl::Option::setArgStr(llvm::StringRef) () from /cvmfs/soft.computecanada.ca/nix/store/9an9khg2bjcmvvx1chrps0q9s5iwdgha-llvm-3.9.0-lib/lib/libLLVM-3.9.so
#1  0x00007fffe2939512 in llvm::cl::opt<(anonymous namespace)::HelpPrinter, true, llvm::cl::parser<bool> >::opt<char [17], llvm::cl::desc, llvm::cl::LocationClass<(anonymous namespace)::HelpPrinter>, llvm::cl::OptionHidden, llvm::cl::ValueExpected, llvm::cl::cat>(char const (&) [17], llvm::cl::desc const&, llvm::cl::LocationClass<(anonymous namespace)::HelpPrinter> const&, llvm::cl::OptionHidden const&, llvm::cl::ValueExpected const&, llvm::cl::cat const&) [clone .constprop.282] () from /cvmfs/soft.computecanada.ca/nix/store/qffpqj55mn3116xgrqa2kc5a6h62cprv-llvm-3.8.1/lib/libLLVM-3.8.so
#2  0x00007fffe293974d in _GLOBAL__sub_I_CommandLine.cpp () from /cvmfs/soft.computecanada.ca/nix/store/qffpqj55mn3116xgrqa2kc5a6h62cprv-llvm-3.8.1/lib/libLLVM-3.8.so
#3  0x00007ffff7de931a in call_init.part () from /cvmfs/soft.computecanada.ca/nix/var/nix/profiles/16.09/lib/ld-linux-x86-64.so.2
#4  0x00007ffff7de942b in _dl_init () from /cvmfs/soft.computecanada.ca/nix/var/nix/profiles/16.09/lib/ld-linux-x86-64.so.2
#5  0x00007ffff7ddacea in _dl_start_user () from /cvmfs/soft.computecanada.ca/nix/var/nix/profiles/16.09/lib/ld-linux-x86-64.so.2
#6  0x0000000000000001 in ?? ()
#7  0x00007fffffff8877 in ?? ()
#8  0x0000000000000000 in ?? ()

#17

cb.png is indeed produced correctly.

$ appleseed.cli --system
2018-01-15T17:09:16.232391Z <001>    28 MB info    | system information:
2018-01-15T17:09:16.232391Z <001>    28 MB info    |   architecture                  x86 64-bit
2018-01-15T17:09:16.232391Z <001>    28 MB info    |   logical cores                 56
2018-01-15T17:09:16.232391Z <001>    28 MB info    |   L1 data cache                 size 32.0 KB, line size 64 bytes
2018-01-15T17:09:16.232391Z <001>    28 MB info    |   L2 cache                      size 256.0 KB, line size 64 bytes
2018-01-15T17:09:16.232391Z <001>    28 MB info    |   L3 cache                      size 17.5 MB, line size 64 bytes
2018-01-15T17:09:16.232391Z <001>    28 MB info    |   instruction sets              sse sse2 sse3 ssse3 sse4.1 sse4.2 avx avx2 fma3
2018-01-15T17:09:16.232391Z <001>    28 MB info    |   physical memory               size 236.0 GB
2018-01-15T17:09:16.232391Z <001>    28 MB info    |   virtual memory                size 236.0 GB

#18

I have the feeling that it’s not loading the right shared LLVM libs.

Possibly related: https://lists.debian.org/debian-qt-kde/2016/12/msg00181.html


#19

Nice specs :heart_eyes:


#20

Ah, good pointer for different LLVM versions…

For the specs, well, yeah, we’re a consortium providing super computing resources, it just makes sense that we have nice specs :slight_smile:

I’m not sure why linking picked up both libLLVM-3.8.so and libLLVM-3.9.so

Apparently, I cannot send new posts for the next 22 hours…