DC environment variable is not recognised
tastyminerals opened this issue ยท 8 comments
Optionally set the environment variable DC if you wish to use another compiler than the DMD known by the system.
I have my shell env var set to
$ echo $DC
/usr/local/bin/ldc
but make
still attempts to use dmd
.
mkdir -p bin
dmd common/src/dcd/common/dcd_version.d common/src/dcd/common/constants.d common/src/dcd/common/socket.d common/src/dcd/common/messages.d common/src/dcd/common/constants2.d src/dcd/server/autocomplete/package.d src/dcd/server/autocomplete/util.d src/dcd/server/autocomplete/localuse.d src/dcd/server/autocomplete/complete.d src/dcd/server/autocomplete/symbols.d src/dcd/server/autocomplete/doc.d src/dcd/server/server.d src/dcd/server/main.d dsymbol/src/dsymbol/import_.d dsymbol/src/dsymbol/modulecache.d dsymbol/src/dsymbol/string_interning.d dsymbol/src/dsymbol/cache_entry.d dsymbol/src/dsymbol/deferred.d dsymbol/src/dsymbol/tests.d dsymbol/src/dsymbol/symbol.d dsymbol/src/dsymbol/conversion/package.d dsymbol/src/dsymbol/conversion/second.d dsymbol/src/dsymbol/conversion/first.d dsymbol/src/dsymbol/semantic.d dsymbol/src/dsymbol/type_lookup.d dsymbol/src/dsymbol/scope_.d dsymbol/src/dsymbol/builtin/names.d dsymbol/src/dsymbol/builtin/symbols.d stdx-allocator/source/stdx/allocator/common.d stdx-allocator/source/stdx/allocator/package.d stdx-allocator/source/stdx/allocator/building_blocks/free_list.d stdx-allocator/source/stdx/allocator/building_blocks/bucketizer.d stdx-allocator/source/stdx/allocator/building_blocks/package.d stdx-allocator/source/stdx/allocator/building_blocks/quantizer.d stdx-allocator/source/stdx/allocator/building_blocks/region.d stdx-allocator/source/stdx/allocator/building_blocks/segregator.d stdx-allocator/source/stdx/allocator/building_blocks/affix_allocator.d stdx-allocator/source/stdx/allocator/building_blocks/scoped_allocator.d stdx-allocator/source/stdx/allocator/building_blocks/kernighan_ritchie.d stdx-allocator/source/stdx/allocator/building_blocks/null_allocator.d stdx-allocator/source/stdx/allocator/building_blocks/fallback_allocator.d stdx-allocator/source/stdx/allocator/building_blocks/allocator_list.d stdx-allocator/source/stdx/allocator/building_blocks/bitmapped_block.d stdx-allocator/source/stdx/allocator/building_blocks/free_tree.d stdx-allocator/source/stdx/allocator/building_blocks/stats_collector.d stdx-allocator/source/stdx/allocator/typed.d stdx-allocator/source/stdx/allocator/gc_allocator.d stdx-allocator/source/stdx/allocator/showcase.d stdx-allocator/source/stdx/allocator/internal.d stdx-allocator/source/stdx/allocator/mmap_allocator.d stdx-allocator/source/stdx/allocator/mallocator.d libdparse/src/dparse/rollback_allocator.d libdparse/src/dparse/ast.d libdparse/src/dparse/entities.d libdparse/src/dparse/strings.d libdparse/src/dparse/stack_buffer.d libdparse/src/dparse/lexer.d libdparse/src/dparse/formatter.d libdparse/src/dparse/parser.d libdparse/src/dparse/trivia.d libdparse/src/std/experimental/lexer.d containers/src/containers/package.d containers/src/containers/slist.d containers/src/containers/hashset.d containers/src/containers/unrolledlist.d containers/src/containers/internal/backwards.d containers/src/containers/internal/hash.d containers/src/containers/internal/element_type.d containers/src/containers/internal/storage_type.d containers/src/containers/internal/mixins.d containers/src/containers/internal/node.d containers/src/containers/dynamicarray.d containers/src/containers/ttree.d containers/src/containers/simdset.d containers/src/containers/immutablehashset.d containers/src/containers/treemap.d containers/src/containers/openhashset.d containers/src/containers/cyclicbuffer.d containers/src/containers/hashmap.d msgpack-d/src//msgpack/common.d msgpack-d/src//msgpack/buffer.d msgpack-d/src//msgpack/package.d msgpack-d/src//msgpack/register.d msgpack-d/src//msgpack/attribute.d msgpack-d/src//msgpack/exception.d msgpack-d/src//msgpack/unpacker.d msgpack-d/src//msgpack/streaming_unpacker.d msgpack-d/src//msgpack/packer.d msgpack-d/src//msgpack/value.d -Icontainers/src -Imsgpack-d/src -Ilibdparse/src -Idsymbol/src -Istdx-allocator/source -Jbin -wi -O -release -inline -ofbin/dcd-server
make: dmd: No such file or directory
make: *** [dmdserver] Error 1
no mention of
I managed to get it working by modifying the makefile though.
I managed to get it working by modifying the makefile though.
What modifications did you perform inside the makefile? I'm having this same problem and I can't find any workaround
Actually just minor changes:
[I] pavels@Pavels-MacBook-Pro ~/D/g/DCD (master)> git diff (base)
diff --git a/makefile b/makefile
index 0adeb83..b8e1af9 100644
--- a/makefile
+++ b/makefile
@@ -1,6 +1,6 @@
.PHONY: all
-all: dmd
+all: ldc
dmd: dmdserver dmdclient
debug: dmdclient debugserver
gdc: gdcserver gdcclient
@@ -8,13 +8,13 @@ ldc: ldcserver ldcclient
DMD := dmd
GDC := gdc
-LDC := ldc2
+LDC := ldc
DPARSE_DIR := libdparse
DSYMBOL_DIR := dsymbol
STDXALLOC_DIR := stdx-allocator
-SHELL:=/bin/bash
+SHELL:=/opt/homebrew/bin/fish
githash:
@mkdir -p bin
ldc
is aliased to /usr/local/bin/ldc
which is a symbolic link to an actual ldc2
binary.
Well it did the trick for me as well, thank you!
I am following README and got the same issue.
user@debian:~/DCD$ DC=gdc make
git describe --tags > bin/githash.txt
mkdir -p bin
dmd common/src/dcd/common/socket.d common/src/dcd/common/messages.d common/src/dcd/common/dcd_version.d common/src/dcd/common/constants2.d common/src/dcd/common/constants.d src/dcd/server/server.d src/dcd/server/main.d src/dcd/server/autocomplete/util.d src/dcd/server/autocomplete/symbols.d src/dcd/server/autocomplete/package.d src/dcd/server/autocomplete/localuse.d src/dcd/server/autocomplete/doc.d src/dcd/server/autocomplete/complete.d dsymbol/src/dsymbol/utils.d dsymbol/src/dsymbol/ufcs.d dsymbol/src/dsymbol/type_lookup.d dsymbol/src/dsymbol/tests.d dsymbol/src/dsymbol/symbol.d dsymbol/src/dsymbol/string_interning.d dsymbol/src/dsymbol/semantic.d dsymbol/src/dsymbol/scope_.d dsymbol/src/dsymbol/modulecache.d dsymbol/src/dsymbol/import_.d dsymbol/src/dsymbol/deferred.d dsymbol/src/dsymbol/conversion/third.d dsymbol/src/dsymbol/conversion/second.d dsymbol/src/dsymbol/conversion/package.d dsymbol/src/dsymbol/conversion/first.d dsymbol/src/dsymbol/cache_entry.d dsymbol/src/dsymbol/builtin/symbols.d dsymbol/src/dsymbol/builtin/names.d libdparse/src/std/experimental/lexer.d libdparse/src/dparse/trivia.d libdparse/src/dparse/strings.d libdparse/src/dparse/stack_buffer.d libdparse/src/dparse/rollback_allocator.d libdparse/src/dparse/parser.d libdparse/src/dparse/lexer.d libdparse/src/dparse/formatter.d libdparse/src/dparse/entities.d libdparse/src/dparse/astprinter.d libdparse/src/dparse/ast.d containers/src/containers/unrolledlist.d containers/src/containers/ttree.d containers/src/containers/treemap.d containers/src/containers/slist.d containers/src/containers/simdset.d containers/src/containers/package.d containers/src/containers/openhashset.d containers/src/containers/internal/storage_type.d containers/src/containers/internal/node.d containers/src/containers/internal/mixins.d containers/src/containers/internal/hash.d containers/src/containers/internal/element_type.d containers/src/containers/internal/backwards.d containers/src/containers/immutablehashset.d containers/src/containers/hashset.d containers/src/containers/hashmap.d containers/src/containers/dynamicarray.d containers/src/containers/cyclicbuffer.d msgpack-d/src/msgpack/value.d msgpack-d/src/msgpack/unpacker.d msgpack-d/src/msgpack/streaming_unpacker.d msgpack-d/src/msgpack/register.d msgpack-d/src/msgpack/packer.d msgpack-d/src/msgpack/package.d msgpack-d/src/msgpack/exception.d msgpack-d/src/msgpack/common.d msgpack-d/src/msgpack/buffer.d msgpack-d/src/msgpack/attribute.d -Icontainers/src -Imsgpack-d/src -Ilibdparse/src -Idsymbol/src -Jbin -wi -O -release -inline -ofbin/dcd-server
/bin/bash: line 1: dmd: command not found
make: *** [makefile:119: dmdserver] Error 127
user@debian:~/DCD$ DC=ldc2 make
git describe --tags > bin/githash.txt
mkdir -p bin
dmd common/src/dcd/common/socket.d common/src/dcd/common/messages.d common/src/dcd/common/dcd_version.d common/src/dcd/common/constants2.d common/src/dcd/common/constants.d src/dcd/server/server.d src/dcd/server/main.d src/dcd/server/autocomplete/util.d src/dcd/server/autocomplete/symbols.d src/dcd/server/autocomplete/package.d src/dcd/server/autocomplete/localuse.d src/dcd/server/autocomplete/doc.d src/dcd/server/autocomplete/complete.d dsymbol/src/dsymbol/utils.d dsymbol/src/dsymbol/ufcs.d dsymbol/src/dsymbol/type_lookup.d dsymbol/src/dsymbol/tests.d dsymbol/src/dsymbol/symbol.d dsymbol/src/dsymbol/string_interning.d dsymbol/src/dsymbol/semantic.d dsymbol/src/dsymbol/scope_.d dsymbol/src/dsymbol/modulecache.d dsymbol/src/dsymbol/import_.d dsymbol/src/dsymbol/deferred.d dsymbol/src/dsymbol/conversion/third.d dsymbol/src/dsymbol/conversion/second.d dsymbol/src/dsymbol/conversion/package.d dsymbol/src/dsymbol/conversion/first.d dsymbol/src/dsymbol/cache_entry.d dsymbol/src/dsymbol/builtin/symbols.d dsymbol/src/dsymbol/builtin/names.d libdparse/src/std/experimental/lexer.d libdparse/src/dparse/trivia.d libdparse/src/dparse/strings.d libdparse/src/dparse/stack_buffer.d libdparse/src/dparse/rollback_allocator.d libdparse/src/dparse/parser.d libdparse/src/dparse/lexer.d libdparse/src/dparse/formatter.d libdparse/src/dparse/entities.d libdparse/src/dparse/astprinter.d libdparse/src/dparse/ast.d containers/src/containers/unrolledlist.d containers/src/containers/ttree.d containers/src/containers/treemap.d containers/src/containers/slist.d containers/src/containers/simdset.d containers/src/containers/package.d containers/src/containers/openhashset.d containers/src/containers/internal/storage_type.d containers/src/containers/internal/node.d containers/src/containers/internal/mixins.d containers/src/containers/internal/hash.d containers/src/containers/internal/element_type.d containers/src/containers/internal/backwards.d containers/src/containers/immutablehashset.d containers/src/containers/hashset.d containers/src/containers/hashmap.d containers/src/containers/dynamicarray.d containers/src/containers/cyclicbuffer.d msgpack-d/src/msgpack/value.d msgpack-d/src/msgpack/unpacker.d msgpack-d/src/msgpack/streaming_unpacker.d msgpack-d/src/msgpack/register.d msgpack-d/src/msgpack/packer.d msgpack-d/src/msgpack/package.d msgpack-d/src/msgpack/exception.d msgpack-d/src/msgpack/common.d msgpack-d/src/msgpack/buffer.d msgpack-d/src/msgpack/attribute.d -Icontainers/src -Imsgpack-d/src -Ilibdparse/src -Idsymbol/src -Jbin -wi -O -release -inline -ofbin/dcd-server
/bin/bash: line 1: dmd: command not found
make: *** [makefile:119: dmdserver] Error 127
user@debian:~/DCD$
dub
does not work either
user@debian:~/DCD$ env | grep ^DC
user@debian:~/DCD$ dub build
Fetching msgpack-d 1.0.4 (getting selected version)...
Fetching libdparse 0.23.0 (getting selected version)...
Fetching emsi_containers 0.9.0 (getting selected version)...
Warning: License in subpackage dcd:dsymbol is different than it's parent package, this is discouraged.
Invalid variable: DC
user@debian:~/DCD$ dub --version
DUB version 1.27.0-3, built on Aug 13 2022
try updating DUB, there was an issue in there a few versions ago that fixed this