Issue 60659
Summary CYGWIN: cannot compile clang-shlib: "error: export ordinal too large"
Labels new issue
Assignees
Reporter carlo-bramini
    I tried to compile the latest 15.0.7 with CYGWIN and I got this error at the final stages of the process:

```
[ 96%] Linking CXX shared library ../../../../bin/cygclang-cpp-15.dll
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: error: export ordinal too large: 96680
collect2: error: ld returned 1 exit status
make[2]: *** [tools/clang/tools/clang-shlib/CMakeFiles/clang-cpp.dir/build.make:2072: bin/cygclang-cpp-15.dll] Error 1
make[1]: *** [CMakeFiles/Makefile2:43633: tools/clang/tools/clang-shlib/CMakeFiles/clang-cpp.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
```

I configured CMake in this way:

```
cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../llvm
```

as it has been described in this page:

https://clang.llvm.org/get_started.html

Adding `LLVM_BUILD_LLVM_DYLIB=ON` didn't change the error message.
Using the solution described here:

https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-clang/0009-Use-hidden-visibility-when-building-for-MinGW-with-Clang.patch

didn't seem to help; GCC prints:

```
warning: visibility attribute not supported in this configuration; ignored [-Wattributes]
```

which seems to be not effective for sorving the trouble.
Into the FAQ, I have not found a way for fixing this error.
Is there a solution to bypass the 64K limit of exported symbols from a DLL?

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to