Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need much, much better instructions #356

Open
lewisl opened this issue Jan 4, 2022 · 3 comments
Open

Need much, much better instructions #356

lewisl opened this issue Jan 4, 2022 · 3 comments

Comments

@lewisl
Copy link

lewisl commented Jan 4, 2022

Installed D from mpkg on MacOS.

Downloaded zip of tour and expanded into a folder: ~/Dropbox/D Lang/english-master

cd to that folder and run the fetch command and the run command.

Fetch appeared to work as you can see from my dub list below. Then I ran dub run dlang-tour -- --lang-dir .

This failed spectacularly. Something is wrong with the directories. Am I supposed to replace --lang_dir with the location where D is installed? If so, got to tell me exactly...

But, looks like lots of deprecations in the tour runner.

Has it all just become obsolete?

Sorry for the long post. dub list and the result of executing the package are shown below.

Dub list

Packages present in the system and known to dub:
  openssl 1.1.6+1.0.1g: /Users/lewis/.dub/packages/openssl-1.1.6_1.0.1g/openssl/
  stdx-allocator 2.77.5: /Users/lewis/.dub/packages/stdx-allocator-2.77.5/stdx-allocator/
  vibe-d 0.9.2: /Users/lewis/.dub/packages/vibe-d-0.9.2/vibe-d/
  vibe-d:utils 0.9.2: /Users/lewis/.dub/packages/vibe-d-0.9.2/vibe-d/utils/
  vibe-d:data 0.9.2: /Users/lewis/.dub/packages/vibe-d-0.9.2/vibe-d/data/
  vibe-d:core 0.9.2: /Users/lewis/.dub/packages/vibe-d-0.9.2/vibe-d/core/
  vibe-d:stream 0.9.2: /Users/lewis/.dub/packages/vibe-d-0.9.2/vibe-d/stream/
  vibe-d:tls 0.9.2: /Users/lewis/.dub/packages/vibe-d-0.9.2/vibe-d/tls/
  vibe-d:crypto 0.9.2: /Users/lewis/.dub/packages/vibe-d-0.9.2/vibe-d/crypto/
  vibe-d:textfilter 0.9.2: /Users/lewis/.dub/packages/vibe-d-0.9.2/vibe-d/textfilter/
  vibe-d:inet 0.9.2: /Users/lewis/.dub/packages/vibe-d-0.9.2/vibe-d/inet/
  vibe-d:mail 0.9.2: /Users/lewis/.dub/packages/vibe-d-0.9.2/vibe-d/mail/
  vibe-d:http 0.9.2: /Users/lewis/.dub/packages/vibe-d-0.9.2/vibe-d/http/
  vibe-d:mongodb 0.9.2: /Users/lewis/.dub/packages/vibe-d-0.9.2/vibe-d/mongodb/
  vibe-d:redis 0.9.2: /Users/lewis/.dub/packages/vibe-d-0.9.2/vibe-d/redis/
  vibe-d:web 0.9.2: /Users/lewis/.dub/packages/vibe-d-0.9.2/vibe-d/web/
  mustache-d 0.1.4: /Users/lewis/.dub/packages/mustache-d-0.1.4/mustache-d/
  dlang-tour 1.2.3: /Users/lewis/.dub/packages/dlang-tour-1.2.3/dlang-tour/
  diet-ng 1.7.4: /Users/lewis/.dub/packages/diet-ng-1.7.4/diet-ng/
  botan 1.12.18: /Users/lewis/.dub/packages/botan-1.12.18/botan/
  vibe-core 1.10.1: /Users/lewis/.dub/packages/vibe-core-1.10.1/vibe-core/
  dfmt 0.13.1: /Users/lewis/.dub/packages/dfmt-0.13.1/dfmt/
  mir-linux-kernel 1.0.1: /Users/lewis/.dub/packages/mir-linux-kernel-1.0.1/mir-linux-kernel/
  botan-math 1.0.3: /Users/lewis/.dub/packages/botan-math-1.0.3/botan-math/
  taggedalgebraic 0.11.17: /Users/lewis/.dub/packages/taggedalgebraic-0.11.17/taggedalgebraic/
  libdparse 0.15.4: /Users/lewis/.dub/packages/libdparse-0.15.4/libdparse/
  tinyendian 0.2.0: /Users/lewis/.dub/packages/tinyendian-0.2.0/tinyendian/
  dyaml 0.8.2: /Users/lewis/.dub/packages/dyaml-0.8.2/dyaml/
  dyaml:constructor 0.8.2: /Users/lewis/.dub/packages/dyaml-0.8.2/dyaml/examples/constructor/
  dyaml:getting-started 0.8.2: /Users/lewis/.dub/packages/dyaml-0.8.2/dyaml/examples/getting_started/
  dyaml:representer 0.8.2: /Users/lewis/.dub/packages/dyaml-0.8.2/dyaml/examples/representer/
  dyaml:resolver 0.8.2: /Users/lewis/.dub/packages/dyaml-0.8.2/dyaml/examples/resolver/
  dyaml:tojson 0.8.2: /Users/lewis/.dub/packages/dyaml-0.8.2/dyaml/examples/tojson/
  dyaml:benchmark 0.8.2: /Users/lewis/.dub/packages/dyaml-0.8.2/dyaml/examples/yaml_bench/
  dyaml:yaml_gen 0.8.2: /Users/lewis/.dub/packages/dyaml-0.8.2/dyaml/examples/yaml_gen/
  dyaml:yaml_stats 0.8.2: /Users/lewis/.dub/packages/dyaml-0.8.2/dyaml/examples/yaml_stats/
  dyaml:testsuite 0.8.2: /Users/lewis/.dub/packages/dyaml-0.8.2/dyaml/testsuite/
  memutils 1.0.4: /Users/lewis/.dub/packages/memutils-1.0.4/memutils/
  eventcore 0.9.9: /Users/lewis/.dub/packages/eventcore-0.9.9/eventcore/
  libasync 0.8.6: /Users/lewis/.dub/packages/libasync-0.8.6/libasync/

Attempt to run the dlang-tour

➜  english-master dub run dlang-tour -- --lang-dir .
Building package dlang-tour in /Users/lewis/.dub/packages/dlang-tour-1.2.3/dlang-tour/
Running pre-generate commands for dfmt...
Running pre-generate commands for vibe-d:tls...
Performing "debug" build using /Library/D/dmd/bin/dmd for x86_64.
stdx-allocator 2.77.5: target for configuration "library" is up to date.
libdparse 0.15.4: target for configuration "library" is up to date.
dfmt 0.13.1: target for configuration "library" is up to date.
tinyendian 0.2.0: target for configuration "library" is up to date.
dyaml 0.8.2: target for configuration "library" is up to date.
mustache-d 0.1.4: target for configuration "library" is up to date.
diet-ng 1.7.4: target for configuration "library" is up to date.
mir-linux-kernel 1.0.1: target for configuration "library" is up to date.
taggedalgebraic 0.11.17: target for configuration "library" is up to date.
eventcore 0.9.9: target for configuration "cfrunloop" is up to date.
vibe-core 1.10.1: target for configuration "cfrunloop" is up to date.
vibe-d:utils 0.9.2: target for configuration "library" is up to date.
vibe-d:data 0.9.2: target for configuration "library" is up to date.
vibe-d:crypto 0.9.2: target for configuration "library" is up to date.
vibe-d:stream 0.9.2: target for configuration "library" is up to date.
vibe-d:textfilter 0.9.2: target for configuration "library" is up to date.
vibe-d:inet 0.9.2: target for configuration "library" is up to date.
vibe-d:tls 0.9.2: building configuration "openssl"...
../../../.dub/packages/vibe-core-1.10.1/vibe-core/source/vibe/core/taskpool.d(30,49): Deprecation: module vibe.core.sync is not accessible here, perhaps add 'static import vibe.core.sync;'
vibe-d:http 0.9.2: building configuration "library"...
../../../.dub/packages/vibe-core-1.10.1/vibe-core/source/vibe/core/taskpool.d(30,49): Deprecation: module vibe.core.sync is not accessible here, perhaps add 'static import vibe.core.sync;'
/Library/D/dmd/src/druntime/import/core/lifetime.d(122,38): Deprecation: constructor `vibe.stream.wrapper.ProxyStream.this` is deprecated - Use createProxyStream instead.
/Library/D/dmd/src/druntime/import/core/lifetime.d(211,21):        instantiated from here: `emplace!(ProxyStream)`
../../../.dub/packages/vibe-core-1.10.1/vibe-core/source/vibe/internal/interfaceproxy.d(158,17):        instantiated from here: `emplace!(ProxyStream)`
../../../.dub/packages/vibe-d-0.9.2/vibe-d/http/vibe/http/server.d(491,10):        instantiated from here: `opAssign!(ProxyStream)`
/Library/D/dmd/src/druntime/import/core/lifetime.d(126,21): Deprecation: constructor `vibe.stream.wrapper.ProxyStream.this` is deprecated - Use createProxyStream instead.
/Library/D/dmd/src/druntime/import/core/lifetime.d(211,21):        instantiated from here: `emplace!(ProxyStream)`
../../../.dub/packages/vibe-core-1.10.1/vibe-core/source/vibe/internal/interfaceproxy.d(158,17):        instantiated from here: `emplace!(ProxyStream)`
../../../.dub/packages/vibe-d-0.9.2/vibe-d/http/vibe/http/server.d(491,10):        instantiated from here: `opAssign!(ProxyStream)`
/Library/D/dmd/src/phobos/std/range/primitives.d(175,38): Deprecation: `alias byKeyValue this` is deprecated - Iterate over .byKeyValue instead.
/Library/D/dmd/src/phobos/std/format/internal/write.d(2839,14):        instantiated from here: `isInputRange!(DictionaryList!(string, true, 16LU, false))`
/Library/D/dmd/src/phobos/std/format/internal/write.d(2520,5):        instantiated from here: `enforceValidFormatSpec!(DictionaryList!(string, true, 16LU, false), char)`
/Library/D/dmd/src/phobos/std/format/write.d(1239,20):        instantiated from here: `formatValueImpl!(Appender!string, DictionaryList!(string, true, 16LU, false), char)`
/Library/D/dmd/src/phobos/std/typecons.d(2936,24):        ... (1 instantiations, -v to show) ...
/Library/D/dmd/src/phobos/std/typecons.d(2914,17):        instantiated from here: `toString!(Appender!string)`
../../../.dub/packages/vibe-d-0.9.2/vibe-d/http/vibe/http/server.d(949,3):        instantiated from here: `Nullable!(DictionaryList!(string, true, 16LU, false))`
/Library/D/dmd/src/phobos/std/range/primitives.d(177,27): Deprecation: `alias byKeyValue this` is deprecated - Iterate over .byKeyValue instead.
/Library/D/dmd/src/phobos/std/format/internal/write.d(2839,14):        instantiated from here: `isInputRange!(DictionaryList!(string, true, 16LU, false))`
/Library/D/dmd/src/phobos/std/format/internal/write.d(2520,5):        instantiated from here: `enforceValidFormatSpec!(DictionaryList!(string, true, 16LU, false), char)`
/Library/D/dmd/src/phobos/std/format/write.d(1239,20):        instantiated from here: `formatValueImpl!(Appender!string, DictionaryList!(string, true, 16LU, false), char)`
/Library/D/dmd/src/phobos/std/typecons.d(2936,24):        ... (1 instantiations, -v to show) ...
/Library/D/dmd/src/phobos/std/typecons.d(2914,17):        instantiated from here: `toString!(Appender!string)`
../../../.dub/packages/vibe-d-0.9.2/vibe-d/http/vibe/http/server.d(949,3):        instantiated from here: `Nullable!(DictionaryList!(string, true, 16LU, false))`
/Library/D/dmd/src/phobos/std/range/primitives.d(175,38): Deprecation: `alias byKeyValue this` is deprecated - Iterate over .byKeyValue instead.
/Library/D/dmd/src/phobos/std/format/internal/write.d(2839,14):        instantiated from here: `isInputRange!(const(DictionaryList!(string, true, 16LU, false)))`
/Library/D/dmd/src/phobos/std/format/internal/write.d(2520,5):        instantiated from here: `enforceValidFormatSpec!(const(DictionaryList!(string, true, 16LU, false)), char)`
/Library/D/dmd/src/phobos/std/format/write.d(1239,20):        instantiated from here: `formatValueImpl!(Appender!string, const(DictionaryList!(string, true, 16LU, false)), char)`
/Library/D/dmd/src/phobos/std/typecons.d(2947,24):        ... (1 instantiations, -v to show) ...
/Library/D/dmd/src/phobos/std/typecons.d(2924,17):        instantiated from here: `toString!(Appender!string)`
../../../.dub/packages/vibe-d-0.9.2/vibe-d/http/vibe/http/server.d(949,3):        instantiated from here: `Nullable!(DictionaryList!(string, true, 16LU, false))`
/Library/D/dmd/src/phobos/std/range/primitives.d(177,27): Deprecation: `alias byKeyValue this` is deprecated - Iterate over .byKeyValue instead.
/Library/D/dmd/src/phobos/std/format/internal/write.d(2839,14):        instantiated from here: `isInputRange!(const(DictionaryList!(string, true, 16LU, false)))`
/Library/D/dmd/src/phobos/std/format/internal/write.d(2520,5):        instantiated from here: `enforceValidFormatSpec!(const(DictionaryList!(string, true, 16LU, false)), char)`
/Library/D/dmd/src/phobos/std/format/write.d(1239,20):        instantiated from here: `formatValueImpl!(Appender!string, const(DictionaryList!(string, true, 16LU, false)), char)`
/Library/D/dmd/src/phobos/std/typecons.d(2947,24):        ... (1 instantiations, -v to show) ...
/Library/D/dmd/src/phobos/std/typecons.d(2924,17):        instantiated from here: `toString!(Appender!string)`
../../../.dub/packages/vibe-d-0.9.2/vibe-d/http/vibe/http/server.d(949,3):        instantiated from here: `Nullable!(DictionaryList!(string, true, 16LU, false))`
vibe-d:web 0.9.2: building configuration "library"...
../../../.dub/packages/vibe-core-1.10.1/vibe-core/source/vibe/core/taskpool.d(30,49): Deprecation: module vibe.core.sync is not accessible here, perhaps add 'static import vibe.core.sync;'
dlang-tour 1.2.3: building configuration "executable"...
../../../.dub/packages/vibe-core-1.10.1/vibe-core/source/vibe/core/taskpool.d(30,49): Deprecation: module vibe.core.sync is not accessible here, perhaps add 'static import vibe.core.sync;'
../../../.dub/packages/dlang-tour-1.2.3/dlang-tour/source/contentprovider.d(430,15): Deprecation: copying `&content` into allocated memory escapes a reference to parameter variable `content`
Compiling Diet HTML template error.dt...
Non-@safe methods are deprecated in REST interfaces - Mark ApiV1.run as @safe.
Non-@safe methods are deprecated in REST interfaces - Mark ApiV1.format as @safe.
Non-@safe methods are deprecated in REST interfaces - Mark ApiV1.shorten as @safe.
Non-@safe methods are deprecated in REST interfaces - Mark ApiV1.gist as @safe.
Non-@safe methods are deprecated in REST interfaces - Mark ApiV1.getSource as @safe.
Compiling Diet HTML template tour.dt...
Compiling Diet HTML template editor.dt...
Linking...
ld: warning: directory not found for option '-L/usr/local/opt/[email protected]/lib'
ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: linker exited with status 1
uncaught exception
object.Exception@source/dub/compilers/compiler.d(116): /Library/D/dmd/bin/dmd failed with exit code 1.
----------------
??:? pure @safe bool std.exception.enforce!().enforce!(bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) [0x1048d1b1a]
??:? void dub.compilers.compiler.Compiler.invokeTool(immutable(char)[][], void delegate(int, immutable(char)[]), immutable(char)[][immutable(char)[]]) [0x1046ef1fa]
??:? void dub.compilers.dmd.DMDCompiler.invokeLinker(in dub.compilers.buildsettings.BuildSettings, in dub.platform.BuildPlatform, immutable(char)[][], void delegate(int, immutable(char)[])) [0x1046f8734]
??:? void dub.generators.build.BuildGenerator.buildWithCompiler(dub.generators.generator.GeneratorSettings, dub.compilers.buildsettings.BuildSettings) [0x1046e328a]
??:? bool dub.generators.build.BuildGenerator.performCachedBuild(dub.generators.generator.GeneratorSettings, dub.compilers.buildsettings.BuildSettings, in dub.package_.Package, immutable(char)[], immutable(char)[], in dub.package_.Package[], in dub.internal.vibecompat.inet.path.NativePath[], out dub.internal.vibecompat.inet.path.NativePath) [0x1046e17f0]
[1]    69325 abort      dub run dlang-tour -- --lang-dir .
@PetarKirov
Copy link
Member

Thanks for sharing your experience. I'm not sure if any macOS user has tried to run the tour locally, until now. Nevertheless, I think it's import for everyone to have a smooth user experience!
The problem is that your system's native compiler (clang), which is used for linking, can't find the openssl libraries on your machine.

The error message is on the bottom of the logs:

Linking...
ld: warning: directory not found for option '-L/usr/local/opt/[email protected]/lib'
ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: linker exited with status 1
uncaught exception
object.Exception@source/dub/compilers/compiler.d(116): /Library/D/dmd/bin/dmd failed with exit code 1.

I think no one on the team that developed the project is a Mac user, so perhaps you are in a good position to help us with the docs, as you have probably better knowledge of the typical workflow of installing packages on macOS.

@PetarKirov
Copy link
Member

The core project's page lists the system dependencies for a Debian/Ubuntu like system: https://github.com/dlang-tour/core#compile--run

The main deps necessary for the tour itself (which is written in vibe.d) are libssl-dev and libevent-dev. The examples themselves require a few things more, as listed on the link above. But for now, @lewisl can you try installing these to libraries and share if that fixes the problem for you?

@lewisl
Copy link
Author

lewisl commented Jan 6, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants