svadev AT lists.siebelschool.illinois.edu
Subject: Svadev mailing list
List archive
- From: John Criswell <criswell 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:17:14 -0500
- List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
- List-id: <svadev.cs.uiuc.edu>
- Organization: University of Illinois
On 10/2/11 2:07 PM, geremy condra wrote:
Hey all, I've been trying to get safecode up and running for a while
now and am simply not having much luck. As far as I can tell I'm
following the instructions on the site correctly, but I'd really
appreciate it if you'd take a look and see if there was anything
obvious that I'm doing wrong.
For background, I'm running Ubuntu 10.04 on a fairly beefy x86_64 machine.
The issue occurs after I go through what appears to be a modestly
successful build routine. The script I'm using to build is:
#! /bin/sh
set -e
# We do all of this in /tmp to make sure we're building locally
cd /tmp
# Get mainline llvm
echo "Getting llvm..."
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
# Get all the projects we need
echo "Getting safecode projects..."
cd llvm/projects
svn co http://llvm.org/svn/llvm-project/poolalloc/trunk poolalloc
svn co http://llvm.org/svn/llvm-project/safecode/trunk safecode
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
# Configure everything
echo "Configuring..."
cd ..
./configure
# Make everything
echo "Making..."
make -j16 tools-only> /tmp/make_tools.out
cd projects/poolalloc
make -j16> /tmp/make_poolalloc.out
cd ../safecode
make -j16> /tmp/make_safecode.out
cd ..
# Install
echo "Installing..."
cd ..
sudo make install> /tmp/install_all.out
cd projects/poolalloc
sudo make install> /tmp/install_poolalloc.out
cd ../safecode
sudo make install> /tmp/install_safecode.out
# Go home
echo "Done."
I can provide the various output files if you want, but there's
nothing in them that immediately appears to be an error. It does emit
a pair of these warnings:
/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.
-- John T.
/tmp/test-rX6MPt.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-rX6MPt.o:/tmp/test.c:6: more undefined references to
`fastlscheck_debug' follow
/tmp/test-rX6MPt.o: In function `foo':
/tmp/test.c:7: undefined reference to `boundscheckui_debug'
/tmp/test.c:7: undefined reference to `poolcheckui_debug'
/tmp/test.c:7: undefined reference to `fastlscheck_debug'
/tmp/test.c:6: undefined reference to `fastlscheck_debug'
/tmp/test.c:6: undefined reference to `pool_unregister_stack_debug'
/tmp/test.c:6: undefined reference to `pool_unregister_stack_debug'
/tmp/test-rX6MPt.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-rX6MPt.o:/tmp/test.c:12: more undefined references to
`pool_register_stack_debug' follow
/tmp/test-rX6MPt.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-rX6MPt.o:/tmp/test.c:12: more undefined references to
`fastlscheck_debug' follow
/tmp/test-rX6MPt.o: In function `main':
/tmp/test.c:14: undefined reference to `boundscheckui_debug'
/tmp/test.c:14: undefined reference to `poolcheckui_debug'
/tmp/test.c:14: undefined reference to `fastlscheck_debug'
/tmp/test.c:14: 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.c:16: undefined reference to `fastlscheck_debug'
/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 `exactcheck2_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.c:20: undefined reference to `fastlscheck_debug'
/tmp/test-rX6MPt.o:/tmp/test.c:20: more undefined references to
`fastlscheck_debug' follow
/tmp/test-rX6MPt.o: In function `main':
/tmp/test.c:21: undefined reference to `exactcheck2_debug'
/tmp/test.c:21: undefined reference to `fastlscheck_debug'
/tmp/test.c:21: undefined reference to `fastlscheck_debug'
/tmp/test.c:20: undefined reference to `fastlscheck_debug'
/tmp/test-rX6MPt.o: In function `pool_ctor':
/tmp/test.c:24: undefined reference to `pool_init_runtime'
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
I can provide the output of the -v option if it helps, and apologies
if this is something really obvious- I'm new to LLVM as well as
safecode. Thanks for your time and assistance in any event,
Geremy Condra
_______________________________________________
svadev mailing list
svadev AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/svadev
- [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/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.