Skip to contentSkip to conversation

eigen: follow default installation scheme

PATCH New Davide Viti 2 participants 4 messages Mar 20, 2014 – Mar 30, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/2 eigen: follow default installation scheme

eigen's build-system (cmake), by default, installs the header files in /usr/include/eigen3

---
Switching from $(generic-package) to $(cmake-package) results in known [1] build failures due to in-place compilation. Not worth fixing on this package which just needs to copy include files.

[1] http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/43687/

 package/eigen/eigen.mk | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
package/eigen/eigen.mk +4 -2
index 5abd464..9a5ce7d 100644
@@ -12,12 +12,14 @@ EIGEN_LICENSE = MPL2, BSD-3c, LGPLv2.1
 EIGEN_LICENSE_FILES = COPYING.MPL2 COPYING.BSD COPYING.LGPL COPYING.README
 EIGEN_INSTALL_STAGING = YES
 EIGEN_INSTALL_TARGET = NO
+EIGEN_DEST_DIR = $(STAGING_DIR)/usr/include/eigen3
 
 # This package only consists of headers that need to be
 # copied over to the sysroot for compile time use
 define EIGEN_INSTALL_STAGING_CMDS
-	$(RM) -r $(STAGING_DIR)/usr/include/Eigen
-	cp -a $(@D)/Eigen $(STAGING_DIR)/usr/include/
+	$(RM) -r $(EIGEN_DEST_DIR)
+	mkdir -p $(EIGEN_DEST_DIR)
+	cp -a $(@D)/Eigen $(EIGEN_DEST_DIR)
 endef
 
 $(eval $(generic-package))
Signature · 1 line
1.9.0
#1 lore raw

PATCH v5 2/2 eigen: add an option to install unsupported modules

---
Changes v4 -> v5:
- fix indentation (spaces > tabs)

Note to self: use emacs Ctrl-q TAB to force tab insertion

 package/eigen/Config.in | 8 ++++++++
 package/eigen/eigen.mk  | 7 +++++++
 2 files changed, 15 insertions(+)
package/eigen/Config.in +8 -0
index e94f9a3..03d65b1 100644
@@ -13,5 +13,13 @@ config BR2_PACKAGE_EIGEN
 
 	  http://eigen.tuxfamily.org/
 
+if BR2_PACKAGE_EIGEN
+
+config BR2_PACKAGE_EIGEN_UNSUPPORTED_MODULES
+	bool "unsupported modules"
+	help
+	  Install eigen unsupported modules
+endif
+
 comment "eigen needs a toolchain w/ C++"
 	depends on !BR2_INSTALL_LIBSTDCPP
package/eigen/eigen.mk +7 -0
index 9a5ce7d..ac030a9 100644
@@ -14,12 +14,19 @@ EIGEN_INSTALL_STAGING = YES
 EIGEN_INSTALL_TARGET = NO
 EIGEN_DEST_DIR = $(STAGING_DIR)/usr/include/eigen3
 
+ifeq ($(BR2_PACKAGE_EIGEN_UNSUPPORTED_MODULES),y)
+define EIGEN_INSTALL_UNSUPPORTED_MODULES_CMDS
+	cp -a $(@D)/unsupported $(EIGEN_DEST_DIR)
+endef
+endif
+
 # This package only consists of headers that need to be
 # copied over to the sysroot for compile time use
 define EIGEN_INSTALL_STAGING_CMDS
 	$(RM) -r $(EIGEN_DEST_DIR)
 	mkdir -p $(EIGEN_DEST_DIR)
 	cp -a $(@D)/Eigen $(EIGEN_DEST_DIR)
+	$(EIGEN_INSTALL_UNSUPPORTED_MODULES_CMDS)
 endef
 
 $(eval $(generic-package))
Signature · 1 line
1.9.0
#2 lore raw

PATCH v5 2/2 eigen: add an option to install unsupported modules

Dear Davide Viti,

Quoted 1 line · Davide Viti

However, I haven't applied this one. See below.

package/eigen/eigen.mk EIGEN_INSTALL_STAGING = YES · line 19

Quoted 3 lines
package/eigen/eigen.mk +3 -0
+ifeq ($(BR2_PACKAGE_EIGEN_UNSUPPORTED_MODULES),y)
+define EIGEN_INSTALL_UNSUPPORTED_MODULES_CMDS
+	cp -a $(@D)/unsupported $(EIGEN_DEST_DIR)

I believe this should be:

	mkdir -p $(EIGEN_DEST_DIR)/unsupported
	cp -a $(@D)/unsupported/Eigen $(EIGEN_DEST_DIR)/unsupport

Otherwise, in /usr/include/eigen3/unsupported, I get a lot of tests beyond just the Eigen header files: I get the documentation and the tests, the README.txt, etc. I believe only the contents of the unsupported/Eigen/ directory is needed.

thomas at skate:~/projets/buildroot/output/staging/usr/include/eigen3/unsupported (master)$ tree .
??? bench
??? ??? bench_svd.cpp
??? CMakeLists.txt
??? doc
??? ??? CMakeLists.txt
??? ??? eigendoxy_layout.xml.in
??? ??? examples
??? ??? ??? BVH_Example.cpp
??? ??? ??? CMakeLists.txt
??? ??? ??? FFT.cpp
??? ??? ??? MatrixExponential.cpp
??? ??? ??? MatrixFunction.cpp
??? ??? ??? MatrixLogarithm.cpp
??? ??? ??? MatrixPower.cpp
??? ??? ??? MatrixPower_optimal.cpp
??? ??? ??? MatrixSine.cpp
??? ??? ??? MatrixSinh.cpp
??? ??? ??? MatrixSquareRoot.cpp
??? ??? ??? PolynomialSolver1.cpp
??? ??? ??? PolynomialUtils1.cpp
??? ??? Overview.dox
??? ??? snippets
??? ??? CMakeLists.txt
??? Eigen
??? ??? AdolcForward
??? ??? AlignedVector3
??? ??? ArpackSupport
??? ??? AutoDiff
??? ??? BVH
??? ??? CMakeLists.txt
??? ??? FFT
??? ??? IterativeSolvers
??? ??? KroneckerProduct
??? ??? LevenbergMarquardt
??? ??? MatrixFunctions
??? ??? MoreVectorization
??? ??? MPRealSupport
??? ??? NonLinearOptimization
??? ??? NumericalDiff
??? ??? OpenGLSupport
??? ??? Polynomials
??? ??? Skyline
??? ??? SparseExtra
??? ??? Splines
??? ??? src
??? ??? ??? AutoDiff
??? ??? ??? ??? AutoDiffJacobian.h
??? ??? ??? ??? AutoDiffScalar.h
??? ??? ??? ??? AutoDiffVector.h
??? ??? ??? ??? CMakeLists.txt
??? ??? ??? BVH
??? ??? ??? ??? BVAlgorithms.h
??? ??? ??? ??? CMakeLists.txt
??? ??? ??? ??? KdBVH.h
??? ??? ??? CMakeLists.txt
??? ??? ??? Eigenvalues
??? ??? ??? ??? ArpackSelfAdjointEigenSolver.h
??? ??? ??? FFT
??? ??? ??? ??? CMakeLists.txt
??? ??? ??? ??? ei_fftw_impl.h
??? ??? ??? ??? ei_kissfft_impl.h
??? ??? ??? IterativeSolvers
??? ??? ??? ??? CMakeLists.txt
??? ??? ??? ??? ConstrainedConjGrad.h
??? ??? ??? ??? DGMRES.h
??? ??? ??? ??? GMRES.h
??? ??? ??? ??? IncompleteCholesky.h
??? ??? ??? ??? IncompleteLU.h
??? ??? ??? ??? IterationController.h
??? ??? ??? ??? MINRES.h
??? ??? ??? ??? Scaling.h
??? ??? ??? KroneckerProduct
??? ??? ??? ??? CMakeLists.txt
??? ??? ??? ??? KroneckerTensorProduct.h
??? ??? ??? LevenbergMarquardt
??? ??? ??? ??? CMakeLists.txt
??? ??? ??? ??? CopyrightMINPACK.txt
??? ??? ??? ??? LevenbergMarquardt.h
??? ??? ??? ??? LMcovar.h
??? ??? ??? ??? LMonestep.h
??? ??? ??? ??? LMpar.h
??? ??? ??? ??? LMqrsolv.h
??? ??? ??? MatrixFunctions
??? ??? ??? ??? CMakeLists.txt
??? ??? ??? ??? MatrixExponential.h
??? ??? ??? ??? MatrixFunctionAtomic.h
??? ??? ??? ??? MatrixFunction.h
??? ??? ??? ??? MatrixLogarithm.h
??? ??? ??? ??? MatrixPower.h
??? ??? ??? ??? MatrixSquareRoot.h
??? ??? ??? ??? StemFunction.h
??? ??? ??? MoreVectorization
??? ??? ??? ??? CMakeLists.txt
??? ??? ??? ??? MathFunctions.h
??? ??? ??? NonLinearOptimization
??? ??? ??? ??? chkder.h
??? ??? ??? ??? CMakeLists.txt
??? ??? ??? ??? covar.h
??? ??? ??? ??? dogleg.h
??? ??? ??? ??? fdjac1.h
??? ??? ??? ??? HybridNonLinearSolver.h
??? ??? ??? ??? LevenbergMarquardt.h
??? ??? ??? ??? lmpar.h
??? ??? ??? ??? qrsolv.h
??? ??? ??? ??? r1mpyq.h
??? ??? ??? ??? r1updt.h
??? ??? ??? ??? rwupdt.h
??? ??? ??? NumericalDiff
??? ??? ??? ??? CMakeLists.txt
??? ??? ??? ??? NumericalDiff.h
??? ??? ??? Polynomials
??? ??? ??? ??? CMakeLists.txt
??? ??? ??? ??? Companion.h
??? ??? ??? ??? PolynomialSolver.h
??? ??? ??? ??? PolynomialUtils.h
??? ??? ??? Skyline
??? ??? ??? ??? CMakeLists.txt
??? ??? ??? ??? SkylineInplaceLU.h
??? ??? ??? ??? SkylineMatrixBase.h
??? ??? ??? ??? SkylineMatrix.h
??? ??? ??? ??? SkylineProduct.h
??? ??? ??? ??? SkylineStorage.h
??? ??? ??? ??? SkylineUtil.h
??? ??? ??? SparseExtra
??? ??? ??? ??? BlockOfDynamicSparseMatrix.h
??? ??? ??? ??? CMakeLists.txt
??? ??? ??? ??? DynamicSparseMatrix.h
??? ??? ??? ??? MarketIO.h
??? ??? ??? ??? MatrixMarketIterator.h
??? ??? ??? ??? RandomSetter.h
??? ??? ??? Splines
??? ??? ??? ??? CMakeLists.txt
??? ??? ??? ??? SplineFitting.h
??? ??? ??? ??? SplineFwd.h
??? ??? ??? ??? Spline.h
??? ??? ??? SVD

