aBothe / Mono-D

D Add-In for MonoDevelop
http://wiki.dlang.org/Mono-D
Other
113 stars 26 forks source link

dub project fails to build in OSX #517

Closed extrawurst closed 10 years ago

extrawurst commented 10 years ago

a simple dub project using vibe.d (adding libevent dependency) that builds perfectly fine using "dub build" on the shell fails to build in mono-d:

[...]
Compiling...
Linking...
ld: library not found for -levent
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--- errorlevel 1
FAIL .dub/build/application-debug-posix.osx-x86_64-dmd-F9DDB1DF54A2C27A9DBD2E393EAE0491 s4client executable
Error executing command build: Link command failed with exit code 1

Exit code 2
Build complete -- 1 error, 0 warnings
Orvid commented 10 years ago

I think this is actually probably a DMD configuration error rather than an issue with Mono-D, does DMD's configuration include the proper OSX path for libevent?

aBothe commented 10 years ago

I already proposed to have a manual dub-script that just puts some LD_LIBRARY_PATH into the dub call before actually invoking dub.

extrawurst commented 10 years ago

if it was a dmd configuration problem why does dub called directly on the shell work ?

extrawurst commented 10 years ago

well no idea.. i tried to bridge the dub call vom XS through a script without success. i created this script as a first step now:

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH;/usr/local/lib"
/usr/bin/dub

but buidling now stops to work completely:

Building: s4server (Default)
Performing main compilation...
/Users/stephan/dub_run.sh build "s4server"
Exit code 255
Build complete -- 1 error, 0 warnings
aBothe commented 10 years ago

Now mono-d is able to handle shell scripts and even shebangs. Please update & try it again :)

extrawurst commented 10 years ago

awesome that does the trick. now what do we do to make this transparent for the ordinary user ?

aBothe commented 10 years ago

Make it a known issue and put it into the mono-d wiki entry :D

extrawurst commented 10 years ago

cant mono-d ship with that script for osx ?

On Fri, Aug 8, 2014 at 11:57 AM, Alexander Bothe notifications@github.com wrote:

Make it a known issue and put it into the mono-d wiki entry :D

— Reply to this email directly or view it on GitHub https://github.com/aBothe/Mono-D/issues/517#issuecomment-51583337.

aBothe commented 10 years ago
#!/bin/sh
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH;/usr/local/lib"
dub $*

This was my script btw.

aBothe commented 10 years ago

Nope, I don't want to have any further external resources/files to be installed anywhere.

extrawurst commented 10 years ago

anyway. thanks. will you close this once it is documented somewhere ?

aBothe commented 10 years ago

I've put a link on to the wiki page.