Compile on Mac issues

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
tatagatha
Posts: 9
Joined: Mon Nov 09, 2009 2:18 pm

Compile on Mac issues

Post by tatagatha »

Hello all,

I'm trying to compile on my mac and I'm running into issues that I can't seem to resolve. Yes I tried to use lhagan's installer, but the resulting app was not supported on my architecture.

So, running configure as instructed

Code: Select all

checking whether Qt is installed as framework... yes
checking whether QtWebKit is available... no
checking for Qt >= 4.1... yes
Looking deeper into config.log

Code: Select all

configure:16723: checking whether QtWebKit is available
configure:16736: g++ -o conftest -g -O2 -I/usr/share/qt4/include -I/usr/share/qt4/include/QtWebKit  conftest.cpp  >&5
conftest.cpp:50:20: error: QWebView: No such file or directory
I don't have anything at /usr/share/qt4 ... Should I? I installed qt as directed in the notes.

Also, looking at the parameters to configure

--with-qt4-bin=/usr/bin

when I look in /usr/bin all I see are some conversion utitilities for qt3to4 and qt4to4.5

Any help plodding through this would be much appreciated.
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: Compile on Mac issues

Post by jriegel »

Hi,
what exact Qt Version you have?

WebKit came with 4.4 I think! Its a stand alone .so like QtCore, QtGui, QtWebKit....
Stop whining - start coding!
tatagatha
Posts: 9
Joined: Mon Nov 09, 2009 2:18 pm

Re: Compile on Mac issues

Post by tatagatha »

jriegel wrote:Hi,
what exact Qt Version you have?
WebKit came with 4.4 I think! Its a stand alone .so like QtCore, QtGui, QtWebKit....
Hello,

Following the link from the CompileOnMac wiki page, I'm using the QT libraries 4.5 for mac.

Marc
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Compile on Mac issues

Post by wmayer »

Hi Marc,

today I got a patch from lhagan. Maybe this solves the Webkit issue. Please, check-out the latest revision from SVN trunk.

Werner
tatagatha
Posts: 9
Joined: Mon Nov 09, 2009 2:18 pm

Re: Compile on Mac issues

Post by tatagatha »

Unfortunately, updating from the trunk didn't fix the problem.
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Compile on Mac issues

Post by wmayer »

There is a test that checks for QWebkit as framework. Could you please post your complete config.log to narrow down the problem?
tatagatha
Posts: 9
Joined: Mon Nov 09, 2009 2:18 pm

Re: Compile on Mac issues

Post by tatagatha »

wmayer wrote:There is a test that checks for QWebkit as framework. Could you please post your complete config.log to narrow down the problem?
It looks like I can't attach the file no matter what extension I use. I've clipped what I think is the relevant part.

Code: Select all

configure:16666: checking whether Qt is installed as framework
configure:16683: g++ -o conftest -g -O2   -F/Library/Frameworks -framework QtCore conftest.cpp  >&5
configure:16683: $? = 0
configure:16692: result: yes
configure:16723: checking whether QtWebKit is available
configure:16736: g++ -o conftest -g -O2 -I/usr/share/qt4/include -I/usr/share/qt4/include/QtWebKit  conftest.cpp  >&5
conftest.cpp:50:20: error: QWebView: No such file or directory
configure:16736: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "FreeCAD"
| #define PACKAGE_TARNAME "FreeCAD"
| #define PACKAGE_VERSION "0.9.2626"
| #define PACKAGE_STRING "FreeCAD 0.9.2626"
| #define PACKAGE_BUGREPORT "wmayer@users.sourceforge.net"
| #define PACKAGE_URL ""
| #define PACKAGE "FreeCAD"
| #define VERSION "0.9.2626"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_ISTREAM 1
| #define HAVE_OSTREAM 1
| #define HAVE_ISTREAM 1
| #define HAVE_FSTREAM 1
| #define HAVE_IOS 1
| #define HAVE_IOMANIP 1
| #define HAVE_IOSTREAM 1
| #define HAVE_IOMANIP_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_FLOAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_SYS_FILIO_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_LIBC_H 1
| #define HAVE_SSTREAM 1
| #define HAVE_NAMESPACES /**/
| #define HAVE_STD_IOSTREAM /**/
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_GETENVIRONMENTVARIABLE 1
| #define HAVE_GL_GL_H 1
| #define HAVE_QGLFORMAT_EQ_OP 1
| #define HAVE_QGLFORMAT_SETOVERLAY 1
| #define HAVE_QGLWIDGET_SETAUTOBUFFERSWAP 1
| #define HAVE_QT_KEYPAD_DEFINE 1
| #define HAVE_QWIDGET_SHOWFULLSCREEN 1
| #define HAVE_SYS_TYPES_H 1
| #define USE_STD_IOSTREAM 1
| /* end confdefs.h.  */
| #include <QWebView>
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:16743: result: no
configure:17337: checking for Qt >= 4.1
configure:17392: /usr/bin/moc myqt.h -o moc_myqt.cpp
configure:17395: $? = 0
configure:17402: g++ -F/Library/Frameworks -I/Library/Frameworks/Qt3Support.framework/Headers -I/Library/Frameworks/QtGui.framework/Headers -I/Library/Frameworks/QtCore.framework/Headers -I/Library/Frameworks/QtOpenGL.framework/Headers -I/Library/Frameworks/QtNetwork.framework/Headers -I/Library/Frameworks/QtSvg.framework/Headers -I/Library/Frameworks/QtXml.framework/Headers -I/usr/include/QtUiTools -c -g -O2 -o moc_myqt.o moc_myqt.cpp
configure:17405: $? = 0
configure:17412: g++ -F/Library/Frameworks -I/Library/Frameworks/Qt3Support.framework/Headers -I/Library/Frameworks/QtGui.framework/Headers -I/Library/Frameworks/QtCore.framework/Headers -I/Library/Frameworks/QtOpenGL.framework/Headers -I/Library/Frameworks/QtNetwork.framework/Headers -I/Library/Frameworks/QtSvg.framework/Headers -I/Library/Frameworks/QtXml.framework/Headers -I/usr/include/QtUiTools -c -g -O2 -o myqt.o myqt.cpp
configure:17415: $? = 0
configure:17423: g++ -Wl,-F/Library/Frameworks -Wl,-framework,QtCore  -o myqt myqt.o moc_myqt.o
configure:17426: $? = 0
configure:17432: ./myqt
configure:17435: $? = 0
configure:17437: result: yes
configure:17506: checking for coin-config
configure:17524: found /usr/local/bin/coin-config
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Compile on Mac issues

Post by wmayer »

I have reworked the Webkit check. Please check-out the latest version of acinclude.m4 from SVN trunk to see if that solves the issue.
lhagan
Posts: 105
Joined: Sun Jul 26, 2009 6:54 pm

Re: Compile on Mac issues

Post by lhagan »

Sorry for being late to reply, somehow I missed your post.

I had issues with WebKit as well. Looking back at the logs, configure did not detect WebKit, but configure did not fail as a result. During make, FreeCAD still tried to build using WebKit and failed as a result. The patch that Werner referenced fixed the issue (for me) in the make step even though configure still said it did not detect WebKit.

I just tried the latest SVN, and configure does detect WebKit now. Could you give this a try and post any error messages? If this works, you should be most of the way there. There are still a couple of minor issues for which I have fixes -- I'll be posting them tonight -- but I have just successfully built and run the current FreeCAD revision on Snow Leopard.
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Compile on Mac issues

Post by wmayer »

Hi,

Webkit was introduced in Qt 4.4 but in FreeCAD we still support Qt 4.3 and older because some systems such as Ubuntu Hardy still have Qt 4.3 as their default version.

That's why we check for Webkit at configure time but do not stop with an error if it is not found. At build time we use the QT_VERSION macro to judge to build the Webkit dependent code or not.

As the test was not properly working as result the includes and libs weren't setup correctly which led to the errors at build time.

Thanks for your quick feedback.

Werner
Post Reply