[Mesa-dev] [clover] Compilation of latest 'libclc git' with LLVM 11.0.0git need ROCm?! - Didn't hit that ever before.

2020-04-14 Thread Dieter Nützel

Hello Jan, hello all,

compiling latest libclc git
9aa6f35 (HEAD -> master, origin/master, origin/HEAD) travis: Add LLVM 9 
build


with LLVM 11.0.0git from today
b30246087a3 (HEAD -> master) [llvm][StringExtras] Add missing include of 
cctype


./configure.py && time nice +19 make -j8

resulted in this error:

PREPARE-BUILTINS built_libs/tahiti-amdgcn--.bc
LLVM-CC amdgcn--amdhsa/lib/workitem/get_global_size.cl.bc
clang-11: error: cannot find ROCm installation.  Provide its path via 
--rocm-path, or pass -nogpulib.
make: *** [Makefile:8132: 
amdgcn--amdhsa/lib/workitem/get_global_size.cl.bc] Fehler 1

242.706u 1.148s 4:03.87 99.9%   0+0k 0+177176io 0pf+0w

Since when is ROCm needed?

Thanks,

Dieter
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [clover] Compilation of latest 'libclc git' with LLVM 11.0.0git need ROCm?! - Didn't hit that ever before.

2020-04-14 Thread Dieter Nützel

Addendum

I'm building LLVM git (llvm + SPIRV-LLVM-Translator) for X86;AMDGPU like 
this:


/opt/llvm-project/llvm

mkdir build
cd build
cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang" 
-DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" -DLLVM_APPEND_VC_REV=OFF 
-DCMAKE_BUILD_TYPE="Release" -DLLVM_LINK_LLVM_DYLIB=ON 
-DLLVM_ENABLE_RTTI=ON -DLLVM_PARALLEL_COMPILE_JOBS="9" ../


-- The C compiler identification is GNU 9.3.1
-- The CXX compiler identification is GNU 9.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- debuginfo-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- libcxx project is disabled
-- libcxxabi project is disabled
-- libunwind project is disabled
-- lld project is disabled
-- lldb project is disabled
-- mlir project is disabled
-- openmp project is disabled
-- parallel-libs project is disabled
-- polly project is disabled
-- pstl project is disabled
-- flang project is disabled
-- Found Z3: /usr/lib64/libz3.so (found suitable version "4.8.8", 
minimum required is "4.7.1")

-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for link.h
-- Looking for link.h - found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for sys/param.h
-- Looking for sys/param.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for zlib.h
-- Looking for zlib.h - found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - not found
-- Looking for histedit.h
-- Looking for histedit.h - found
-- Looking for CrashReporterClient.h
-- Looking for CrashReporterClient.h - not found
-- Looking for linux/magic.h
-- Looking for linux/magic.h - found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for pthread_getspecific in pthread
-- Looking for pthread_getspecific in pthread - found
-- Looking for pthread_rwlock_init in pthread
-- Looking for pthread_rwlock_init in pthread - found
-- Looking for pthread_mutex_lock in pthread
-- Looking for pthread_mutex_lock in pthread - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for pfm_initialize in pfm
-- Looking for pfm_initialize in pfm - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Looking for compress2 in z
-- Looking for compress2 in z - found
-- Looking for el_init in edit
-- Looking for el_init in edit - found
-- Looking for setupterm in terminfo
-- Looking for setupterm in terminfo - not found
-- Looking for setupterm in tinfo
-- Looking for setupterm in tinfo - found
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.10")
-- Looking for xar_open in xar
-- Looking for xar_open in xar - not found
-- Looking for arc4random
-- Looking for arc4random - not found
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /usr/include
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Failed
-- Looking for _Unwind_Backtra

Re: [Mesa-dev] [clover] Compilation of latest 'libclc git' with LLVM 11.0.0git need ROCm?! - Didn't hit that ever before.

2020-04-14 Thread Jan Vesely
On Wed, 2020-04-15 at 05:40 +0200, Dieter Nützel wrote:
> Addendum
> 
> I'm building LLVM git (llvm + SPIRV-LLVM-Translator) for X86;AMDGPU like 
> this:

there's nothing wrong with your build. rocm libs are required by clang
when it targets amdgcn--amdhsa target. Unless you know that you want
libclc for amdhsa, you probably don't want to build it.

nit: configure.py was dropped from libclc months ago, it's generally
better to build the latest git. it now comes in llvm monorepo.


@Matt, the -amdhsa triple was introduced by AMD. I don't think there's
any other user so if AMD doesn't have a use for it, we should drop it.

Jan

> 
> /opt/llvm-project/llvm
> 
> mkdir build
> cd build
> cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang" 
> -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" -DLLVM_APPEND_VC_REV=OFF 
> -DCMAKE_BUILD_TYPE="Release" -DLLVM_LINK_LLVM_DYLIB=ON 
> -DLLVM_ENABLE_RTTI=ON -DLLVM_PARALLEL_COMPILE_JOBS="9" ../
> 
> -- The C compiler identification is GNU 9.3.1
> -- The CXX compiler identification is GNU 9.3.1
> -- The ASM compiler identification is GNU
> -- Found assembler: /usr/bin/cc
> -- Check for working C compiler: /usr/bin/cc
> -- Check for working C compiler: /usr/bin/cc - works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Detecting C compile features
> -- Detecting C compile features - done
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ - works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> -- clang project is enabled
> -- clang-tools-extra project is disabled
> -- compiler-rt project is disabled
> -- debuginfo-tests project is disabled
> -- libc project is disabled
> -- libclc project is disabled
> -- libcxx project is disabled
> -- libcxxabi project is disabled
> -- libunwind project is disabled
> -- lld project is disabled
> -- lldb project is disabled
> -- mlir project is disabled
> -- openmp project is disabled
> -- parallel-libs project is disabled
> -- polly project is disabled
> -- pstl project is disabled
> -- flang project is disabled
> -- Found Z3: /usr/lib64/libz3.so (found suitable version "4.8.8", 
> minimum required is "4.7.1")
> -- Looking for dlfcn.h
> -- Looking for dlfcn.h - found
> -- Looking for errno.h
> -- Looking for errno.h - found
> -- Looking for fcntl.h
> -- Looking for fcntl.h - found
> -- Looking for link.h
> -- Looking for link.h - found
> -- Looking for malloc/malloc.h
> -- Looking for malloc/malloc.h - not found
> -- Looking for pthread.h
> -- Looking for pthread.h - found
> -- Looking for signal.h
> -- Looking for signal.h - found
> -- Looking for sys/ioctl.h
> -- Looking for sys/ioctl.h - found
> -- Looking for sys/mman.h
> -- Looking for sys/mman.h - found
> -- Looking for sys/param.h
> -- Looking for sys/param.h - found
> -- Looking for sys/resource.h
> -- Looking for sys/resource.h - found
> -- Looking for sys/stat.h
> -- Looking for sys/stat.h - found
> -- Looking for sys/time.h
> -- Looking for sys/time.h - found
> -- Looking for sys/types.h
> -- Looking for sys/types.h - found
> -- Looking for termios.h
> -- Looking for termios.h - found
> -- Looking for unistd.h
> -- Looking for unistd.h - found
> -- Looking for valgrind/valgrind.h
> -- Looking for valgrind/valgrind.h - not found
> -- Looking for zlib.h
> -- Looking for zlib.h - found
> -- Looking for fenv.h
> -- Looking for fenv.h - found
> -- Looking for FE_ALL_EXCEPT
> -- Looking for FE_ALL_EXCEPT - found
> -- Looking for FE_INEXACT
> -- Looking for FE_INEXACT - found
> -- Looking for mach/mach.h
> -- Looking for mach/mach.h - not found
> -- Looking for histedit.h
> -- Looking for histedit.h - found
> -- Looking for CrashReporterClient.h
> -- Looking for CrashReporterClient.h - not found
> -- Looking for linux/magic.h
> -- Looking for linux/magic.h - found
> -- Looking for pthread_create in pthread
> -- Looking for pthread_create in pthread - found
> -- Looking for pthread_getspecific in pthread
> -- Looking for pthread_getspecific in pthread - found
> -- Looking for pthread_rwlock_init in pthread
> -- Looking for pthread_rwlock_init in pthread - found
> -- Looking for pthread_mutex_lock in pthread
> -- Looking for pthread_mutex_lock in pthread - found
> -- Looking for dlopen in dl
> -- Looking for dlopen in dl - found
> -- Looking for clock_gettime in rt
> -- Looking for clock_gettime in rt - found
> -- Looking for pfm_initialize in pfm
> -- Looking for pfm_initialize in pfm - not found
> -- Looking for pthread.h
> -- Looking for pthread.h - found
> -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
> -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
> -- Looking for pthread_create in pthreads
> -- Looking for pthread_create in pthreads - not found
> -- Looking for pthread_create in pthread
> -- Looking for pthread_create in pthread - found
> -- Found Threads: TRUE
> -- Looking for compress2 in z
> -- Looking

Re: [Mesa-dev] [clover] Compilation of latest 'libclc git' with LLVM 11.0.0git need ROCm?! - Didn't hit that ever before.

2020-04-14 Thread Dieter Nützel

Am 15.04.2020 05:50, schrieb Jan Vesely:

On Wed, 2020-04-15 at 05:40 +0200, Dieter Nützel wrote:

Addendum

I'm building LLVM git (llvm + SPIRV-LLVM-Translator) for X86;AMDGPU 
like

this:


there's nothing wrong with your build. rocm libs are required by clang
when it targets amdgcn--amdhsa target. Unless you know that you want
libclc for amdhsa, you probably don't want to build it.

nit: configure.py was dropped from libclc months ago, it's generally
better to build the latest git. it now comes in llvm monorepo.


Oh,

my BAD, sorry Jan.
Is it in this path/tree, now?

llvm-project/libclc> l
insgesamt 108
drwxr-xr-x 13 dieter users  4096 15. Apr 02:53 .
drwxr-xr-x 22 dieter users  4096 15. Apr 02:53 ..
drwxr-xr-x  3 dieter users  4096 15. Nov 00:55 amdgcn
drwxr-xr-x  3 dieter users  4096 15. Nov 00:55 amdgcn-amdhsa
lrwxrwxrwx  1 dieter users13 15. Nov 00:55 amdgcn-mesa3d -> 
amdgcn-amdhsa

drwxr-xr-x  3 dieter users  4096 15. Nov 00:55 amdgpu
-rwxr-xr-x  1 dieter users   697 15. Nov 00:55 check_external_calls.sh
drwxr-xr-x  2 dieter users  4096 15. Apr 02:53 cmake
-rw-r--r--  1 dieter users 10537 15. Apr 02:53 CMakeLists.txt
-rwxr-xr-x  1 dieter users   224 15. Nov 00:55 compile-test.sh
-rw-r--r--  1 dieter users42 15. Nov 00:55 CREDITS.TXT
drwxr-xr-x  4 dieter users  4096 15. Nov 00:55 generic
-rw-r--r--  1 dieter users   235 15. Nov 00:55 .gitignore
-rw-r--r--  1 dieter users   281 15. Nov 00:55 libclc.pc.in
-rw-r--r--  1 dieter users 16469 15. Nov 00:55 LICENSE.TXT
drwxr-xr-x  3 dieter users  4096 15. Nov 00:55 ptx
drwxr-xr-x  3 dieter users  4096 15. Nov 00:55 ptx-nvidiacl
drwxr-xr-x  3 dieter users  4096 15. Nov 00:55 r600
-rw-r--r--  1 dieter users  1623 15. Nov 00:55 README.TXT
drwxr-xr-x  2 dieter users  4096 15. Nov 00:55 test
drwxr-xr-x  2 dieter users  4096 15. Nov 00:55 utils
drwxr-xr-x  2 dieter users  4096 15. Nov 00:55 www

Then 'README.TXT' have to updated, too. --- configure.py...

Greetings,

Dieter



@Matt, the -amdhsa triple was introduced by AMD. I don't think there's
any other user so if AMD doesn't have a use for it, we should drop it.

Jan



/opt/llvm-project/llvm

mkdir build
cd build
cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang"
-DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" -DLLVM_APPEND_VC_REV=OFF
-DCMAKE_BUILD_TYPE="Release" -DLLVM_LINK_LLVM_DYLIB=ON
-DLLVM_ENABLE_RTTI=ON -DLLVM_PARALLEL_COMPILE_JOBS="9" ../

-- The C compiler identification is GNU 9.3.1
-- The CXX compiler identification is GNU 9.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- debuginfo-tests project is disabled
-- libc project is disabled
-- libclc project is disabled
-- libcxx project is disabled
-- libcxxabi project is disabled
-- libunwind project is disabled
-- lld project is disabled
-- lldb project is disabled
-- mlir project is disabled
-- openmp project is disabled
-- parallel-libs project is disabled
-- polly project is disabled
-- pstl project is disabled
-- flang project is disabled
-- Found Z3: /usr/lib64/libz3.so (found suitable version "4.8.8",
minimum required is "4.7.1")
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for link.h
-- Looking for link.h - found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for sys/param.h
-- Looking for sys/param.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for zlib.h
-- Looking for zlib.h - found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - not