CompileOnMac instruction updates

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
beaker42
Posts: 13
Joined: Fri Dec 30, 2011 2:19 am
Location: Tetchill, North Shropshire, United Kingdom
Contact:

Re: CompileOnMac instruction updates

Postby beaker42 » Sun Jan 01, 2012 8:51 pm

chrismarth wrote:Thanks to some of the tips from beaker, I have the latest SVN rev compiling (on 10.7.2) now as well. A few comments related to this:
Good to hear somebody else got it working, proves it wasn't a fluke ;)

- Jason (Beaker)
Go outside, the graphics are amazing.
jmaustpc
Posts: 10361
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: CompileOnMac instruction updates

Postby jmaustpc » Mon Jan 02, 2012 2:24 pm

Hi Jason

I wondered if beaker was your inspiration for "beaker42".

He is one of my favourite Muppets. :D

Jim
User avatar
beaker42
Posts: 13
Joined: Fri Dec 30, 2011 2:19 am
Location: Tetchill, North Shropshire, United Kingdom
Contact:

Re: CompileOnMac instruction updates

Postby beaker42 » Mon Jan 02, 2012 2:38 pm

jmaustpc wrote:I wondered if beaker was your inspiration for "beaker42".
One of the more socially acceptable of my nicknames from my school days. :lol:
Go outside, the graphics are amazing.
shaunhoulihan
Posts: 12
Joined: Thu Dec 22, 2011 2:51 am
Location: San Francisco, California, USA
Contact:

Re: CompileOnMac instruction updates

Postby shaunhoulihan » Tue Jan 03, 2012 12:32 am

Thanks to beakers help I finally got 0.12 compiled and running on osx lion too!

Successfully opened an .stl file with it. Not sure if the all the modules are working correctly (drawing etc.)

A couple errors on make including the following.

Code: Select all

/opt/local/include/boost/system/error_code.hpp: At global scope:
/opt/local/include/boost/system/error_code.hpp:214: warning: 'boost::system::posix_category' defined but not used
/opt/local/include/boost/system/error_code.hpp:215: warning: 'boost::system::errno_ecat' defined but not used
/opt/local/include/boost/system/error_code.hpp:216: warning: 'boost::system::native_ecat' defined but not used
make[6]: *** [libPart_la-AppPartPy.lo] Error 1
make[5]: *** [all] Error 2
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
I updated boost right before running config and make

Thanks again! I'll keep you posted.
arauchfuss
Posts: 14
Joined: Wed Dec 21, 2011 5:28 pm

Re: CompileOnMac instruction updates

Postby arauchfuss » Tue Jan 03, 2012 4:08 pm

Back after the holidays. Looks like I will have to have another go at compiling.
hagerstefan
Posts: 5
Joined: Thu Nov 17, 2011 8:57 pm

Re: CompileOnMac instruction updates

Postby hagerstefan » Thu Jan 05, 2012 6:55 pm

This is very good :ugeek:

I hope I´ll get it also to work under Lion.
The information to force the compile process to use Python 2.5 was hopefully the hint to get it working.

Maybe i can manage it to compile freecad in the next days :mrgreen:

best regards
Stefan
lhagan
Posts: 105
Joined: Sun Jul 26, 2009 6:54 pm

Re: CompileOnMac instruction updates

Postby lhagan » Sun Jan 08, 2012 9:26 am

I made a bunch of updates to the CompileOnMac instructions on the wiki based on the great work in this thread and my own experiences building FreeCAD earlier today. It still needs work, but I think it's a good start.

I also gave building as a single application bundle a quick try and it's almost working without too much trouble. I am having a problem getting FreeCAD to link properly to OCC (or rather OCE). This should be fixable and my portable build of FreeCAD actually starts and some features work. I'll put the compiled binary up as soon as I get it working (and instructions to make one too).
lhagan
Posts: 105
Joined: Sun Jul 26, 2009 6:54 pm

Re: CompileOnMac instruction updates

Postby lhagan » Sun Jan 08, 2012 9:52 am

Actually, maybe this is something Werner or Jurgen can help with?

I'm setting the path to OCE in configure:

Code: Select all

--with-occ-lib=/Applications/FreeCAD.app/Contents/Frameworks/lib --with-occ-include=/Applications/FreeCAD.app/Contents/Frameworks/include/oce
But it fails to detect OCE:

Code: Select all

configure:28600: $? = 0
configure:28627: result: true
configure:28679: checking OpenCascade...
configure:28717: checking Standard.hxx usability
configure:28734: g++ -c -g -O2  -I/Applications/FreeCAD.app/Contents/Frameworks/include/oce  conftest.cpp >&5
conftest.cpp:87:24: error: Standard.hxx: No such file or directory
configure:28740: $? = 1
configure: failed program was:
| /* confdefs.h.  */
That path IS correct, and configure finds OCE if I add it to CPPFLAGS first:

Code: Select all

export CPPFLAGS="-I/Applications/FreeCAD.app/Contents/Frameworks/include/oce"
However, the resulting FreeCAD binaries are missing the full paths to the OCE libraries. For example, PartGui.so should include the full path to "/Applications/FreeCAD.app/Contents/Frameworks/lib/libTKernel.2.dylib", but it only has "libTKernel.2.dylib" in the header. This is fixable in some cases, but not all, and I think that getting configure to recognize OCE without using CPPFLAGS is the key.

Any thoughts?
shaunhoulihan
Posts: 12
Joined: Thu Dec 22, 2011 2:51 am
Location: San Francisco, California, USA
Contact:

Re: CompileOnMac instruction updates

Postby shaunhoulihan » Sun Jan 08, 2012 7:16 pm

lhagan:

Tried your method of using homebrew and got the following:

Error: No available formula for coin

were you able to install coin, qt, soqt, and pyqt using this method? Do tell...
lhagan
Posts: 105
Joined: Sun Jul 26, 2009 6:54 pm

Re: CompileOnMac instruction updates

Postby lhagan » Sun Jan 08, 2012 8:26 pm

were you able to install coin, qt, soqt, and pyqt using this method? Do tell...
Sorry about that. The instructions for homebrew aren't done yet, but since nothing on the CompileOnMac page was working, I figured it wouldn't hurt to start updating. I added a note to that effect on the wiki.

I forgot that I created my own homebrew formulas for coin and soqt. Also, I would recommend installing Qt using the installer package from the Qt website as there are some issues with the homebrew version. I'm going to submit coin and soqt formulas to the official homebrew repository. Long term, I hope to have all FreeCAD dependencies working in homebrew (I find it much easier to work with than MacPorts or Fink).

The steps below should work in the meantime, but I haven't had a chance to test them on a 100% clean system, so I'm not certain that there won't be issues.

Code: Select all

brew update
brew create http://ftp.coin3d.org/coin/src/all/Coin-3.1.3.tar.gz
Then replace the contents of coin.rb with:

Code: Select all

require 'formula'

class Coin < Formula
  url 'http://ftp.coin3d.org/coin/src/all/Coin-3.1.3.tar.gz'
  homepage 'http://www.coin3d.org/'
  md5 '1538682f8d92cdf03e845c786879fbea'

  # depends_on 'cmake'

  def install
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}", "--with-framework-prefix=#{prefix}"
    # system "cmake . #{std_cmake_parameters}"
    system "make install"
  end
end
Same for soqt:

Code: Select all

brew create http://ftp.coin3d.org/coin/src/all/SoQt-1.4.1.tar.gz
And replace the contents of soqt.rb with:

Code: Select all

require 'formula'

class Soqt < Formula
  url 'http://ftp.coin3d.org/coin/src/all/SoQt-1.4.1.tar.gz'
  homepage 'http://www.coin3d.org/lib/soqt/'
  md5 '6dddafb755e9afb9924da1d46f3cd0d4'

  # depends_on 'cmake'

  def install
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}", "--with-framework-prefix=#{prefix}",
                          "--with-qt=/Library/Frameworks", "--with-framework"
    # system "cmake . #{std_cmake_parameters}"
    system "make install"
  end
end
You should now be able to brew install coin pyqt