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

DC=... can't find alternative D compilers #133

Closed
WebDrake opened this issue Oct 17, 2013 · 7 comments
Closed

DC=... can't find alternative D compilers #133

WebDrake opened this issue Oct 17, 2013 · 7 comments

Comments

@WebDrake
Copy link
Contributor

I'm trying to build dub from git-HEAD source on an Ubuntu 13.10 system that has all 3 D compilers installed. Just running build.sh works fine (DMD is auto-detected and the library compiles), but running it with the DC=... option fails:

$ ./build.sh DC=ldmd2
Generating version file...
Running dmd...
Error: cannot read file DC=ldmd2.d

$ ./build.sh DC=/opt/ldc/bin/ldmd2
Generating version file...
Running dmd...
Error: cannot read file DC=/opt/ldc/bin/ldmd2.d

$ ./build.sh DC=gdmd
Generating version file...
Running dmd...
Error: cannot read file DC=gdmd.d
@s-ludwig
Copy link
Member

You need to turn that around: DC=ldmd2 ./build.sh
It's not a command line option, but rather an environment variable. Have you seen anything documented about "DC" by any chance? This needs to be added to the README and on the code.dlang.org documentation.

@WebDrake
Copy link
Contributor Author

No, have seen nothing documented. I'm used to such things being defined after the command (e.g. ./configure CFLAGS=... etc.), so assumed this would work similarly.

Thanks for the quick response!

@WebDrake
Copy link
Contributor Author

Compiling using ldmd2 or gdmd falls over, however:

$ DC=ldmd2 ./build.sh 
Generating version file...
Running ldmd2...
bin/dub.o:(.rodata._D123TypeInfo_S3std8typecons86__T10RefCountedTS3std4file15DirIteratorImplVE3std8typecons24RefCountedAutoInitialize0Z10RefCounted6__initZ[_D123TypeInfo_S3std8typecons86__T10RefCountedTS3std4file15DirIteratorImplVE3std8typecons24RefCountedAutoInitialize0Z10RefCounted6__initZ]+0x60): undefined reference to `_D3std8typecons86__T10RefCountedTS3std4file15DirIteratorImplVE3std8typecons24RefCountedAutoInitialize0Z10RefCounted10__postblitMFZv'
collect2: error: ld returned 1 exit status
Error: /usr/bin/gcc failed with status: 1

$ DC=gdmd ./build.sh 
Generating version file...
Running gdmd...
/opt/gdc/include/d/4.8.2/x86_64-unknown-linux-gnu/core/time.di:224: error: this cannot be interpreted at compile time, because it has no available source code
/opt/gdc/include/d/4.8.2/std/net/curl.d:195: note: called from here: dur(2L)

@s-ludwig
Copy link
Member

Hm, both seem to be bugs of those compilers, although it's hard to judge for the LDC case. Can you file bug reports against those? Hopefully the maintainers will be willing to reduce the test case if required.

@mihails-strasuns
Copy link

gdc failure is issue on their side - they install only .di files for druntime by default.
http://forum.dlang.org/post/evgopfyvfbpcopwrnqll@forum.dlang.org

@WebDrake
Copy link
Contributor Author

The GDC devs are aware of the issue, it was flagged in a different context by another user.

@WebDrake
Copy link
Contributor Author

The LDC error is also a bug, now fixed: ldc-developers/ldc#454. So I think we can close this.

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

3 participants