octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MinGW build error w. LLVM: undefined reference to `__chkstk_ms'


From: Philip Nienhuis
Subject: Re: MinGW build error w. LLVM: undefined reference to `__chkstk_ms'
Date: Thu, 30 Aug 2012 11:22:10 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6

Michael Goffioul wrote:
On Wed, Aug 29, 2012 at 10:54 PM, Philip Nienhuis
<address@hidden <mailto:address@hidden>> wrote:

    Using the /experimental/ llvm&clang MinGW binaries from:
    http://www.llvm.org/releases/download.html#3.1
    I get this build error:

    :
    libtool: link: g++ -shared-libgcc -shared -nostdlib
    x:/programs/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../dllcrt2.o
    x:/programs/mingw/bin/../lib/gcc/mingw32/4.5.2/crtbegin.o
    .libs\\liboctinterp.la.lnkscript -Wl,--whole-archive
    octave-value/.libs/liboctave-value.a parse-tree/.libs/libparse-tree.a
    interp-core/.libs/libinterp-core.a interpfcn/.libs/libinterpfcn.a
    corefcn/.libs/libcorefcn.a -Wl,--no-whole-archive
    -L/home/Philip/octdev/octllvm3.7/libcruft/.libs
    -LX:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib
    -L/x/Programs/gplibs/lib -L/x/Programs/OctaveLibs/lib
    -L/x/programs/GnuWin32/lib
    -L/projetos/gcc/bld/452/build/mingw32/winsup/mingw
    -L/projetos/gcc/bld/452/build/mingw32/winsup/w32api/lib
    -L/projetos/gcc/bld/452/build/mingw32/libstdc++-v3/src
    -L/projetos/gcc/bld/452/build/mingw32/libstdc++-v3/src/.libs
    ../liboctave/.libs/liboctave.dll.a -Lx:/Programs/gplibs/lib
    -Lx:/Programs/OctaveLibs/lib -Lx:/programs/GnuWin32/lib
    -Lx:/programs/mingw/lib -Lx:/programs/mingw/lib/gcc/mingw32/4.5.2
    -Lx:/programs/mingw/bin/../lib/gcc/mingw32/4.5.2/../../..
    -Lx:/programs/mingw/bin/../lib/gcc/mingw32/4.5.2
    /home/Philip/octdev/octllvm3.7/libcruft/.libs/libcruft.dll.a -lcholmod
    -lumfpack -lamd -lcamd -lcolamd -lccolamd -lcxsparse -larpack -lqrupdate
    -lreadline -lncurses ../libcruft/.libs/libcruft.dll.a -lblas -lfltk_gl
    -lfltk -lole32 -luuid -lcomctl32 -Lc:/Programs/gplibs/lib
    -LX:/Programs/gplibs/lib /x/Programs/OctaveLibs/lib/libhdf5.dll
    -L/mingw/lib
    /mingw/lib/libm.a /x/Programs/OctaveLibs/lib/libfftw3.dll.a
    /x/Programs/OctaveLibs/lib/libfftw3f.dll.a -lpcre
    x:/Programs/gplibs/lib/libfontconfig.dll.a /mingw/lib/libiconv.dll.a
    x:/Programs/gplibs/lib/libfreetype.dll.a -lz /mingw/lib/libexpat.dll.a
    -lopengl32 -lglu32 -lLLVMAsmParser -lLLVMInstrumentation -lLLVMLinker
    -lLLVMArchive -lLLVMBitReader -lLLVMDebugInfo -lLLVMJIT -lLLVMipo
    -lLLVMVectorize -lLLVMBitWriter -lLLVMTableGen -lLLVMHexagonCodeGen
    -lLLVMHexagonDesc -lLLVMHexagonInfo -lLLVMHexagonAsmPrinter
    -lLLVMPTXCodeGen
    -lLLVMPTXDesc -lLLVMPTXAsmPrinter -lLLVMPTXInfo -lLLVMMBlazeDisassembler
    -lLLVMMBlazeAsmParser -lLLVMMBlazeCodeGen -lLLVMMBlazeDesc
    -lLLVMMBlazeInfo
    -lLLVMMBlazeAsmPrinter -lLLVMCppBackendCodeGen -lLLVMCppBackendInfo
    -lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info
    -lLLVMMSP430AsmPrinter
    -lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMCellSPUCodeGen
    -lLLVMCellSPUDesc -lLLVMCellSPUInfo -lLLVMMipsCodeGen
    -lLLVMMipsAsmParser
    -lLLVMMipsDisassembler -lLLVMMipsDesc -lLLVMMipsAsmPrinter
    -lLLVMMipsInfo
    -lLLVMARMDisassembler -lLLVMARMAsmParser -lLLVMARMCodeGen -lLLVMARMDesc
    -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMPowerPCCodeGen -lLLVMPowerPCDesc
    -lLLVMPowerPCInfo -lLLVMPowerPCAsmPrinter -lLLVMSparcCodeGen
    -lLLVMSparcDesc
    -lLLVMSparcInfo -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter
    -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86Desc -lLLVMX86Info
    -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMMCDisassembler -lLLVMMCParser
    -lLLVMInterpreter -lLLVMCodeGen
    -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa
    -lLLVMAnalysis -lLLVMMCJIT -lLLVMRuntimeDyld -lLLVMExecutionEngine
    -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport
    /mingw/lib/libiberty.a -lpthread
    /mingw/lib/gcc/mingw32/4.5.2/libgfortran.dll.a -llapack -luser32
    -lkernel32
    -lgdi32 -lws2_32 -luser32 -lkernel32 -Lx:/programs/mingw/bin/../lib/gcc
    -Lx:/programs/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/lib
    /mingw/lib/gcc/mingw32/4.5.2/libstdc++.dll.a -lmingw32 -lgcc_s -lgcc
    -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32
    -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt
    x:/programs/mingw/bin/../lib/gcc/mingw32/4.5.2/crtend.o
      -shared-libgcc -O2
    -mieee-fp -O2 -Wl,--allow-multiple-definition -Wl,--enable-auto-import
    -Wl,--enable-runtime-pseudo-reloc-v2 -Wl,--allow-multiple-definition
    -mno-cygwin -Wl,--enable-auto-import
    -Wl,--enable-runtime-pseudo-reloc   -o
    .libs/liboctinterp-1.dll -Wl,--enable-auto-image-base -Xlinker
    --out-implib
    -Xlinker .libs/liboctinterp.dll.a
    Creating library file: .libs/liboctinterp.dll.a
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMSelectionDAG.a(SelectionDAGBuilder.o):SelectionDAGBuilder.cpp:(.text+0xfc5a):
    undefined reference to `__chkstk_ms'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMX86AsmPrinter.a(X86IntelInstPrinter.o):X86IntelInstPrinter.cpp:(.text+0x10aa):
    undefined reference to `__chkstk_ms'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMX86AsmPrinter.a(X86ATTInstPrinter.o):X86ATTInstPrinter.cpp:(.text+0x291a):
    undefined reference to `__chkstk_ms'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMScalarOpts.a(LoopStrengthReduce.o):LoopStrengthReduce.cpp:(.text+0x17a9a):
    undefined reference to `__chkstk_ms'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMInstCombine.a(InstCombineSimplifyDemanded.o):InstCombineSimplifyDemanded.cpp:(.text+0x2a7a):
    undefined reference to `__chkstk_ms'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMCore.a(Function.o):Function.cpp:(.text+0x1c96):
    more undefined references to `__chkstk_ms' follow
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMSupport.a(DynamicLibrary.o):DynamicLibrary.cpp:(.text+0xb52):
    undefined reference to address@hidden'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMSupport.a(APFloat.o):APFloat.cpp:(.text+0x3c0a):
    undefined reference to `__chkstk_ms'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMSupport.a(Path.o):Path.cpp:(.text+0x1c6f):
    undefined reference to `__chkstk_ms'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMSupport.a(Path.o):Path.cpp:(.text+0x26a2):
    undefined reference to `__chkstk_ms'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMSupport.a(Path.o):Path.cpp:(.text+0x342f):
    undefined reference to `__chkstk_ms'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMSupport.a(Path.o):Path.cpp:(.text+0x482b):
    undefined reference to `__chkstk_ms'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMSupport.a(Signals.o):Signals.cpp:(.text+0x363):
    undefined reference to address@hidden'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMSupport.a(Signals.o):Signals.cpp:(.text+0x37f):
    undefined reference to address@hidden'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMSupport.a(Process.o):Process.cpp:(.text+0xac):
    undefined reference to address@hidden'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMSupport.a(Program.o):Program.cpp:(.text+0x4e9):
    undefined reference to `__chkstk_ms'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMSupport.a(Program.o):Program.cpp:(.text+0x6a2):
    undefined reference to `__chkstk_ms'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/lib/libLLVMSupport.a(Program.o):Program.cpp:(.text+0x796):
    undefined reference to `__chkstk_ms'
    
