On Sun, 15 May 2016 22:39:30 GMT, Fennellstyle wrote:

Hi everyone,

This is my first time using dub. I kept getting build failures trying to build the stub application dub init creates.

[fennellstyle@localhost ~/dev/test]$ dub
Performing "debug" build using dmd for x86_64.
test ~master: building configuration "application"...
Error: module app is in file 'source/app.d' which cannot be read
import path[0] = source/
import path[1] = /usr/include/dmd/phobos
import path[2] = /usr/include/dmd/druntime/import
dmd failed with exit code 1.

Eventually, I figured "cannot be read" may mean some permissions issue. Running as root:

sudo dub

The build worked!

Does anyone know why I have to build as root? Has anyone encountered this before?



What does ls -l source/app.d print for you? I never have encountered that issue, but it might be an issue with the flags used for creating the files (which happens inside of the standard library). It would also make sense to compare with the just released version 1.0.0 of DUB, because that uses std.stdio instead of std.stream to create the files.