Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-18 Thread Sylvestre Ledru



Le 18/11/2018 à 22:44, Samuel Thibault a écrit :

Sylvestre Ledru, le dim. 18 nov. 2018 20:48:00 +0100, a ecrit:

Le 18/11/2018 à 14:09, Samuel Thibault a écrit :

FI, here are the patches I am currently using to get the package built.
D54378 and 54379 are still being discussed upstream, and the last two
still need to be cleaned and submitted upstream.

Would be nice if you could do a MR on salsa!

You mean before it's merged upstream?


if you want this in 7 :)



Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-18 Thread Samuel Thibault
Sylvestre Ledru, le dim. 18 nov. 2018 20:48:00 +0100, a ecrit:
> Le 18/11/2018 à 14:09, Samuel Thibault a écrit :
> > FI, here are the patches I am currently using to get the package built.
> > D54378 and 54379 are still being discussed upstream, and the last two
> > still need to be cleaned and submitted upstream.
> 
> Would be nice if you could do a MR on salsa!

You mean before it's merged upstream?

Samuel



Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-18 Thread Sylvestre Ledru
Hello,

Le 18/11/2018 à 14:09, Samuel Thibault a écrit :
> FI, here are the patches I am currently using to get the package built.
> D54378 and 54379 are still being discussed upstream, and the last two
> still need to be cleaned and submitted upstream.


Would be nice if you could do a MR on salsa!

Thanks
S



Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-18 Thread Samuel Thibault
FI, here are the patches I am currently using to get the package built.
D54378 and 54379 are still being discussed upstream, and the last two
still need to be cleaned and submitted upstream.

Samuel
Add Hurd support.

Patch by samuel.thiba...@ens-lyon.org

Differential Revision: https://reviews.llvm.org/D54079

Index: openmp/runtime/src/kmp.h
===
--- openmp/runtime/src/kmp.h.orig
+++ openmp/runtime/src/kmp.h
@@ -1048,6 +1048,10 @@ extern kmp_uint64 __kmp_now_nsec();
 /* TODO: tune for KMP_OS_NETBSD */
 #define KMP_INIT_WAIT 1024U /* initial number of spin-tests   */
 #define KMP_NEXT_WAIT 512U /* susequent number of spin-tests */
+#elif KMP_OS_HURD
+/* TODO: tune for KMP_OS_HURD */
+#define KMP_INIT_WAIT 1024U /* initial number of spin-tests   */
+#define KMP_NEXT_WAIT 512U /* susequent number of spin-tests */
 #endif
 
 #if KMP_ARCH_X86 || KMP_ARCH_X86_64
Index: openmp/runtime/src/kmp_ftn_entry.h
===
--- openmp/runtime/src/kmp_ftn_entry.h.orig
+++ openmp/runtime/src/kmp_ftn_entry.h
@@ -369,7 +369,7 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_
 #else
   int gtid;
 
-#if KMP_OS_DARWIN || KMP_OS_FREEBSD || KMP_OS_NETBSD
+#if KMP_OS_DARWIN || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD
   gtid = __kmp_entry_gtid();
 #elif KMP_OS_WINDOWS
   if (!__kmp_init_parallel ||
Index: openmp/runtime/src/kmp_platform.h
===
--- openmp/runtime/src/kmp_platform.h.orig
+++ openmp/runtime/src/kmp_platform.h
@@ -22,6 +22,7 @@
 #define KMP_OS_DARWIN 0
 #define KMP_OS_WINDOWS 0
 #define KMP_OS_CNK 0
+#define KMP_OS_HURD 0
 #define KMP_OS_UNIX 0 /* disjunction of KMP_OS_LINUX, KMP_OS_DARWIN etc. */
 
 #ifdef _WIN32
@@ -59,13 +60,18 @@
 #define KMP_OS_CNK 1
 #endif
 
+#if (defined __GNU__)
+#undef KMP_OS_HURD
+#define KMP_OS_HURD 1
+#endif
+
 #if (1 !=  \
  KMP_OS_LINUX + KMP_OS_FREEBSD + KMP_OS_NETBSD + KMP_OS_DARWIN +   \
- KMP_OS_WINDOWS)
+ KMP_OS_WINDOWS + KMP_OS_HURD)
 #error Unknown OS
 #endif
 
-#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_DARWIN
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_DARWIN || KMP_OS_HURD
 #undef KMP_OS_UNIX
 #define KMP_OS_UNIX 1
 #endif
Index: openmp/runtime/src/kmp_runtime.cpp
===
--- openmp/runtime/src/kmp_runtime.cpp.orig
+++ openmp/runtime/src/kmp_runtime.cpp
@@ -7643,7 +7643,7 @@ __kmp_determine_reduction_method(
 #if KMP_ARCH_X86_64 || KMP_ARCH_PPC64 || KMP_ARCH_AARCH64 || KMP_ARCH_MIPS64
 
 #if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_WINDOWS ||   \
-KMP_OS_DARWIN
+KMP_OS_DARWIN || KMP_OS_HURD
 
 int teamsize_cutoff = 4;
 
@@ -7670,7 +7670,7 @@ __kmp_determine_reduction_method(
 
 #elif KMP_ARCH_X86 || KMP_ARCH_ARM || KMP_ARCH_AARCH || KMP_ARCH_MIPS
 
-#if KMP_OS_LINUX || KMP_OS_WINDOWS
+#if KMP_OS_LINUX || KMP_OS_WINDOWS || KMP_OS_HURD
 
 // basic tuning
 
Index: openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c
===
--- openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c.orig
+++ openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c
@@ -70,6 +70,10 @@ static const char* ittnotify_lib_name =
 #define ANDROID_ITTNOTIFY_DEFAULT_PATH  "/data/data/com.intel.vtune/intel/libittnotify.so"
 #endif
 
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
 
 #ifndef LIB_VAR_NAME
 #if ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_ARM || ITT_ARCH==ITT_ARCH_MIPS
Index: openmp/runtime/src/z_Linux_util.cpp
===
--- openmp/runtime/src/z_Linux_util.cpp.orig
+++ openmp/runtime/src/z_Linux_util.cpp
@@ -444,8 +444,7 @@ void __kmp_terminate_thread(int gtid) {
determined exactly, FALSE if incremental refinement is necessary. */
 static kmp_int32 __kmp_set_stack_info(int gtid, kmp_info_t *th) {
   int stack_data;
-#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD
-  /* Linux* OS only -- no pthread_getattr_np support on OS X* */
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD
   pthread_attr_t attr;
   int status;
   size_t size = 0;
@@ -497,7 +496,7 @@ static void *__kmp_launch_worker(void *t
   sigset_t new_set, old_set;
 #endif /* KMP_BLOCK_SIGNALS */
   void *exit_val;
-#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD
   void *volatile padding = 0;
 #endif
   int gtid;
@@ -1765,7 +1764,7 @@ static int __kmp_get_xproc(void) {
 
   int r = 0;
 
-#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD
+#if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_HURD
 
   r = sysconf(_SC_NPROCESSORS_ONLN);
 
@@ -1953,9 +1952,9 @@ int __kmp_is_address_mapped(void 

Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-16 Thread Samuel Thibault
Hello,

FI, this is happening on

https://reviews.llvm.org/D54079
https://reviews.llvm.org/D54338
https://reviews.llvm.org/D54339
https://reviews.llvm.org/D54378
https://reviews.llvm.org/D54379

I'll send the patches eventually commited.

Samuel



Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-05 Thread Samuel Thibault
Hello,

Samuel Thibault, le dim. 04 nov. 2018 15:02:22 +0100, a ecrit:
> #include <...> search starts here:
>  /mnt/compil/llvm-toolchain-7-7/libcxx/include
>  /usr/local/include
>  /mnt/compil/llvm-toolchain-7-7/build-llvm/lib/clang/7.0.0/include
>  /usr/include
> End of search list.

I tried on Linux and got

#include <...> search starts here:
 /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8
 /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8
 /usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward
 /usr/local/include
 /var/tmp/llvm-toolchain-7-7/build-llvm/lib/clang/7.0.0/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.

So actually the cmake test in libcxxabi doesn't see the libcxx includes,
but the gcc includes. I don't know if that's on purpose.  I'll fix that
too anyway.

Samuel



Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-04 Thread Sylvestre Ledru


Le 04/11/2018 à 15:02, Samuel Thibault a écrit :
>
> Also, it's missing -I/usr/include/$(DEB_HOST_MULTIARCH), that's also
> problematic. I guess we need to define

Or just disable libc++ for hurd ;)


S



Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-04 Thread Samuel Thibault
Sylvestre Ledru, le dim. 04 nov. 2018 17:46:04 +0100, a ecrit:
> Le 04/11/2018 à 15:02, Samuel Thibault a écrit :
> > Also, it's missing -I/usr/include/$(DEB_HOST_MULTIARCH), that's also
> > problematic. I guess we need to define
> 
> Or just disable libc++ for hurd ;)

That's an option indeed :)

I guess packages depending on llvm don't use c++ that much for now?

The non-definition of __GNU__ and __ELF__ and missing
/usr/include/i386-gnu inclusion will however quickly pose problems, so
at least I'll fix these.

Samuel



Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-04 Thread Sylvestre Ledru


Le 04/11/2018 à 17:47, Samuel Thibault a écrit :
> Sylvestre Ledru, le dim. 04 nov. 2018 17:46:04 +0100, a ecrit:
>> Le 04/11/2018 à 15:02, Samuel Thibault a écrit :
>>> Also, it's missing -I/usr/include/$(DEB_HOST_MULTIARCH), that's also
>>> problematic. I guess we need to define
>> Or just disable libc++ for hurd ;)
> That's an option indeed :)
>
> I guess packages depending on llvm don't use c++ that much for now?
AFAIK, no package in Debian uses libc++ yet.
> The non-definition of __GNU__ and __ELF__ and missing
> /usr/include/i386-gnu inclusion will however quickly pose problems, so
> at least I'll fix these.

ok, thanks!

S



Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-04 Thread Samuel Thibault
Sylvestre Ledru, le dim. 04 nov. 2018 14:38:16 +0100, a ecrit:
> Le 04/11/2018 à 14:32, Samuel Thibault a écrit :
> > Samuel Thibault, le dim. 04 nov. 2018 14:30:22 +0100, a ecrit:
> >> I'm actually wondering what is supposed to make clang++ take the
> >> -DLIBCXXABI_LIBCXX_INCLUDES=/mnt/compil/llvm-toolchain-7-7/libcxx/include
> > I tried to make this an environment variable that clang++ could take,
> > but still:
> 
> I dont' think this is a compiler variable.
> 
> Just try with -I/mnt/compil/llvm-toolchain-7-7/libcxx/include
> 
> and it should be fine.

clang version 7.0.0-8 (tags/RELEASE_700/final)
Target: i686-unknown--gnu0.9
Thread model: posix
InstalledDir: /mnt/compil/llvm-toolchain-7-7/build-llvm/bin
 "/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang++" -cc1 -triple 
i686-unknown--gnu0.9 -emit-obj -disable-free -disable-llvm-verifier 
-discard-value-names -main-file-name src.cxx -mrelocation-model static 
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose 
-mconstructor-aliases -target-cpu pentium4 -dwarf-column-info 
-debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -v 
-coverage-notes-file 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/cmTC_b2902.dir/src.cxx.gcno
 -resource-dir /mnt/compil/llvm-toolchain-7-7/build-llvm/lib/clang/7.0.0 -D 
_FORTIFY_SOURCE=2 -D LLVM_NO_OLD_LIBSTDCXX -I 
/mnt/compil/llvm-toolchain-7-7/libcxx/include -internal-isystem 
/usr/include/clang/7.0.0/include/ -O2 -Wformat -Werror=format-security 
-Wdate-time -std=c++0x -fdeprecated-macro -fdebug-compilation-dir 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build 
-fdebug-prefix-map=/mnt/compil/llvm-toolchain-7-7=. -ferror-limit 19 
-fmessage-length 80 -stack-protector 2 -fobjc-runtime=gcc -fcxx-exceptions 
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops 
-vectorize-slp -o CMakeFiles/cmTC_b2902.dir/src.cxx.o -x c++ 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx 
-faddrsig
clang -cc1 version 7.0.0 based upon LLVM 7.0.0 default target 
i686-unknown-gnu0.9
ignoring nonexistent directory "/usr/include/clang/7.0.0/include/"
#include "..." search starts here:
#include <...> search starts here:
 /mnt/compil/llvm-toolchain-7-7/libcxx/include
 /usr/local/include
 /mnt/compil/llvm-toolchain-7-7/build-llvm/lib/clang/7.0.0/include
 /usr/include
End of search list.
In file included from 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx:1:
In file included from /mnt/compil/llvm-toolchain-7-7/libcxx/include/atomic:543:
/mnt/compil/llvm-toolchain-7-7/libcxx/include/__config:67:4: error: Unknown
  object file format
#  error Unknown object file format
   ^
/mnt/compil/llvm-toolchain-7-7/libcxx/include/__config:1121:6: error: 
  "No thread API"
#error "No thread API"
 ^
In file included from 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx:1:
In file included from /mnt/compil/llvm-toolchain-7-7/libcxx/include/atomic:545:
In file included from /mnt/compil/llvm-toolchain-7-7/libcxx/include/cstdint:145:
In file included from 
/mnt/compil/llvm-toolchain-7-7/libcxx/include/stdint.h:119:
In file included from 
/mnt/compil/llvm-toolchain-7-7/build-llvm/lib/clang/7.0.0/include/stdint.h:61:
/usr/include/stdint.h:26:10: fatal error: 'bits/libc-header-start.h' file not
  found
#include 
 ^~
3 errors generated.

> It is missing from the search path. I guess this is a cmake check which
> is limited to Linux

Ah, libcxx is new in llvm-toolchain-7, I now understand why all these
new issues compared to -6.0 :)

I have trivially fixed the thread part in my tree.

For the file format part, it seems that clang 6.0 itself doesn't define
__ELF__ either, and not even __GNU__, which will be more than
problematic :) It seems these should be defined in
./clang/lib/Basic/Targets/OSTargets.h, I'll have a look.

Also, it's missing -I/usr/include/$(DEB_HOST_MULTIARCH), that's also
problematic. I guess we need to define

clang/lib/Driver/ToolChains/Hurd.{cpp,h}

Samuel



Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-04 Thread Sylvestre Ledru


Le 04/11/2018 à 14:32, Samuel Thibault a écrit :
> Samuel Thibault, le dim. 04 nov. 2018 14:30:22 +0100, a ecrit:
>> I'm actually wondering what is supposed to make clang++ take the
>> -DLIBCXXABI_LIBCXX_INCLUDES=/mnt/compil/llvm-toolchain-7-7/libcxx/include
> I tried to make this an environment variable that clang++ could take,
> but still:

I dont' think this is a compiler variable.

Just try with -I/mnt/compil/llvm-toolchain-7-7/libcxx/include

and it should be fine.

It is missing from the search path. I guess this is a cmake check which
is limited to Linux

S



Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-04 Thread Samuel Thibault
Samuel Thibault, le dim. 04 nov. 2018 14:30:22 +0100, a ecrit:
> I'm actually wondering what is supposed to make clang++ take the
> -DLIBCXXABI_LIBCXX_INCLUDES=/mnt/compil/llvm-toolchain-7-7/libcxx/include

I tried to make this an environment variable that clang++ could take,
but still:

$ LIBCXXABI_LIBCXX_INCLUDES=/mnt/compil/llvm-toolchain-7-7/libcxx/include 
/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang++-g -O2 
-fdebug-prefix-map=/mnt/compil/llvm-toolchain-7-7=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 
-DLLVM_NO_OLD_LIBSTDCXX  -std=c++0x   -o CMakeFiles/cmTC_b2902.dir/src.cxx.o -c 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx -v
clang version 7.0.0-8 (tags/RELEASE_700/final)
Target: i686-unknown--gnu0.9
Thread model: posix
InstalledDir: /mnt/compil/llvm-toolchain-7-7/build-llvm/bin
 "/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang++" -cc1 -triple 
i686-unknown--gnu0.9 -emit-obj -disable-free -disable-llvm-verifier 
-discard-value-names -main-file-name src.cxx -mrelocation-model static 
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose 
-mconstructor-aliases -target-cpu pentium4 -dwarf-column-info 
-debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -v -v 
-coverage-notes-file 
/mnt/compil/llvm-toolchain-7-7/CMakeFiles/cmTC_b2902.dir/src.cxx.gcno 
-resource-dir /mnt/compil/llvm-toolchain-7-7/build-llvm/lib/clang/7.0.0 -D 
_FORTIFY_SOURCE=2 -D LLVM_NO_OLD_LIBSTDCXX -internal-isystem 
/usr/include/clang/7.0.0/include/ -O2 -Wformat -Werror=format-security 
-Wdate-time -std=c++0x -fdeprecated-macro -fdebug-compilation-dir 
/mnt/compil/llvm-toolchain-7-7 
-fdebug-prefix-map=/mnt/compil/llvm-toolchain-7-7=. -ferror-limit 19 
-fmessage-length 80 -stack-protector 2 -fobjc-runtime=gcc -fcxx-exceptions 
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops 
-vectorize-slp -o CMakeFiles/cmTC_b2902.dir/src.cxx.o -x c++ 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx 
-faddrsig
clang -cc1 version 7.0.0 based upon LLVM 7.0.0 default target 
i686-unknown-gnu0.9
ignoring nonexistent directory "/usr/include/clang/7.0.0/include/"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /mnt/compil/llvm-toolchain-7-7/build-llvm/lib/clang/7.0.0/include
 /usr/include
End of search list.
error: unable to open output file 'CMakeFiles/cmTC_b2902.dir/src.cxx.o': 'No
  such file or directory'
1 error generated.

Samuel



Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-04 Thread Samuel Thibault
Sylvestre Ledru, le dim. 04 nov. 2018 14:21:55 +0100, a ecrit:
> Le 04/11/2018 à 12:09, Samuel Thibault a écrit :
> > Hello,
> >
> > Sylvestre Ledru, le dim. 04 nov. 2018 09:18:08 +0100, a ecrit:
> >> Le 04/11/2018 à 02:33, Samuel Thibault a écrit :
> >>> /mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang++-g -O2 
> >>> -fdebug-prefix-map=/mnt/compil/llvm-toolchain-7-7=. 
> >>> -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
> >>> -D_FORTIFY_SOURCE=2 -DLLVM_NO_OLD_LIBSTDCXX  -std=c++0x   -o 
> >>> CMakeFiles/cmTC_b2902.dir/src.cxx.o -c 
> >>> /mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx
> >> Adding -v to see the search paths, what this command returns?
> > It's not very talkative :/
> >
> > clang version 7.0.0-8 (tags/RELEASE_700/final)
> > Target: i686-unknown--gnu0.9
> > Thread model: posix
> > InstalledDir: /mnt/compil/llvm-toolchain-7-7/build-llvm/bin
> > clang++: error: no such file or directory: 
> > '/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx'
> 
> This is a temp file generated by cmake. Just create it again with the
> right content :)

D'oh, I didn't even read the error content and assumed it was the atomic
issue again. There it is:

$ /mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang++-g -O2 
-fdebug-prefix-map=/mnt/compil/llvm-toolchain-7-7=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 
-DLLVM_NO_OLD_LIBSTDCXX  -std=c++0x   -o CMakeFiles/cmTC_b2902.dir/src.cxx.o -c 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx
clang version 7.0.0-8 (tags/RELEASE_700/final)
Target: i686-unknown--gnu0.9
Thread model: posix
InstalledDir: /mnt/compil/llvm-toolchain-7-7/build-llvm/bin
 "/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang++" -cc1 -triple 
i686-unknown--gnu0.9 -emit-obj -disable-free -disable-llvm-verifier 
-discard-value-names -main-file-name src.cxx -mrelocation-model static 
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose 
-mconstructor-aliases -target-cpu pentium4 -dwarf-column-info 
-debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -v -v 
-coverage-notes-file 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/cmTC_b2902.dir/src.cxx.gcno
 -resource-dir /mnt/compil/llvm-toolchain-7-7/build-llvm/lib/clang/7.0.0 -D 
_FORTIFY_SOURCE=2 -D LLVM_NO_OLD_LIBSTDCXX -internal-isystem 
/usr/include/clang/7.0.0/include/ -O2 -Wformat -Werror=format-security 
-Wdate-time -std=c++0x -fdeprecated-macro -fdebug-compilation-dir 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build 
-fdebug-prefix-map=/mnt/compil/llvm-toolchain-7-7=. -ferror-limit 19 
-fmessage-length 80 -stack-protector 2 -fobjc-runtime=gcc -fcxx-exceptions 
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops 
-vectorize-slp -o CMakeFiles/cmTC_b2902.dir/src.cxx.o -x c++ 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx 
-faddrsig
clang -cc1 version 7.0.0 based upon LLVM 7.0.0 default target 
i686-unknown-gnu0.9
ignoring nonexistent directory "/usr/include/clang/7.0.0/include/"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /mnt/compil/llvm-toolchain-7-7/build-llvm/lib/clang/7.0.0/include
 /usr/include
End of search list.
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx:1:10:
 fatal error: 
  'atomic' file not found
#include 
 ^~~~
1 error generated.

I'm actually wondering what is supposed to make clang++ take the
-DLIBCXXABI_LIBCXX_INCLUDES=/mnt/compil/llvm-toolchain-7-7/libcxx/include

Samuel



Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-04 Thread Sylvestre Ledru


Le 04/11/2018 à 12:09, Samuel Thibault a écrit :
> Hello,
>
> Sylvestre Ledru, le dim. 04 nov. 2018 09:18:08 +0100, a ecrit:
>> Le 04/11/2018 à 02:33, Samuel Thibault a écrit :
>>> /mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang++-g -O2 
>>> -fdebug-prefix-map=/mnt/compil/llvm-toolchain-7-7=. 
>>> -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
>>> -D_FORTIFY_SOURCE=2 -DLLVM_NO_OLD_LIBSTDCXX  -std=c++0x   -o 
>>> CMakeFiles/cmTC_b2902.dir/src.cxx.o -c 
>>> /mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx
>> Adding -v to see the search paths, what this command returns?
> It's not very talkative :/
>
> clang version 7.0.0-8 (tags/RELEASE_700/final)
> Target: i686-unknown--gnu0.9
> Thread model: posix
> InstalledDir: /mnt/compil/llvm-toolchain-7-7/build-llvm/bin
> clang++: error: no such file or directory: 
> '/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx'

This is a temp file generated by cmake. Just create it again with the
right content :)

S



Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-04 Thread Samuel Thibault
Hello,

Sylvestre Ledru, le dim. 04 nov. 2018 09:18:08 +0100, a ecrit:
> Le 04/11/2018 à 02:33, Samuel Thibault a écrit :
> > /mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang++-g -O2 
> > -fdebug-prefix-map=/mnt/compil/llvm-toolchain-7-7=. 
> > -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
> > -D_FORTIFY_SOURCE=2 -DLLVM_NO_OLD_LIBSTDCXX  -std=c++0x   -o 
> > CMakeFiles/cmTC_b2902.dir/src.cxx.o -c 
> > /mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx
> 
> Adding -v to see the search paths, what this command returns?

It's not very talkative :/

clang version 7.0.0-8 (tags/RELEASE_700/final)
Target: i686-unknown--gnu0.9
Thread model: posix
InstalledDir: /mnt/compil/llvm-toolchain-7-7/build-llvm/bin
clang++: error: no such file or directory: 
'/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx'

Samuel



Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-04 Thread Sylvestre Ledru
Hello,

Le 04/11/2018 à 02:33, Samuel Thibault a écrit :
> /mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang++-g -O2 
> -fdebug-prefix-map=/mnt/compil/llvm-toolchain-7-7=. -fstack-protector-strong 
> -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 
> -DLLVM_NO_OLD_LIBSTDCXX  -std=c++0x   -o CMakeFiles/cmTC_b2902.dir/src.cxx.o 
> -c /mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx

Adding -v to see the search paths, what this command returns?

Thanks
S



Bug#912819: llvm-toolchain-7: FTBFS on hurd-i386

2018-11-03 Thread Samuel Thibault
Source: llvm-toolchain-7
Version: 1:7-8
Severity: important
User: debian-h...@lists.debian.org
Usertags: hurd

Hello,

llvm-toolchain-7 currently FTBFS on hurd-i386, on openmp issues first,
which are being submitted upstream on https://reviews.llvm.org/D54079 ,
but after applying the fix for openmp I'm getting a weird issue:

/usr/bin/ranlib ../../../lib/libgtest_main.a
make[4] : on quitte le répertoire « /mnt/compil/llvm-toolchain-7-7/build-llvm »
[100%] Built target gtest_main
make[3] : on quitte le répertoire « /mnt/compil/llvm-toolchain-7-7/build-llvm »
/usr/bin/cmake -E cmake_progress_start 
/mnt/compil/llvm-toolchain-7-7/build-llvm/CMakeFiles 0
make[2] : on quitte le répertoire « /mnt/compil/llvm-toolchain-7-7/build-llvm »
mkdir -p libcxxabi/build
mkdir -p libcxx/build
CMAKE_BIN=cmake; \
if test -f /tmp/cmake/bin/cmake; then \
CMAKE_BIN=/tmp/cmake/bin/cmake; \
fi; \
echo "Using cmake: $CMAKE_BIN"; \
cd libcxxabi/build && \
 $CMAKE_BIN ../ \
