Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Installing ITK (science overlay)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
ogenos
n00b
n00b


Joined: 22 Feb 2013
Posts: 41

PostPosted: Tue Jul 14, 2015 12:42 pm    Post subject: [solved] Installing ITK (science overlay) Reply with quote

Hello,

I need to install ITK from science overlay. I have added the overlay to the layman, then used emerge in the usual way. ITK installs without any hitch as long as the "python" flag isn't activated, but otherwise fails:

Code:
...
 tlib.dir/sparse/spOutput.c.o -lm
cd /var/tmp/portage/sci-libs/itk-4.5.1/work/itk-4.5.1_build/Modules/ThirdParty/VNL/src/vxl/v3p/netlib && /usr/bin/cmake -E cmake_symlink_library ../../../../../../../lib/libitkv3p_netlib-4.5.so.1 ../../../../../../../lib/libitkv3p_netlib-4.5.so.1 ../../../../../../../lib/libitkv3p_netlib-4.5.so
make[2]: Leaving directory '/var/tmp/portage/sci-libs/itk-4.5.1/work/itk-4.5.1_build'
/usr/bin/cmake -E cmake_progress_report /var/tmp/portage/sci-libs/itk-4.5.1/work/itk-4.5.1_build/CMakeFiles  93 94 95 96
[  7%] Built target itkv3p_netlib
make[1]: Leaving directory '/var/tmp/portage/sci-libs/itk-4.5.1/work/itk-4.5.1_build'
Makefile:136: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: sci-libs/itk-4.5.1::science failed (compile phase):
 *   emake failed


I need to have ITK installed with python wrappers activated. Has anyone been successful with correcting this error? I would appreciate it if someone helps me with the solution.

Thanks.


Last edited by ogenos on Thu Jul 16, 2015 5:39 pm; edited 3 times in total
Back to top
View user's profile Send private message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 431

PostPosted: Wed Jul 15, 2015 10:55 am    Post subject: Reply with quote

1) My compilation failed at 8%, not 7% idk why

2) u should check build log and paste log with FIRST ERROR like this, so ppl wouldnt need to recompile to check that ( and u would get answer faster):
Code:
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include/g++-v4.9/bits/char_traits.h:39,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include/g++-v4.9/string:40,
                 from /var/tmp/portage/sci-libs/itk-4.5.1/work/InsightToolkit-4.5.1/Modules/Core/Common/include/itkMacro.h:47,
                 from /var/tmp/portage/sci-libs/itk-4.5.1/work/InsightToolkit-4.5.1/Modules/Core/Common/include/itkLightObject.h:21,
                 from /var/tmp/portage/sci-libs/itk-4.5.1/work/InsightToolkit-4.5.1/Modules/Core/Common/include/itkObject.h:31,
                 from /var/tmp/portage/sci-libs/itk-4.5.1/work/InsightToolkit-4.5.1/Modules/Core/Common/include/itkCommand.h:21,
                 from /var/tmp/portage/sci-libs/itk-4.5.1/work/itk-4.5.1_build/Wrapping/Modules/ITKCommon/vcl_complex.cxx:1:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include/g++-v4.9/bits/stl_algobase.h: In function '_OI std::__copy_move_a(_II, _II, _OI)':
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/include/g++-v4.9/bits/stl_algobase.h:390: error: expected primary-expression before ')' token


So its obvious it has some problems with gcc 4.9.2 ( probably newer version will work later with gcc 4.9.X)

3) So I compiled successfully ( almost, i interrupted at 75%, because it was taking ages )using gcc 4.8.3 ( use gcc-config to change, revert later )
_________________
Installation aborted to prevent system self-destruction
Back to top
View user's profile Send private message
ogenos
n00b
n00b


Joined: 22 Feb 2013
Posts: 41

PostPosted: Wed Jul 15, 2015 12:03 pm    Post subject: Reply with quote

Hello mir3x,

Thank you for helping!

I have these errors in my ITK log:

Code:
...
[  6%] [  6%] [  6%] gccxml_cc1plus: error: gccxml_builtins.h: No such file or directory
...
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/bits/stl_algobase.h: In function '_OI std::__copy_move_a(_II, _II, _OI)':
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/bits/stl_algobase.h:384: error: expected primary-expression before ')' token
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/bits/stl_algobase.h:384: error: there are no arguments to '__is_trivial' that depend on a template parameter, so a declaration of '__is_trivial' must be available
...


I don't have other versions of gcc apart from 4.8.4

Code:
# gcc-config -l
 [1] avr-4.8.4 *

 [2] x86_64-pc-linux-gnu-4.8.4 *


Please advise further.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Jul 15, 2015 12:32 pm    Post subject: Reply with quote

ebuild mentions [edit] python 2.7

not sure how that influences the build, but maybe worth to check if python is set to 2.7


Last edited by Roman_Gruber on Wed Jul 15, 2015 12:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
ogenos
n00b
n00b


Joined: 22 Feb 2013
Posts: 41

PostPosted: Wed Jul 15, 2015 12:45 pm    Post subject: Reply with quote

Hello tw04l124,

Do you mean python 2.7?

Code:
# eselect python list
Available Python interpreters:
  [1]   python2.7 *
  [2]   python3.3
  [3]   python3.4
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Jul 15, 2015 1:11 pm    Post subject: Reply with quote

ebuild fails for a previous required package here:

Code:
emerge sci-libs/itk
Calculating dependencies... done!

>>> Verifying ebuild manifests
>>> Running pre-merge checks for sci-libs/itk-4.5.1
 * To tune ITK to make the best use of working memory you can set
 *     ITK_COMPUTER_MEMORY_SIZE=XX
 * in make.conf, default is 1 (unit is GB)
 * For Python language bindings, you can define the dimensions
 * you want to create bindings for by setting
 *     ITK_WRAP_DIMS=X;Y;Z...
 * in make.conf, default is 2;3 for 2D and 3D data

>>> Emerging (1 of 4) dev-libs/double-conversion-2.0.1::gentoo
 * Fetching files in the background. To view fetch progress, run
 * `tail -f /var/log/emerge-fetch.log` in another terminal.
 * double-conversion-2.0.1.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                    [ ok ]
>>> Unpacking source...
>>> Unpacking double-conversion-2.0.1.tar.gz to /var/tmp/portage/dev-libs/double-conversion-2.0.1/work
>>> Source unpacked in /var/tmp/portage/dev-libs/double-conversion-2.0.1/work
>>> Preparing source in /var/tmp/portage/dev-libs/double-conversion-2.0.1/work ...
 * Applying double-conversion-2.0.1-scons.patch ...                                                                                       [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-libs/double-conversion-2.0.1/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-libs/double-conversion-2.0.1/work ...
scons -j2 libdouble-conversion.so
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: *** Do not know how to make File target `libdouble-conversion.so' (/var/tmp/portage/dev-libs/double-conversion-2.0.1/work/libdouble-conversion.so).  Stop.
scons: building terminated because of errors.
 * ERROR: dev-libs/double-conversion-2.0.1::gentoo failed (compile phase):
 *   escons failed.
 *
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 1999:  Called escons 'libdouble-conversion.so'
 *   environment, line  801:  Called die
 * The specific snippet of code:
 *       [[ ${ret} -ne 0 ]] && has "${EAPI:-0}" 4 5 && die "escons failed.";
 *
 * If you need support, post the output of `emerge --info '=dev-libs/double-conversion-2.0.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/double-conversion-2.0.1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-libs/double-conversion-2.0.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/double-conversion-2.0.1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-libs/double-conversion-2.0.1/work'
 * S: '/var/tmp/portage/dev-libs/double-conversion-2.0.1/work'

>>> Failed to emerge dev-libs/double-conversion-2.0.1, Log file:

>>>  '/var/tmp/portage/dev-libs/double-conversion-2.0.1/temp/build.log'


Code:
emerge -av sci-libs/itk

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] dev-libs/double-conversion-2.0.1:0/1::gentoo  USE="-static-libs" 6.850 KiB
[ebuild  N     ] dev-cpp/gccxml-0.9.0_pre20131217::gentoo  7.944 KiB
[ebuild  N     ] sci-libs/dcmtk-3.6.0::science  USE="png ssl tcpd threads tiff xml zlib -doc" 4.650 KiB
[ebuild  N     ] sci-libs/itk-4.5.1::science  USE="fftw python -debug -doc -examples -itkv3compat -review {-test} -vtkglue" CPU_FLAGS_X86="sse2" PYTHON_TARGETS="python2_7" 207.799 KiB

Total: 4 packages (4 new), Size of downloads: 227.242 KiB

Would you like to merge these packages? [Yes/No]



http://www.itk.org/

Quote:
ITK 4.8 Released to Further Medical Computing Research and Development


http://www.itk.org/ITK/resources/software.html
Quote:
The current release is version 4.8.0 from July 2015. The following downloads are available


Well I do not know if you ahve a newer ebuild.

but the ebuild is outdated anyway regarding version from the homepage.

Highly advised that "someone" updates the ebuilds. Sometimes its enough to rename the ebuild and digest and goes on...


looks related https://bugs.gentoo.org/show_bug.cgi?id=472786
Back to top
View user's profile Send private message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 431

PostPosted: Wed Jul 15, 2015 5:15 pm    Post subject: Reply with quote

Code:
gccxml_cc1plus: error: gccxml_builtins.h: No such file or directory


Do u have gccxml version 0.9.0_pre20131217 ?

I just found that gccxml installs /usr/share/gccxml-0.9/GCC/4.8/gccxml_builtins.h
if u have older version u miss that file probabaly

