Skip to Content.
Sympa Menu

svadev - Re: [svadev] Link error with fmemsafety and boost

svadev AT lists.siebelschool.illinois.edu

Subject: Svadev mailing list

List archive

Re: [svadev] Link error with fmemsafety and boost


Chronological Thread 
  • From: John Criswell <criswell AT illinois.edu>
  • To: Paul Bombach <pmb AT novodynamics.com>
  • Cc: svadev AT cs.uiuc.edu
  • Subject: Re: [svadev] Link error with fmemsafety and boost
  • Date: Thu, 8 Sep 2011 14:24:19 -0500
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
  • List-id: <svadev.cs.uiuc.edu>
  • Organization: University of Illinois

Dear Paul,

I figured out what the problem was and fixed it.  You can get the fix by updating from the public subversion repository.

As an FYI, I filed this as a bug (PR 10894).

Please let me know if it still causes problems.

-- John T.


On 9/8/11 10:24 AM, Paul Bombach wrote:
Hello:

I'm having problems linking multiple modules that include any boost algorithm headers. In particular, when I have two modules that include <boost/algorithm/string.hpp> in more than one module, I get the following link error.

     clang version 3.0 (: http://llvm.org/svn/llvm-project/safecode/trunk/tools/clang)
     Target: x86_64-apple-darwin11.0.0
     Thread model: posix
     clang: warning: argument unused during compilation: '-fmemsafety'
      "/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.7.0 -o fmem.exe -lcrt1.10.6.o -L/Users/pmb/Projects/safecode/lib fmem.o subroutine.o -lsc_dbg_rt -lpoolalloc_bitmap -lstdc++ -lstdc++ -lSystem
     ld: duplicate symbol ___unnamed_1 in subroutine.o and fmem.o for architecture x86_64
     clang: error: linker command failed with exit code 1 (use -v to see invocation)

The compilation and linking commands that I use are:

     #!/bin/bash
     PATH=$SAFECODEDIR/bin
     /usr/local/llvm/bin/clang++ -g -I/Volumes/Workspaces/2.5alpha2-memsafe/crs/3rd-party/include -fmemsafety -c fmem.cpp -o fmem.o
     /usr/local/llvm/bin/clang++ -g -I/Volumes/Workspaces/2.5alpha2-memsafe/crs/3rd-party/include -fmemsafety -c subroutine.cpp -o subroutine.o
     /usr/local/llvm/bin/clang++  -v -o fmem.exe -fmemsafety fmem.o subroutine.o -L$SAFECODEDIR/lib -lsc_dbg_rt -lpoolalloc_bitmap -lstdc++

I've attached the modules fmem.cpp and subroutine.cpp that are causing the problems.  Thanks in advance for any help.

pmb







_______________________________________________
svadev mailing list
svadev AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/svadev




Archive powered by MHonArc 2.6.16.

Top of Page