compiling minetest on mac

pheonixfire
Member
 
Posts: 66
Joined: Sun Oct 21, 2012 06:25

compiling minetest on mac

by pheonixfire » Mon Nov 05, 2012 06:27

I'm trying to compile minetest on mac but I get the following
Image

Uploaded with ImageShack.us

I've tried compiling irrlicht to get that bit working but I get more errors, so is there anywhere I can get a precompiled version of
irrlicht so I can compile minetest

Any help is appreciated
Pheonixfire
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Mon Nov 05, 2012 10:12

Probably not, you'd have to build everything yourself.
Also check this, but it's really outdated (might still be useful).
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Mon Nov 05, 2012 19:29

I'm also walking down this road, trying to compile on osx 10.6.

I've gotten Irrlicht to build, but none of the tutorial programs worked.

I used the "trunk" version of irrlicht, which is the new Irrlicht 1.8 version.

Its all in here: https://www.dropbox.com/sh/zd2p2el8rokvpmw/HU2HedVZRx

The zip file contains the entire contents of the folders.

This contains the source and what I think is a compiled version of irrlicht 1.8, libIrrlicht.a

As I said, I don't know if this actually works, since some quick trials with the tutorial progs for irrlicht only showed me blank windows (but at least they built and got the windows up)

I downloaded the trunk version to /Users/theo/Downloads/irr_trunk/using

svn co https://irrlicht.svn.sourceforge.net/svnroot/irrlicht/trunk /Users/theo/Downloads/irr_trunk/

then opened /Users/theo/Dropbox/irrilicht/irr_trunk/source/Irrlicht/MacOSX/MacOSX.xcodeproj

with xcode 3.2.6.

I think you need, the carbon, cocoa, iokit and openGL framework to compile, it, I found info about that elsewhere on this forum (can help you out if neccessary)
Last edited by OmniStudent on Mon Nov 05, 2012 19:35, edited 1 time in total.
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Mon Nov 05, 2012 19:35

This post might be useful, but it seems nobody heard from the guy again after this post:

http://minetest.net/forum/viewtopic.php?id=2803
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Tue Nov 06, 2012 05:57

All the irrlicht demos are working on my OSX 10.6 now!
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Tue Nov 06, 2012 08:36

Great!

Good to read that someone's making progress compiling minetest for the Mac.
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Tue Nov 06, 2012 10:38

I don't think the problem is irrlicht, but guess that's some kind of progress too.
 

pheonixfire
Member
 
Posts: 66
Joined: Sun Oct 21, 2012 06:25

by pheonixfire » Thu Nov 08, 2012 10:31

I fixed my problem with irrlicht by copying it from the old mac version, not sure how I
fixed the vorbis problem

I now have the following problem:
Image

Uploaded with ImageShack.us

I'm not sure what the error is

any help is appreciated
pheonixfire
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Thu Nov 08, 2012 11:08

I think I ran into this problem too:

If I remember things right, the problem was some problem with if(APPLE) in the CMakeLists.txt file,
like that destination never gets set.

Is there even an if(APPLE) clause among the if(WIN32)... in the start of CMakeLists?

Please post CMakeLists.txt
 

pheonixfire
Member
 
Posts: 66
Joined: Sun Oct 21, 2012 06:25

by pheonixfire » Thu Nov 08, 2012 11:30

I'm using the a copy from http://minetest.net/download.php

any help is appreciated
pheonixfire
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Thu Nov 08, 2012 12:17

Perhaps the DESTINATION is not set because CMakeLists does not react to APPLE as it should.
Strange thing is, line 157 is inside an if(UNIX) clause.

I suggest inserting

message(STATUS "-------------I REACTED TO THIS------------")

inside some of the IF clauses in cmakelists.

You can also use this command to try to print out some variables, like

message(STATUS "XDG apps dir is set to=${XDG_APPS_DIR}")

or something similar, to find the missing variable.
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Fri Nov 09, 2012 06:57

Sorry to hijack the thread, but:

I'm trying to build minetest for mac with another approach, namely using toabis cmake project:

https://github.com/toabi/minetest/tree/cmake-osx

I run cmake -G Xcode . -DENABLE_SOUND=0

in this - there's some trouble with the sound that I won't bother with now, but otherwise this runs nicely and produces an xcode project.

Trying to build this, however, causes 3 errors (the least I've had on any attempt to build for mac)

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
 "_createDeviceEx", referenced from:
      _main in main.o
  "irr::video::IdentityMaterial", referenced from:
      __ZN3irr5video16IdentityMaterialE$non_lazy_ptr in sky.o
      __ZN3irr5video16IdentityMaterialE$non_lazy_ptr in clientmap.o
      __ZN3irr5video16IdentityMaterialE$non_lazy_ptr in farmesh.o
      __ZN3irr5video16IdentityMaterialE$non_lazy_ptr in clouds.o
     (maybe you meant: __ZN3irr5video16IdentityMaterialE$non_lazy_ptr)
ld: symbol(s) not found
collect2: ld returned 1 exit status


Since I'm practically C++ and XCode illiterate, can anyone tell me what this means and how to solve it?
 

pheonixfire
Member
 
Posts: 66
Joined: Sun Oct 21, 2012 06:25

by pheonixfire » Sat Nov 10, 2012 05:57

OmniStudent wrote:You can also use this command to try to print out some variables, like

message(STATUS "XDG apps dir is set to=${XDG_APPS_DIR}")

or something similar, to find the missing variable.


Where abouts would you recommend I put this in the file?
since I don't normally mess around with cmake files

any help is appreciated
pheonixfire
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Sat Nov 10, 2012 07:03

You can put it anywhere, its just a message. If you copy it and paste it after every row of regular code, you will get a message after that code is executed.

Put it in the start, middle and end of the file and see if it changes.
 

pheonixfire
Member
 
Posts: 66
Joined: Sun Oct 21, 2012 06:25

by pheonixfire » Sat Nov 10, 2012 10:56

It gives me the following regardless of where I put it in the file
-- XDG apps dir is set to=

any help is appreciated
pheonixfire
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Sat Nov 10, 2012 15:26

pheonixfire wrote:It gives me the following regardless of where I put it in the file
-- XDG apps dir is set to=

any help is appreciated
pheonixfire


That means that variable is never set!

Try replacing this chunk of text in CMakeLists.txt with this:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
message(STATUS "Using XDG_APPS_DIR=${XDG_APPS_DIR}")
if(WIN32)
    set(SHAREDIR ".")
    set(BINDIR "bin")
    set(DOCDIR "doc")
    set(EXAMPLE_CONF_DIR ".")
    set(LOCALEDIR "locale")
    message(STATUS "I think Im in windows")
    message(STATUS "Using XDG_APPS_DIR=${XDG_APPS_DIR}")
elseif(APPLE)
    # Random placeholders; this isn't usually used and may not work
    # See https://github.com/toabi/minetest-mac/
    set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}")
    set(BINDIR "bin")
    set(DOCDIR "share/doc/${PROJECT_NAME}")
    set(EXAMPLE_CONF_DIR ${DOCDIR})
    set(LOCALEDIR "locale")

    #set(XDG_APPS_DIR "/Users/macusername/")

    message(STATUS "I think Im in mac")
    message(STATUS "Using XDG_APPS_DIR=${XDG_APPS_DIR}")
elseif(APPLE)
elseif(UNIX) # Linux, BSD etc
    if(RUN_IN_PLACE)
        set(SHAREDIR ".")
        set(BINDIR "bin")
        set(DOCDIR "doc")
        set(EXAMPLE_CONF_DIR ".")
        set(MANDIR "unix/man")
        set(XDG_APPS_DIR "unix/applications")
        set(ICONDIR "unix/icons")
        set(LOCALEDIR "locale")
            message(STATUS "I think Im in linux and this is RUN_IN_PLACE")
            message(STATUS "Using XDG_APPS_DIR=${XDG_APPS_DIR}")
    else()
        set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}")
        set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
        set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}")
        set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")
        set(EXAMPLE_CONF_DIR ${DOCDIR})
        set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/share/applications")
        set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
        set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale")
            message(STATUS "I think Im in linux and this is RUN_IN_PLACE")
            message(STATUS "Using XDG_APPS_DIR=${XDG_APPS_DIR}")
    endif()
endif()


Uncomment the line
#set(XDG_APPS_DIR "/Users/macusername/")
to set a the variable to a directory "on purpose"
 

pheonixfire
Member
 
Posts: 66
Joined: Sun Oct 21, 2012 06:25

by pheonixfire » Sun Nov 11, 2012 02:18

That was able to create a xcode project, it will tell me that the build succeeded
but it won't give me a .app file to launch
Here's what it gives me

Image

Uploaded with ImageShack.us

It's telling me there's a lot of unused variables

any help is appreciated
pheonixfire
Last edited by pheonixfire on Sun Nov 11, 2012 04:18, edited 1 time in total.
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Sun Nov 11, 2012 07:08

xcode project that builds you say?

That's further than I've gotten, what version did you compile?

Did you change the line

#set(XDG_APPS_DIR "/Users/macusername/")

to anything that makes sense on you computer?

Maybe the app ended up there.

Do you get any kind of file named minetest? I think it should end up in a build or bin directory, not sure.

If possible, please post the xbuild project somewhere, I'd like to try it out.
 

pheonixfire
Member
 
Posts: 66
Joined: Sun Oct 21, 2012 06:25

by pheonixfire » Sun Nov 11, 2012 12:02

how do I post files, I've been using imageshack to post images

any help is appreciated
pheonixfire
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Nov 11, 2012 13:56

pheonixfire wrote:how do I post files, I've been using imageshack to post images

any help is appreciated
pheonixfire

You can use Omploader: http://ompldr.org/
 

pheonixfire
Member
 
Posts: 66
Joined: Sun Oct 21, 2012 06:25

by pheonixfire » Mon Nov 12, 2012 06:38

Here's what I did to get the xcode project:

I downloaded minetest-0.4.3 and minetest_game-0.4.3

then I changed I changed the following in CMakeLists.txt
I put a # at the start of line 157 and then add set(XDG_APPS_DIR "/Users/macusername/")
after line 203

I got the irrlicht framework out of toabi's minetest verion(I could get irrlicht to compile)
and the other required frameworks out of the version of minetest from here
https://docs.google.com/file/d/0BzOHD6zIUMbMNG9ZYm8xN3Qzamc/edit?pli=1

I hope that helps

any help is appreciated
pheonixfire
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Mon Nov 12, 2012 07:12

Thankyou.

Did the 7z zip at https://docs.google.com/file/d/0BzOHD6zIUMbMNG9ZYm8xN3Qzamc/edit?pli=1 extract OK for you?

I got a message telling me that the resource fork items could not be extracted.


On the light side, minetestserver compiles nicely from celeron55-minetest-9696ed3 when I do
cmake . -DENABLE_SOUND=0 -DRUN_IN_PLACE=1 -DBUILD_CLIENT=0
make -2

When I try to build the client I get

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Linking CXX executable ../bin/minetest
ld: warning: in /Developer/SDKs/MacOSX10.6.sdk/usr/local/lib/libIrrlicht.a, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libjpeg.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libpng.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libX11.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libXext.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libjpeg.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libpng.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libX11.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libXext.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
  "_createDeviceEx", referenced from:
      _main in main.cpp.o
  "irr::core::IdentityMatrix", referenced from:
      __ZN3irr4core14IdentityMatrixE$non_lazy_ptr in content_cao.cpp.o
      __ZN3irr4core14IdentityMatrixE$non_lazy_ptr in game.cpp.o
     (maybe you meant: __ZN3irr4core14IdentityMatrixE$non_lazy_ptr)
  "irr::video::IdentityMaterial", referenced from:
      __ZN3irr5video16IdentityMaterialE$non_lazy_ptr in sky.cpp.o
      __ZN3irr5video16IdentityMaterialE$non_lazy_ptr in clientmap.cpp.o
      __ZN3irr5video16IdentityMaterialE$non_lazy_ptr in farmesh.cpp.o
      __ZN3irr5video16IdentityMaterialE$non_lazy_ptr in clouds.cpp.o
     (maybe you meant: __ZN3irr5video16IdentityMaterialE$non_lazy_ptr)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [bin/minetest] Error 1
make[1]: *** [src/CMakeFiles/minetest.dir/all] Error 2
make: *** [all] Error 2
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Mon Nov 12, 2012 07:59

I just got the celeron55-minetest-9696ed3 version of minetest to compile from command line on OSX 10.6.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
/Users/security/mine2/celeron55-minetest-9696ed3/bin/minetest


Opens up a window with the start screens. It reacts to mouse clicks but not to the keyboard, so I haven't been able to acutally get into a game and test it.

Here's what I did to get this far:

Downloaded celeron55-minetest-9696ed3, both the minetest_game-0.4.3 and minetest_-0.4.3 from http://minetest.net/download.php
Extracted, renamed celeron55-minetest_game-87a1e37 to minetest_game and put it in the games folder.

Downloaded irrlicht-1.8.zip from http://irrlicht.sourceforge.net/downloads/.
Opened up the xcode project.
Set architecture to i386 and system to 10.6 in project properties and under (get info when rightclicking targets).
Choose build.
Copied the built irrlicht.a to /usr/local/lib

Ran cmake . -DENABLE_SOUND=0 -DRUN_IN_PLACE=1 -DBUILD_CLIENT=1
from the minetest dir
Ran make -j2

I had installed other dependencies earlier, some using "port", so if you get different results from this, that may be the reason.
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Mon Nov 12, 2012 17:03

I just had luck compiling from Xcode with
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
https://github.com/toabi/minetest/tree/cmake-osx


The reason this didn't work before was probably that my irrlicht 1.8 was compiled for 64bits.

Here's what I did:

In CMakeLists.txt:

add the row

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
set(XDG_APPS_DIR "unix/applications")


at row 63 (that is inside the elseif(APPLE) clause)

run
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
cmake -G Xcode . -DENABLE_SOUND=0


(had trouble with sound, so I'm disabling this for now)

Open the xcode project produced.

Choose build->build

Change active target to "package" and build again.

The file minetest-0.4.3-osx.dmg appears in the same folder as the xcode project
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Mon Nov 12, 2012 19:02

Oh, and I just realized
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
cmake -G Xcode .
will make an xcode project for any repository.
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Wed Nov 14, 2012 06:42

Fixed the sound problem. Again, it appears to be an architecture problem. Fixed it by installing libvorbis with

sudo port -v install libvorbis +universal

,which I guess gave me both 32bit and 64bit builds for vorbis.
 

nerfski
New member
 
Posts: 1
Joined: Wed Nov 14, 2012 15:44

by nerfski » Wed Nov 14, 2012 16:04

Just wanted to post that I also managed to get a build working on my MacBook Pro (2011) OSX 10.7 Lion, Using Xcode 4.5.2 and the steps posted by OmniStudent but substituting irrlicht 1.7.3 instead of 1.8.

I also used target SDK 10.7, instead of 10.6, because 4.5.2 doesn't seem to include the 10.6 SDK by default. Also, I chose the compiler LLVM GCC 4.2, not sure whether this was a good choice, but I had originally tried to do a build on command line only and that was working better.

When I launch the game (after installing the package) it works, but there is a constant flicker of the lighting, so there are probably a few other things I need to figure out on my build to fix that. I plan on installing irrlicht 1.8 as a first step.

I compiled and used libjpeg 8c : http://www.ijg.org/files/jpegsrc.v8c.tar.gz, OmniStudent, which libjpeg did you get from 'port'?
 

OmniStudent
Member
 
Posts: 261
Joined: Sat Nov 03, 2012 06:40

by OmniStudent » Wed Nov 14, 2012 20:05

nerfski wrote:
I compiled and used libjpeg 8c : http://www.ijg.org/files/jpegsrc.v8c.tar.gz, OmniStudent, which libjpeg did you get from 'port'?


From what I can see in text files my file is in /opt/local/bin an version
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
universal.darwin_10.i386-x86_64.


Not sure if that what you mean though :/
 

mrscotty
New member
 
Posts: 4
Joined: Wed Nov 14, 2012 20:25

by mrscotty » Wed Nov 14, 2012 20:56

On OS X 10.7.3, I was able to get minetest compiled with Irrlicht 1.8 and the GUI starts, but I am unable to enter any text in the text fields. They are not even selectable by clicking with the mouse. Here are the steps I took:

1. Download Irrlicht 1.8 from sourceforge

2. Compile and install Irrlicht (used i386 because I had compile errors when trying to compile minetest as x86_64)

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
$ cd irrlicht-1.8/
$ (cd source/Irrlicht/MacOSX && xcodebuild -arch i386 -project MacOSX.xcodeproj)
$ sudo cp source/Irrlicht/MacOSX/build/Release/libIrrlicht.a /usr/local/lib/
$ sudo cp -r include /usr/local/include/Irrlicht


3. Clone minetest from github and rebased the cmake-osx branch from toabi onto the current master HEAD

4. Compile and install minetest

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
$ cd minetest
$ cmake -D ENABLE_SOUND=0 -G Xcode .
$ xcodebuild -project minetest.xcodeproj -target package


The minetest.app is in minetest-0.4.3-osx.dmg in the minetest directory.

Does anyone have an idea regarding the text input problem?
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed Nov 14, 2012 20:57

mrscotty wrote:On OS X 10.7.3, I was able to get minetest compiled with Irrlicht 1.8 and the GUI starts, but I am unable to enter any text in the text fields. They are not even selectable by clicking with the mouse. Here are the steps I took:

1. Download Irrlicht 1.8 from sourceforge

2. Compile and install Irrlicht (used i386 because I had compile errors when trying to compile minetest as x86_64)

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
$ cd irrlicht-1.8/
$ (cd source/Irrlicht/MacOSX && xcodebuild -arch i386 -project MacOSX.xcodeproj)
$ sudo cp source/Irrlicht/MacOSX/build/Release/libIrrlicht.a /usr/local/lib/
$ sudo cp -r include /usr/local/include/Irrlicht


3. Clone minetest from github and rebased the cmake-osx branch from toabi onto the current master HEAD

4. Compile and install minetest

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
$ cd minetest
$ cmake -D ENABLE_SOUND=0 -G Xcode .
$ xcodebuild -project minetest.xcodeproj -target package


The minetest.app is in minetest-0.4.3-osx.dmg in the minetest directory.

Does anyone have an idea regarding the text input problem?

The changes in 1.8 don't seem to work with Minetest's usage of 1.7.3.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

Next

Return to Minetest General

Who is online

Users browsing this forum: No registered users and 96 guests

cron