v11.4 compile OS X 64 bit - different error

Asked by Alchymy Laboratory

Official V11.4 64bit now works on my iMac. However attempt to compile from current source now has different issue to attempts at 11.3?

Last login: Mon Aug 27 10:58:39 on ttys000
IRON:~ alchymylab$ cd developer/stellarium
IRON:stellarium alchymylab$ cd builds/macosx
IRON:macosx alchymylab$ make
[ 0%] Generating ui_quasarsDialog.h
[ 0%] Generating moc_Quasars.cxx
[ 0%] Generating gui/moc_QuasarsDialog.cxx
[ 1%] Generating qrc_Quasars.cxx
Scanning dependencies of target Quasars-static
[ 1%] Building CXX object plugins/Quasars/src/CMakeFiles/Quasars-static.dir/Quasars.cpp.o
[ 1%] Building CXX object plugins/Quasars/src/CMakeFiles/Quasars-static.dir/Quasar.cpp.o
[ 1%] Building CXX object plugins/Quasars/src/CMakeFiles/Quasars-static.dir/gui/QuasarsDialog.cpp.o
[ 1%] Building CXX object plugins/Quasars/src/CMakeFiles/Quasars-static.dir/moc_Quasars.cxx.o
/Users/alchymylab/Developer/stellarium/builds/macosx/plugins/Quasars/src/moc_Quasars.cxx:14:2: error: #error "This file was generated using the moc from 4.8.2. It"
/Users/alchymylab/Developer/stellarium/builds/macosx/plugins/Quasars/src/moc_Quasars.cxx:15:2: error: #error "cannot be used with the include files from this version of Qt."
/Users/alchymylab/Developer/stellarium/builds/macosx/plugins/Quasars/src/moc_Quasars.cxx:16:2: error: #error "(The moc has changed too much.)"
/Users/alchymylab/Developer/stellarium/builds/macosx/plugins/Quasars/src/moc_Quasars.cxx:57: error: no ‘void Quasars::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’ member function declared in class ‘Quasars’
/Users/alchymylab/Developer/stellarium/builds/macosx/plugins/Quasars/src/moc_Quasars.cxx:76: error: ‘const QMetaObjectExtraData Quasars::staticMetaObjectExtraData’ is not a static member of ‘class Quasars’
/Users/alchymylab/Developer/stellarium/builds/macosx/plugins/Quasars/src/moc_Quasars.cxx:78: error: argument of type ‘void (Quasars::)(QObject*, QMetaObject::Call, int, void**)’ does not match ‘int (*)(QMetaObject::Call, int, void**)’
/Users/alchymylab/Developer/stellarium/builds/macosx/plugins/Quasars/src/moc_Quasars.cxx:82: error: ‘staticMetaObjectExtraData’ was not declared in this scope
/Users/alchymylab/Developer/stellarium/builds/macosx/plugins/Quasars/src/moc_Quasars.cxx:147: error: no ‘void QuasarsStelPluginInterface::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’ member function declared in class ‘QuasarsStelPluginInterface’
/Users/alchymylab/Developer/stellarium/builds/macosx/plugins/Quasars/src/moc_Quasars.cxx:155: error: ‘const QMetaObjectExtraData QuasarsStelPluginInterface::staticMetaObjectExtraData’ is not a static member of ‘class QuasarsStelPluginInterface’
/Users/alchymylab/Developer/stellarium/builds/macosx/plugins/Quasars/src/moc_Quasars.cxx:157: error: argument of type ‘void (QuasarsStelPluginInterface::)(QObject*, QMetaObject::Call, int, void**)’ does not match ‘int (*)(QMetaObject::Call, int, void**)’
/Users/alchymylab/Developer/stellarium/builds/macosx/plugins/Quasars/src/moc_Quasars.cxx:161: error: ‘staticMetaObjectExtraData’ was not declared in this scope
make[2]: *** [plugins/Quasars/src/CMakeFiles/Quasars-static.dir/moc_Quasars.cxx.o] Error 1
make[1]: *** [plugins/Quasars/src/CMakeFiles/Quasars-static.dir/all] Error 2
make: *** [all] Error 2
IRON:macosx alchymylab$

Question information

Language:
English Edit question
Status:
Answered
For:
Stellarium Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
treaves (treaves) said :
#1

Try deleting the entire directory, and rerunning cmake.

Revision history for this message
Alchymy Laboratory (alchymylab) said :
#2

Made no difference, will start from scratch again and run through whole process. Source was fetched with

bzr branch lp:stellarium stellarium

Revision history for this message
treaves (treaves) said :
#3

Then there is something wrong with your setup. I've never had an issue building this on any one of several Mac's, and several others do as well.

Revision history for this message
Alchymy Laboratory (alchymylab) said :
#4

Will review the setup as attempts to build 11.3 got further than this.

Revision history for this message
Alchymy Laboratory (alchymylab) said :
#5

Have upgraded Xcode to 4.4 and CMake to 2.8.9 and re-installed the Qt libraries. Reloaded source via bzr.

CMakeLists.txt now amended for apple and lists configure output as below. Are there any issues at this stage that would cause a fail to build? E.g. ICONV_SECOND_ARGUMENT_IS_CONST?

# best way to get to APPLE?
IF(APPLE)
 SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -fno-common -Wall -Wextra")
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-common -Wall -Wextra -Wno-unused-parameter")

 # uncomment one of the following, depending on minimum OS level you want
 #SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.5")
 #SET(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.5.sdk/")
 SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.6")
 SET(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.6.sdk/")

 # uncomment one of the following, depending on what platforms you want.
 # NOTE: Qt build for Cocoa is Intel only. Qt with Carbon is both, but does not seem
 # to handle 64bit well.
 #SET(CMAKE_OSX_ARCHITECTURES "i386;x86_64;ppc;ppc64")
 #SET(CMAKE_OSX_ARCHITECTURES "i386;x86_64")
 SET(CMAKE_OSX_ARCHITECTURES "x86_64")
ENDIF()

CMake now shows:

The C compiler identification is GNU 4.2.1
The CXX compiler identification is Clang 4.0.0
Checking whether C compiler has -isysroot
Checking whether C compiler has -isysroot - yes
Checking whether C compiler supports OSX deployment target flag
Checking whether C compiler supports OSX deployment target flag - yes
Check for working C compiler: /usr/bin/gcc
Check for working C compiler: /usr/bin/gcc -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: /usr/bin/c++
Check for working CXX compiler: /usr/bin/c++ -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Found Clang 2336.1
Found GCC 4.2
Looking for pow10
Looking for pow10 - not found
Looking for Q_WS_X11
Looking for Q_WS_X11 - not found.
Looking for Q_WS_WIN
Looking for Q_WS_WIN - not found.
Looking for Q_WS_QWS
Looking for Q_WS_QWS - not found.
Looking for Q_WS_MAC
Looking for Q_WS_MAC - found
Looking for QT_MAC_USE_COCOA
Looking for QT_MAC_USE_COCOA - found
Found Qt4: /usr/bin/qmake (found suitable version "4.8.2", required is "4.6.2")
Found OpenGL: /System/Library/Frameworks/OpenGL.framework
Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5")
Performing Test ICONV_SECOND_ARGUMENT_IS_CONST
Performing Test ICONV_SECOND_ARGUMENT_IS_CONST - Failed
Found Iconv: /opt/local/lib/libiconv.dylib
Found Gettext: /opt/local/bin/msgmerge (found version "0.18.1")
Found xgettext: /opt/local/bin/xgettext
Configuring done

Revision history for this message
treaves (treaves) said :
#6

You do not need to touch the cmake file.

As I said before, you seem to have a very non-standard intstall. I'll see about updating the WIKI. But, all you need is:

- cmake from their own site
- Qt 4.8.2 from Qt (the 64bit Cocoa libs)
- MacPorts
-- sudo port install intltool (which will install all you need)
- bazaar from their own site
- Xcode, with the command line tools installed

Check out trunk
mkdir builds/unix
cd builds/unix
cmake ../..
make

And it will work. That's all that is needed.

My ports:
[~ ] port list installed
expat @2.1.0 textproc/expat
gdbm @1.10 databases/gdbm
gettext @0.18.1.1 devel/gettext
intltool @0.50.2 textproc/intltool
libiconv @1.14 textproc/libiconv
ncurses @5.9 devel/ncurses
p5.12-getopt-long @2.380.0 perl/p5-getopt-long
p5.12-pathtools @3.330.0 perl/p5-pathtools
p5.12-scalar-list-utils @1.230.0 perl/p5-scalar-list-utils
p5.12-xml-parser @2.400.0 perl/p5-xml-parser
perl5.12 @5.12.4 lang/perl5.12

I have done this on three different Mac's with three different versions of the OS.

Revision history for this message
treaves (treaves) said :
#7

If you still have issues, and really want to help, we can set up a Skype call, and see if I can help troubleshoot your setup.

Revision history for this message
Alexander Wolf (alexwolf) said :
#8

Please try use only GCC or Clang compilers, not both in one time. As example, cmake -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ ../..

Revision history for this message
Alchymy Laboratory (alchymylab) said :
#9

Installed missing intltool and taking steps above get after bzr download:

Last login: Sat Sep 1 22:40:06 on ttys000
IRON:~ alchymylab$ cd developer
IRON:developer alchymylab$ cd stellarium
IRON:stellarium alchymylab$ mkdir -p builds/macosx
IRON:stellarium alchymylab$ cd builds/macosx
IRON:macosx alchymylab$ cmake -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ ../..
-- The C compiler identification is Clang 4.0.0
-- The CXX compiler identification is Clang 4.0.0
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- broken
CMake Error at /Applications/CMake 2.8-9.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler "/usr/bin/clang" is not able to compile a simple test
  program.

  It fails with the following output:

   Change Dir: /Users/alchymylab/developer/stellarium/builds/macosx/CMakeFiles/CMakeTmp

    Run Build Command:/opt/local/bin/gmake "cmTryCompileExec2023141347/fast"

  Launch of "gmake" failed: the PowerPC architecture is no longer supported.

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:12 (PROJECT)

-- Configuring incomplete, errors occurred!
IRON:macosx alchymylab$

Note - Xcode 4.4.1 has removed SDKs as it is now a self contained App, but they are commented out in CMakeLists anyway?

Revision history for this message
Alexander Wolf (alexwolf) said :
#10

hmm... maybe you have worked GCC? Please try cmake -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_CXX_FLAGS="-arch x86_64" -DCMAKE_C_FLAGS="-arch x86_64" ../..

Revision history for this message
Alchymy Laboratory (alchymylab) said :
#11

Will probably leave this for a while as we do not want to spend too much time on it, as the official 64 bit build of 11.4 now works on my iMac whereas 11.3 crashed - which started the self-build testing. I have still to move up to Mountain Lion so the 'goal posts' will move again. Will research this and testing the auto build bot once I get to lastest OS version.

Many thanks to everyone for support so far!

Can you help with this problem?

Provide an answer of your own, or ask Alchymy Laboratory for more information if necessary.

To post a message you must log in.