??? ???     ??? BDCSVD.h
??? ???     ??? CMakeLists.txt
??? ???     ??? doneInBDCSVD.txt
??? ???     ??? JacobiSVD.h
??? ???     ??? SVDBase.h
??? ???     ??? TODOBdcsvd.txt
??? ??? SVD
??? README.txt
??? test
    ??? alignedvector3.cpp
    ??? autodiff.cpp
    ??? bdcsvd.cpp
    ??? BVH.cpp
    ??? CMakeLists.txt
    ??? dgmres.cpp
    ??? FFT.cpp
    ??? FFTW.cpp
    ??? forward_adolc.cpp
    ??? gmres.cpp
    ??? jacobisvd.cpp
    ??? kronecker_product.cpp
    ??? levenberg_marquardt.cpp
    ??? matrix_exponential.cpp
    ??? matrix_function.cpp
    ??? matrix_functions.h
    ??? matrix_power.cpp
    ??? matrix_square_root.cpp
    ??? minres.cpp
    ??? mpreal
    ??? ??? mpreal.h
    ??? mpreal_support.cpp
    ??? NonLinearOptimization.cpp
    ??? NumericalDiff.cpp
    ??? openglsupport.cpp
    ??? polynomialsolver.cpp
    ??? polynomialutils.cpp
    ??? sparse_extra.cpp
    ??? splines.cpp
    ??? svd_common.h

Care to look into this and resend a new version of the patch?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v5 1/2 eigen: follow default installation scheme

In reply to Davide Viti

Dear Davide Viti,

Quoted 4 lines · Davide Viti

eigen's build-system (cmake), by default, installs the header files in /usr/include/eigen3

I've applied this one. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com