Skip to Content.
Sympa Menu

svadev - Re: [svadev] SAFECode Mainline Ready for Development

svadev AT lists.siebelschool.illinois.edu

Subject: Svadev mailing list

List archive

Re: [svadev] SAFECode Mainline Ready for Development


Chronological Thread 
  • From: "Martin Richtarsky" <m AT martinien.de>
  • To: svadev AT cs.uiuc.edu
  • Subject: Re: [svadev] SAFECode Mainline Ready for Development
  • Date: Fri, 19 Oct 2012 13:42:39 +0200
  • Importance: Normal
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev/>
  • List-id: <svadev.cs.uiuc.edu>

>>>>> I'm getting a linker error when building current LLVM trunk together
>>>>> with
>>>>> SAFECode trunk. Anyone has seen this before?
>>>>>
>>>>> llvm[4]: Linking Release+Asserts Shared Library libclang.so
>>>>>
>>>>> /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld:
>>>>> anonymous version tag cannot be combined with other version tags
>>>>> collect2: ld returned 1 exit status
>>>>> make[4]: ***
>>>>>
>>>>> [/local/mar_/buildsafecode/projects/safecode/Release+Asserts/lib/libclang.so]
>>>>> Error 1
>>>>
>>>> I haven't seen this error. I usually use Debug builds; I'm running a
>>>> Release+Asserts build right now to see if that causes the issue to
>>>> show
>>>> up.
>>>>
>>>> In the meantime, can you tell me what version of GCC (or Clang) and ld
>>>> you're using? We should make sure they're not one of the versions
>>>> that
>>>> can't build LLVM.
>>>
>>>
>>> I was using:
>>>
>>> gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
>>
>>
>> I suggest updating to a working version of GCC (or using Clang) to
>> compile
>> LLVM, but I don't think the broken version of GCC is the problem.
>>
>>
>>>
>>> and these two ld's
>>>
>>> GNU ld (GNU Binutils; SUSE Linux Enterprise 11) 2.20.0.20100122-0.7.9
>>> GNU ld (GNU Binutils) 2.22.52
>>
>>
>> Wow. I think you're using a newer version of the linker than I am.
>>
>> Just as an experiment, try commenting out the following lines in
>> llvm/Makefile.rules:
>>
>> ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD GNU))
>> ifneq ($(ARCH), Mips)
>> LD.Flags +=
>> -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map
>> endif
>> endif
> I had the same problem with both gcc 4.5.2 and the latest clang using
> GNU ld 2.21.0. The choice of compiler, the type of build, and the
> experiment above didn't seem to make a difference.
>
> I did however get the LLVM and SAFECode tests to produce the expected
> results by replacing the two lines:
> DIRS := driver libclang c-index-test arcmt-test c-arcmt-test diagtool \
> clang-check
> in safecode/tools/clang/tools/Makefile with just:
> DIRS := driver
>
> There is likely a better way to do this but at least it lets one test
> SAFECode.

Just for completeness: I was also able to get a functioning SAFECode this
way.

Building with clang instead of GCC didn't make a difference for me either,
still the same linker error. Also removing the LD-Flags as suggested by
John didn't help. A debug build showed the error, too.

Could it be a problem of some C headers? At least the system I used is
quite old in that regard.

Best regards,
Martin



  • Re: [svadev] SAFECode Mainline Ready for Development, Martin Richtarsky, 10/19/2012

Archive powered by MHonArc 2.6.16.

Top of Page