Opened 12 years ago

Closed 12 years ago

#36072 closed defect (fixed)

cmake: GUI variant patch error

Reported by: aeronova Owned by: cssdev
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: josephwinston (Joseph Winston), matej.batic@…, robsonpeixoto@…
Port: cmake

Description (last modified by mf2k (Frank Schima))

Hello,

I'd like to report the following error when I tried to upgrade gmsh from 2.5.0_0 to 2.5.0_1 (Mac OS X 10.6.8):

version:1
:msg:main --->  Computing dependencies for cmake:info:main .:debug:main cmake has no conflicts
:debug:main Searching for dependency: pkgconfig
:debug:main Found Dependency: receipt exists for pkgconfig
:debug:main Searching for dependency: libidn
:debug:main Found Dependency: receipt exists for libidn
:debug:main Searching for dependency: openssl
:debug:main Found Dependency: receipt exists for openssl
:debug:main Searching for dependency: qt4-mac
:debug:main Found Dependency: receipt exists for qt4-mac
:msg:main 
:debug:main Executing org.macports.main (cmake)
:debug:main changing euid/egid - current euid: 0 - current egid: 0
:debug:main egid changed to: 501
:debug:main euid changed to: 502
:debug:main Skipping completed org.macports.archivefetch (cmake)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.fetch (cmake)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.checksum (cmake)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.extract (cmake)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:patch patch phase started at Mon Sep 10 09:44:40 SGT 2012
:debug:patch Executing org.macports.patch (cmake)
:notice:patch --->  Applying patches to cmake
:info:patch --->  Applying patch-CMakeFindFrameworks.cmake.diff
:debug:patch Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_cmake/cmake/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.6'
:debug:patch Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_cmake/cmake/work/cmake-2.8.9" && /usr/bin/patch -p0'
:debug:patch Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_cmake/cmake/work/cmake-2.8.9" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/cmake/files/patch-CMakeFindFrameworks.cmake.diff'
:info:patch patching file Modules/CMakeFindFrameworks.cmake
:info:patch Reversed (or previously applied) patch detected!  Assume -R? [n] 
:info:patch Apply anyway? [n] 
:info:patch Skipping patch.
:info:patch 1 out of 1 hunk ignored -- saving rejects to file Modules/CMakeFindFrameworks.cmake.rej
:info:patch Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_cmake/cmake/work/cmake-2.8.9" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/cmake/files/patch-CMakeFindFrameworks.cmake.diff'
:info:patch Exit code: 1
:error:patch org.macports.patch for port cmake returned: command execution failed
:debug:patch Error code: CHILDSTATUS 17534 1
:debug:patch Backtrace: command execution failed
    while executing
"system $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec patch "" "< '$patch'""
    (procedure "portpatch::patch_main" line 35)
    invoked from within
"$procedure $targetname"
:info:patch Warning: targets not executed for cmake: org.macports.install org.macports.patch org.macports.configure org.macports.build org.macports.destroot
:notice:patch Please see the log file for port cmake for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_cmake/cmake/main.log

Change History (13)

comment:1 Changed 12 years ago by mf2k (Frank Schima)

Description: modified (diff)
Keywords: gmsh removed
Owner: changed from macports-tickets@… to css@…
Port: cmake added
Summary: gmsh @2.5.0_0 update error - build failurecmake patch error

In the future, please use WikiFormatting, fill in the Port field with the port that actually failed to build, and Cc that port's maintainer.

comment:2 Changed 12 years ago by raimue (Rainer Müller)

This was not a clean build attempt as indicated by "Skipping completed" in the log. Please run sudo port clean cmake, try your original command again, and then attach the log file.

comment:3 Changed 12 years ago by aeronova

Thanks for the replies. I run 'sudo port clean cmake' and then tried 'sudo port upgrade gmsh', which run upgrading cmake due to dependency. The below is the error log I got:

version:1
:msg:main --->  Computing dependencies for cmake:info:main .:debug:main cmake has no conflicts
:debug:main Searching for dependency: pkgconfig
:debug:main Found Dependency: receipt exists for pkgconfig
:debug:main Searching for dependency: libidn
:debug:main Found Dependency: receipt exists for libidn
:debug:main Searching for dependency: openssl
:debug:main Found Dependency: receipt exists for openssl
:debug:main Searching for dependency: qt4-mac
:debug:main Found Dependency: receipt exists for qt4-mac
:msg:main 
:debug:main Executing org.macports.main (cmake)
:debug:main changing euid/egid - current euid: 0 - current egid: 0
:debug:main egid changed to: 501
:debug:main euid changed to: 502
:debug:main Skipping completed org.macports.archivefetch (cmake)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.fetch (cmake)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.checksum (cmake)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.extract (cmake)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:patch patch phase started at Mon Sep 10 13:31:23 SGT 2012
:debug:patch Executing org.macports.patch (cmake)
:notice:patch --->  Applying patches to cmake
:info:patch --->  Applying patch-CMakeFindFrameworks.cmake.diff
:debug:patch Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_cmake/cmake/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.6'
:debug:patch Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_cmake/cmake/work/cmake-2.8.9" && /usr/bin/patch -p0'
:debug:patch Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_cmake/cmake/work/cmake-2.8.9" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/cmake/files/patch-CMakeFindFrameworks.cmake.diff'
:info:patch patching file Modules/CMakeFindFrameworks.cmake
:info:patch Reversed (or previously applied) patch detected!  Assume -R? [n] 
:info:patch Apply anyway? [n] 
:info:patch Skipping patch.
:info:patch 1 out of 1 hunk ignored -- saving rejects to file Modules/CMakeFindFrameworks.cmake.rej
:info:patch Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_cmake/cmake/work/cmake-2.8.9" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/cmake/files/patch-CMakeFindFrameworks.cmake.diff'
:info:patch Exit code: 1
:error:patch org.macports.patch for port cmake returned: command execution failed
:debug:patch Error code: CHILDSTATUS 17892 1
:debug:patch Backtrace: command execution failed
    while executing
"system $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec patch "" "< '$patch'""
    (procedure "portpatch::patch_main" line 35)
    invoked from within
"$procedure $targetname"
:info:patch Warning: targets not executed for cmake: org.macports.install org.macports.patch org.macports.configure org.macports.build org.macports.destroot
:notice:patch Please see the log file for port cmake for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_cmake/cmake/main.log


comment:4 Changed 12 years ago by gnw3

"cmake +gui" fails to build for me on SL at the patch stage, but for patch-CMakeLists.txt.diff, not patch-CMakeFindFrameworks.cmake.diff as reported here.

$ sudo port clean cmake
--->  Cleaning cmake
a$ sudo port configure cmake
--->  Computing dependencies for cmake
--->  Fetching distfiles for cmake
--->  Verifying checksum(s) for cmake
--->  Extracting cmake
--->  Applying patches to cmake
--->  Configuring cmake

but fails when +gui is used:

$ sudo port clean cmake
--->  Cleaning cmake
$ sudo port configure cmake +gui
--->  Computing dependencies for cmake
--->  Fetching distfiles for cmake
--->  Verifying checksum(s) for cmake
--->  Extracting cmake
--->  Applying patches to cmake
Error: org.macports.patch for port cmake returned: command execution failed
Please see the log file for port cmake for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_www.macports.org_files_ports_devel_cmake/cmake/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port cmake failed

The problem appears to be with patch-CMakeLists.txt.diff

:info:patch patching file CMakeLists.txt
:info:patch Hunk #1 succeeded at 528 (offset -14 lines).
:info:patch Hunk #2 succeeded at 541 (offset -14 lines).
:info:patch patching file Source/QtDialog/CMakeLists.txt
:info:patch Hunk #1 FAILED at 59.
:info:patch Hunk #4 succeeded at 115 with fuzz 1 (offset 1 line).
:info:patch 1 out of 4 hunks FAILED -- saving rejects to file Source/QtDialog/CMakeLists.txt.rej
:info:patch Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_www.macports.org_files_ports_devel_cmake/cmake/work/cmake-2.8.9" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/www.macports.org/files/ports/devel/cmake/files/patch-CMakeLists.txt.diff'
:info:patch Exit code: 1

comment:5 in reply to:  4 Changed 12 years ago by aeronova

Thanks for the info. I run it without gui, sudo port upgrade cmake -gui, then upgrading cmake was fine. Then it started to rebuild some packages such as

--->  Installing cmake @2.8.9_0
--->  Cleaning cmake
--->  Computing dependencies for cmake
--->  Deactivating cmake @2.8.8_1+gui
--->  Cleaning cmake
--->  Activating cmake @2.8.9_0
--->  Cleaning cmake
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  Found 17 broken file(s), matching files to ports
--->  Found 6 broken port(s), determining rebuild order
--->  Rebuilding in order
     gmsh @2.5.0 
     plotutils @2.6 
     gtkmm @2.24.2 
     gtkspell2 @2.0.16 
     libgsf @1.14.22 
     librsvg @2.36.1 
--->  Computing dependencies for gmsh

and failed at building gmsh:

:info:build [ 36%] Building CXX object CMakeFiles/gmsh.dir/Graphics/gl2png.cpp.o
:info:build /usr/bin/g++-4.2   -DNO_PARALLEL_THREADS -DTETLIBRARY -pipe -O2 -arch x86_64  -O3 -DNDEBUG -arch x86_64 -isysroot / -mmacosx-version-min=10.6 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/contrib/ANN/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/contrib/Chaco/main -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/contrib/DiscreteIntegration -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/contrib/gmm -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/contrib/kbipack -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/contrib/MathEx -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/contrib/mpeg_encode/headers -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/contrib/Metis -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/contrib/Netgen -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/contrib/Netgen/libsrc/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/contrib/Netgen/libsrc/interface -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/contrib/bamg -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/contrib/bamg/bamglib -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/contrib/Tetgen -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/Common -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/Fltk -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/Geo -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/Graphics -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/Mesh -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/Solver -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/Numeric -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/Parser -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/Plugin -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/Post -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/Qt -I/opt/local/include -I/opt/local/include/readline    -o CMakeFiles/gmsh.dir/Graphics/gl2png.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/Graphics/gl2png.cpp
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/Graphics/gl2png.cpp: In function ‘void create_png(FILE*, PixelBuffer*, int)’:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source/Graphics/gl2png.cpp:60: error: ‘Z_DEFAULT_COMPRESSION’ was not declared in this scope
:info:build make[2]: *** [CMakeFiles/gmsh.dir/Graphics/gl2png.cpp.o] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source'
:info:build make[1]: *** [CMakeFiles/gmsh.dir/all] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/work/gmsh-2.5.0-source" && /usr/bin/make -j2 -w all 
:info:build Exit code: 2
:error:build org.macports.build for port gmsh returned: command execution failed
:debug:build Error code: CHILDSTATUS 19186 2
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: targets not executed for gmsh: org.macports.install org.macports.build org.macports.destroot
:notice:build Please see the log file for port gmsh for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_gmsh/gmsh/main.log

, which I'm afraid has to do with libpng.

comment:6 Changed 12 years ago by josephwinston (Joseph Winston)

Cc: josephwinston@… added

Cc Me!

comment:7 Changed 12 years ago by matej.batic@…

Cc: matej.batic@… added

Cc Me!

comment:8 Changed 12 years ago by matej.batic@…

Happened to me, too, when upgrading cmake (+gui). Did a clean --all cmake, but the problem persists:

:info:patch patching file Source/QtDialog/CMakeLists.txt
:info:patch Hunk #1 FAILED at 59.
:info:patch Hunk #4 succeeded at 115 with fuzz 1 (offset 1 line).
:info:patch 1 out of 4 hunks FAILED -- saving rejects to file Source/QtDialog/CMakeLists.txt.rej

I could install -gui, but I'd prefer to have the nice splashy qt ui :)

comment:9 Changed 12 years ago by cssdev

Status: newassigned
Summary: cmake patch errorcmake: GUI variant patch error

I don't normally use the GUI, so I didn't catch the patch failure. I'll take a look.

comment:10 Changed 12 years ago by h_atac@…

Cc me!

comment:11 Changed 12 years ago by robsonpeixoto@…

Versions

$ port version
Version: 2.1.2

$ port installed qt4-mac
The following ports are currently installed:
  qt4-mac @4.8.2_3+framework+quartz+raster (active)

$ port info cmake
cmake @2.8.9, Revision 1 (devel)

On my machine the error is:

:info:configure CMake Warning at Modules/FindQt4.cmake:605 (MESSAGE):
:info:configure   /opt/local/bin/qmake reported QT_INSTALL_LIBS as "/opt/local/lib" but
:info:configure   QtCore could not be found there.  Qt is NOT installed correctly for the
:info:configure   target build environment.
:info:configure Call Stack (most recent call first):
:info:configure   Source/QtDialog/CMakeLists.txt:14 (FIND_PACKAGE)
:info:configure 
:info:configure 
:info:configure CMake Error at Modules/FindQt4.cmake:609 (MESSAGE):
:info:configure   Could NOT find QtCore.  Check
:info:configure   /opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_devel_cmake/cmake/work/cmake-2.8.9/CMakeFiles/CMakeError.log
:info:configure   for more details.
:info:configure Call Stack (most recent call first):
:info:configure   Source/QtDialog/CMakeLists.txt:14 (FIND_PACKAGE)
:info:configure 
:info:configure 
:info:configure -- Configuring incomplete, errors occurred!
:info:configure ---------------------------------------------
:info:configure Error when bootstrapping CMake:
:info:configure Problem while running initial CMake
:info:configure ---------------------------------------------
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_devel_cmake/cmake/work/cmake-2.8.9" && ./configure --prefix=/opt/local --mandir=/share/man --docdir=/share/doc/cmake --parallel=4 --init=/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_devel_cmake/cmake/work/cmake-2.8.9/macports.cmake --qt-gui --qt-qmake=/opt/local/bin/qmake 

comment:12 in reply to:  11 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: robsonpeixoto@… added

Replying to robsonpeixoto@…:

On my machine the error is:

...completely different and therefore belongs in a separate ticket.

comment:13 in reply to:  9 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

Replying to css@…:

I don't normally use the GUI, so I didn't catch the patch failure. I'll take a look.

It looks like r97867 fixed this.

Note: See TracTickets for help on using tickets.