X:/programs/msys/home/Philip/octdev/dev/llvm-3.1/liblibLLVMSupport.a(MemoryBuffer.o):MemoryBuffer.cpp:(.text+0xa0a):
    undefined reference to `__chkstk_ms'
    collect2: ld returned 1 exit status
    make[3]: *** [liboctinterp.la <http://liboctinterp.la>] Error 1
    make[3]: Leaving directory `/home/Philip/octdev/octllvm3.7/libinterp'
    make[2]: *** [all] Error 2
    make[2]: Leaving directory `/home/Philip/octdev/octllvm3.7/libinterp'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/Philip/octdev/octllvm3.7'
    make: *** [all] Error 2

    Is this due to the "experimental" nature of the llvm libs I
    downloaded? is
    there a way to check this?
    or is the plethora of platform libs in the libtool call ("...
    -lLLVMPowerPCAsmPrinter -lLLVMSparcCodeGen ...") somehow involved?


IIRC __chkstk_ms is provided by libgcc. Not 100% sure, though. Anyway
it's an internal function of GCC.

Note that you're also missing symbols from psapi and dbghelp libraries.

Thanks for the pointer.
A google search turns up that most likely something is wrong with environment settings (LIB, LIBPATH, PATH, etc). Hmmm, not improbable as I essentially use Tatsuro's build environment which contains several subdirs that I don't even have (e.g., "/projetos/gcc/bld/452/build/mingw32/winsup/mingw").
so I'll first look into cleaning up there.

(Anyway the only difference between my previous (successfull) build attempts and this here is that I now tried with LLVM (JIT). Perhaps the last straw that breaks the camel's back?)

Philip


reply via email to

[Prev in Thread] Current Thread [Next in Thread]