OpenMS / contrib

Automated CMake build scripts for the OpenMS contrib libraries
Other
0 stars 21 forks source link

Eigen patch fails #60

Closed hroest closed 6 years ago

hroest commented 6 years ago

When building Eigen for the second time, applying the patches fails as follows:

$ cmake -DBUILD_TYPE=EIGEN  contrib_exp
[...all works well]
$ cmake -DBUILD_TYPE=EIGEN  contrib_exp
-- ADDRESSMODEL IS: 64 bit
-- BUILD_TYPE: EIGEN (one of: ALL;SEQAN;LIBSVM;XERCESC;BOOST;COINOR;BZIP2;ZLIB;GLPK;EIGEN;WILDMAGIC;SQLITE;KISSFFT)
-- FORCE_REBUILD: OFF
-- NUMBER_OF_JOBS: 2 (maximal number of concurrent compile jobs)
-- Downloading EIGEN .. 
-- Downloading EIGEN .. skipped (already downloaded)
-- Validating archive for EIGEN .. 
-- Validating archive for EIGEN .. done
-- Extracting EIGEN .. 
-- Extracting EIGEN .. skipped (already exists)
-- Try patching /tmp/tt/src/eigen-eigen-5a0156e40feb/CMakeList.txt with binary option ... 
-- Try patching /tmp/tt/src/eigen-eigen-5a0156e40feb/CMakeList.txt without binary option ... 
-- Patching /tmp/tt/src/eigen-eigen-5a0156e40feb/CMakeList.txt ... failed (with and without --binary option)
-- Check if the patch was created with 'diff -u' and if the paths are correct!
-- Call was: /tmp/tt/src/eigen-eigen-5a0156e40feb: /usr/bin/patch  -p0 -b -N -i "/home/hr/openmsall/source/contrib_exp/patches//eigen/CMakeList.txt.patch"
CMake Error at macros.cmake:248 (message):
  patching file CMakeLists.txt

  Reversed (or previously applied) patch detected! Skipping patch.

  2 out of 2 hunks ignored -- saving rejects to file CMakeLists.txt.rej
Call Stack (most recent call first):
  libraries.cmake/eigen.cmake:20 (OPENMS_PATCH)
  CMakeLists.txt:543 (OPENMS_CONTRIB_BUILD_EIGEN)

-- Configuring incomplete, errors occurred!
See also "/tmp/tt/CMakeFiles/CMakeOutput.log".

this is quite annoying and does not happen for any of the other contrib packages. We probably should not try to apply the patches twice

timosachsenberg commented 6 years ago

Ok I will take a look at it.


MACRO ( OPENMS_PATCH patchfile_varname workingdir_varname patchedfile_varname)
  ## First try: with --binary (because of EOL problems, OS and patch.exe specific)
  set( PATCH_ARGUMENTS "-p0 --binary -b -N -i") ## NOTE: always keep -i as last argument !!
  if (EXISTS ${${patchedfile_varname}}.orig)
    message(STATUS "Patching ${${patchedfile_varname}} ... skipped (already applied)")

It seems that it should not patch if there is already the patched file with extension .orig

timosachsenberg commented 6 years ago

ok think I found the problem. uses CMakeList.txt instead of CMakeLists.txt

timosachsenberg commented 6 years ago

pushed a fix to contrib