Opened 15 years ago

Closed 15 years ago

#18306 closed defect (fixed)

automoc requires apple-gcc42 depends-build

Reported by: jm@… Owned by: illogic-al@…
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: Cc:
Port: automoc

Description (last modified by jmroot (Joshua Root))

--->  Configuring automoc
CMake Error at /opt/local/share/cmake-2.6/Modules/CMakeDetermineCCompiler.cmake:31 (MESSAGE):
  Could not find compiler set in environment variable CC:

  /usr/bin/gcc-4.2.
Call Stack (most recent call first):
  CMakeLists.txt:1 (project)

In the portfile: configure.compiler gcc-4.2

If the port requires, apple-gcc42 then it should be in the build depencies? Attached is a patch which fixes this issue.

Attachments (10)

patch-automoc.txt (314 bytes) - added by jm@… 15 years ago.
patch-automoc.diff (550 bytes) - added by jm@… 15 years ago.
Add gcc42 compilation options.
patch-phonon.diff (508 bytes) - added by jm@… 15 years ago.
patch-soprano.diff (612 bytes) - added by jm@… 15 years ago.
Soprano gcc42 compilation fix.
patch-kdelibs4.diff (729 bytes) - added by jm@… 15 years ago.
Allows to compile setting compiler to gcc42
patch-qimageblitz.diff (283 bytes) - added by jm@… 15 years ago.
Compiler flags set to gcc42.
patch-akonadi.diff (334 bytes) - added by jm@… 15 years ago.
gcc42 compiler option for Akonadi portfile.
patch-kdepimlibs4.diff (315 bytes) - added by jm@… 15 years ago.
kdepimlibs4 gcc42 compilation options.
patch-kdesdk4.diff (304 bytes) - added by jm@… 15 years ago.
gcc42 compiler option for Kdesdk4
patch-kde4port.diff (373 bytes) - added by jm@… 15 years ago.

Download all attachments as: .zip

Change History (31)

comment:1 Changed 15 years ago by jm@…

The patch does not solve the issue. Can you help?

Changed 15 years ago by jm@…

Attachment: patch-automoc.txt added

comment:2 Changed 15 years ago by jm@…

I could compile automoc with gcc4 and remove the requirement for gcc42. I don't know MacPorts enough to judge if this fix is correct.

comment:3 Changed 15 years ago by jm@…

Example:

sudo port -v install phonon
--->  Configuring phonon
CMake Error at /opt/local/share/cmake-2.6/Modules/CMakeDetermineCCompiler.cmake:31 (MESSAGE):
  Could not find compiler set in environment variable CC:

  /usr/bin/gcc-4.2.
Call Stack (most recent call first):
  CMakeLists.txt:1 (project)


CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_audio_phonon/work/build/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_audio_phonon/work/build/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_audio_phonon/work/build" && cmake -DCMAKE_INSTALL_PREFIX=/opt/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DQT_QMAKE_EXECUTABLE=/opt/local/libexec/qt4-mac/bin/qmake -Wno-dev -DBUILD_doc=ON -DBUILD_SHARED_LIBS=ON -DBUNDLE_INSTALL_DIR=/Applications/MacPorts/KDE4 -DPHONON_INCLUDE_DIR=/opt/local/include -DPHONON_LIBRARY=/opt/local/lib/libphonon.dylib -DKDE_DISTRIBUTION_TEXT="MacPorts/Mac OS X" -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib ../phonon-4.3.0 " returned error 1
Command output: CMake Error at /opt/local/share/cmake-2.6/Modules/CMakeDetermineCCompiler.cmake:31 (MESSAGE):
  Could not find compiler set in environment variable CC:

  /usr/bin/gcc-4.2.
Call Stack (most recent call first):
  CMakeLists.txt:1 (project)


CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_audio_phonon/work/build/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_audio_phonon/work/build/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

Warning: the following items did not execute (for phonon): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.

comment:4 Changed 15 years ago by jmroot (Joshua Root)

Description: modified (diff)
Milestone: Port EnhancementsPort Bugs
Owner: changed from macports-tickets@… to illogic-al@…
Port: automoc added

Changed 15 years ago by jm@…

Attachment: patch-automoc.diff added

Add gcc42 compilation options.

Changed 15 years ago by jm@…

