[LLVMdev] dragonegg polly support broken?

Tobias Grosser tobias at grosser.es
Sun Oct 21 11:01:37 PDT 2012

On 10/21/2012 10:57 AM, Jack Howarth wrote:
> On Sun, Oct 21, 2012 at 10:38:48AM -0700, Tobias Grosser wrote:
>> On 10/21/2012 09:13 AM, Jack Howarth wrote:
>>> On Sun, Oct 21, 2012 at 08:38:21AM -0700, Tobias Grosser wrote:
>>>> On 10/20/2012 05:38 PM, Jack Howarth wrote:
>>>>> Duncan,
>>>>>        Is the documentation for using Polly support in dragonegg correct? I built llvm/polly/dragonegg
>>>>> using the documentation at http://polly.llvm.org/example_load_Polly_into_dragonegg.html
>>>>> with...
>>>>> GCC=/sw/lib/gcc4.7/bin/gcc-4 LLVM_CONFIG=/sw/opt/llvm-3.2/bin/llvm-config ENABLE_LLVM_PLUGINS=1 make CPPFLAGS="-DENABLE_LTO -I/sw/include"
>>>>> The resulting dragonegg plugin works fine as...
>>>>> /sw/lib/gcc4.7/bin/gcc-4 -fplugin=/sw/lib/gcc4.7/lib/dragonegg.so -O3  himenoBMTxpa.c
>>>>> but if I try to invoke polly with...
>>>>> /sw/lib/gcc4.7/bin/gcc-4 -fplugin=/sw/lib/gcc4.7/lib/dragonegg.so -O3 -fplugin-arg-dragonegg-llvm-option=load:/sw/opt/llvm-3.2/lib/LLVMPolly.dylib himenoBMTxpa.c
>>>>> I get the error...
>>>>> cc1: Unknown command line argument 'load=/sw/opt/llvm-3.2/lib/LLVMPolly.dylib'.  Try: 'cc1 -help'
>>>> I think the website is wrong. You probably need to add a '-' before the
>>>> 'load'. See the following:
>>>> "-fplugin-arg-dragonegg-llvm-option=-load:/sw/opt/llvm-3.2/lib/LLVMPolly.dylib"
>>>> Please let me know if this works, such that I can update the website.
>>> Tobias,
>>>      This solves the previous problem but exposes another...
>> Great, I checked in the website fix in:
>> https://llvm.org/svn/llvm-project/polly/trunk@166396
>>> [MacBookPro:~] howarth% /sw/lib/gcc4.7/bin/gcc-4 -fplugin=/sw/lib/gcc4.7/lib/dragonegg.so -O3 -fplugin-arg-dragonegg-llvm-option=-load:/sw/opt/llvm-3.2/lib/LLVMPolly.dylib himenoBMTxpa.c -v
>>> himenoBMTxpa.c:248:5: warning: incompatible implicit declaration of built-in function ‘free’ [enabled by default]
>>> dyld: lazy symbol binding failed: fast lazy bind offset out of range (39257, max=7640) in image /sw/lib/gcc4.7/libexec/gcc/x86_64-apple-darwin11.4.2/4.7.2/cc1
>>> dyld: fast lazy bind offset out of range (39257, max=7640) in image /sw/lib/gcc4.7/libexec/gcc/x86_64-apple-darwin11.4.2/4.7.2/cc1
>>> gcc-4: internal compiler error: Trace/BPT trap: 5 (program cc1)
>>> Please submit a full bug report,
>>> with preprocessed source if appropriate.
>>> See <http://gcc.gnu.org/bugs.html> for instructions.
>>> I'll open a bugzilla for this one.
>> Yes, please do. This is an interesting problem. I have no solution of
>> the top of my head.
> Done... http://llvm.org/bugs/show_bug.cgi?id=14140. I'll ping the MacPorts maintainers of their llvm-3.2 package to update
> it to contain polly as well. This, with a rebuild of their dragonegg-3.2 package, should provide the Apple programmers with
> pre-built binaries to debug this issue without tainting themselves with GPLv3 code.


> Can you take a look at lvm.org/bugs/show_bug.cgi?id=14135 as well? We need to avoid using LLVM_SHLIBEXT in the test
> subdirectory because this is defined to '.dylib' on darwin while Polly correctly builds the loadable module with the
> '.so' suffix causing almost all of the testsuite to fail with 'make test-polly'. Thanks in advance.

I would prefer to build Polly with the native extension on darwin. The 
native extension seems to be '.dylib', no? Do you know if a autoconf 
build gets it right?


More information about the llvm-dev mailing list