On Tue, 08 Oct 2013 16:55:46 GMT, Sean Kelly wrote:
So I downloaded vibe.d, created a "hello world" project with a dub template, and compiled it. This was the result on my OSX box:
Building configuration "application", build type debug
Compiling...
Linking...
ld: library not found for -levent
collect2: ld returned 1 exit status
--- errorlevel 1
Error: Link command failed with exit code 1libevent2 isn't a dub package so this error makes sense, but I'm wondering how the situation could be handled better. Should there be some way for a project to enumerate external dependencies?
There have been ideas in that direction in #52 and #34 and also in some earlier discussions (need to search for those). However, there have been strong objections from package maintainers regarding the feasibility or hygiene of this approach in general.
I agree it's a very ambitious side project. However maybe there is some middle ground solution where at least a customized error message can be output in case of a missing library. In our case, external libraries of this kind ideally should only occur for Deimos(-like) modules, so it's not unrealistic that there will be good broad support for this solution, even if it requires manual work.
Crude syntax idea:
{
"libs": "event", "ssl",
"libNames": {
"event": "Libevent 2.0.x",
"ssl": "OpenSSL"
}
}
The automatically generated message could then look like "Libevent 2.0.x development files have not been found. Please install them using the system's package manager." - maybe with some platform specific additions: " Homebrew is recommended to manage packages on OS X - see http://brew.sh/");
Having said that, at some point I personally would really like to have a full solution, so that DUB (or a utility added on top) can also automatically generate system packages for various systems.