Re: Building GNUstep for Windows using Clang

Frederik Seiffert <[email protected]>
Newsgroups gmane.comp.lib.gnustep.devel
Message-ID <[email protected]>
Hi all,

As a second option I’ve been working on trying to build using the MSVC ABI (i.e. without MinGW).

Using the latest Clang 11 from the LLVM website and Pthreads-win32, plus removing -lm from target.make, I was able to get quite a bit further running Base configure.

However, it fails checking for objc_sync_enter with the following linker errors – any ideas what these could be about?

> configure:8038: checking for objc_sync_enter
> configure:8038: /C/LLVM/bin/clang -o conftest.exe -g  -I/c/GNUstep/MSVC/x64/include -I/c/GNUstep/MSVC/x64/include -I/c/GNUstep/MSVC/x64/include -I/c/GNUstep/MSVC/x64/include  -x objective-c -fuse-ld=lld -L/c/GNUstep/MSVC/x64/lib -L/c/GNUstep/MSVC/x64/lib -L/c/GNUstep/MSVC/x64/lib -L/c/GNUstep/MSVC/x64/lib conftest.c  -lpthread -fuse-ld=lld -pthread -fexceptions -fobjc-runtime=gnustep-2.0 -fblocks -L/home/Frederik -LSeiffert/GNUstep/Library/Libraries -L/c/GNUstep/MSVC/x64/lib -lobjc     >&5
> conftest.c:119:6: warning: incompatible redeclaration of library function 'objc_sync_enter' [-Wincompatible-library-redeclaration]
> char objc_sync_enter ();
>      ^
> conftest.c:119:6: note: 'objc_sync_enter' is a builtin with type 'int (id)'
> 1 warning generated.
> lld-link: error: relocation against symbol in discarded section: __start_.objcrt$SEL
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> 
> lld-link: error: relocation against symbol in discarded section: __stop.objcrt$SEL
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> 
> lld-link: error: relocation against symbol in discarded section: __start_.objcrt$CLS
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> 
> lld-link: error: relocation against symbol in discarded section: __stop.objcrt$CLS
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> 
> lld-link: error: relocation against symbol in discarded section: __start_.objcrt$CLR
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> 
> lld-link: error: relocation against symbol in discarded section: __stop.objcrt$CLR
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> 
> lld-link: error: relocation against symbol in discarded section: __start_.objcrt$CAT
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> 
> lld-link: error: relocation against symbol in discarded section: __stop.objcrt$CAT
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> 
> lld-link: error: relocation against symbol in discarded section: __start_.objcrt$PCL
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> 
> lld-link: error: relocation against symbol in discarded section: __stop.objcrt$PCL
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> 
> lld-link: error: relocation against symbol in discarded section: __start_.objcrt$PCR
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> 
> lld-link: error: relocation against symbol in discarded section: __stop.objcrt$PCR
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> 
> lld-link: error: relocation against symbol in discarded section: __start_.objcrt$CAL
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> 
> lld-link: error: relocation against symbol in discarded section: __stop.objcrt$CAL
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> 
> lld-link: error: relocation against symbol in discarded section: __start_.objcrt$STR
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> 
> lld-link: error: relocation against symbol in discarded section: __stop.objcrt$STR
> >>> referenced by C:\tmp\conftest-78a937.o:(.objc_init)
> PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
> 0.	Program arguments: C:\LLVM\bin\lld-link -out:conftest.exe -defaultlib:libcmt -libpath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.28.29333\lib\x64 -libpath:C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.28.29333\atlmfc\lib\x64 -libpath:C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\ucrt\x64 -libpath:C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\x64 -libpath:C:\LLVM\lib\clang\11.0.0\lib\windows -libpath:C:/GNUstep/MSVC/x64/lib -libpath:C:/GNUstep/MSVC/x64/lib -libpath:C:/GNUstep/MSVC/x64/lib -libpath:C:/GNUstep/MSVC/x64/lib -libpath:C:/msys64/home/Frederik -libpath:Seiffert/GNUstep/Library/Libraries -libpath:C:/GNUstep/MSVC/x64/lib -nologo -debug C:\tmp\conftest-76158a.o pthread.lib objc.lib 


> configure:8038: result: no
> configure:8052: error: The objc runtime library does not appear to have synchronisation support.  Try re-configuring gnustep-make with a CPPFLAGS variable containing a -L point to specify the directory containing the correct libobjc, or using the --with-objc-lib-flag=... option.


Thanks,
Frederik
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.