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

dub project fails to build in OSX #517

Closed
extrawurst opened this issue Aug 7, 2014 · 12 comments
Closed

dub project fails to build in OSX #517

extrawurst opened this issue Aug 7, 2014 · 12 comments

Comments

@extrawurst
Copy link

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
Copy link
Collaborator

Orvid commented Aug 7, 2014

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
Copy link
Owner

aBothe commented Aug 7, 2014

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
Copy link
Author

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

@extrawurst
Copy link
Author

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 pushed a commit that referenced this issue Aug 8, 2014
@aBothe
Copy link
Owner

aBothe commented Aug 8, 2014

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

@aBothe aBothe added dub labels Aug 8, 2014
@extrawurst
Copy link
Author

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

@aBothe
Copy link
Owner

aBothe commented Aug 8, 2014

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

@extrawurst
Copy link
Author

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
#517 (comment).

@aBothe
Copy link
Owner

aBothe commented Aug 8, 2014

#!/bin/sh
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH;/usr/local/lib"
dub $*

This was my script btw.

@aBothe
Copy link
Owner

aBothe commented Aug 8, 2014

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

@extrawurst
Copy link
Author

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

@aBothe
Copy link
Owner

aBothe commented Aug 10, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants