mac compile

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

mac compile

by pheonixfire » Tue Mar 19, 2013 08:41

I decided to have another go at compiling minetest for mac

I commented out the following lines
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
#if(UNIX)
#    install(FILES "doc/minetest.6" "doc/minetestserver.6" DESTINATION "${MANDIR}/man6")
#    install(FILES "misc/minetest.desktop" DESTINATION "${XDG_APPS_DIR}")
#    install(FILES "misc/minetest-icon.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps")
#endif()


and I added set(XDG_APPS_DIR "/Users/James/") in the apple elseif starting at line 196

I was then able to run the cmake . -DRUN_IN_PLACE=1 and make -j2 commands
the make -j2 gives the following results:
Image

Uploaded with ImageShack.us

previous thread on attempt
http://forum.minetest.net/viewtopic.php?id=3627

could somesone tell me how to fix this

any help is appreciated
pheonixfire
 

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

by PilzAdam » Tue Mar 19, 2013 10:04

Seems like it doesnt find the irrlicht header. Can you post the output of cmake?
 

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

by pheonixfire » Tue Mar 19, 2013 11:36

okay, here it is

Image

Uploaded with ImageShack.us

any help is appreciated
pheonixfire
 

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

by PilzAdam » Tue Mar 19, 2013 11:51

Does /Libary/Frameworks/Irrlicht.framework/Headers contain irrTypes.h?
Maybe remove CMakeChache.txt in the minetest directory and run cmake and make.
 

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

by pheonixfire » Tue Mar 19, 2013 11:57

the framework does contain the required file


I'll get back to you about the second one

any help is appreciated
pheonixfire
 

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

by pheonixfire » Wed Mar 20, 2013 12:25

here's the result of cmake make when I remove the cmakecache file

Image

Uploaded with ImageShack.us

any help is appreciated
pheonixfire
 

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

by pheonixfire » Wed Mar 20, 2013 23:43

I solved the above by adding a copy of libIrrlicht.a in the minetest folder then adding the path into
the cmakecache file at line 242

When I ran the make -j2 command I got half a dozen to a dozen files not found, this can be fixed by
copying them from a copy of irrlicht source file into the irrlicht framework folder

After that when I run make -j2 I get the following:

Image

Uploaded with ImageShack.us

any help is appreciated
pheonixfire
 

BlindBanana
Member
 
Posts: 23
Joined: Sun Mar 17, 2013 13:33

by BlindBanana » Thu Mar 21, 2013 11:44

I don't know Mac OS, so this are mostly guesses:

Are you sure to have Irrlicht on your system? (Irrlicht 1.8.x gives some graphics bugs, 1.7.x does not)
If not please compile Irrlicht 1.7.3 (should be the latest 1.7.x version) and configure Minetest 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
mkdir build
cd build
cmake .. -DRUN_IN_PLACE=1 -DWARN_ALL=1 -DIRRLICHT_SOURCE_DIR=../../irrlicht-1.7.3/

Please adapt the pahts to your system!
And specify the root-folder of irrlicht (e.g. irrlicht-1.7.3/, not one of the subfolders (e.g source/ or source/Irrlicht/).

But if you build irrlicht from soure you have to run make in irrlicht-1.7.3/source/Irrlicht/).

Which compiler do you use?
With gcc everything should work fine. With Clang you could have some trouble, I tried to build minetest with Clang 3.2.0 and ran into some errors which are currently not resolved.
 

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

by pheonixfire » Thu Mar 21, 2013 12:55

the top line of my last post causes problems further down the line
I ended up changing it to "IRRLICHT_LIBRARY:FILEPATH=" instead

As for the version of irrlicht I use I got 1.8 to compile when I used gcc
I've got a copy the irrlicht framework in my library frameworks folder

Image

Uploaded with ImageShack.us

this is as as I got , I'm not sure what error is

any help is appreciated
pheonixfire
 

BlindBanana
Member
 
Posts: 23
Joined: Sun Mar 17, 2013 13:33

by BlindBanana » Thu Mar 21, 2013 13:41

I can't read the terminal output. Can you paste it as text into
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
 [ code ] [ /code ]
tags (without the whitespace), please?
 

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

by pheonixfire » Fri Mar 22, 2013 00:32

okay, I forgot I could do it this way

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
[  1%] Built target jthread
[ 14%] Built target lua
[ 14%] Built target jsoncpp
[ 49%] Built target minetestserver
Linking CXX executable ../bin/minetest
ld: warning: ignoring file /usr/local/lib/libjpeg.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /usr/local/lib/libjpeg.dylib
ld: warning: ignoring file /opt/local/lib/libvorbisfile.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /opt/local/lib/libvorbisfile.dylib
ld: warning: ignoring file /opt/local/lib/libvorbis.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /opt/local/lib/libvorbis.dylib
ld: warning: ignoring file /usr/local/lib/libogg.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /usr/local/lib/libogg.dylib
ld: warning: ignoring file /usr/local/lib/libjpeg.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /usr/local/lib/libjpeg.dylib
ld: warning: ignoring file /opt/local/lib/libvorbisfile.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /opt/local/lib/libvorbisfile.dylib
ld: warning: ignoring file /opt/local/lib/libvorbis.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /opt/local/lib/libvorbis.dylib
ld: warning: ignoring file /usr/local/lib/libogg.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /usr/local/lib/libogg.dylib
Undefined symbols for architecture i386:
  "irr::core::IdentityMatrix", referenced from:
      GenericCAO::addToScene(irr::scene::ISceneManager*, ITextureSource*, irr::IrrlichtDevice*) in content_cao.cpp.o
      GenericCAO::updateTextures(std::string const&) in content_cao.cpp.o
      GenericCAO::updateTexturePos() in content_cao.cpp.o
      the_game(bool&, bool, InputHandler*, irr::IrrlichtDevice*, irr::gui::IGUIFont*, std::string, std::string, std::string, std::string, unsigned short, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&, std::string, ChatBackend&, SubgameSpec const&, bool) in game.cpp.o
      GenericCAO::addToScene(irr::scene::ISceneManager*, ITextureSource*, irr::IrrlichtDevice*) in content_cao.cpp.o
      GenericCAO::updateTextures(std::string const&) in content_cao.cpp.o
      GenericCAO::updateTexturePos() in content_cao.cpp.o
      the_game(bool&, bool, InputHandler*, irr::IrrlichtDevice*, irr::gui::IGUIFont*, std::string, std::string, std::string, std::string, unsigned short, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&, std::string, ChatBackend&, SubgameSpec const&, bool) in game.cpp.o
  "irr::video::IdentityMaterial", referenced from:
      irr::scene::ISceneNode::getMaterial(unsigned int) in sky.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in clientmap.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in farmesh.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in clouds.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in particles.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in sky.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in clientmap.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in farmesh.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in clouds.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in particles.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in sky.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in clientmap.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in farmesh.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in clouds.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in particles.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in sky.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in clientmap.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in farmesh.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in clouds.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in particles.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in sky.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in clientmap.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in farmesh.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in clouds.cpp.o
      irr::scene::ISceneNode::getMaterial(unsigned int) in particles.cpp.o
  "_createDeviceEx", referenced from:
      _main in main.cpp.o
  "_ov_clear", referenced from:
      loadOggFile(std::string const&) in sound_openal.cpp.o
  "_ov_fopen", referenced from:
      loadOggFile(std::string const&) in sound_openal.cpp.o
  "_ov_info", referenced from:
      loadOggFile(std::string const&) in sound_openal.cpp.o
  "_ov_read", referenced from:
      loadOggFile(std::string const&) in sound_openal.cpp.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/minetest] Error 1
make[1]: *** [src/CMakeFiles/minetest.dir/all] Error 2
make: *** [all] Error 2


any help is appreciated
pheonixfire
 

BlindBanana
Member
 
Posts: 23
Joined: Sun Mar 17, 2013 13:33

by BlindBanana » Fri Mar 22, 2013 14:00

Could you include the full output, please?
 

prestidigitator
Member
 
Posts: 632
Joined: Thu Feb 21, 2013 23:54

by prestidigitator » Fri Mar 22, 2013 19:25

It looks like you might be trying to compile/link a 64-bit program using 32-bit libraries. I can't really help you with a fix for that on a Mac, but it might give you a place to start looking for an answer.
Last edited by prestidigitator on Fri Mar 22, 2013 19:26, edited 1 time in total.
 

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

by pheonixfire » Sat Mar 23, 2013 01:49

BlindBanana wrote:Could you include the full output, please?


The only thing that wasn't included was the line were the command was entered

any help is appreciated
pheonixfire
 

prestidigitator
Member
 
Posts: 632
Joined: Thu Feb 21, 2013 23:54

by prestidigitator » Sat Mar 23, 2013 06:46

I'm fairly certain that all the undefined symbols it is complaining about are because those libraries it is trying to use were compiled for the wrong target architecture. So you need to somehow find or point the build at the right versions of libjpeg, libvorbisfile, and libogg.
 

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

by pheonixfire » Wed Mar 27, 2013 23:57

can someone tell me where I would find i386 versions of libjpeg, libvorbisfile, and libogg.

any help is appreciated
pheonixfire
 

User avatar
doyousketch2
Member
 
Posts: 82
Joined: Tue Feb 05, 2013 16:06
GitHub: doyousketch2
In-game: Sketch2

by doyousketch2 » Sat Mar 30, 2013 04:35

Well, if you really can't find a Mac version,
you could try searching the Debian repositories. [url]packages.debian.org/src:libjpeg[/url]

You can click - Limit to a architecture: i386 - if you so choose.

Tho I think you'd be better of searching for a FreeBSD version if you can,
'cuz OS X was kinda built off that.

If you can't drop them in as a replacement, you may have to build them from source.
Last edited by doyousketch2 on Sat Mar 30, 2013 04:45, edited 1 time in total.
 

User avatar
doyousketch2
Member
 
Posts: 82
Joined: Tue Feb 05, 2013 16:06
GitHub: doyousketch2
In-game: Sketch2

by doyousketch2 » Sat Mar 30, 2013 09:25

Was thinking about this while commenting on a Fedora thread-

install MacPorts

http://www.macports.org/install.php

then try something like Calinou's "one-line" Debian install
but swap out APT-GET to PORT:

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
sudo port install git-core build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libsm-dev libcurl4-openssl-dev; git clone git://github.com/minetest/minetest.git;cd minetest/games; git clone git://github.com/minetest/minetest_game.git; git clone git://github.com/minetest/common.git; cd ..; cmake . -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1; cd src; make -j2; cd ../bin; ./minetest; echo -e "\n\nYou can run Minetest again by double-clicking "minetest" in the "bin" folder of the "minetest" folder in your home folder.\nYou can install mods in ~/minetest/mods/minetest, too."


tho, as I pointed out in the Fedora thread, the folder will be owned by the admin, so you may want to "change group" and/or "change owner" so you can access it.

you'd change it to whatever your (user) name is on your machine.

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
sudo port install git-core build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libsm-dev libcurl4-openssl-dev; git clone git://github.com/minetest/minetest.git;cd minetest/games; git clone git://github.com/minetest/minetest_game.git; git clone git://github.com/minetest/common.git; cd ..; cmake . -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1; cd src; make -j2;cd ..;chgrp -R (user) minetest;chown -R (user) minetest; cd ../bin; ./minetest; echo -e "\n\nYou can run Minetest again by double-clicking "minetest" in the "bin" folder of the "minetest" folder in your home folder.\nYou can install mods in ~/minetest/mods/minetest, too."


Make sure to change the two spots in there called (user)
into the name you use to log into your computer.

so, in your particular case, it looks like you log in as james.
thus, for yours it would be:

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
sudo port install git-core build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libsm-dev libcurl4-openssl-dev; git clone git://github.com/minetest/minetest.git;cd minetest/games; git clone git://github.com/minetest/minetest_game.git; git clone git://github.com/minetest/common.git; cd ..; cmake . -DRUN_IN_PLACE=1 -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1; cd src; make -j2;cd ..;chgrp -R james minetest;chown -R james minetest; cd ../bin; ./minetest; echo -e "\n\nYou can run Minetest again by double-clicking "minetest" in the "bin" folder of the "minetest" folder in your home folder.\nYou can install mods in ~/minetest/mods/minetest, too."


for everone else, they gotta swap out james for their log-in name. I think it's usually not capitalized.
Last edited by doyousketch2 on Sat Mar 30, 2013 09:36, edited 1 time in total.
 

User avatar
doyousketch2
Member
 
Posts: 82
Joined: Tue Feb 05, 2013 16:06
GitHub: doyousketch2
In-game: Sketch2

by doyousketch2 » Sat Mar 30, 2013 09:57

eh, you know what...

I'm pretty sure that'll do ok on Fedora, but I just tried typing those libraries into the MacPorts search engine
and it's only coming up with results for: git-core cmake libogg libvorbis.

that may get you ever-so-slightly closer, as you can at least install MacPorts, then:
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
sudo port install git-core cmake libogg libvorbis


but I think you may have to find the rest of the libraries from a BSD source.
FreeBSD, NetBSD, perhaps OpenBSD...

http://www.freebsd.org/ports/master-index.html

then you can try the Debian repos as a last option,
'cuz I know that it has 'em, but I dunno if they are compatible.

If you go that route, pull 'em from testing - they call it "wheezy"
or possibly stable - they call it "squeeze"
but only if they don't have a version in testing, those are newer.

building each dependency from source may be your best bet.
Last edited by doyousketch2 on Sat Mar 30, 2013 10:05, edited 1 time in total.
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 38 guests

cron