[LLVMbugs] [Bug 9829] New: undefined reference to __mingw_vprintf when linking to libLLVMCore.a

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon May 2 09:10:20 PDT 2011


           Summary: undefined reference to __mingw_vprintf when linking to
           Product: libraries
           Version: 2.9
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: Core LLVM classes
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: dash4893h4932 at abv.bg
                CC: llvmbugs at cs.uiuc.edu


on winxp-sp2-x86 installing the following official packages in /llvm/:


compiling example at:


constructing and adjusting cmd line:

perl llvm-config --libs core jit native --cxxflags --ldflags

llvm-g++ *.cpp -o a.exe -I/llvm/include -DNDEBUG -D__NO_CTYPE_INLINE
-fomit-frame-pointer -fno-exceptions -Woverloaded-virtual -Wcast-qual
-L/llvm/lib -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen
-lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMX86AsmPrinter
-lLLVMX86Utils -lLLVMX86Info -lLLVMJIT -lLLVMExecutionEngine -lLLVMCodeGen
-lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa
-lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport
-lLLVMSystemZCodeGen -lLLVMSystemZInfo -lpsapi -limagehlp -lm

results in:

Warning: .drectve `-aligncomm:___CTOR_LIST__,2 ' unrecognized
Warning: .drectve `-aligncomm:___DTOR_LIST__,2' unrecognized
/llvm/lib/libLLVMCore.a(PassManager.o)(.text+0x13):PassManager.cpp: undefined
reference to `__mingw_vprintf'
/llvm/lib/libLLVMSupport.a(Signals.o)(.text+0x1b):Signals.cpp: undefined
reference to `__mingw_vfprintf'
/llvm/lib/libLLVMSupport.a(Path.o)(.text+0x1b):Path.cpp: undefined reference to
collect2: ld returned 1 exit status


collect2 suggest that the mingw versions of these functions were linked.
'grep' does not return any files containing these symbols in llvm/lib. the
closest possible location is /llvm/lib/libmingwex.a, which contains symbols
like __mingw_vsnprintf, __mingw_snprintf.
a solution is to define the symbols manually e.g. blank functions in a object


i've sent an email yesterday to the list directly, but using the BZ system
might be better...i was also able to recompiled the support / core libraries
from the 2.9 source with mingw-gcc-4.4.1, but got a lot of SJLJ errors instead
of the '__mingw_*' when linking.

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