Skip to content

Installing on OSX with DUB tutorials #213

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

Open
joelcnz opened this issue Feb 5, 2016 · 7 comments
Open

Installing on OSX with DUB tutorials #213

joelcnz opened this issue Feb 5, 2016 · 7 comments

Comments

@joelcnz
Copy link

joelcnz commented Feb 5, 2016

I haven't been able to install it properly. Neither has my brother who does programming for a living.

@Jebbs
Copy link
Owner

Jebbs commented Feb 5, 2016

Can you tell me what you two have tried? It might help me with writing the tutorial.

@joelcnz
Copy link
Author

joelcnz commented Feb 5, 2016

I can't remember what I did with the C/C++ side of the story.

I think I used GIT hub and then DUB.

I used 'export DYLD_LIBRARY_PATH=libs' when running programs.

I actually don't remember much.

@grogancolin
Copy link
Contributor

grogancolin commented Apr 27, 2016

So, I'm in the middle of this atm - and it mostly works fine.

Installing it on OSX has been pretty easy - I've just installed all dependencies using brew (Including autotools and cmake).

As far as I remember, I believe all the brews you'll need to install is:

brew install sfml csfml autoconf cmake dub gcc

Incase the above isn't enough, here's the complete list of brews I have installed.
Obviously all the ruby brews can be ignored, and probably most of the rest too.
Just said I'd put em here to cross reference with the above if something goes wrong.

brew list
autoconf                gdbm                    libmpc                  rbenv
byobu                   gettext                 libogg                  rbenv-bundle-exec
cmake                   glew                   libpng                  rbenv-bundler
coreutils               gmp                     libvorbis               ruby-build
csfml                   gnu-sed                 mpfr                    s-lang
dub                     isl                     newt                    sfml
flac                    jpeg                    openssl                 tmux
freetype                ldc                     pcre                    wget
fswatch                 libconfig               pkg-config              zsh
gcc                     libevent                popt                    zsh-completions

From then, following the Posix install instructions for DSFMLC will get you to the point you can compile a dsfml D project with dub.

These are exactly what I followed:

git clone -b 2.1 --depth 1 https://github.com/Jebbs/DSFMLC.git
cd DSFMLC
cmake .
make
sudo make install

Then it should be plain sailing!

dub init myTestProject dsfml
cd myTestProject
dub build

The following doesn't matter anymore as has been fixed. Please ignore!

One caveat - dsfml:audio won't compile with dmd 2071 (the newest one at time of writing), with following errors:

⇒  dub build
Performing "debug" build using dmd for x86_64.
dsfml:system 2.1.0: target for configuration "library" is up to date.
dsfml:audio 2.1.0: building configuration "library"...
../../.dub/packages/dsfml-2.1.0/src/dsfml/audio/soundbuffer.d(63,21): Error: function object.Object.toString () is not callable using argument types (const(char)*)
../../.dub/packages/dsfml-2.1.0/src/dsfml/audio/soundbuffer.d(148,22): Error: function object.Object.toString () is not callable using argument types (const(char)*)
../../.dub/packages/dsfml-2.1.0/src/dsfml/audio/soundbuffer.d(172,22): Error: function object.Object.toString () is not callable using argument types (const(char)*)
../../.dub/packages/dsfml-2.1.0/src/dsfml/audio/soundbuffer.d(196,22): Error: function object.Object.toString () is not callable using argument types (const(char)*)
../../.dub/packages/dsfml-2.1.0/src/dsfml/audio/soundbuffer.d(222,22): Error: function object.Object.toString () is not callable using argument types (const(char)*)
../../.dub/packages/dsfml-2.1.0/src/dsfml/audio/soundbuffer.d(247,22): Error: function object.Object.toString () is not callable using argument types (const(char)*)
../../.dub/packages/dsfml-2.1.0/src/dsfml/audio/soundrecorder.d(61,21): Error: function object.Object.toString () is not callable using argument types (const(char)*)
../../.dub/packages/dsfml-2.1.0/src/dsfml/audio/soundrecorder.d(92,21): Error: function object.Object.toString () is not callable using argument types (const(char)*)
../../.dub/packages/dsfml-2.1.0/src/dsfml/audio/soundstream.d(82,21): Error: function object.Object.toString () is not callable using argument types (const(char)*)
../../.dub/packages/dsfml-2.1.0/src/dsfml/audio/soundstream.d(278,21): Error: function object.Object.toString () is not callable using argument types (const(char)*)
dmd failed with exit code 1.

Complete the above with either ldc or an older version of dmd (or gdc, but I didn't check that!)
Have opened #223 for this.

@joelcnz
Copy link
Author

joelcnz commented Dec 30, 2016

Yes! It worked, thank you very much, grogancolin!

I didn't see your reply, till now.

@joelcnz
Copy link
Author

joelcnz commented Jan 15, 2017

brew gcc took about 2 hours to install. Is there some thing wrong?

Also, I got the following with brew update && brew upgrade && brew cleanup

==> Upgrading gcc
Warning: Building gcc from source:
The bottle needs the Xcode CLT to be installed.

@joelcnz
Copy link
Author

joelcnz commented Jan 15, 2017

This is the rest of the brew/gcc stuff (wait forever!):

==> Upgrading gcc
Warning: Building gcc from source:
The bottle needs the Xcode CLT to be installed.
==> Downloading https://ftpmirror.gnu.org/gcc/gcc-6.3.0/gcc-6.3.0.tar.bz2
Already downloaded: /Users/joelchristensen/Library/Caches/Homebrew/gcc-6.3.0.tar.bz2
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/e9e0e
Already downloaded: /Users/joelchristensen/Library/Caches/Homebrew/gcc--patch-863957f90a934ee8f89707980473769cff47ca0663c3906992da6afb242fb220.patch
==> Patching
==> Applying 6.1.0-jit.patch
patching file gcc/jit/Make-lang.in
==> ../configure --build=x86_64-apple-darwin16.1.0 --prefix=/usr/local/Cellar/gc
==> make bootstrap

@joelcnz
Copy link
Author

joelcnz commented Feb 6, 2017

Taking for ever to update home brew stuff isn't very good. Can I do any thing about it? Do I just install Xcode CLT?

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