Skip to Content.
Sympa Menu

svadev - Re: [svadev] problems installing safecode

svadev AT lists.siebelschool.illinois.edu

Subject: Svadev mailing list

List archive

Re: [svadev] problems installing safecode


Chronological Thread 
  • From: Matthew Wala <wala1 AT illinois.edu>
  • To: geremy condra <debatem1 AT gmail.com>
  • Cc: svadev AT cs.uiuc.edu
  • Subject: Re: [svadev] problems installing safecode
  • Date: Mon, 3 Oct 2011 14:06:05 -0500
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
  • List-id: <svadev.cs.uiuc.edu>

On Mon, Oct 3, 2011 at 1:37 PM, geremy condra
<debatem1 AT gmail.com>
wrote:
> On Mon, Oct 3, 2011 at 11:19 AM, Matthew Wala
> <wala1 AT illinois.edu>
> wrote:
>> On Sun, Oct 2, 2011 at 3:29 PM, geremy condra
>> <debatem1 AT gmail.com>
>> wrote:
>>> On Sun, Oct 2, 2011 at 1:07 PM, geremy condra
>>> <debatem1 AT gmail.com>
>>> wrote:
>>>> On Sun, Oct 2, 2011 at 12:54 PM, Matthew Wala
>>>> <wala1 AT illinois.edu>
>>>> wrote:
>>>>>
>>>>> The libraries to link in should actually be -lsc_dbg_rt
>>>>> -lpoolalloc_bitmap -lgdtoa -lstdc++.
>>>>> I've added that to the svn documentation but apparently it's not on the
>>>>> website.
>>>>>
>>>>> Matt
>>>>>
>>>>
>>>> Thanks for your help, but unfortunately while this eliminates the
>>>> undefined reference errors in libsc_dbg_rt.so it doesn't seem to do
>>>> anything for the test application.
>>>>
>>>> As a note, simply executing a `make` instead of a `make tools-only`
>>>> seems to drop a small handful of the errors. Here's what I have now:
>>>>
>>>> user@machine:/tmp$
>>>> clang -g -fmemsafety -o test test.c -lsc_dbg_rt
>>>> -lpoolalloc_bitmap -lgdtoa -lstdc++
>>>> /tmp/test-AYWkSt.o: In function `foo':
>>>> /tmp/test.c:5: undefined reference to `pool_register_stack_debug'
>>>> /tmp/test.c:5: undefined reference to `pool_register_stack_debug'
>>>> /tmp/test.c:5: undefined reference to `fastlscheck_debug'
>>>> /tmp/test.c:5: undefined reference to `fastlscheck_debug'
>>>> /tmp/test.c:5: undefined reference to `fastlscheck_debug'
>>>> /tmp/test.c:5: undefined reference to `fastlscheck_debug'
>>>> /tmp/test.c:6: undefined reference to `fastlscheck_debug'
>>>> /tmp/test-AYWkSt.o:/tmp/test.c:6: more undefined references to
>>>> `fastlscheck_debug' follow
>>>> /tmp/test-AYWkSt.o: In function `foo':
>>>> /tmp/test.c:6: undefined reference to `pool_unregister_stack_debug'
>>>> /tmp/test.c:6: undefined reference to `pool_unregister_stack_debug'
>>>> /tmp/test-AYWkSt.o: In function `main':
>>>> /tmp/test.c:12: undefined reference to `poolargvregister'
>>>> /tmp/test.c:12: undefined reference to `pool_register_stack_debug'
>>>> /tmp/test.c:12: undefined reference to `pool_register_stack_debug'
>>>> /tmp/test.c:12: undefined reference to `pool_register_stack_debug'
>>>> /tmp/test.c:12: undefined reference to `pool_register_stack_debug'
>>>> /tmp/test.c:12: undefined reference to `pool_register_stack_debug'
>>>> /tmp/test-AYWkSt.o:/tmp/test.c:12: more undefined references to
>>>> `pool_register_stack_debug' follow
>>>> /tmp/test-AYWkSt.o: In function `main':
>>>> /tmp/test.c:12: undefined reference to `fastlscheck_debug'
>>>> /tmp/test.c:12: undefined reference to `fastlscheck_debug'
>>>> /tmp/test.c:12: undefined reference to `fastlscheck_debug'
>>>> /tmp/test.c:12: undefined reference to `fastlscheck_debug'
>>>> /tmp/test.c:12: undefined reference to `fastlscheck_debug'
>>>> /tmp/test-AYWkSt.o:/tmp/test.c:12: more undefined references to
>>>> `fastlscheck_debug' follow
>>>> /tmp/test-AYWkSt.o: In function `main':
>>>> /tmp/test.c:17: undefined reference to `pool_register_debug'
>>>> /tmp/test.c:17: undefined reference to `fastlscheck_debug'
>>>> /tmp/test.c:17: undefined reference to `fastlscheck_debug'
>>>> /tmp/test.c:17: undefined reference to `fastlscheck_debug'
>>>> /tmp/test.c:16: undefined reference to `fastlscheck_debug'
>>>> /tmp/test.c:16: undefined reference to `fastlscheck_debug'
>>>> /tmp/test-AYWkSt.o:/tmp/test.c:20: more undefined references to
>>>> `fastlscheck_debug' follow
>>>> /usr/local/lib/libsc_dbg_rt.so: undefined reference to `__poolalloc_init'
>>>
>>> Hmm, I missed this last one. This seems to be in poolalloc.so, but
>>> linking that gives me lots and lots of issues.
>>>
>>> Geremy Condra
>>>
>>
>> What happens when you try to compile the file with the static version
>> of the libraries as parameters (eg, /usr/local/lib/libsc_dbg_rt.a
>> instead of -lsc_dbg_rt)?
>>
>> Matt
>>
>
> Here's the errors I get-
>
> user@machine:/tmp$
> clang -g -fmemsafety -o test test.c
> /usr/local/lib/libsc_dbg_rt.a -lpoolalloc_bitmap -lgdtoa -lstdc++
> /usr/local/lib/libsc_dbg_rt.a(PoolAllocatorBitMask.o): In function
> `bus_error_handler':
> /tmp/llvm/projects/safecode/runtime/DebugRuntime/PoolAllocatorBitMask.cpp:1193:
> undefined reference to `llvm::PPageSize'
> /tmp/llvm/projects/safecode/runtime/DebugRuntime/PoolAllocatorBitMask.cpp:1195:
> undefined reference to `llvm::PPageSize'
> /tmp/llvm/projects/safecode/runtime/DebugRuntime/PoolAllocatorBitMask.cpp:1196:
> undefined reference to `llvm::PPageSize'
> /tmp/llvm/projects/safecode/runtime/DebugRuntime/PoolAllocatorBitMask.cpp:1196:
> undefined reference to `llvm::PPageSize'
> /tmp/llvm/projects/safecode/runtime/DebugRuntime/PoolAllocatorBitMask.cpp:1201:
> undefined reference to `llvm::PPageSize'
> /usr/local/lib/libsc_dbg_rt.a(PoolAllocatorBitMask.o):/tmp/llvm/projects/safecode/runtime/DebugRuntime/PoolAllocatorBitMask.cpp:1265:
> more undefined references to `llvm::PPageSize' follow
> /usr/local/lib/libsc_dbg_rt.a(PageManager.o): In function
> `llvm::AllocatePage()':
> /tmp/llvm/projects/safecode/runtime/DebugRuntime/PageManager.cpp:311:
> undefined reference to `llvm::FreePages'
> /tmp/llvm/projects/safecode/runtime/DebugRuntime/PageManager.cpp:321:
> undefined reference to `llvm::GetPages(unsigned int)'
> /usr/local/lib/libsc_dbg_rt.a(PageManager.o): In function
> `llvm::ProtectShadowPage(void*, unsigned int)':
> /tmp/llvm/projects/safecode/runtime/DebugRuntime/PageManager.cpp:357:
> undefined reference to `llvm::PPageSize'
> /usr/local/lib/libsc_dbg_rt.a(PageManager.o): In function
> `llvm::UnprotectShadowPage(void*, unsigned int)':
> /tmp/llvm/projects/safecode/runtime/DebugRuntime/PageManager.cpp:370:
> undefined reference to `llvm::PPageSize'
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
>
> Not sure what to make of that- thoughts?
>
> Also, this is probably a stupid question to be asking now, but is
> there a more supported version than tip-of-tree? I tried the 2.7
> tarball and wound up with a different set of errors.
>
> Geremy Condra
>

I guess I wasn't clear. I meant replacing all the SAFECode runtime
library parameters with the static versions.

So use something like:

clang -g -fmemsafety -o test test.c /usr/local/lib/libsc_dbg_rt.a
/usr/local/lib/libpoolalloc_bitmap.a /usr/local/lib/libgdtoa.a
-lstdc++

What sort of errors are you getting with the 2.7 version? It uses a
different tool but you have to link in the same libraries.

Matt




Archive powered by MHonArc 2.6.16.

Top of Page