Building typelib + dyncall with clang

Peter Soetens <[email protected]>
Newsgroups gmane.science.robotics.orocos.devel
Message-ID <CAMYDobW_MGvaBTF9h070B+CdZhbVkgZTYC+ZA5QpQ0BReeNuVw@mail.gmail.com>
Hi,

I tried to build typelib with clang, but the dyncall-0.6 ruby bindings
contain gcc specific assembly code.

In dyncall-0.7, this has been fixed. I did a quick test, and both
typelib + dyncall 0.7 can be compiled with clang/clang++. However, the
typelib test suite fails:

$ ./typelib_testsuite
Running 42 test cases...
unknown location(0): fatal error in "test_repositories_merge":
std::runtime_error: plugin not found
/home/kaltan/vbox/hudson/jobs/bootstrap-toolchain/workspace/CORBA_IMPL/TAO/Compiler/clang/TARGET/gnulinux/arch/amd64/branch/toolchain-2.5/orocos-toolchain/typelib/test/test_registry.cc(163):
last checkpoint
unknown location(0): fatal error in "test_csv": std::runtime_error:
plugin not found
/home/kaltan/vbox/hudson/jobs/bootstrap-toolchain/workspace/CORBA_IMPL/TAO/Compiler/clang/TARGET/gnulinux/arch/amd64/branch/toolchain-2.5/orocos-toolchain/typelib/test/test_display.cc(33):
last checkpoint
unknown location(0): fatal error in "test_tlb_idempotent":
std::runtime_error: plugin not found
/home/kaltan/vbox/hudson/jobs/bootstrap-toolchain/workspace/CORBA_IMPL/TAO/Compiler/clang/TARGET/gnulinux/arch/amd64/branch/toolchain-2.5/orocos-toolchain/typelib/test/test_display.cc(33):
last checkpoint
unknown location(0): fatal error in "test_tlb_import":
std::runtime_error: plugin not found
/home/kaltan/vbox/hudson/jobs/bootstrap-toolchain/workspace/CORBA_IMPL/TAO/Compiler/clang/TARGET/gnulinux/arch/amd64/branch/toolchain-2.5/orocos-toolchain/typelib/test/test_display.cc(33):
last checkpoint
unknown location(0): fatal error in "test_equality": memory access
violation at address: 0x00000010: no mapping at fault address
/home/kaltan/vbox/hudson/jobs/bootstrap-toolchain/workspace/CORBA_IMPL/TAO/Compiler/clang/TARGET/gnulinux/arch/amd64/branch/toolchain-2.5/orocos-toolchain/typelib/test/test_model.cc(138):
last checkpoint

*** 5 failures detected in test suite "typelib"

While the toolchain built with gcc + dyncall-0.7 only fails with:

$ ./typelib_testsuite
Running 42 test cases...
/home/kaltan/vbox/hudson/jobs/bootstrap-toolchain/workspace/CORBA_IMPL/TAO/Compiler/gcc/TARGET/gnulinux/arch/amd64/branch/toolchain-2.5/orocos-toolchain/typelib/test/test_marshalling.cc(93):
fatal error in "test_marshalling_simple": critical check -1 ==
memcmp(&a, &reloaded, sizeof(A)) failed [-1 != -256]

*** 1 failure detected in test suite "typelib"

So this seems more related to clang than to upgrading to dyncall-0.7.
Also note that I had to set 'CC=clang' as environment variable, since
the dyncall build detects its own compiler and does not pickup the one
from cmake/typelib.

BTW, there's also a pretty serious warning here:

[ 19%] Building CXX object typelib/CMakeFiles/typeLib.dir/pluginmanager.o
/home/kaltan/vbox/hudson/jobs/bootstrap-toolchain/workspace/CORBA_IMPL/TAO/Compiler/clang/TARGET/gnulinux/arch/amd64/branch/toolchain-2.5/orocos-toolchain/typelib/typelib/pluginmanager.cc:66:9:
warning: delete called on 'Typelib::TypeDefinitionPlugin' that is
abstract
      but has non-virtual destructor [-Wdelete-non-virtual-dtor]
        delete *it;
        ^
1 warning generated.

which should be fixed by making the destructor virtual in
Typelib::TypeDefinitionPlugin

Peter
-- 
Orocos-Dev mailing list
[email protected]
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.