Coder Social home page Coder Social logo

Building on OSX 10.10 about openage HOT 31 CLOSED

dalexandrov avatar dalexandrov commented on April 28, 2024
Building on OSX 10.10

from openage.

Comments (31)

mic-e avatar mic-e commented on April 28, 2024

This issue seems to be related.

from openage.

LeviSchuck avatar LeviSchuck commented on April 28, 2024

I upgraded to 10.10 with brew and had problems with python. I removed brew and reinstalled it, as well as packages I regularly use.

Perhaps you can try that. (I have not tried to build this yet, as I only started watching yesterday πŸ˜… )

from openage.

dalexandrov avatar dalexandrov commented on April 28, 2024

@kloplop321 I've reinstalled brew yesterday. Did not help.

@mic-e I've tried to find fix in the issue specified, still the same stuff.

from openage.

thehydroimpulse avatar thehydroimpulse commented on April 28, 2024

Same issue for me. Tried a bunch of workarounds, trying to overwrite which version of python cmake uses with -DPYTHON_EXECUTABLE with no luck.

from openage.

svkurowski avatar svkurowski commented on April 28, 2024

Install python3 via homebrew and then pass the following to the configure script. You may need to change the python version.

  --raw-cmake-args \
  -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/include/python3.4m/ \
  -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4.dylib \
  -DPython_FRAMEWORKS=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework

This is the whole command I use to configure right now. Compilation will fail due to this llvm bug. @Fr3akout is working on that after we discussed it in the irc channel.

from openage.

thehydroimpulse avatar thehydroimpulse commented on April 28, 2024

@svkurowski Yep, that worked perfectly. Thanks!

from openage.

dalexandrov avatar dalexandrov commented on April 28, 2024

The only thing left:

openage v2.2-285-gf7268cc

  compiler | GNU 4.9.1
  cxxflags | -O2 -Wall -Wextra -pedantic -std=c++11

install prefix | /usr/local
build dir | /Users/mitia/openage/openage/.bin/gcc-release-O2

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OPUSFILE_INCLUDE_DIR
used as include directory in directory /Users/mitia/openage/openage/cpp
used as include directory in directory /Users/mitia/openage/openage/cpp
used as include directory in directory /Users/mitia/openage/openage/cpp
OPUSFILE_LIB
linked by target "openage" in directory /Users/mitia/openage/openage/cpp
SDL2IMAGE_INCLUDE_DIRS
used as include directory in directory /Users/mitia/openage/openage/cpp
used as include directory in directory /Users/mitia/openage/openage/cpp
used as include directory in directory /Users/mitia/openage/openage/cpp
SDL2IMAGE_LIBRARIES
linked by target "openage" in directory /Users/mitia/openage/openage/cpp

Whats wrong?

Thank you!

from openage.

svkurowski avatar svkurowski commented on April 28, 2024

Did you install opus,opusfile,sdl2andsdl2_image` using Homebrew?
If so, did you use the whole command I posted above?

from openage.

thehydroimpulse avatar thehydroimpulse commented on April 28, 2024

@svkurowski Using the whole command does indeed work.

from openage.

dalexandrov avatar dalexandrov commented on April 28, 2024

@svkurowski
yep, installed, still got:

OPUSFILE_INCLUDE_DIR
used as include directory in directory /Users/mitia/openage/openage/cpp
used as include directory in directory /Users/mitia/openage/openage/cpp
used as include directory in directory /Users/mitia/openage/openage/cpp
SDL2IMAGE_INCLUDE_DIRS
used as include directory in directory /Users/mitia/openage/openage/cpp
used as include directory in directory /Users/mitia/openage/openage/cpp
used as include directory in directory /Users/mitia/openage/openage/cpp

from openage.

svkurowski avatar svkurowski commented on April 28, 2024

Well, the corresponding lines in my command are:

-DOPUSFILE_INCLUDE_DIR=/usr/local/Cellar/opusfile/0.6/include/ \
-DSDL2IMAGE_INCLUDE_DIRS=/usr/local/Cellar/sdl2_image/2.0.0_1/include/

Could you do

ls /usr/local/Cellar/opusfile/0.6/include/
ls /usr/local/Cellar/sdl2_image/2.0.0_1/include/

and check if the header files are there?

from openage.

dalexandrov avatar dalexandrov commented on April 28, 2024

Ok, fixed. Configure now works, but the make fails. In my case:
/usr/local/Cellar/opusfile/0.6/include/opusfile.h:110:11: fatal error: 'opus_multistream.h' file not found

from openage.

svkurowski avatar svkurowski commented on April 28, 2024

Yeah I had that too, that is an upstream bug in homebrews' opus/opus_file in my opinion.
I will investigate upon it and maybe post an issue to the homebrew repo.
Setup the following symlinks to fix it for now: [..]

This got fixed in this pullrequest. The Python problem persists and will be discussed in #40 .

from openage.

svkurowski avatar svkurowski commented on April 28, 2024

This issue can be closed.

from openage.

TheJJ avatar TheJJ commented on April 28, 2024

hm actually i'd leave this open until the mac build really succeeds for all mac users that still have problems.

from openage.

thehydroimpulse avatar thehydroimpulse commented on April 28, 2024

You might have to add the -lstdc++ ldflag for it to build python in correctly.

from openage.

martyphee avatar martyphee commented on April 28, 2024

This worked for me on 10.9.4.

./configure \
  --flags="-stdlib=libc++  -I/usr/local/Cellar/fontconfig/2.11.1/include/ -I/usr/local/include/SDL2 -I/usr/local/Cellar/opus/1.1/include/opus -I/usr/local/Cellar/opusfile/0.6/include/opus -I/usr/local/Cellar/opus/1.1/include/opus" \
  --ldflags="-stdlib=libc++ -lSDL2_Image -lSDL2main" \
  --raw-cmake-args \
  -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.4.2/Frameworks/Python.framework/Versions/3.4/include/python3.4m/ \
  -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.4.2/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4.dylib \
  -DPython_FRAMEWORKS=/usr/local/Cellar/python3/3.4.2/Frameworks/Python.framework \
  -DSDL2IMAGE_INCLUDE_DIRS=/usr/local/Cellar/sdl2_image/2.0.0_1/include \
  -DSDL2IMAGE_LIBRARIES=/usr/local/Cellar/sdl2_image/2.0.0_1/lib/libSDL2_image-2.0.0.dylib

from openage.

dalexandrov avatar dalexandrov commented on April 28, 2024

configure is ok, but then make suffers.

from openage.

martyphee avatar martyphee commented on April 28, 2024

So was mine until I did configure like above. Had a number of linking issues because it wasn't finding libraries.

from openage.

dalexandrov avatar dalexandrov commented on April 28, 2024

gcc: error: unrecognized command line option '-stdlib=libc++'

Are you building with gcc or clang?

from openage.

martyphee avatar martyphee commented on April 28, 2024

Looks like clang. I'm very rusty with my C/C++ and build tools. Too much java/python....

openage v2.2-357-ge850274

      compiler | Clang 6.0.0.6000051
      cxxflags | -stdlib=libc++ -I/usr/local/Cellar/fontconfig/2.11.1/include/ -I/usr/local/include/SDL2 -I/usr/local/Cellar/opus/1.1/include/opus -I/usr/local/Cellar/opusfile/0.6/include/opus -I/usr/local/Cellar/opus/1.1/include/opus -Wall -Wextra -pedantic -std=c++11
install prefix | /usr/local
     build dir | /Users/martinphee/develop/openage/.bin/gcc-release-stdlib=libc++-I-usr-local-Cellar-fontconfig-2-11-1-include-I-usr-local-include-SDL2-I-usr-local-Cellar-opus-1-1-include-opus-I-usr-local-Cellar-opusfile-0-6-include-opus-I-usr-local-Cellar-opus-1-1-include-opus

from openage.

dalexandrov avatar dalexandrov commented on April 28, 2024

switched to clang:
/Users/mitia/openage/openage/cpp/texture.h:5:10: fatal error: 'GL/gl.h' file not found
#include <GL/gl.h>

from openage.

TheJJ avatar TheJJ commented on April 28, 2024

This should have been fixed in 1de94e4, make sure you are using the latest version.

from openage.

dalexandrov avatar dalexandrov commented on April 28, 2024

nice but..
openage/cpp/font.cpp:3:10: fatal error: 'fontconfig/fontconfig.h' file not found
#include <fontconfig/fontconfig.h>

from openage.

martyphee avatar martyphee commented on April 28, 2024

Install fontconfig: brew install fontconfig

On Thu, Oct 30, 2014 at 9:04 AM, Dmitry Alexandrov <[email protected]

wrote:

nice but..
openage/cpp/font.cpp:3:10: fatal error: 'fontconfig/fontconfig.h' file not
found
#include

β€”
Reply to this email directly or view it on GitHub
#16 (comment).

from openage.

janisozaur avatar janisozaur commented on April 28, 2024

errors like missing libstdc++ usually mean you're trying to use C compiler (gcc, clang) instead of C++ compiler (g++, clang++)

from openage.

dalexandrov avatar dalexandrov commented on April 28, 2024

OK! Build completed.
Now.. any chance to run it? ..openage/bin/cpp/openage is this the correct path?

from openage.

dalexandrov avatar dalexandrov commented on April 28, 2024

Just for info, my config was kind of this:

 ./configure   --flags="-stdlib=libc++  -I/usr/local/Cellar/fontconfig/2.11.1/include/ -I/usr/local/include/SDL2 -I/usr/local/Cellar/opus/1.1/include/opus -I/usr/local/Cellar/opusfile/0.6/include/opus -I/usr/local/Cellar/opus/1.1/include/opus"   --ldflags="-stdlib=libc++ -lSDL2_Image -lSDL2main"   --raw-cmake-args   -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4.2/include/python3.4/   -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4m.dylib   -DPython_FRAMEWORKS=/usr/local/Cellar/python3/3.4.2/Frameworks/Python.framework   -DSDL2IMAGE_INCLUDE_DIRS=/usr/local/Cellar/sdl2_image/2.0.0_1/include   -DSDL2IMAGE_LIBRARIES=/usr/local/Cellar/sdl2_image/2.0.0_1/lib/libSDL2_image-2.0.0.dylib

from openage.

janisozaur avatar janisozaur commented on April 28, 2024

from your configure script output:

build dir | /Users/martinphee/develop/openage/.bin/gcc-release-stdlib=libc++-I-usr-local-Cellar-fontconfig-2-11-1-include-I-usr-local-include-SDL2-I-usr-local-Cellar-opus-1-1-include-opus-I-usr-local-Cellar-opusfile-0-6-include-opus-I-usr-local-Cellar-opus-1-1-include-opus

I would look in there

from openage.

janisozaur avatar janisozaur commented on April 28, 2024

or simply

find . -type f -executable -name openage

from openage.

svkurowski avatar svkurowski commented on April 28, 2024

You run it by executing make run. Make sure to convert the media files first though.
See the building documentation.

from openage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.