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: Wed, 5 Oct 2011 11:59:10 -0500
- List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
- List-id: <svadev.cs.uiuc.edu>
- Organization: University of Illinois
Dear All,
I think I've finally figured out this mystery.
The problem is that some configure scripts (correctly written configure scripts, I think) want LDFLAGS to contain any -L linker flags and LIBS to contain any -l linker flags.
If you set LDFLAGS as described in the old SAFECode documentation, you get the following command line:
/home/vadve/criswell/box/x86/llvm/projects/safecode/Debug+Asserts/bin/clang -g -fmemsafety -L/home/vadve/criswell/box/x86/llvm/projects/safecode/Debug+Asserts/lib -lsc_dbg_rt -lpoolalloc_bitmap -lgdtoa -lstdc++ conftest.c
On Linux, this appears to try to link the libraries *before* the object file created by compiling conftest.c. Since functions are pulled in on demand, nothing is pulled in from the SAFECode run-time libraries, and linking fails.
This command, however, works:
/home/vadve/criswell/box/x86/llvm/projects/safecode/Debug+Asserts/bin/clang -o conftest -g -fmemsafety -L/home/vadve/criswell/box/x86/llvm/projects/safecode/Debug+Asserts/lib conftest.c -lsc_dbg_rt -lpoolalloc_bitmap -lgdtoa -lstdc++
Configure scripts will do the above when LDFLAGS is set to "-L/home/vadve/criswell/box/x86/llvm/projects/safecode/Debug+Asserts/lib" and LIBS is set to "-lsc_dbg_rt -lpoolalloc_bitmap -lgdtoa -lstdc++."
I've updated the SAFECode documentation both in the source tree and on the web site to recommend that users set LDFLAGS and LIBS as above. It also includes tips (such as defining LDFLAGS as it was previously in the documentation) if, for some reason, using the LIBS environment variable doesn't work.
-- John T.
- Re: [svadev] problems installing safecode, (continued)
- 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
Archive powered by MHonArc 2.6.16.