Discussion:
[ITK-users] HDF5 problem when compile ITK 4.11.0
沈庄明
2017-05-10 11:58:37 UTC
Permalink
Hi all,


When I compile ITK 4.11.0 on Rhel 6 using gcc 4.8.5 (ITK_USE_SYSTEM_HDF5 in CMake is disable), I encountered a problem (pls see the attached figure). Any suggestion? Thanks in advance.



Regards,


Zhuangming Shen
Matt McCormick
2017-05-10 13:21:07 UTC
Permalink
Hi,

To address the -fPIC error, add -fPIC to CMAKE_C_FLAGS and
CMAKE_CXX_FLAGS. Or, set BUILD_SHARED_LIBS to ON.

For building on RHEL 6, ITK 4.11.1 or ITK 4.12RC is adviced due to
fixes for the gold linker.

HTH,
Matt

On Wed, May 10, 2017 at 7:58 AM, 沈庄明 <***@sphic.org.cn> wrote:
> Hi all,
>
>
> When I compile ITK 4.11.0 on Rhel 6 using gcc 4.8.5 (ITK_USE_SYSTEM_HDF5 in
> CMake is disable), I encountered a problem (pls see the attached figure).
> Any suggestion? Thanks in advance.
>
>
>
> Regards,
>
>
> Zhuangming Shen
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/l
沈庄明
2017-05-11 01:02:47 UTC
Permalink
Hi Matt,

I have tried (1) add -fPIC to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS, (2) BUILD_SHARED_LIBS to ON and (3) using ITK 4.11.1, but none of them can fix the problem. The same error still appears. Any idea? Thanks.


Regards,

Zhuangming Shen
________________________________________
From: Matt McCormick <***@kitware.com>
Sent: Wednesday, May 10, 2017 9:21 PM
To: 沈庄明
Cc: insight-***@itk.org
Subject: Re: [ITK-users] HDF5 problem when compile ITK 4.11.0

Hi,

To address the -fPIC error, add -fPIC to CMAKE_C_FLAGS and
CMAKE_CXX_FLAGS. Or, set BUILD_SHARED_LIBS to ON.

For building on RHEL 6, ITK 4.11.1 or ITK 4.12RC is adviced due to
fixes for the gold linker.

HTH,
Matt

On Wed, May 10, 2017 at 7:58 AM, 沈庄明 <***@sphic.org.cn> wrote:
> Hi all,
>
>
> When I compile ITK 4.11.0 on Rhel 6 using gcc 4.8.5 (ITK_USE_SYSTEM_HDF5 in
> CMake is disable), I encountered a problem (pls see the attached figure).
> Any suggestion? Thanks in advance.
>
>
>
> Regards,
>
>
> Zhuangming Shen
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.
沈庄明
2017-05-11 09:00:46 UTC
Permalink
Hi Matt,

I have found the reason. This is because the compiler in CMAKE is set to original gcc/g++, not gcc/g++ 4.8.5. Thanks for your suggestion.


Regards,

Zhuangming Shen
________________________________________
From: Matt McCormick <***@kitware.com>
Sent: Wednesday, May 10, 2017 9:21 PM
To: 沈庄明
Cc: insight-***@itk.org
Subject: Re: [ITK-users] HDF5 problem when compile ITK 4.11.0

Hi,

To address the -fPIC error, add -fPIC to CMAKE_C_FLAGS and
CMAKE_CXX_FLAGS. Or, set BUILD_SHARED_LIBS to ON.

For building on RHEL 6, ITK 4.11.1 or ITK 4.12RC is adviced due to
fixes for the gold linker.

HTH,
Matt

On Wed, May 10, 2017 at 7:58 AM, 沈庄明 <***@sphic.org.cn> wrote:
> Hi all,
>
>
> When I compile ITK 4.11.0 on Rhel 6 using gcc 4.8.5 (ITK_USE_SYSTEM_HDF5 in
> CMake is disable), I encountered a problem (pls see the attached figure).
> Any suggestion? Thanks in advance.
>
>
>
> Regards,
>
>
> Zhuangming Shen
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailma
Loading...