[LLVMbugs] [Bug 14140] New: LLVMPolly.so plugin fails to load under dragonegg plugin on darwin

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Oct 21 10:13:24 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=14140

             Bug #: 14140
           Summary: LLVMPolly.so plugin fails to load under dragonegg
                    plugin on darwin
           Product: dragonegg
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: New Bugs
        AssignedTo: baldrick at free.fr
        ReportedBy: howarth at nitro.med.uc.edu
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Using current llvm/polly/dragonegg svn, the LLVMPolly.so plugin fails to load
on x86_64-apple-darwin11. The failure is of the form...

[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.so
himenoBMTxpa.c -v
Using built-in specs.
COLLECT_GCC=/sw/lib/gcc4.7/bin/gcc-4
COLLECT_LTO_WRAPPER=/sw/lib/gcc4.7/libexec/gcc/x86_64-apple-darwin11.4.2/4.7.2/lto-wrapper
Target: x86_64-apple-darwin11.4.2
Configured with: ../gcc-4.7.2/configure --prefix=/sw --prefix=/sw/lib/gcc4.7
--mandir=/sw/share/man --infodir=/sw/lib/gcc4.7/info
--enable-languages=c,c++,fortran,lto,objc,obj-c++,java --with-gmp=/sw
--with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-mpc=/sw
--with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
--program-suffix=-fsf-4.7 --enable-cloog-backend=isl
Thread model: posix
gcc version 4.7.2 (GCC) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.7.4'
'-fplugin=/sw/lib/gcc4.7/lib/dragonegg.so' '-O3'
'-fplugin-arg-dragonegg-llvm-option=-load:/sw/opt/llvm-3.2/lib/LLVMPolly.so'
'-v' '-mtune=core2'
 /sw/lib/gcc4.7/libexec/gcc/x86_64-apple-darwin11.4.2/4.7.2/cc1 -quiet -v
-iplugindir=/sw/lib/gcc4.7/lib/gcc/x86_64-apple-darwin11.4.2/4.7.2/plugin
-D__DYNAMIC__ himenoBMTxpa.c
-iplugindir=/sw/lib/gcc4.7/lib/gcc/x86_64-apple-darwin11.4.2/4.7.2/plugin -fPIC
-quiet -dumpbase himenoBMTxpa.c -mmacosx-version-min=10.7.4 -mtune=core2
-auxbase himenoBMTxpa -O3 -version -fplugin=/sw/lib/gcc4.7/lib/dragonegg.so
-fplugin-arg-dragonegg-llvm-option=-load:/sw/opt/llvm-3.2/lib/LLVMPolly.so -o
/var/folders/1l/n78sywl52lz6kkys6nv7mnph0000gp/T//ccLgQw2U.s
GNU C (GCC) version 4.7.2 (x86_64-apple-darwin11.4.2)
    compiled by GNU C version 4.7.2, GMP version 5.0.5, MPFR version 3.1.1, MPC
version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Versions of loaded plugins:
 dragonegg: 3.2svn
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/sw/lib/gcc4.7/lib/gcc/x86_64-apple-darwin11.4.2/4.7.2/../../../../x86_64-apple-darwin11.4.2/include"
#include "..." search starts here:
#include <...> search starts here:
 /sw/lib/gcc4.7/lib/gcc/x86_64-apple-darwin11.4.2/4.7.2/include
 /sw/lib/gcc4.7/include
 /sw/lib/gcc4.7/lib/gcc/x86_64-apple-darwin11.4.2/4.7.2/include-fixed
 /usr/include
 /System/Library/Frameworks
 /Library/Frameworks
End of search list.
GNU C (GCC) version 4.7.2 (x86_64-apple-darwin11.4.2)
    compiled by GNU C version 4.7.2, GMP version 5.0.5, MPFR version 3.1.1, MPC
version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Versions of loaded plugins:
 dragonegg: 3.2svn
Compiler executable checksum: d413f6ce20b86abf66faf4823487889a
himenoBMTxpa.c: In function ‘main’:
himenoBMTxpa.c:79:5: warning: incompatible implicit declaration of built-in
function ‘strcpy’ [enabled by default]
himenoBMTxpa.c: In function ‘set_param’:
himenoBMTxpa.c:226:5: warning: incompatible implicit declaration of built-in
function ‘exit’ [enabled by default]
himenoBMTxpa.c: In function ‘newMat’:
himenoBMTxpa.c:239:5: warning: incompatible implicit declaration of built-in
function ‘malloc’ [enabled by default]
himenoBMTxpa.c: In function ‘clearMat’:
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.

which backtraces in gdb as...

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007fff5fc0106d in __dyld_dyld_fatal_error ()
(gdb) 
(gdb) bt
#0  0x00007fff5fc0106d in __dyld_dyld_fatal_error ()
#1  0x00007fff5fc048c8 in __dyld__ZN4dyld4haltEPKc ()
#2  0x00007fff5fc04948 in __dyld__ZN4dyld18fastBindLazySymbolEPP11ImageLoaderm
()
#3  0x00007fff90af7716 in dyld_stub_binder_ ()
#4  0x0000000100f3b2c0 in Json::Value::maxUInt ()
#5  0x00007fff5fc0fda6 in
__dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
()
#6  0x00007fff5fc0faf2 in
__dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
()
#7  0x00007fff5fc0d2e4 in
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
()
#8  0x00007fff5fc0e0b7 in
__dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE
()
#9  0x00007fff5fc031b9 in __dyld__ZN4dyld15runInitializersEP11ImageLoader ()
#10 0x00007fff5fc09657 in __dyld_dlopen ()
#11 0x00007fff90af795b in dlopen ()
#12 0x0000000142f3888e in llvm::sys::DynamicLibrary::getPermanentLibrary ()
#13 0x0000000142f256bd in llvm::PluginLoader::operator= ()
#14 0x000000014280fbda in llvm::cl::opt<llvm::PluginLoader, false,
llvm::cl::parser<std::string> >::handleOccurrence ()
#15 0x0000000142f1730c in CommaSeparateAndAddOccurence ()
#16 0x0000000142f1395f in ProvideOption ()
#17 0x0000000142f1224b in llvm::cl::ParseCommandLineOptions ()
#18 0x000000014280d3ff in InitializeBackend ()
#19 0x000000014280c191 in llvm_emit_globals ()

Note that LLVMPolly.so loads fine under clang with...

/sw/opt/llvm-3.2/bin/clang -Xclang -load -Xclang
/sw/opt/llvm-3.2/lib/LLVMPolly.so -O3 -mllvm -polly himenoBMTxpa.c

and allows the compilation to complete. This is using Xcode 4.5.1's command
line tools.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list