[LLVMbugs] [Bug 16648] New: Linking shared library fails on Win7 64-bit with mingw64 gcc-4.8.1

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 17 17:30:32 PDT 2013


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

            Bug ID: 16648
           Summary: Linking shared library fails on Win7 64-bit with
                    mingw64 gcc-4.8.1
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Makefiles
          Assignee: unassignedbugs at nondot.org
          Reporter: callum.a.rogers at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10892
  --> http://llvm.org/bugs/attachment.cgi?id=10892&action=edit
Patch from LLVM 3.3 release with modified version of Makefile.rules that uses 
.a.o  instead of   .def

I ran

  ./configure --enable-shared --enable-jit --enable-targets=host
  make

on Windows 7 using mingw64 and gcc-4.8.1; it all went fine until it reached
stage for linking the share library:

llvm[1]: Linking Release+Asserts Shared Library LLVM-3.3.dll
...
... tens of thousands of like below
...
Cannot export ZThn8_NK4llvm14PassNameParser15printOptionInfoERKNS_2cl6OptionEy:
symbol not defined
Cannot export ZZN4llvm13BallLarusNodeC1EPNS_10BasicBlockEE7nextUID: symbol not
defined
Cannot export
ZZN4llvm16MipsDAGToDAGISel10SelectCodeEPNS_6SDNodeEE12MatcherTable: symbol not
defined
Cannot export ZZN4llvm7hashing6detail18get_execution_seedEvE4seed: symbol not
defined
Cannot export
ZZNK4llvm16PPCFrameLowering24getCalleeSavedSpillSlotsERjE13darwinOffsets:
symbol not defined
Cannot export
ZZNK4llvm16PPCFrameLowering24getCalleeSavedSpillSlotsERjE15darwin64Offsets:
symbol not defined
Cannot export
ZZNK4llvm16PPCFrameLowering24getCalleeSavedSpillSlotsERjE7Offsets: symbol not
defined
Cannot export
ZZNK4llvm16PPCFrameLowering24getCalleeSavedSpillSlotsERjE9Offsets64: symbol not
defined
Cannot export ZnwyRN4llvm16BumpPtrAllocatorE: symbol not defined
Cannot export _jit_debug_descriptor: symbol not defined
Cannot export _jit_debug_register_code: symbol not defined
collect2.exe: error: ld returned 1 exit status


Now, I found this other bug #12795: http://llvm.org/bugs/show_bug.cgi?id=12795
which fixed it by replacing "LLVM-3.0.def" with "LLVM-3.0.a.o" (I have no idea
what this is doing) so I (manually) applied the patch to LLVM-3.3 and tried it
out (patch as attachment), but it still has errors:


llvm[1]: Linking Release+Asserts Shared Library LLVM-3.3.dll
c:/mingw-builds/x64-4.8.1-posix-seh-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe:
c:/Users/Callum/compili
ng/llvm-3.3.src/llvm-3.3.src/tools/llvm-shlib/Release+Asserts/LLVM-3.3.a.o:
warning: COMDAT symbol '.pdata$_ZNK4llvm9MCAsmInfo28getNonexecutableStackSectio
nERNS_9MCContextE' does not match section name '.pdata'
c:/mingw-builds/x64-4.8.1-posix-seh-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe:
c:/Users/Callum/compili
ng/llvm-3.3.src/llvm-3.3.src/tools/llvm-shlib/Release+Asserts/LLVM-3.3.a.o:
warning: COMDAT symbol '.xdata$_ZNK4llvm9MCAsmInfo28getNonexecutableStackSectio
nERNS_9MCContextE' does not match section name '.xdata'
c:/Users/Callum/compiling/llvm-3.3.src/llvm-3.3.src/tools/llvm-shlib/Release+Asserts/LLVM-3.3.a.o:JIT.cpp:(.text+0x51ff37):
undefined reference to `__regis
ter_frame'
c:/Users/Callum/compiling/llvm-3.3.src/llvm-3.3.src/tools/llvm-shlib/Release+Asserts/LLVM-3.3.a.o:JIT.cpp:(.text+0x51ff48):
undefined reference to `__dereg
ister_frame'
c:/Users/Callum/compiling/llvm-3.3.src/llvm-3.3.src/tools/llvm-shlib/Release+Asserts/LLVM-3.3.a.o:SectionMemoryManager.cpp:(.text+0xda3e7b):
undefined refe
rence to `__register_frame'
c:/mingw-builds/x64-4.8.1-posix-seh-rev2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe:
c:/Users/Callum/compili
ng/llvm-3.3.src/llvm-3.3.src/tools/llvm-shlib/Release+Asserts/LLVM-3.3.a.o: bad
reloc address 0x3 in section `.text$_ZN4llvm17SparcELFMCAsmInfoD1Ev[_ZN4llv
m17SparcELFMCAsmInfoD1Ev]'
collect2.exe: error: ld returned 1 exit status
/c/Users/Callum/compiling/llvm-3.3.src/llvm-3.3.src/Makefile.rules:1256: recipe
for target `/c/Users/Callum/compiling/llvm-3.3.src/llvm-3.3.src/Release+Ass
erts/bin/LLVM-3.3.dll' failed
make[1]: ***
[/c/Users/Callum/compiling/llvm-3.3.src/llvm-3.3.src/Release+Asserts/bin/LLVM-3.3.dll]
Error 1
make[1]: Leaving directory
`/c/Users/Callum/compiling/llvm-3.3.src/llvm-3.3.src/tools/llvm-shlib'
/c/Users/Callum/compiling/llvm-3.3.src/llvm-3.3.src/Makefile.rules:876: recipe
for target `all' failed
make: *** [all] Error 1


How do you think we can fix this? I think this is blocking the creation of any
windows binaries (see there are no 3.3 binaries available even on the website).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130718/179c9b96/attachment.html>


More information about the llvm-bugs mailing list