b1naryth1ef / dscord

Discord Library for D
http://b1naryth1ef.github.io/dscord/
zlib License
51 stars 15 forks source link

Building dscord dub, dirSeparator not found #27

Closed lukewilson2002 closed 5 years ago

lukewilson2002 commented 7 years ago

......\AppData\Roaming\dub\packages\dscord-0.0.9\dscord\src\dscord\util\storage.d(6,8): Error: module std.file import 'dirSeparator' not found image

exact commands in the order they were typed: dub fetch dscord dub build dscord

I am new to the D language, and only just found Dub after finding your project. My only education of Dub comes from their in-line help. Thanks for any help guys, hope this is helpful.

b1naryth1ef commented 7 years ago

Can you grab the DMD version by running dmd --version?

lukewilson2002 commented 7 years ago

@b1naryth1ef sure man: image

lukewilson2002 commented 7 years ago

oops lol

b1naryth1ef commented 7 years ago

Try building off the master version of this repo, you can do this by adjusting the version in the dub.json file to:

"dscord": "~master"

I have yet to cut a release with the latest changes, but I'll work on doing that soon.

lukewilson2002 commented 7 years ago

@b1naryth1ef sorry for really long response delay. After changing the file dub.json to use master, as you proposed, I still get the following error.

D:\Projects\atomic>dub run

## Warning for package libasync, configuration 32mscoff ##

The following compiler flags have been specified in the package description
file. They are handled by DUB and direct use in packages is discouraged.
Alternatively, you can set the DFLAGS environment variable to pass custom flags
to the compiler, or use one of the suggestions below:

-m32mscoff: Use --arch=x86/--arch=x86_64/--arch=x86_mscoff to specify the target architecture

## Warning for package libasync, configuration 32mscoff ##

The following compiler flags have been specified in the package description
file. They are handled by DUB and direct use in packages is discouraged.
Alternatively, you can set the DFLAGS environment variable to pass custom flags
to the compiler, or use one of the suggestions below:

-m32mscoff: Use --arch=x86/--arch=x86_64/--arch=x86_mscoff to specify the target architecture

WARNING: A deprecated branch based version specification is used for the dependency dscord. Please use numbered versions instead. Also note that you can still use the dub.selections.json file to override a certain dependency to use a branch instead.
Selected package dscord 0.0.9 does not match the dependency specification ~master in package atomic. Need to "dub upgrade"?
Performing "debug" build using dmd for x86.
opus 0.0.2: target for configuration "library" is up to date.
dcad 0.0.9: target for configuration "library" is up to date.
shaker 0.0.8: target for configuration "" is up to date.
vibe-d:utils 0.7.30: target for configuration "library" is up to date.
vibe-d:data 0.7.30: target for configuration "library" is up to date.
vibe-d:core 0.7.30: target for configuration "libevent" is up to date.
diet-ng 1.2.0: target for configuration "library" is up to date.
vibe-d:http 0.7.30: target for configuration "library" is up to date.
vibe-d:diet 0.7.30: target for configuration "library" is up to date.
vibe-d:mail 0.7.30: target for configuration "library" is up to date.
vibe-d:mongodb 0.7.30: target for configuration "library" is up to date.
vibe-d:redis 0.7.30: target for configuration "library" is up to date.
vibe-d:web 0.7.30: target for configuration "library" is up to date.
vibe-d 0.7.30: target for configuration "libevent" is up to date.
dscord 0.0.9: building configuration ""...
C:\Users\Stephanie\AppData\Roaming\dub\packages\vibe-d-0.7.30\vibe-d\source\vibe\http\server.d(282,33): Deprecation: alias diet.traits.FilterCallback is deprecated - Use SafeFilterCallback instead.
C:\Users\Stephanie\AppData\Roaming\dub\packages\dscord-0.0.9\dscord\src\dscord\util\storage.d(6,8): Error: module std.file import 'dirSeparator' not found
dmd failed with exit code 1.

Note: this is as bare-bones as any project could be, and your library is it's only dependency.

MeaninglessCode commented 7 years ago

I have this same issue when building dscord.

.dub/packages/dscord-0.0.9/dscord/src/dscord/util/storage.d(6,8): Error: module std.file import 'dirSeparator' not found
b1naryth1ef commented 7 years ago

I just pushed v0.010 which should have the correct import path, please dub upgrade and try building off that.

MeaninglessCode commented 7 years ago

Not sure if this is an issue on my part, but now I get this.

Performing "debug" build using dmd for x86_64.
dscord 0.0.10: building configuration "dscord-linux-static-x64"...
Error: Error reading file '../../usr/lib/x86_64-linux-gnu/libsodium.a'
dmd failed with exit code 1.

I have the libsodium libraries installed.

ldconfig -p | grep libsodium
libsodium.so.18 (libc6,x86-64) => /usr/lib/libsodium.so.18
libsodium.so (libc6,x86-64) => /usr/lib/libsodium.so
MeaninglessCode commented 7 years ago

Built correctly on Windows. I'm probably just doing something wrong on Linux.

b1naryth1ef commented 5 years ago

Closing this because its stale, but just for those who may stumble upon it in the future:

Versions of dscord prior to v1.0.0 had a builtin implementation of voice which required libsodium (provided via another lib of mine shaker). Ignoring the reasons why building shaker can be filled with pain, I decided to rip this out in v1 to reduce the maintenance footprint and potentially make space for including support around something like telecom.

All that to say this should no longer be an issue.