Attachment: patch-phonon.diff added

Changed 15 years ago by jm@…

Attachment: patch-soprano.diff added

Soprano gcc42 compilation fix.

Changed 15 years ago by jm@…

Attachment: patch-kdelibs4.diff added

Allows to compile setting compiler to gcc42

Changed 15 years ago by jm@…

Attachment: patch-qimageblitz.diff added

Compiler flags set to gcc42.

Changed 15 years ago by jm@…

Attachment: patch-akonadi.diff added

gcc42 compiler option for Akonadi portfile.

Changed 15 years ago by jm@…

Attachment: patch-kdepimlibs4.diff added

kdepimlibs4 gcc42 compilation options.

Changed 15 years ago by jm@…

Attachment: patch-kdesdk4.diff added

gcc42 compiler option for Kdesdk4

comment:5 Changed 15 years ago by jm@…

kdepimlibs4 fails:

/opt/local/bin/cmake -E cmake_progress_report /opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/build/CMakeFiles 
[ 76%] Building CXX object akonadi/tests/testrunner/CMakeFiles/akonaditest.dir/setup.o
cd /opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/build/akonadi/tests/testrunner && /opt/local/bin/g++-mp-4.2   -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -O2  -fno-common -Woverloaded-virtual -fvisibility=hidden -fvisibility-inlines-hidden -fexceptions -fexceptions -O2 -DNDEBUG -DQT_NO_DEBUG -I/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/build/akonadi/tests/testrunner -I/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/kdepimlibs-4.2.0/akonadi/tests/testrunner -I/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/kdepimlibs-4.2.0 -I/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/build -I/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/kdepimlibs-4.2.0/akonadi -I/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/kdepimlibs-4.2.0/akonadi/tests/.. -I/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/kdepimlibs-4.2.0/akonadi/tests -I/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/build/akonadi/tests/.. -I/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/kdepimlibs-4.2.0/kabc -I/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/kdepimlibs-4.2.0/kcal -I/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/build/kabc -I/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/build/kcal -I/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/build/akonadi -I/opt/local/include -I/opt/local/include/KDE -I/opt/local/libexec/qt4-mac/include/phonon -I/opt/local/libexec/qt4-mac/include/QtXmlPatterns -I/opt/local/libexec/qt4-mac/include/QtWebKit -I/opt/local/libexec/qt4-mac/include/QtHelp -I/opt/local/libexec/qt4-mac/include/QtAssistant -I/opt/local/libexec/qt4-mac/include/QtDBus -I/opt/local/libexec/qt4-mac/include/QtTest -I/opt/local/libexec/qt4-mac/include/QtUiTools -I/opt/local/libexec/qt4-mac/include/QtScript -I/opt/local/libexec/qt4-mac/include/QtSvg -I/opt/local/libexec/qt4-mac/include/QtXml -I/opt/local/libexec/qt4-mac/include/QtSql -I/opt/local/libexec/qt4-mac/include/QtOpenGL -I/opt/local/libexec/qt4-mac/include/QtNetwork -I/opt/local/libexec/qt4-mac/include/QtDesigner -I/opt/local/libexec/qt4-mac/include/Qt3Support -I/opt/local/libexec/qt4-mac/include/QtGui -I/opt/local/libexec/qt4-mac/include/QtCore -I/opt/local/libexec/qt4-mac/include/Qt -I/opt/local/libexec/qt4-mac/mkspecs/default -I/opt/local/libexec/qt4-mac/include   -F/opt/local/libexec/qt4-mac/lib -L/opt/local/libexec/qt4-mac/lib -D__APPLE_KDE__ -D_LARGEFILE64_SOURCE -o CMakeFiles/akonaditest.dir/setup.o -c /opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/kdepimlibs-4.2.0/akonadi/tests/testrunner/setup.cpp
/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/kdepimlibs-4.2.0/akonadi/tests/testrunner/setup.cpp: In member function 'bool SetupTest::clearEnvironment()':
/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/kdepimlibs-4.2.0/akonadi/tests/testrunner/setup.cpp:53: error: could not convert 'unsetenv(QString::toAscii() const().QByteArray::operator const char*())' to 'bool'
/opt/local/var/macports/build/_opt_mports_trunk_dports_kde_kdepimlibs4/work/kdepimlibs-4.2.0/akonadi/tests/testrunner/setup.cpp:53: error: in argument to unary !
make[2]: *** [akonadi/tests/testrunner/CMakeFiles/akonaditest.dir/setup.o] Error 1
make[1]: *** [akonadi/tests/testrunner/CMakeFiles/akonaditest.dir/all] Error 2
make: *** [all] Error 2

Warning: the following items did not execute (for kdepimlibs4): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.

comment:6 Changed 15 years ago by illogic-al@…

The reason gcc42 is set as the compiler for the kde ports is because gcc4 won't work and gnu's gcc 4.2 doesn't work either. So the fix, would be to update the apple-gcc42 port to the latest version. I'm trying to get this working in ticket #16666.

comment:7 Changed 15 years ago by illogic-al@…

btw, all these patches aren't necessary. All the common building bits are in a port group so only one file would need to be patched. See trunk/dports/_resources/port1.0/group/kde4-1.0.tcl :-) If you get this working, that is probably the only file you would need to patch.

comment:8 Changed 15 years ago by jm@…

I changed the file on my local svn checkout files. Now how to use them for testing locally?

comment:9 Changed 15 years ago by jm@…

Please find attached a patch which adds gcc42 build requirement to kde4-1.0.tcl. It is quite a trivial patch for consistency. Then we may decide to replace gcc42 by mac-gcc42. This is becoming quite important and it would be nice to fix Kde4 compilation rapidly.

Changed 15 years ago by jm@…

Attachment: patch-kde4port.diff added

comment:10 Changed 15 years ago by jm@…

According to Kde team, KDE4 should be able to compile using gcc42. Now, how do I apply the kde4port patch locally to testing purpose?

comment:11 in reply to:  10 Changed 15 years ago by illogic-al@…

Replying to jm@…:

According to Kde team, KDE4 should be able to compile using gcc42. Now, how do I apply the kde4port patch locally to testing purpose?

It should already be applied (how would you have made a patch otherwise)? If you mean you want it applied in macports you need to prove to me that this actually works. Normally I'd test it myself but I'm still working on other things atm, and am not willing to break things for everybody. So, prove that using gcc42 both a) compiles and b) produces programs that actually run and i'll make the change.

comment:12 Changed 15 years ago by jm@…

I am stuck trying to prepare packages for Kdenlive (http://www.kdenlive.org)
Tuning compilation parameters in trunk/dports/_resources/port1.0/group/kde4-1.0.tcl is important.
Can you help us? We are stuck on kde4 and this is normal.

comment:13 Changed 15 years ago by jm@…

Okay. I was able to patch automoc to use macports gcc42. Then I modified kde4-1.0.tcl and I am recompiling the buzz. Stay tuned.

comment:14 Changed 15 years ago by sergio.roa@…

Hi! Please take a look at this ticket: #18471. I managed to install the above mentioned libraries and kdebase4-runtime

comment:15 Changed 15 years ago by illogic-al@…

What's the word jm? What happened with using macports gcc42? Can this ticket be closed?

comment:16 Changed 15 years ago by jm@…

This bug only affect MacOs 10.4, which offre gcc4.0.
apple-gcc-42 compiles fine. Now there are two issues:

  • apple-gcc42 does not correspond to any compiler option. I tried apple-gcc-42 without success. So this should be solved first.
  • automoc compiler should be configured to use a specific compiler.
  • Then trunk/dports/_resources/port1.0/group/kde4-1.0.tcl should be partched to reference apple-gcc-42

comment:17 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:18 Changed 15 years ago by illogic-al@…

Status: newassigned

comment:19 Changed 15 years ago by dbevans (David B. Evans)

I think the way to configure apple-gcc-42 is this

configure.compiler  apple-gcc-4.2

See UsingTheRightCompiler

comment:20 in reply to:  19 Changed 15 years ago by illogic-al@…

Replying to devans@…:

I think the way to configure apple-gcc-42 is this

configure.compiler apple-gcc-4.2

See UsingTheRightCompiler

Does the apple-gcc-4.2 port build a c++ compiler now?

comment:21 Changed 15 years ago by illogic-al@…

Resolution: fixed
Status: assignedclosed

Fixed in r53425.

Note: See TracTickets for help on using tickets.