On 22 February 2017 at 14:57, Marc Dietrich <marvi...@gmx.de> wrote: > Am Mittwoch, 22. Februar 2017, 15:48:18 CET schrieb Emil Velikov: >> On 22 February 2017 at 13:31, Marc Dietrich <marvi...@gmx.de> wrote: >> > Am Mittwoch, 22. Februar 2017, 04:45:46 CET schrieb Timothy Arceri: >> >> For gpu generations that use LLVM we create a timestamp string >> >> containing both the LLVM and Mesa build times, otherwise we just >> >> use the Mesa build time. >> >> >> >> Reviewed-by: Marek Olšák <marek.ol...@amd.com> >> >> Reviewed-by: Edward O'Callaghan <funfunc...@folklore1984.net> >> >> --- >> >> >> >> src/gallium/drivers/radeon/r600_pipe_common.c | 43 >> >> >> >> +++++++++++++++++++++++++++ src/gallium/drivers/radeon/r600_pipe_common.h >> >> | >> >> >> >> 3 ++ >> >> 2 files changed, 46 insertions(+) >> >> >> >> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c >> >> b/src/gallium/drivers/radeon/r600_pipe_common.c index 1781584..bae6d6f >> >> 100644 >> >> --- a/src/gallium/drivers/radeon/r600_pipe_common.c >> >> +++ b/src/gallium/drivers/radeon/r600_pipe_common.c >> >> @@ -43,6 +43,10 @@ >> >> >> >> #define HAVE_LLVM 0 >> >> #endif >> >> >> >> +#if HAVE_LLVM >> >> +#include <llvm-c/TargetMachine.h> >> >> +#endif >> >> + >> >> >> >> #ifndef MESA_LLVM_VERSION_PATCH >> >> #define MESA_LLVM_VERSION_PATCH 0 >> >> #endif >> >> >> >> @@ -779,6 +783,41 @@ static const char* r600_get_chip_name(struct >> >> r600_common_screen *rscreen) } >> >> >> >> } >> >> >> >> +static void r600_disk_cache_create(struct r600_common_screen *rscreen) >> >> +{ >> >> + uint32_t mesa_timestamp; >> >> + if (disk_cache_get_function_timestamp(r600_disk_cache_create, >> >> + &mesa_timestamp)) { >> >> + char *timestamp_str; >> >> + int res = -1; >> >> + if (rscreen->chip_class < SI) { >> >> + res = asprintf(×tamp_str, >> >> "%u",mesa_timestamp); >> >> + } >> >> +#if HAVE_LLVM >> >> + else { >> >> + uint32_t llvm_timestamp; >> >> + if >> >> (disk_cache_get_function_timestamp(LLVMInitializeAMDGPUTargetInfo, + >> >> &llvm_timestamp)) >> >> { + res = asprintf(×tamp_str, "%u_%u", >> >> + mesa_timestamp, >> >> llvm_timestamp); + } >> >> + } >> >> +#endif >> > >> > maybe this fails to link later in omx with r600 only compile. >> > >> > make[4]: Verzeichnis „/usr/src/dri-project/mesa/src/gallium/targets/omx“ >> > wird betreten >> > >> > CXXLD libomx_mesa.la >> > >> > ../../../../src/gallium/drivers/radeon/.libs/libradeon.a(r600_pipe_common. >> > o): In function `r600_disk_cache_create': >> > r600_pipe_common.c:(.text+0x2000): undefined reference to >> > `LLVMInitializeAMDGPUTargetInfo' >> > collect2: error: ld returned 1 exit status >> > make[4]: *** [Makefile:791: libomx_mesa.la] Fehler 1 >> > make[4]: Verzeichnis „/usr/src/dri-project/mesa/src/gallium/targets/omx“ >> > wird verlassen >> >> That should not happen since >> - Compile guard HAVE_LLVM is defined when --enable-llvm is set >> (explicitly or not) >> - Makefile/link guard HAVE_GALLIUM_LLVM is set when the --enable-llvm is >> >> Please make clean/git clean and report the output of make V=1 if the >> final link still fails. > > still same. I added -lLLVMAMDGPUInfo to LLVM_{LDFLAGS|LIBS}. Now it compiles, > but GL apps crash during context creation. I also tested the initial version > posted and this worked just fine. I have llvm enabled. > Afaict there is no functional change that would trigger this issue - either things were broken before (but went unnoticed) or something is going bonkers here.
First things first: - is this issue with multiple static LLVM libraries or multiple shared LLVM libraries ? - can you reproduce with simple shared LLVM library Note that multiple shared LLVM libraries is not supported on our end :-\ As a follow-up: - can you analyse the output of libvulkan_radeon.so linking vs libomx.so - missing -lLLVMfoo, strange order etc. - check if correct the component is not added to the LLVM_COMPONENT list (in configure.ac) - send us a patch that fixes the problem on your end, please ;-) Thanks Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev