www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Simplest way to just run std.socket unittest?

reply Thomas Mader <thomas.mader gmail.com> writes:
1) What is the simplest way to just run the std.socket unittest?

I build LDC and run all the tests except for std.socket.
After that I have a different ldc dir where I would like to run 
only the std.socket unittest of phobos but with the ldc from the 
previous build/directory.
Currently I do the following for the second test:

         make -j $NIX_BUILD_CORES DMD=${ldcBuild}/bin/ldc2 
phobos2-test-runner phobos2-test-runner-debug 
phobos2-ldc-unittest phobos2-ldc-unittest-debug
         ctest -j $NIX_BUILD_CORES -V DMD=${ldcBuild}/bin/ldc2 -R 
std.socket

And this for the first build and test:

         ctest -j $NIX_BUILD_CORES -V DMD=$PWD/bin/ldc2 -E 
std.socket

'ldcBuild' is the path to the previously compiled ldc.
Which works but I wonder if there is a faster/better/simpler way 
of doing it.

2) I am also having the problem that on Mac OSX High Sierra the 
build of the second test isn't working because libdruntime-ldc.a 
has no architecture set. (also checked with lipo -info 
libdruntime-ldc.a)

fatal error: /Library/Developer/CommandLineTools/usr/bin/lipo: 
archive with no architecture specification: 
/nix/store/rdfmcs3qwbri9wf1n114sx7hpy40fyi8-ldcBuild-1.4.0/l
b/libdruntime-ldc.a (can't determine architecture for it)

I once checked the static libs inside the build dir and their 
where multiple static libs. (phobos, runtime,...)
And all except for the runtime had the correct x86_64 
architecture.
After install there is only libdruntime-ldc.a left.

3) The other thing is that I don't know how to disable the build 
and tests for debug.

Here is my current config for the second test of ldc (std.socket):

cmake flags: -DCMAKE_BUILD_TYPE=Release 
-DCMAKE_SKIP_BUILD_RPATH=ON 
-DCMAKE_INSTALL_INCLUDEDIR=/nix/store/7g9v5gi86y2ic5iz9ni2iipyaxhjh8d5-ldcUni
tests-1.4.0/include -DCMAKE_INSTALL_LIBDIR=/nix/store/7g9v5gi86y2ic5iz9ni2iipyaxhjh8d5-ld
Unittests-1.4.0/lib -DCMAKE_INSTALL_NAME_DIR=/nix/store/7g9v5gi86y2ic5iz9ni2iipyaxhjh8d5-ld
Unittests-1.4.0/lib -DCMAKE_INSTALL_PREFIX=/nix/store/7g9v5gi86y2ic5iz9ni2iipyaxhjh8d
-ldcUnittests-1.4.0 
-DINCLUDE_INSTALL_DIR=/nix/store/7g9v5gi86y2ic5iz9ni2iipyaxhjh8d5-ldcUnittests-1.4
0/include/dlang/ldc -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_RPATH=ON
-DBUILD_SHARED_LIBS=OFF -DLDC_WITH_LLD=OFF
-DD_COMPILER=/nix/store/rdfmcs3qwbri9wf1n114sx7hpy40fyi8-ldcBuild-1.4.0/bin/ldmd2
-- The C compiler identification is Clang 4.0.1
-- The CXX compiler identification is Clang 4.0.1
-- Check for working C compiler: 
/nix/store/74an2y603w6mais4jl5kzzw0808v2iw2-clang-wrapper-4.0.1/bin/clang
-- Check for working C compiler: 
/nix/store/74an2y603w6mais4jl5kzzw0808v2iw2-clang-wrapper-4.0.1/bin/clang --
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: 
/nix/store/74an2y603w6mais4jl5kzzw0808v2iw2-clang-wrapper-4.0.1/bin/clang++
-- Check for working CXX compiler: 
/nix/store/74an2y603w6mais4jl5kzzw0808v2iw2-clang-wrapper-4.0.1/bin/clang++ --
works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found host D compiler 
/nix/store/rdfmcs3qwbri9wf1n114sx7hpy40fyi8-ldcBuild-1.4.0/bin/ldmd2, with
default flags ''
-- Host D compiler version: LDC - the LLVM D compiler (1.4.0)
-- Found LLVM: 
/nix/store/scwzrijmpgssmkjm4x5cp30afm22xzps-llvm-4.0.1 (found 
suitable version "4.0.1", minimum required is "3.7")
-- LDC version identifier: 1.4.0
-- Building LDC with PGO support
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for setupterm in tinfo
-- Looking for setupterm in tinfo - found
ld: warning: ignoring file 
/nix/store/rdfmcs3qwbri9wf1n114sx7hpy40fyi8-ldcBuild-1.4.0/li
/libdruntime-ldc.a, file was built for archive which is not the architecture
being linked (x86_64):
/nix/store/rdfmcs3qwbri9wf1n114sx7hpy40fyi8-ldcBuild-1.4.0/lib/libdruntime-ldc.a
Undefined symbols for architecture x86_64:
   "__d_dso_registry", referenced from:
       _ldc.register_dso in cmakeExtractDMDSystemLinker.o
   "__d_run_main", referenced from:
       _main in cmakeExtractDMDSystemLinker.o
ld: symbol(s) not found for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v 
to see invocation)
Error: 
/nix/store/74an2y603w6mais4jl5kzzw0808v2iw2-clang-wrapper-4.0.1/bin/clang
failed with status: 1
CMake Error at cmake/Modules/ExtractDMDSystemLinker.cmake:40 
(message):
   Failed to compile empty program using D compiler
   
'/nix/store/rdfmcs3qwbri9wf1n114sx7hpy40fyi8-ldcBuild-1.4.0/bin/ldmd2'
Call Stack (most recent call first):
   CMakeLists.txt:603 (include)

Here is my current config for the first build and test of ldc:

cmake flags: -DCMAKE_BUILD_TYPE=Release 
-DCMAKE_SKIP_BUILD_RPATH=ON 
-DCMAKE_INSTALL_INCLUDEDIR=/nix/store/rdfmcs3qwbri9wf1n114sx7hpy40fyi8-ld
Build-1.4.0/include -DCMAKE_INSTALL_LIBDIR=/nix/store/rdfmcs3qwbri9wf1n114sx7hpy40fyi
-ldcBuild-1.4.0/lib -DCMAKE_INSTALL_NAME_DIR=/nix/store/rdfmcs3qwbri9wf1n114sx7hpy40fyi
-ldcBuild-1.4.0/lib -DCMAKE_INSTALL_PREFIX=/nix/store/rdfmcs3qwbri9wf1n114sx7hpy4
fyi8-ldcBuild-1.4.0 
-DINCLUDE_INSTALL_DIR=/nix/store/rdfmcs3qwbri9wf1n114sx7hpy40fyi8-ldcBuild-1.4
0/include/dlang/ldc -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_RPATH=ON
-DBUILD_SHARED_LIBS=OFF -DLDC_WITH_LLD=OFF
-- The C compiler identification is Clang 4.0.1
-- The CXX compiler identification is Clang 4.0.1
-- Check for working C compiler: 
/nix/store/74an2y603w6mais4jl5kzzw0808v2iw2-clang-wrapper-4.0.1/bin/clang
-- Check for working C compiler: 
/nix/store/74an2y603w6mais4jl5kzzw0808v2iw2-clang-wrapper-4.0.1/bin/clang --
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: 
/nix/store/74an2y603w6mais4jl5kzzw0808v2iw2-clang-wrapper-4.0.1/bin/clang++
-- Check for working CXX compiler: 
/nix/store/74an2y603w6mais4jl5kzzw0808v2iw2-clang-wrapper-4.0.1/bin/clang++ --
works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found host D compiler 
/nix/store/d7wbzrjias7ccz6395b1p2x4p5ijchkb-dmd-2.075.1/bin/dmd, 
with default flags ''
-- Host D compiler version: DMD64 D Compiler v2.075.1
-- Found LLVM: 
/nix/store/scwzrijmpgssmkjm4x5cp30afm22xzps-llvm-4.0.1 (found 
suitable version "4.0.1", minimum required is "3.7")
-- LDC version identifier: 1.4.0
-- Building LDC with PGO support
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for setupterm in tinfo
-- Looking for setupterm in tinfo - found
-- Host D compiler linker program: 
/nix/store/74an2y603w6mais4jl5kzzw0808v2iw2-clang-wrapper-4.0.1/bin/clang
-- Host D compiler linker flags: 
-m64;-Xlinker;-no_compact_unwind;-L/nix/store/s0k070dc60vv1wffwsx7s25lg8q9hkr5-dmdBuild-2.075.1/lib;-lphobos2;-lpthread;-lm
-- Looking for _SC_ARG_MAX
-- Looking for _SC_ARG_MAX - found
-- Not found: 
/nix/store/36dd8fzd4qmccq8gz46z3ivpyk51p4kc-llvm-4.0.1-lib/lib/libLTO.dylib
-- Not found: 
/nix/store/36dd8fzd4qmccq8gz46z3ivpyk51p4kc-llvm-4.0.1-lib/lib/clang/4.0.1/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
-- Not found: 
/nix/store/36dd8fzd4qmccq8gz46z3ivpyk51p4kc-llvm-4.0.1-lib/lib/libFuzzer.a
-- Using path for Intrinsics.td: 
/nix/store/scwzrijmpgssmkjm4x5cp30afm22xzps-llvm-4.0.1/include
-- The ASM compiler identification is Clang
-- Found assembler: 
/nix/store/74an2y603w6mais4jl5kzzw0808v2iw2-clang-wrapper-4.0.1/bin/clang
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Performing Test COMPILER_RT_TARGET_HAS_ATOMICS
-- Performing Test COMPILER_RT_TARGET_HAS_ATOMICS - Success
-- Performing Test COMPILER_RT_TARGET_HAS_FCNTL_LCK
-- Performing Test COMPILER_RT_TARGET_HAS_FCNTL_LCK - Success
-- Configuring done
-- Generating done
CMake Warning:
   Manually-specified variables were not used by the project:

     CMAKE_INSTALL_INCLUDEDIR

And here are all the passed tests inclusive debug:

The following tests passed:
	build-druntime-test-runner-debug
	build-druntime-test-runner
	clean-dmd-testsuite-debug
	clean-dmd-testsuite
	core.atomic
	core.attribute
	core.bitop
	core.checkedint
	core.cpuid
	core.demangle
	core.exception
	core.internal.abort
	core.internal.convert
	core.internal.hash
	core.internal.spinlock
	core.internal.string
	core.internal.traits
	core.math
	core.memory
	core.runtime
	core.simd
	core.stdc.complex
	core.stdc.config
	core.stdc.ctype
	core.stdc.errno
	core.stdc.fenv
	core.stdc.float_
	core.stdc.inttypes
	core.stdc.limits
	core.stdc.locale
	core.stdc.math
	core.stdc.signal
	core.stdc.stdarg
	core.stdc.stddef
	core.stdc.stdint
	core.stdc.stdio
	core.stdc.stdlib
	core.stdc.string
	core.stdc.tgmath
	core.stdc.time
	core.stdc.wchar_
	core.stdc.wctype
	core.sync.barrier
	core.sync.condition
	core.sync.config
	core.sync.exception
	core.sync.mutex
	core.sync.rwmutex
	core.sync.semaphore
	core.thread
	core.time
	core.vararg
	gc.bits
	gc.config
	gc.gcinterface
	gc.impl.conservative.gc
	gc.impl.manual.gc
	gc.os
	gc.pooltable
	gc.proxy
	ldc.arrayinit
	ldc.asan
	ldc.attributes
	ldc.dcompute
	ldc.eh.common
	ldc.eh.fixedpool
	ldc.eh.libunwind
	ldc.eh.msvc
	object
	rt.aApply
	rt.aApplyR
	rt.aaA
	rt.adi
	rt.arrayassign
	rt.arraybyte
	rt.arraycast
	rt.arraycat
	rt.arraydouble
	rt.arrayfloat
	rt.arrayint
	rt.arrayreal
	rt.arrayshort
	rt.backtrace.dwarf
	rt.backtrace.elf
	rt.cast_
	rt.cmath2
	rt.config
	rt.cover
	rt.critical_
	rt.dmain2
	invariant
	rt.lifetime
	rt.mach_utils
	rt.memory
	rt.memset
	rt.minfo
	rt.monitor_
	rt.obj
	rt.profilegc
	rt.qsort
	rt.sections
	rt.sections_android
	rt.sections_elf_shared
	rt.sections_ldc
	rt.sections_osx_x86
	rt.sections_osx_x86_64
	build-ldc2-unittest
	rt.sections_solaris
	rt.sections_win32
	ldc2-unittest
	rt.sections_win64
	rt.switch_
	rt.tracegc
	rt.tlsgc
	rt.typeinfo.ti_Acfloat
	rt.typeinfo.ti_Acdouble
	rt.typeinfo.ti_Adouble
	rt.typeinfo.ti_Acreal
	rt.typeinfo.ti_Ag
	rt.typeinfo.ti_Afloat
	rt.typeinfo.ti_Aint
	rt.typeinfo.ti_Along
	rt.typeinfo.ti_Areal
	rt.typeinfo.ti_Ashort
	rt.typeinfo.ti_byte
	rt.typeinfo.ti_C
	rt.typeinfo.ti_cdouble
	rt.typeinfo.ti_cent
	rt.typeinfo.ti_char
	rt.typeinfo.ti_cfloat
	rt.typeinfo.ti_creal
	rt.typeinfo.ti_dchar
	rt.typeinfo.ti_double
	rt.typeinfo.ti_delegate
	rt.typeinfo.ti_idouble
	rt.typeinfo.ti_float
	rt.typeinfo.ti_int
	rt.typeinfo.ti_ifloat
	rt.typeinfo.ti_ireal
	rt.typeinfo.ti_long
	rt.typeinfo.ti_ptr
	rt.typeinfo.ti_n
	rt.typeinfo.ti_short
	rt.typeinfo.ti_real
	rt.typeinfo.ti_ubyte
	rt.typeinfo.ti_ucent
	rt.typeinfo.ti_uint
	rt.typeinfo.ti_ulong
	rt.typeinfo.ti_ushort
	rt.typeinfo.ti_void
	rt.unwind
	rt.typeinfo.ti_wchar
	rt.util.array
	rt.util.container.array
	rt.util.container.common
	rt.util.container.hashtab
	rt.util.hash
	rt.util.container.treap
	rt.util.random
	rt.util.typeinfo
	core.sys.posix.arpa.inet
	rt.util.utf
	core.sys.posix.dirent
	core.sys.posix.config
	core.sys.posix.fcntl
	core.sys.posix.dlfcn
	core.sys.posix.iconv
	core.sys.posix.grp
	core.sys.posix.libgen
	core.sys.posix.inttypes
	core.sys.posix.mqueue
	core.sys.posix.net.if_
	core.sys.posix.netinet.in_
	core.sys.posix.netdb
	core.sys.posix.poll
	core.sys.posix.netinet.tcp
	core.sys.posix.pthread
	core.sys.posix.pwd
	core.sys.posix.semaphore
	core.sys.posix.sched
	core.sys.posix.setjmp
	core.sys.posix.signal
	core.sys.posix.stdio
	core.sys.posix.stdlib
	core.sys.posix.sys.filio
	core.sys.posix.sys.ioccom
	core.sys.posix.sys.ipc
	core.sys.posix.sys.ioctl
	core.sys.posix.sys.mman
	core.sys.posix.sys.msg
	core.sys.posix.sys.resource
	core.sys.posix.sys.select
	core.sys.posix.sys.shm
	core.sys.posix.sys.socket
	core.sys.posix.sys.statvfs
	core.sys.posix.sys.stat
	core.sys.posix.sys.time
	core.sys.posix.sys.ttycom
	core.sys.posix.sys.uio
	core.sys.posix.sys.types
	core.sys.posix.sys.un
	core.sys.posix.sys.utsname
	core.sys.posix.syslog
	core.sys.posix.sys.wait
	core.sys.posix.termios
	core.sys.posix.time
	core.sys.posix.ucontext
	core.sys.posix.unistd
	core.sys.posix.utime
	core.sys.darwin.dlfcn
	core.sys.darwin.mach.dyld
	core.sys.darwin.execinfo
	core.sys.darwin.mach.getsect
	core.sys.darwin.mach.kern_return
	core.sys.darwin.mach.loader
	core.sys.darwin.mach.port
	core.sys.darwin.mach.semaphore
	core.sys.darwin.mach.thread_act
	core.sys.darwin.pthread
	core.sys.darwin.sys.cdefs
	core.sys.darwin.sys.mman
	core.sys.darwin.sys.event
	core.sys.osx.dlfcn
	core.sys.osx.execinfo
	core.sys.osx.mach.getsect
	core.sys.osx.mach.dyld
	core.sys.osx.mach.loader
	core.sys.osx.mach.kern_return
	core.sys.osx.mach.port
	core.sys.osx.mach.semaphore
	core.sys.osx.pthread
	core.sys.osx.mach.thread_act
	core.sys.osx.sys.event
	core.sys.osx.sys.cdefs
	core.atomic-debug
	core.sys.osx.sys.mman
	core.attribute-debug
	core.bitop-debug
	core.cpuid-debug
	core.checkedint-debug
	core.demangle-debug
	core.exception-debug
	core.internal.convert-debug
	core.internal.abort-debug
	core.internal.hash-debug
	core.internal.spinlock-debug
	core.internal.traits-debug
	core.internal.string-debug
	core.memory-debug
	core.math-debug
	core.simd-debug
	core.runtime-debug
	core.stdc.config-debug
	core.stdc.complex-debug
	core.stdc.errno-debug
	core.stdc.ctype-debug
	core.stdc.fenv-debug
	core.stdc.float_-debug
	core.stdc.limits-debug
	core.stdc.inttypes-debug
	core.stdc.locale-debug
	core.stdc.math-debug
	core.stdc.signal-debug
	core.stdc.stdarg-debug
	core.stdc.stdint-debug
	core.stdc.stddef-debug
	core.stdc.stdlib-debug
	core.stdc.stdio-debug
	core.stdc.string-debug
	core.stdc.tgmath-debug
	core.stdc.wchar_-debug
	core.stdc.time-debug
	core.sync.barrier-debug
	core.stdc.wctype-debug
	core.sync.config-debug
	core.sync.condition-debug
	core.sync.exception-debug
	core.sync.mutex-debug
	core.sync.rwmutex-debug
	core.thread-debug
	core.sync.semaphore-debug
	core.time-debug
	core.vararg-debug
	gc.config-debug
	gc.bits-debug
	gc.gcinterface-debug
	gc.impl.conservative.gc-debug
	gc.impl.manual.gc-debug
	gc.os-debug
	gc.proxy-debug
	gc.pooltable-debug
	ldc.asan-debug
	ldc.arrayinit-debug
	ldc.dcompute-debug
	ldc.attributes-debug
	ldc.eh.common-debug
	ldc.eh.fixedpool-debug
	ldc.eh.libunwind-debug
	ldc.eh.msvc-debug
	object-debug
	rt.aApply-debug
	rt.aaA-debug
	rt.aApplyR-debug
	rt.adi-debug
	rt.arrayassign-debug
	rt.arraycast-debug
	rt.arraybyte-debug
	rt.arraycat-debug
	rt.arraydouble-debug
	rt.arrayint-debug
	rt.arrayfloat-debug
	rt.arrayshort-debug
	rt.arrayreal-debug
	rt.backtrace.dwarf-debug
	rt.backtrace.elf-debug
	rt.cmath2-debug
	rt.cast_-debug
	rt.cover-debug
	rt.config-debug
	rt.critical_-debug
	rt.dmain2-debug
	rt.lifetime-debug
	invariant-debug
	rt.memory-debug
	rt.mach_utils-debug
	rt.minfo-debug
	rt.memset-debug
	rt.obj-debug
	rt.monitor_-debug
	rt.profilegc-debug
	rt.qsort-debug
	rt.sections_android-debug
	rt.sections-debug
	rt.sections_elf_shared-debug
	rt.sections_ldc-debug
	rt.sections_osx_x86-debug
	rt.sections_osx_x86_64-debug
	rt.sections_win32-debug
	rt.sections_solaris-debug
	rt.switch_-debug
	rt.sections_win64-debug
	rt.tracegc-debug
	rt.tlsgc-debug
	rt.typeinfo.ti_Acdouble-debug
	rt.typeinfo.ti_Acfloat-debug
	rt.typeinfo.ti_Adouble-debug
	rt.typeinfo.ti_Acreal-debug
	rt.typeinfo.ti_Afloat-debug
	rt.typeinfo.ti_Ag-debug
	rt.typeinfo.ti_Along-debug
	rt.typeinfo.ti_Aint-debug
	rt.typeinfo.ti_Areal-debug
	rt.typeinfo.ti_Ashort-debug
	rt.typeinfo.ti_byte-debug
	rt.typeinfo.ti_C-debug
	rt.typeinfo.ti_cdouble-debug
	rt.typeinfo.ti_cent-debug
	rt.typeinfo.ti_char-debug
	rt.typeinfo.ti_cfloat-debug
	rt.typeinfo.ti_dchar-debug
	rt.typeinfo.ti_creal-debug
	rt.typeinfo.ti_double-debug
	rt.typeinfo.ti_delegate-debug
	rt.typeinfo.ti_idouble-debug
	rt.typeinfo.ti_float-debug
	rt.typeinfo.ti_int-debug
	rt.typeinfo.ti_ifloat-debug
	rt.typeinfo.ti_long-debug
	rt.typeinfo.ti_ireal-debug
	rt.typeinfo.ti_ptr-debug
	rt.typeinfo.ti_n-debug
	rt.typeinfo.ti_short-debug
	rt.typeinfo.ti_real-debug
	rt.typeinfo.ti_ubyte-debug
	rt.typeinfo.ti_ucent-debug
	rt.typeinfo.ti_uint-debug
	rt.typeinfo.ti_ulong-debug
	rt.typeinfo.ti_ushort-debug
	rt.typeinfo.ti_void-debug
	rt.unwind-debug
	rt.typeinfo.ti_wchar-debug
	rt.util.array-debug
	rt.util.container.array-debug
	rt.util.container.common-debug
	rt.util.container.hashtab-debug
	rt.util.container.treap-debug
	rt.util.hash-debug
	rt.util.random-debug
	rt.util.typeinfo-debug
	core.sys.posix.arpa.inet-debug
	rt.util.utf-debug
	core.sys.posix.dirent-debug
	core.sys.posix.config-debug
	core.sys.posix.fcntl-debug
	core.sys.posix.dlfcn-debug
	core.sys.posix.iconv-debug
	core.sys.posix.grp-debug
	core.sys.posix.inttypes-debug
	core.sys.posix.libgen-debug
	core.sys.posix.mqueue-debug
	core.sys.posix.net.if_-debug
	core.sys.posix.netinet.in_-debug
	core.sys.posix.netdb-debug
	core.sys.posix.poll-debug
	core.sys.posix.netinet.tcp-debug
	core.sys.posix.pthread-debug
	core.sys.posix.pwd-debug
	core.sys.posix.semaphore-debug
	core.sys.posix.sched-debug
	core.sys.posix.setjmp-debug
	core.sys.posix.signal-debug
	core.sys.posix.stdio-debug
	core.sys.posix.stdlib-debug
	core.sys.posix.sys.ioccom-debug
	core.sys.posix.sys.filio-debug
	core.sys.posix.sys.ipc-debug
	core.sys.posix.sys.ioctl-debug
	core.sys.posix.sys.mman-debug
	core.sys.posix.sys.msg-debug
	core.sys.posix.sys.resource-debug
	core.sys.posix.sys.select-debug
	core.sys.posix.sys.socket-debug
	core.sys.posix.sys.shm-debug
	core.sys.posix.sys.statvfs-debug
	core.sys.posix.sys.stat-debug
	core.sys.posix.sys.ttycom-debug
	core.sys.posix.sys.time-debug
	core.sys.posix.sys.types-debug
	core.sys.posix.sys.uio-debug
	core.sys.posix.sys.utsname-debug
	core.sys.posix.sys.un-debug
	core.sys.posix.sys.wait-debug
	core.sys.posix.syslog-debug
	core.sys.posix.termios-debug
	core.sys.posix.time-debug
	core.sys.posix.ucontext-debug
	core.sys.posix.unistd-debug
	core.sys.darwin.dlfcn-debug
	core.sys.posix.utime-debug
	core.sys.darwin.execinfo-debug
	core.sys.darwin.mach.dyld-debug
	core.sys.darwin.mach.getsect-debug
	core.sys.darwin.mach.kern_return-debug
	core.sys.darwin.mach.loader-debug
	core.sys.darwin.mach.port-debug
	core.sys.darwin.mach.thread_act-debug
	core.sys.darwin.mach.semaphore-debug
	core.sys.darwin.pthread-debug
	core.sys.darwin.sys.cdefs-debug
	core.sys.darwin.sys.event-debug
	core.sys.darwin.sys.mman-debug
	core.sys.osx.execinfo-debug
	core.sys.osx.dlfcn-debug
	core.sys.osx.mach.getsect-debug
	core.sys.osx.mach.dyld-debug
	core.sys.osx.mach.kern_return-debug
	core.sys.osx.mach.loader-debug
	core.sys.osx.mach.semaphore-debug
	core.sys.osx.mach.port-debug
	core.sys.osx.pthread-debug
	core.sys.osx.mach.thread_act-debug
	core.sys.osx.sys.cdefs-debug
	core.sys.osx.sys.event-debug
	core.sys.osx.sys.mman-debug
	build-phobos2-test-runner-debug
	etc.c.curl-debug
	etc.c.odbc.sql-debug
	etc.c.odbc.sqlext-debug
	etc.c.odbc.sqltypes-debug
	etc.c.odbc.sqlucode-debug
	etc.c.sqlite3-debug
	etc.c.zlib-debug
	std.algorithm.comparison-debug
	std.algorithm.internal-debug
	std.algorithm.iteration-debug
	std.algorithm.mutation-debug
	std.algorithm-debug
	std.algorithm.searching-debug
	std.algorithm.setops-debug
	std.algorithm.sorting-debug
	std.array-debug
	std.ascii-debug
	std.base64-debug
	std.bigint-debug
	std.bitmanip-debug
	std.c.fenv-debug
	std.c.locale-debug
	std.c.math-debug
	std.c.process-debug
	std.c.stdarg-debug
	std.c.stddef-debug
	std.c.stdio-debug
	std.c.stdlib-debug
	std.c.string-debug
	std.c.time-debug
	std.c.wcharh-debug
	std.compiler-debug
	std.complex-debug
	std.concurrency-debug
	std.concurrencybase-debug
	std.container.array-debug
	std.container.binaryheap-debug
	std.container.dlist-debug
	std.container-debug
	std.container.rbtree-debug
	std.container.slist-debug
	std.container.util-debug
	std.conv-debug
	std.csv-debug
	std.datetime-debug
	std.demangle-debug
	std.digest.crc-debug
	std.digest.digest-debug
	std.digest.hmac-debug
	std.digest.md-debug
	std.digest.murmurhash-debug
	std.digest.ripemd-debug
	std.digest.sha-debug
	std.encoding-debug
	std.exception-debug
	std.experimental.allocator.building_blocks.affix_allocator-debug
	std.experimental.allocator.building_blocks.allocator_list-debug
	std.experimental.allocator.building_blocks.bitmapped_block-debug
	std.experimental.allocator.building_blocks.bucketizer-debug
	std.experimental.allocator.building_blocks.fallback_allocator-debug
	std.experimental.allocator.building_blocks.free_list-debug
	std.experimental.allocator.building_blocks.free_tree-debug
	std.experimental.allocator.building_blocks.kernighan_ritchie-debug
	std.experimental.allocator.building_blocks.null_allocator-debug
	std.experimental.allocator.building_blocks-debug
	std.experimental.allocator.building_blocks.quantizer-debug
	std.experimental.allocator.building_blocks.region-debug
	std.experimental.allocator.building_blocks.scoped_allocator-debug
	std.experimental.allocator.building_blocks.segregator-debug
	std.experimental.allocator.building_blocks.stats_collector-debug
	std.experimental.allocator.common-debug
	std.experimental.allocator.gc_allocator-debug
	std.experimental.allocator.mallocator-debug
	std.experimental.allocator.mmap_allocator-debug
	std.experimental.allocator-debug
	std.experimental.allocator.showcase-debug
	std.experimental.allocator.typed-debug
	std.experimental.checkedint-debug
	std.experimental.logger.core-debug
	std.experimental.logger.filelogger-debug
	std.experimental.logger.multilogger-debug
	std.experimental.logger.nulllogger-debug
	std.experimental.logger-debug
	std.experimental.typecons-debug
	std.file-debug
	std.format-debug
	std.functional-debug
	std.getopt-debug
	std.internal.cstring-debug
	std.internal.digest.sha_SSSE3-debug
	std.internal.encodinginit-debug
	std.internal.math.biguintarm-debug
	std.internal.math.biguintcore-debug
	std.internal.math.biguintnoasm-debug
	std.internal.math.biguintx86-debug
	std.internal.math.errorfunction-debug
	std.internal.math.gammafunction-debug
	std.internal.processinit-debug
	std.internal.scopebuffer-debug
	std.internal.test.dummyrange-debug
	std.internal.test.uda-debug
	std.internal.unicode_comp-debug
	std.internal.unicode_decomp-debug
	std.internal.unicode_grapheme-debug
	std.internal.unicode_norm-debug
	std.internal.unicode_tables-debug
	std.internal.windows.advapi32-debug
	std.json-debug
	std.math-debug
	std.mathspecial-debug
	std.meta-debug
	std.mmfile-debug
	std.net.curl-debug
	std.net.isemail-debug
	std.numeric-debug
	std.outbuffer-debug
	std.parallelism-debug
	std.path-debug
	std.process-debug
	std.random-debug
	std.range.interfaces-debug
	std.range-debug
	std.range.primitives-debug
	std.regex.internal.backtracking-debug
	std.regex.internal.generator-debug
	std.regex.internal.ir-debug
	std.regex.internal.kickstart-debug
	std.regex.internal.parser-debug
	std.regex.internal.tests-debug
	std.regex.internal.thompson-debug
	std.regex-debug
	std.signals-debug
	std.stdint-debug
	std.stdio-debug
	std.stdiobase-debug
	std.string-debug
	std.system-debug
	std.traits-debug
	std.typecons-debug
	std.typetuple-debug
	std.uni-debug
	std.uri-debug
	std.utf-debug
	std.uuid-debug
	std.variant-debug
	std.xml-debug
	std.zip-debug
	std.zlib-debug
	std.c.osx.socket-debug
	lit-tests
	build-phobos2-test-runner
	etc.c.odbc.sql
	etc.c.curl
	etc.c.odbc.sqlext
	etc.c.odbc.sqltypes
	etc.c.sqlite3
	etc.c.odbc.sqlucode
	std.algorithm.comparison
	etc.c.zlib
	std.algorithm.iteration
	std.algorithm.internal
	std.algorithm.mutation
	std.algorithm
	std.algorithm.searching
	std.algorithm.setops
	std.algorithm.sorting
	std.array
	std.base64
	std.ascii
	std.bigint
	std.bitmanip
	std.c.locale
	std.c.fenv
	std.c.math
	std.c.process
	std.c.stdarg
	std.c.stddef
	std.c.stdio
	std.c.stdlib
	std.c.string
	std.c.time
	std.c.wcharh
	std.compiler
	std.concurrency
	std.complex
	std.concurrencybase
	std.container.array
	std.container.dlist
	std.container.binaryheap
	std.container
	std.container.rbtree
	std.container.slist
	std.container.util
	std.csv
	std.conv
	std.demangle
	std.digest.crc
	std.digest.digest
	std.digest.hmac
	std.digest.md
	std.digest.murmurhash
	std.digest.ripemd
	std.digest.sha
	std.encoding
	std.exception
	std.datetime
	std.experimental.allocator.building_blocks.allocator_list
	std.experimental.allocator.building_blocks.affix_allocator
	std.experimental.allocator.building_blocks.bucketizer
	std.experimental.allocator.building_blocks.bitmapped_block
	std.experimental.allocator.building_blocks.fallback_allocator
	std.experimental.allocator.building_blocks.free_list
	std.experimental.allocator.building_blocks.kernighan_ritchie
	std.experimental.allocator.building_blocks.free_tree
	std.experimental.allocator.building_blocks
	std.experimental.allocator.building_blocks.null_allocator
	std.experimental.allocator.building_blocks.region
	std.experimental.allocator.building_blocks.quantizer
	std.experimental.allocator.building_blocks.segregator
	std.experimental.allocator.building_blocks.scoped_allocator
	std.experimental.allocator.building_blocks.stats_collector
	std.experimental.allocator.common
	std.experimental.allocator.gc_allocator
	std.experimental.allocator.mallocator
	std.experimental.allocator.mmap_allocator
	std.experimental.allocator
	std.experimental.allocator.showcase
	std.experimental.allocator.typed
	std.experimental.logger.core
	std.experimental.checkedint
	std.experimental.logger.filelogger
	std.experimental.logger.multilogger
	std.experimental.logger
	std.experimental.logger.nulllogger
	std.file
	std.experimental.typecons
	std.functional
	std.format
	std.getopt
	std.internal.cstring
	std.internal.encodinginit
	std.internal.digest.sha_SSSE3
	std.internal.math.biguintarm
	std.internal.math.biguintcore
	std.internal.math.biguintnoasm
	std.internal.math.biguintx86
	std.internal.math.errorfunction
	std.internal.math.gammafunction
	std.internal.scopebuffer
	std.internal.processinit
	std.internal.test.dummyrange
	std.internal.test.uda
	std.internal.unicode_decomp
	std.internal.unicode_comp
	std.internal.unicode_grapheme
	std.internal.unicode_norm
	std.internal.unicode_tables
	std.internal.windows.advapi32
	std.math
	std.json
	std.meta
	std.mathspecial
	std.mmfile
	std.net.curl
	std.net.isemail
	std.outbuffer
	std.numeric
	std.path
	std.parallelism
	std.random
	std.range.interfaces
	std.process
	std.range
	std.regex.internal.backtracking
	std.range.primitives
	std.regex.internal.generator
	std.regex.internal.ir
	std.regex.internal.parser
	std.regex.internal.kickstart
	std.regex.internal.tests
	std.regex.internal.thompson
	std.signals
	std.regex
	std.stdint
	std.stdio
	std.stdiobase
	std.string
	std.system
	std.traits
	std.typetuple
	std.typecons
	std.uni
	std.uri
	std.utf
	std.variant
	std.uuid
	std.zip
	std.xml
	std.c.osx.socket
	std.zlib
	dmd-testsuite
	dmd-testsuite-debug
Nov 28
parent reply kinke <kinke libero.it> writes:
On Wednesday, 29 November 2017 at 07:17:49 UTC, Thomas Mader 
wrote:
 1) What is the simplest way to just run the std.socket unittest?
Running `<build dir>/runtime/phobos2-test-runner[-debug] std.socket` IIRC; that's what the 2 CTest tests boil down to.
 2) I am also having the problem that on Mac OSX High Sierra the 
 build of the second test isn't working because 
 libdruntime-ldc.a has no architecture set. (also checked with 
 lipo -info libdruntime-ldc.a)
We use LLVM for archiving. Since you're using an older LLVM (4.0.1; LDC 1.4 btw is 'old' too, current version is 1.6), that may have been fixed in LLVM 5.0. You can also opt to use the Xcode archiver by including `-DRT_ARCHIVE_WITH_LDC=OFF` in the CMake command line.
 3) The other thing is that I don't know how to disable the 
 build and tests for debug.
Don't know what you mean by `build for debug`; I guess you mean the debug builds of druntime/Phobos. Those libs should be included in each LDC package IMO, otherwise the `-link-debuglib` switch doesn't work as expected. If you only want to run the release tests, you can skip dmd-testsuite-debug and the debug druntime/Phobos unittests via `ctest -E "-debug"`, as they all have the `-debug` suffix. For the make/ninja build command line, I recommend `make -j<N> all druntime-test-runner phobos2-test-runner` in that case. Similar and further tweaks can be found in our CI scripts, e.g., https://github.com/ldc-developers/ldc/blob/master/.travis.yml#L104-L116. To get the CMake command line right, be sure to have a look at the script we use for the official release packages: https://github.com/ldc-developers/ldc-scripts/blob/master/ldc2-pack ging/2-build-ldc.sh (LDC_INSTALL_LTOPLUGIN etc.).
Nov 29
parent reply Thomas Mader <thomas.mader gmail.com> writes:
On Wednesday, 29 November 2017 at 11:02:43 UTC, kinke wrote:
 We use LLVM for archiving. Since you're using an older LLVM 
 (4.0.1; LDC 1.4 btw is 'old' too, current version is 1.6), that 
 may have been fixed in LLVM 5.0.
 You can also opt to use the Xcode archiver by including 
 `-DRT_ARCHIVE_WITH_LDC=OFF` in the CMake command line.
Thank you very much, -DRT_ARCHIVE_WITH_LDC=OFF was the missing argument to make it work on OSX. I wanted to switch to ldc 1.6.0 but got the following error. First I tried with llvm 4 but since you mentioned llvm 5 I tried it but without succes. I got the same error as with 4. CMake Error at runtime/jit-rt/DefineBuildJitRT.cmake:40 (include): include could not find load file: /nix/store/n0yi0jz38k67zmpn86zixyizhscb1c7d-llvm-5.0.0-lib/lib/cmake/llvm/LLVMConfig.cmake Call Stack (most recent call first): runtime/CMakeLists.txt:710 (build_jit_runtime) Maybe the llvm packages in Nixos have this file missing but since I don't know anything about llvm internals I can't tell. It seems strange though because I think a missing file should have been detected by other packages depending on LLVM. The build derivation for llvm 5 can be found under https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compi ers/llvm/5/llvm.nix though. Maybe there are some missing flags or something?
Nov 29
next sibling parent Thomas Mader <thomas.mader gmail.com> writes:
On Wednesday, 29 November 2017 at 21:21:44 UTC, Thomas Mader 
wrote:
 On Wednesday, 29 November 2017 at 11:02:43 UTC, kinke wrote:
 We use LLVM for archiving. Since you're using an older LLVM 
 (4.0.1; LDC 1.4 btw is 'old' too, current version is 1.6), 
 that may have been fixed in LLVM 5.0.
 You can also opt to use the Xcode archiver by including 
 `-DRT_ARCHIVE_WITH_LDC=OFF` in the CMake command line.
Thank you very much, -DRT_ARCHIVE_WITH_LDC=OFF was the missing argument to make it work on OSX. I wanted to switch to ldc 1.6.0 but got the following error. First I tried with llvm 4 but since you mentioned llvm 5 I tried it but without succes. I got the same error as with 4. CMake Error at runtime/jit-rt/DefineBuildJitRT.cmake:40 (include): include could not find load file: /nix/store/n0yi0jz38k67zmpn86zixyizhscb1c7d-llvm-5.0.0-lib/lib/cmake/llvm/LLVMConfig.cmake Call Stack (most recent call first): runtime/CMakeLists.txt:710 (build_jit_runtime) Maybe the llvm packages in Nixos have this file missing but since I don't know anything about llvm internals I can't tell. It seems strange though because I think a missing file should have been detected by other packages depending on LLVM. The build derivation for llvm 5 can be found under https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compi ers/llvm/5/llvm.nix though. Maybe there are some missing flags or something?
I tried to fix it by setting the env-var ${LLVM_LIBRARY_DIRS} but with no success. It seems cmake is setting that in the configure phase itself overwriting whatever I set before.
Nov 29
prev sibling parent reply kinke <noone nowhere.com> writes:
On Wednesday, 29 November 2017 at 21:21:44 UTC, Thomas Mader 
wrote:
 Maybe the llvm packages in Nixos have this file missing but 
 since I don't know anything about llvm internals I can't tell.
 It seems strange though because I think a missing file should 
 have been detected by other packages depending on LLVM.
 The build derivation for llvm 5 can be found under 
 https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compi
ers/llvm/5/llvm.nix though. Maybe there are some missing flags or something?
Looks like it's missing but should be there. My manual LLVM 5.0.0 build (no special flags) installs 26 files into lib/cmake/llvm, incl. `LLVMConfig.cmake`. The nix script you linked to touches at least one file in that directory: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/llvm/5/llvm.nix#L136
Nov 29
parent reply Thomas Mader <thomas.mader gmail.com> writes:
On Wednesday, 29 November 2017 at 22:25:24 UTC, kinke wrote:
 On Wednesday, 29 November 2017 at 21:21:44 UTC, Thomas Mader 
 wrote:
 Maybe the llvm packages in Nixos have this file missing but 
 since I don't know anything about llvm internals I can't tell.
 It seems strange though because I think a missing file should 
 have been detected by other packages depending on LLVM.
 The build derivation for llvm 5 can be found under 
 https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compi
ers/llvm/5/llvm.nix though. Maybe there are some missing flags or something?
Looks like it's missing but should be there. My manual LLVM 5.0.0 build (no special flags) installs 26 files into lib/cmake/llvm, incl. `LLVMConfig.cmake`. The nix script you linked to touches at least one file in that directory: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/llvm/5/llvm.nix#L136
It is in another directory. I might look into the llvm package to fix it but it's possible that it is intended this way. Fact is that there is a lib and a normal root dir for llvm. ldc finds the lib root dir but should find the normal one. It's normal for nix splitting stuff up that way but two lib dirs seem strange though.
Nov 30
parent Thomas Mader <thomas.mader gmail.com> writes:
On Thursday, 30 November 2017 at 08:19:56 UTC, Thomas Mader wrote:
 On Wednesday, 29 November 2017 at 22:25:24 UTC, kinke wrote:
 On Wednesday, 29 November 2017 at 21:21:44 UTC, Thomas Mader 
 wrote:
 Maybe the llvm packages in Nixos have this file missing but 
 since I don't know anything about llvm internals I can't tell.
 It seems strange though because I think a missing file should 
 have been detected by other packages depending on LLVM.
 The build derivation for llvm 5 can be found under 
 https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compi
ers/llvm/5/llvm.nix though. Maybe there are some missing flags or something?
Looks like it's missing but should be there. My manual LLVM 5.0.0 build (no special flags) installs 26 files into lib/cmake/llvm, incl. `LLVMConfig.cmake`. The nix script you linked to touches at least one file in that directory: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/llvm/5/llvm.nix#L136
It is in another directory. I might look into the llvm package to fix it but it's possible that it is intended this way. Fact is that there is a lib and a normal root dir for llvm. ldc finds the lib root dir but should find the normal one. It's normal for nix splitting stuff up that way but two lib dirs seem strange though.
llvm-config returns the wrong path with llvm-config --libdir on NixOS/Nix. I was able to fix/workaround it for now by disabling the setting of the LLVM_LIBRARY_DIRS var in the cmake config and setting it manually via cmake flag -DLLVM_LIBRARY_DIRS=<correct path to llvm lib dir>
Nov 30