Skip to content

Pragma-related ICE building RTS #20

@simonjwright

Description

@simonjwright

Following the advice in #19 to check out the commits in #18, and after struggles with clang++ & macOS (will report later) I get this while building the RTS (target quicklib):

	gprbuild -v -n -p --target=llvm -j1 -P/Volumes/Miscellaneous2/ll/gnat-llvm/llvm-interface/lib/rts-native/adainclude/libada \
	  -XCFLAGS="-O2 -g" \
	  -XEXTRALIBFLAGS=" -gdwarf-aranges" \
	  -XLIBRARY_KIND=static
object directory "/Volumes/Miscellaneous2/ll/gnat-llvm/llvm-interface/lib/rts-native/adainclude/../obj-static" created for project Libgnarl
Changing to object directory of "Libgnarl": "/Volumes/Miscellaneous2/ll/gnat-llvm/llvm-interface/lib/rts-native/obj-static/"
/volumes/miscellaneous2/ll/clang+llvm-11.0.0-x86_64-apple-darwin/bin/clang -c -x c -O2 -g -I../include -DIN_RTS=1 -fexceptions -DSTANDALONE -gdwarf-aranges -I/volumes/miscellaneous2/ll/gnat-llvm/llvm-interface/lib/rts-native/adainclude /Volumes/Miscellaneous2/ll/gnat-llvm/llvm-interface/lib/rts-native/adainclude/thread.c
/volumes/miscellaneous2/ll/gnat-llvm/llvm-interface/bin/llvm-gcc -c -x ada -gnatA -O2 -g -nostdinc -I../adainclude -gnatpg -gnatec=/private/var/folders/_q/fvnxz46903z9hjh38fz0lyhm0000gs/T/GNAT-TEMP-000002.TMP -gnatem=/private/var/folders/_q/fvnxz46903z9hjh38fz0lyhm0000gs/T/GNAT-TEMP-000003.TMP /Volumes/Miscellaneous2/ll/gnat-llvm/llvm-interface/lib/rts-native/adainclude/a-synbar.adb

raised SEM_PRAG.ANALYZE_PRAGMA.PRAGMA_EXIT : sem_prag.adb:6605
gprbuild: *** compilation phase failed
make[1]: *** [quicklib] Error 4

Could this perhaps be related to these warnings about llvm_wrapper.o being compiled with different visibility settings while linking llvm-gnat1?

ld: warning: direct access in function 'llvm::LLParser::ParseStandaloneMetadata()' from file
 '/Volumes/Miscellaneous2/ll/clang+llvm-11.0.0-x86_64-apple-darwin/lib/libLLVMAsmParser.a(LLParser.cpp.o)'
 to global weak symbol 'llvm::MDTuple::get(llvm::LLVMContext&,
 llvm::ArrayRef<llvm::Metadata*>)' from file 'libgnat_llvm.a(llvm_wrapper.o)' means 
 the weak symbol cannot be overridden at runtime. This was likely caused by different
 translation units being compiled with different visibility settings.
ld: warning: direct access in function 'llvm::LLParser::ParseMDTuple(llvm::MDNode*&, bool)' from file
 '/Volumes/Miscellaneous2/ll/clang+llvm-11.0.0-x86_64-apple-darwin/lib/libLLVMAsmParser.a(LLParser.cpp.o)'
 to global weak symbol 'llvm::MDTuple::get(llvm::LLVMContext&, llvm::ArrayRef<llvm::Metadata*>)' from file 'libgnat_llvm.a(llvm_wrapper.o)' means
 the weak symbol cannot be overridden at runtime. This was likely caused by different
 translation units being compiled with different visibility settings.

llvm_wrapper.o compiled with clang++ below, same issue with g++.

/Volumes/Miscellaneous2/ll/gnat-llvm/../llvm/bin/clang++ -c -x c++ -g -I/Volumes/Miscellaneous2/ll/clang+llvm-11.0.0-x86_64-apple-darwin/include -std=c++14 -fno-exceptions -fno-rtti -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -MMD -MF llvm_wrapper.d /Volumes/Miscellaneous2/ll/gnat-llvm/llvm-interface/llvm_wrapper.cc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions