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

/bin/sh: 1: rdmd: not found #2442

Closed
andre2007 opened this issue May 18, 2020 · 7 comments
Closed

/bin/sh: 1: rdmd: not found #2442

andre2007 opened this issue May 18, 2020 · 7 comments

Comments

@andre2007
Copy link
Contributor

I have a docker file based on ubuntu:focal and install these system packages: build-essential ldc dub.
While building a project based on vibe-d there is following error:

Running pre-generate commands for vibe-d:tls...
/bin/sh: 1: rdmd: not found

This is odd and I wonder what can be done to avoid this issue:

  • include rdmd in every linux distribution package of ldc
  • Replace usage of rdmd in vibe-d (replace it with dub?)

What do you think?

@Geod24
Copy link
Contributor

Geod24 commented May 18, 2020

It comes from :

preGenerateCommands `rdmd --eval='

I thought that LDC was distributing rdmd too, is it not the case ? I guess it depends on the packager.

In this specific case you can work around this by using an explicit configuration:

vibe.d/tls/dub.sdl

Lines 69 to 99 in ecbdc5d

configuration "openssl-1.1" {
platforms "posix" "windows"
dependency "openssl" version="~>1.0"
versions "VibeUseOpenSSL11"
sourceFiles "../lib/win-i386-mscoff/libssl.lib" "../lib/win-i386-mscoff/libcrypto.lib" platform="windows-x86"
sourceFiles "../lib/win-amd64/libssl.lib" "../lib/win-amd64/libcrypto.lib" platform="windows-x86_64"
}
configuration "openssl-1.1-optlink" {
platforms "windows-x86-dmd"
sourceFiles "../lib/win-i386/libssl.lib" "../lib/win-i386/libcrypto.lib" platform="windows-x86-dmd"
}
configuration "openssl-1.0" {
platforms "posix"
dependency "openssl" version="~>1.0"
versions "VibeUseOpenSSL10"
}
configuration "openssl-0.9" {
platforms "posix"
dependency "openssl" version="~>1.0"
versions "VibeUseOldOpenSSL"
}
configuration "botan" {
dependency "botan" version="~>1.12.0"
}
configuration "notls" {
}

@andre2007
Copy link
Contributor Author

Thanks.

I will contact the owners of the ldc package (ldmd2 is included but not rdmd) but maybe we should get independent of rdmd as much as possible.

With dub single file packages we should have a good alternative.

@Geod24
Copy link
Contributor

Geod24 commented May 18, 2020

Yes I think single-file recipe is the way to go (although there is probably a significant difference in startup time compared to rdmd).
We had a similar problem in my application, where we use a D script to build a C++ library. We ended up going with single-file D package to make it cross-platform.

@andre2007
Copy link
Contributor Author

@Geod24
Copy link
Contributor

Geod24 commented May 18, 2020

Just to clarify my comment: Not having rdmd can make sense for distributions. On Alpine, I packaged it as dtools-rdmd. But if you download the zip from Github (directly or through install.sh) you'll get it with LDC. I don't know if rdmd has the same default mechanism as dub (dub will default to whatever compiled it), I think it default to the compiler in its current directory, then a few other places, but you'd have to check if LDC's rdmd is special in any way.

@andre2007
Copy link
Contributor Author

#2443

@andre2007
Copy link
Contributor Author

Fixed.

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