( and it doesnt have 4.9 directory, its why it failed for me for gcc 4.9.2 probably )

2)
U can install itk 4.8 version
Create local overlay -> https://wiki.gentoo.org/wiki/Overlay/Local_overlay
Copy that ebuild to local overlay and change his name to itk-4.8.0
(I removed whole patches section in ebuild)
use repoman or ebuild itk-4.8.0.ebuild manifest

emerge it

( I interrupted emerging again, but it was over 15% already , looks ok)
_________________
Installation aborted to prevent system self-destruction
Back to top
View user's profile Send private message
ogenos
n00b
n00b


Joined: 22 Feb 2013
Posts: 41

PostPosted: Thu Jul 16, 2015 5:37 pm    Post subject: Reply with quote

Thank you both tw04l124 for the general and mir3x for the detailed directives. I will mark this topic as solved.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Thu Jul 16, 2015 6:01 pm    Post subject: Reply with quote

WEll when you wrote an ebuild or use an ebuild for the Current version, 4.8.0 i think, plesae share the ebuild so the next person who stumble accros this topic can reuse it, ty
Back to top
View user's profile Send private message
ogenos
n00b
n00b


Joined: 22 Feb 2013
Posts: 41

PostPosted: Thu Jul 16, 2015 8:34 pm    Post subject: Reply with quote

Ok, I thought this wasn't necessary, since mir3x gave all the details. Anyway, the changes are everywhere that you see a line starting with a minus, that line is replaced with the similar line that starts with a plus.

Code:
--- itk-4.5.1.ebuild    2015-07-13 11:59:46.000000000 -0400
+++ itk-4.8.0.ebuild    2015-07-16 09:53:51.000000000 -0400
@@ -10,12 +10,12 @@

 MYPN=InsightToolkit
 MYP=${MYPN}-${PV}
-DOC_PV=4.5.0
+DOC_PV=4.8.0

 DESCRIPTION="NLM Insight Segmentation and Registration Toolkit"
 HOMEPAGE="http://www.itk.org"
-SRC_URI="mirror://sourceforge/${PN}/${MYP}.tar.xz
-       doc? ( mirror://sourceforge/${PN}/Doxygen${MYPN}-${DOC_PV}.tar.gz )"
+SRC_URI="mirror://sourceforge/${PN}/${MYP}.tar.xz"
+#      doc? ( mirror://sourceforge/${PN}/Doxygen${MYPN}-${DOC_PV}.tar.gz )"
 RESTRICT="primaryuri"

 LICENSE="Apache-2.0"
@@ -37,7 +37,7 @@
 DEPEND="${RDEPEND}
        python? ( ${PYTHON_DEPS}
                          >=dev-lang/swig-2.0
-                         >=dev-cpp/gccxml-0.9.0_pre20120309 )
+                         >=dev-cpp/gccxml-0.9.0_pre20131217 )
        doc? ( app-doc/doxygen )
 "

@@ -45,14 +45,14 @@

-PATCHES=(
-       "${FILESDIR}"/0001-BUG-Wrap-TransformFileReader-TransformFileWriter.patch
-       "${FILESDIR}"/0002-COMP-Fixed-itkQuasiNewtonOptimizerv4-wrapping-warnin.patch
-       "${FILESDIR}"/0003-COMP-Fixed-itkGradientDescentOptimizerv4-wrapping-wa.patch
-       "${FILESDIR}"/0004-COMP-Warp-OptimizerParameterScalesEstimatorTemplate.patch
-       "${FILESDIR}"/0005-make-gdcm-helper-library-static.patch
-       "${FILESDIR}"/nrrdio-linking.patch
-)
+#PATCHES=(
+#      "${FILESDIR}"/0001-BUG-Wrap-TransformFileReader-TransformFileWriter.patch
+#      "${FILESDIR}"/0002-COMP-Fixed-itkQuasiNewtonOptimizerv4-wrapping-warnin.patch
+#      "${FILESDIR}"/0003-COMP-Fixed-itkGradientDescentOptimizerv4-wrapping-wa.patch
+#      "${FILESDIR}"/0004-COMP-Warp-OptimizerParameterScalesEstimatorTemplate.patch
+#      "${FILESDIR}"/0005-make-gdcm-helper-library-static.patch
+#      "${FILESDIR}"/nrrdio-linking.patch
+#)

 pkg_pretend() {
        if [[ -z ${ITK_COMPUTER_MEMORY_SIZE} ]]; then
 S="${WORKDIR}/${MYP}"


Obviously itk-4.5.1.ebuild becomes tk-4.8.0.ebuild. These ebuild files are under /var/lib/layman/science/sci-libs/itk

Next you run
Code:
# ebuild itk-4.8.0.ebuild manifest
# emerge sci-libs/itk
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum