svadev AT lists.siebelschool.illinois.edu
Subject: Svadev mailing list
List archive
- 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: Sun, 2 Oct 2011 14:54:05 -0500
- List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
- List-id: <svadev.cs.uiuc.edu>
On Sun, Oct 2, 2011 at 2:45 PM, geremy condra
<debatem1 AT gmail.com>
wrote:
> On Sun, Oct 2, 2011 at 12:17 PM, John Criswell
> <criswell AT illinois.edu>
> wrote:
>> On 10/2/11 2:07 PM, geremy condra wrote:
>
> <snip>
>
>>> /tmp/llvm/Makefile.rules:1192: Bytecode libraries require LLVM capable
>>> compiler but none is available ****
>>
>> It's possible that recent changes to the LLVM build system have broken the
>> ability to build bitcode libraries. This is something I'll have to look
>> into (I'm having a chat with the LLVM developer who's wanting to change
>> this
>> functionality to see what we'll need to do once he's done changing things).
>>
>> For most users, though, this is not a problem. You can just use the native
>> code libraries. Bitcode libraries are mainly important for
>> performance-conscious users that want to do inter-procedural inlining of
>> the
>> run-time functions.
>>
>>>
>>> I'm not clear on why this is; I have both llvm-gcc and clang installed:
>>>
>>> user@machine:/tmp$
>>> which llvm-gcc
>>> /usr/bin/llvm-gcc
>>> user@machine:/tmp$
>>> which clang
>>> /usr/local/bin/clang
>>>
>>> Regardless, when I attempt to compile the test program given at
>>> http://safecode.cs.illinois.edu/docs/UsersGuide.html I get the
>>> following linker errors:
>>>
>>> user@machine:/tmp$
>>> clang -g -fmemsafety -o test test.c
>>
>> You've forgotten to link in the libraries implementing the run-time checks.
>> It should be:
>>
>> clang -g -fmemsafety -o test test.c -L/usr/local/lib -lsc_dbg_rt
>> -lpoolalloc_bitmap -lstdc++
>>
>> (I'm assuming the libraries were installed in /usr/local/lib. Just replace
>> that path with wherever the libraries are installed or with the directory
>> into which they were built in the SAFECode object tree).
>>
>> If that doesn't work, please email back. However, I suspect that this is
>> the problem.
>
> Unfortunately, this does not seem to fix the issue, and in fact
> somewhat adds to it. In hopes that the additional errors are
> informative, I've added them below:
>
> user@machine:/tmp$
> clang -g -fmemsafety -o test test.c
> -L/usr/local/lib -lsc_dbg_rt -lpoolalloc_bitmap -lstdc++
> /tmp/test-6gxS0h.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-6gxS0h.o:/tmp/test.c:6: more undefined references to
> `fastlscheck_debug' follow
> /tmp/test-6gxS0h.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-6gxS0h.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-6gxS0h.o:/tmp/test.c:12: more undefined references to
> `pool_register_stack_debug' follow
> /tmp/test-6gxS0h.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-6gxS0h.o:/tmp/test.c:12: more undefined references to
> `fastlscheck_debug' follow
> /tmp/test-6gxS0h.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-6gxS0h.o:/tmp/test.c:20: more undefined references to
> `fastlscheck_debug' follow
> /usr/local/lib/libsc_dbg_rt.so: undefined reference to `__dtoa'
> /usr/local/lib/libsc_dbg_rt.so: undefined reference to `__hdtoa'
> /usr/local/lib/libsc_dbg_rt.so: undefined reference to `__poolalloc_init'
> /usr/local/lib/libsc_dbg_rt.so: undefined reference to `__ldtoa'
> /usr/local/lib/libsc_dbg_rt.so: undefined reference to `__freedtoa'
> /usr/local/lib/libsc_dbg_rt.so: undefined reference to `__hldtoa'
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
>
> On another note, is there a time when not linking to these libraries
> is correct? I would be happy to provide a documentation patch fixing
> the 'sample debugging with safecode' section of the users' guide
> (http://safecode.cs.illinois.edu/docs/UsersGuide.html) if not.
>
> Thanks again,
> Geremy Condra
>
> <snip>
>
> _______________________________________________
> svadev mailing list
> svadev AT cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/svadev
>
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
- [svadev] problems installing safecode, geremy condra, 10/02/2011
- Re: [svadev] problems installing safecode, Vikram Adve, 10/02/2011
- Re: [svadev] problems installing safecode, John Criswell, 10/02/2011
- Re: [svadev] problems installing safecode, geremy condra, 10/02/2011
- Re: [svadev] problems installing safecode, Matthew Wala, 10/02/2011
- Re: [svadev] problems installing safecode, geremy condra, 10/02/2011
- Re: [svadev] problems installing safecode, geremy condra, 10/02/2011
- Re: [svadev] problems installing safecode, Matthew Wala, 10/03/2011
- Re: [svadev] problems installing safecode, geremy condra, 10/03/2011
- Re: [svadev] problems installing safecode, Matthew Wala, 10/03/2011
- Re: [svadev] problems installing safecode, geremy condra, 10/03/2011
- Re: [svadev] problems installing safecode, Vikram Adve, 10/05/2011
- Re: [svadev] problems installing safecode, geremy condra, 10/05/2011
- Re: [svadev] problems installing safecode, Matthew Wala, 10/06/2011
- Re: [svadev] problems installing safecode, Matthew Wala, 10/03/2011
- Re: [svadev] problems installing safecode, geremy condra, 10/02/2011
- Re: [svadev] problems installing safecode, geremy condra, 10/02/2011
- Re: [svadev] problems installing safecode, Matthew Wala, 10/02/2011
- Re: [svadev] problems installing safecode, geremy condra, 10/02/2011
Archive powered by MHonArc 2.6.16.