-DCMAKE_INSTALL_PREFIX=/usr/lib/llvm-7 
-DLLVM_CONFIG_PATH=/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/llvm-config 
-DCMAKE_BUILD_TYPE=RelWithDebInfo 
-DCMAKE_CXX_COMPILER=/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang++ 
-DCMAKE_C_COMPILER=/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang 
-DCMAKE_CXX_FLAGS="-g -O2 -fdebug-prefix-map=/mnt/compil/llvm-toolchain-7-7=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2" -DCMAKE_EXE_LINKER_FLAGS="" -DCMAKE_SHARED_LINKER_FLAGS="" 
-DCMAKE_MODULE_LINKER_FLAGS="" 
-DCMAKE_AR=/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/llvm-ar 
-DCMAKE_RANLIB=/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/llvm-ranlib 
-DCMAKE_C_COMPILER=/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang 
-DLLVM_EXTERNAL_LIT=/mnt/compil/llvm-toolchain-7-7/utils/lit/lit.py  
-DLLVM_BINUTILS_INCDIR=/usr/include/  \
-DLIBCXXABI_LIBCXX_PATH=/mnt/compil/llvm-toolchain-7-7/libcxx \
-DLIBCXXABI_LIBCXX_LIBRARY_PATH=/mnt/compil/llvm-toolchain-7-7/libcxx/build/lib 
\
-DLIBCXXABI_LIBCXX_INCLUDES=/mnt/compil/llvm-toolchain-7-7/libcxx/include \
-DLIBCXXABI_ENABLE_EXCEPTIONS=ON \
-DLLVM_ENABLE_RTTI=ON && \
 /usr/bin/make -j 1 VERBOSE=1 CXXFLAGS=" -fuse-ld=gold 
-Wl,--no-keep-files-mapped -Wl,--no-map-whole-files"  LDFLAGS=" -fuse-ld=gold 
--no-keep-files-mapped --no-map-whole-files"
Using cmake: cmake
-- The CXX compiler identification is Clang 7.0.0
-- The C compiler identification is Clang 7.0.0
-- Check for working CXX compiler: 
/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang++
-- Check for working CXX compiler: 
/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: 
/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang
-- Check for working C compiler: 
/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring for standalone build.
-- Found LLVM_CONFIG_PATH as 
/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/llvm-config
-- Linker detection: GNU ld
-- Performing Test LLVM_NO_OLD_LIBSTDCXX
-- Performing Test LLVM_NO_OLD_LIBSTDCXX - Failed
CMake Error at 
/mnt/compil/llvm-toolchain-7-7/build-llvm/lib/cmake/llvm/CheckCompilerVersion.cmake:38
 (message):
  Host Clang must be able to find libstdc++4.8 or newer!
Call Stack (most recent call first):
  
/mnt/compil/llvm-toolchain-7-7/build-llvm/lib/cmake/llvm/HandleLLVMOptions.cmake:9
 (include)
  cmake/Modules/HandleOutOfTreeLLVM.cmake:97 (include)
  cmake/Modules/HandleOutOfTreeLLVM.cmake:140 (configure_out_of_tree_llvm)
  CMakeLists.txt:29 (include)


-- Configuring incomplete, errors occurred!
See also 
"/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeOutput.log".
See also 
"/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeError.log".


CMakeError.log shows:

/mnt/compil/llvm-toolchain-7-7/build-llvm/bin/clang++-g -O2 
-fdebug-prefix-map=/mnt/compil/llvm-toolchain-7-7=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 
-DLLVM_NO_OLD_LIBSTDCXX  -std=c++0x   -o CMakeFiles/cmTC_b2902.dir/src.cxx.o -c 
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx
/mnt/compil/llvm-toolchain-7-7/libcxxabi/build/CMakeFiles/CMakeTmp/src.cxx:2:10:
 fatal error: 'atomic' file not found
#include 
 ^~~~
1 error generated.


But the atomic file is there in the 
/mnt/compil/llvm-toolchain-7-7/libcxx/include directory given as 
LIBCXXABI_LIBCXX_INCLUDES::

€ ls -l /mnt/compil/llvm-toolchain-7-7/libcxx/include/atomic
-rw-r--r-- 1 samy samy 63749 sept. 17 12:02 
/mnt/compil/llvm-toolchain-7-7/libcxx/include/atomic

Any idea what could be going wrong?

Samuel

-- System Information:
Debian Release: buster/sid
  APT prefers