Regression in old build system using CMake 3.12?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Regression in old build system using CMake 3.12?

BBerco
This post was updated on .
I have stumbled upon a weird behavior after upgrading vtk to 8.1.2 this
morning via Homebrew.

Basically, since this morning, adding VTK to a CMakeLists.txt without
specifying the necessary components will cause a number of compilation
errors to pop up (see error trace below). This syntax was fine until now in
the "old" build system.

I have been able to replicate the problem with a random example I pulled
from Bill Lorensen's example website. Note that for both the CMakeLists.txt
below, cmake will run just fine. It is only upon calling make that hell
breaks loose.

See reply from author below for more specific example

- CMakeLists.txt, will compile with errors
cmake_minimum_required(VERSION 3.12)
project(BugDemo)
find_package(VTK)
include(${VTK_USE_FILE})
add_executable(LightActor LightActor.cxx )
target_link_libraries(LightActor PRIVATE ${VTK_LIBRARIES})


- CMakeLists.txt, will compile fine
cmake_minimum_required(VERSION 3.12)
project(BugDemo)
find_package(VTK COMPONENTS vtkCommonCore)
include(${VTK_USE_FILE})
add_executable(LightActor LightActor.cxx )
target_link_libraries(LightActor PRIVATE ${VTK_LIBRARIES})

Any ideas?

ps: here's the compiler error trace

Scanning dependencies of target main
[ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.o
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:313:9: error:
no member named 'signbit' in the global namespace
using ::signbit;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:314:9: error:
no member named 'fpclassify' in the global namespace
using ::fpclassify;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:315:9: error:
no member named 'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
      ~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/math.h:749:12:
note: 'finite' declared here
extern int finite(double)
           ^
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:316:9: error:
no member named 'isinf' in the global namespace
using ::isinf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:317:9: error:
no member named 'isnan' in the global namespace
using ::isnan;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:318:9: error:
no member named 'isnormal' in the global namespace
using ::isnormal;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:319:7: error:
no member named 'isgreater' in the global namespace; did you mean
'::std::greater'?
using ::isgreater;
      ^~
/Library/Developer/CommandLineTools/usr/include/c++/v1/functional:720:29:
note: '::std::greater' declared here
struct _LIBCPP_TEMPLATE_VIS greater : binary_function<_Tp, _Tp, bool>
                            ^
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:320:7: error:
no member named 'isgreaterequal' in the global namespace; did you mean
'::std::greater_equal'?
using ::isgreaterequal;
      ^~
/Library/Developer/CommandLineTools/usr/include/c++/v1/functional:749:29:
note: '::std::greater_equal' declared here
struct _LIBCPP_TEMPLATE_VIS greater_equal : binary_function<_Tp, _Tp, bool>
                            ^
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:321:9: error:
no member named 'isless' in the global namespace
using ::isless;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:322:9: error:
no member named 'islessequal' in the global namespace
using ::islessequal;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:323:9: error:
no member named 'islessgreater' in the global namespace
using ::islessgreater;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:324:9: error:
no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:325:9: error:
no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
13 errors generated.
make[2]: *** [CMakeFiles/main.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2









--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Regression in old build system using CMake 3.12?

David Gobbi
Hi Ben,

You said that similar errors occurred for a "random example"... can you
say which example it was, and give the error trace for that specific
example?

  David


On Tue, Jan 22, 2019 at 3:16 PM BBerco <[hidden email]> wrote:
I have stumbled upon a weird behavior after upgrading vtk to 8.1.2 this
morning via Homebrew.

Basically, since this morning, adding VTK to a CMakeLists.txt without
specifying the necessary components will cause a number of compilation
errors to pop out (see error trace below). This syntax was fine until now in
the "old" build system.

I have been able to replicate the problem with a random example I pulled
from Bill Lorensen's example website. Note that for both the CMakeLists.txt
below, cmake will run just fine. It is only upon calling make that hell
breaks loose.

I've also noted that earlier versions of CMake (3.3 is the one I tested)
seem to not be affected.

- CMakeLists.txt, will compile with errors
cmake_minimum_required(VERSION 3.12)
project(BugDemo)
find_package(VTK)
include(${VTK_USE_FILE})
add_executable(LightActor LightActor.cxx )
target_link_libraries(LightActor PRIVATE ${VTK_LIBRARIES})


- CMakeLists.txt, will compile fine
cmake_minimum_required(VERSION 3.12)
project(BugDemo)
find_package(VTK REQUIRED vtkCommonCore)
include(${VTK_USE_FILE})
add_executable(LightActor LightActor.cxx )
target_link_libraries(LightActor PRIVATE ${VTK_LIBRARIES})

Any ideas?

ps: here's the compiler error trace provided below

Scanning dependencies of target main
[ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.o
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:313:9: error:
no member named 'signbit' in the global namespace
using ::signbit;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:314:9: error:
no member named 'fpclassify' in the global namespace
using ::fpclassify;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:315:9: error:
no member named 'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
      ~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/math.h:749:12:
note: 'finite' declared here
extern int finite(double)
           ^
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:316:9: error:
no member named 'isinf' in the global namespace
using ::isinf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:317:9: error:
no member named 'isnan' in the global namespace
using ::isnan;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:318:9: error:
no member named 'isnormal' in the global namespace
using ::isnormal;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:319:7: error:
no member named 'isgreater' in the global namespace; did you mean
'::std::greater'?
using ::isgreater;
      ^~
/Library/Developer/CommandLineTools/usr/include/c++/v1/functional:720:29:
note: '::std::greater' declared here
struct _LIBCPP_TEMPLATE_VIS greater : binary_function<_Tp, _Tp, bool>
                            ^
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:320:7: error:
no member named 'isgreaterequal' in the global namespace; did you mean
'::std::greater_equal'?
using ::isgreaterequal;
      ^~
/Library/Developer/CommandLineTools/usr/include/c++/v1/functional:749:29:
note: '::std::greater_equal' declared here
struct _LIBCPP_TEMPLATE_VIS greater_equal : binary_function<_Tp, _Tp, bool>
                            ^
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:321:9: error:
no member named 'isless' in the global namespace
using ::isless;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:322:9: error:
no member named 'islessequal' in the global namespace
using ::islessequal;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:323:9: error:
no member named 'islessgreater' in the global namespace
using ::islessgreater;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:324:9: error:
no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:325:9: error:
no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
13 errors generated.
make[2]: *** [CMakeFiles/main.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Regression in old build system using CMake 3.12?

BBerco
This post was updated on .
I'm sorry for the confusion. Actually, the problem appears to arise when vtk
and the armadillo library are loaded together. I haven't tried more
combinations of libraries to see if the problem only arises in this specific
case.

Anyways, here's an even more minimal example demonstrating the problem. The
CMakeLists.txt shows two different ways to find VTK. The call that's relying
on COMPONENTS works fine, but the non-specific one leads to the error trace
pasted below.

*CMakeLists.txt*
cmake_minimum_required(VERSION 3.12)
project(main CXX)
# Find VTK Package. The non-specific call leads to +20 errors to be
generated at compile time
# find_package(VTK REQUIRED COMPONENTS vtkCommonCore)
find_package(VTK REQUIRED)
find_package(armadillo)
include(${VTK_USE_FILE})
add_executable(main main.cpp)
set(library_dependencies ${ARMADILLO_LIBRARIES} ${VTK_LIBRARIES})
target_link_libraries(main PUBLIC ${library_dependencies})

*
main.cpp*
#include <armadillo>
int main(){
        return 1;
}

*log.txt
*
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:313:9: error:
no member named 'signbit' in the global namespace
using ::signbit;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:314:9: error:
no member named 'fpclassify' in the global namespace
using ::fpclassify;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:315:9: error:
no member named 'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
      ~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/math.h:749:12:
note: 'finite' declared here
extern int finite(double)
           ^
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:316:9: error:
no member named 'isinf' in the global namespace
using ::isinf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:317:9: error:
no member named 'isnan' in the global namespace
using ::isnan;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:318:9: error:
no member named 'isnormal' in the global namespace
using ::isnormal;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:319:9: error:
no member named 'isgreater' in the global namespace
using ::isgreater;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:320:9: error:
no member named 'isgreaterequal' in the global namespace
using ::isgreaterequal;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:321:9: error:
no member named 'isless' in the global namespace
using ::isless;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:322:9: error:
no member named 'islessequal' in the global namespace
using ::islessequal;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:323:9: error:
no member named 'islessgreater' in the global namespace
using ::islessgreater;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:324:9: error:
no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:325:9: error:
no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:551:28: error:
expected a qualified name after 'typename'
_LIBCPP_CONSTEXPR typename enable_if<is_floating_point&lt;_A1>::value,
bool>::type
                           ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:551:37: error:
expected ';' at end of declaration
_LIBCPP_CONSTEXPR typename enable_if<is_floating_point&lt;_A1>::value,
bool>::type
                                    ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:551:37: error:
expected unqualified-id
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:563:39: error:
use of undeclared identifier 'is_floating_point'
_LIBCPP_CONSTEXPR typename enable_if<!is_floating_point&lt;_A1>::value,
bool>::type
                                      ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:563:57: error:
'_A1' does not refer to a value
_LIBCPP_CONSTEXPR typename enable_if<!is_floating_point&lt;_A1>::value,
bool>::type
                                                        ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:561:17: note:
declared here
template <class _A1>
                ^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:563:63: error:
definition or redeclaration of 'value' cannot name the global scope
_LIBCPP_CONSTEXPR typename enable_if<!is_floating_point&lt;_A1>::value,
bool>::type
                                                            ~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/main.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2






--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Regression in old build system using CMake 3.12?

BBerco
This post was updated on .
I've started playing around with the component inclusion and noticed that the
above error is reproduced even with COMPONENTS, IF vtkIOImage is included.

I've tried to include vtkCommonColor, vtkCommonComputationalGeometry, vtkCommonCore, vtkCommonMath, vtkCommonMisc, vtkFiltersCore, vtkFiltersGeneral, vtkFiltersSources, vtkGUISupportQt, vtkImagingCore and vtkInteractionStyle , but these modules seem innocuous since the compilation proceeded without errors when they were included.

Also, the problem really has to do with cmath (i.e math.h), not just armadillo. An even more minimal example would be to remove find_package(armadillo) from the CMakeLists.txt and #include<armadillo> from main.cpp. Replace the latter with #include <cmath>, and the errors are still here (when vtkIOImage is included)


--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Regression in old build system using CMake 3.12?

Bill Lorensen
In reply to this post by BBerco
I recently updated the. example make to handle the old and new module system. Try the new version here.


On Tue, Jan 22, 2019, 2:16 PM BBerco <[hidden email] wrote:
I have stumbled upon a weird behavior after upgrading vtk to 8.1.2 this
morning via Homebrew.

Basically, since this morning, adding VTK to a CMakeLists.txt without
specifying the necessary components will cause a number of compilation
errors to pop out (see error trace below). This syntax was fine until now in
the "old" build system.

I have been able to replicate the problem with a random example I pulled
from Bill Lorensen's example website. Note that for both the CMakeLists.txt
below, cmake will run just fine. It is only upon calling make that hell
breaks loose.

I've also noted that earlier versions of CMake (3.3 is the one I tested)
seem to not be affected.

- CMakeLists.txt, will compile with errors
cmake_minimum_required(VERSION 3.12)
project(BugDemo)
find_package(VTK)
include(${VTK_USE_FILE})
add_executable(LightActor LightActor.cxx )
target_link_libraries(LightActor PRIVATE ${VTK_LIBRARIES})


- CMakeLists.txt, will compile fine
cmake_minimum_required(VERSION 3.12)
project(BugDemo)
find_package(VTK REQUIRED vtkCommonCore)
include(${VTK_USE_FILE})
add_executable(LightActor LightActor.cxx )
target_link_libraries(LightActor PRIVATE ${VTK_LIBRARIES})

Any ideas?

ps: here's the compiler error trace provided below

Scanning dependencies of target main
[ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.o
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:313:9: error:
no member named 'signbit' in the global namespace
using ::signbit;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:314:9: error:
no member named 'fpclassify' in the global namespace
using ::fpclassify;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:315:9: error:
no member named 'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
      ~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/math.h:749:12:
note: 'finite' declared here
extern int finite(double)
           ^
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:316:9: error:
no member named 'isinf' in the global namespace
using ::isinf;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:317:9: error:
no member named 'isnan' in the global namespace
using ::isnan;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:318:9: error:
no member named 'isnormal' in the global namespace
using ::isnormal;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:319:7: error:
no member named 'isgreater' in the global namespace; did you mean
'::std::greater'?
using ::isgreater;
      ^~
/Library/Developer/CommandLineTools/usr/include/c++/v1/functional:720:29:
note: '::std::greater' declared here
struct _LIBCPP_TEMPLATE_VIS greater : binary_function<_Tp, _Tp, bool>
                            ^
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:320:7: error:
no member named 'isgreaterequal' in the global namespace; did you mean
'::std::greater_equal'?
using ::isgreaterequal;
      ^~
/Library/Developer/CommandLineTools/usr/include/c++/v1/functional:749:29:
note: '::std::greater_equal' declared here
struct _LIBCPP_TEMPLATE_VIS greater_equal : binary_function<_Tp, _Tp, bool>
                            ^
In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
In file included from /usr/local/include/armadillo:26:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:321:9: error:
no member named 'isless' in the global namespace
using ::isless;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:322:9: error:
no member named 'islessequal' in the global namespace
using ::islessequal;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:323:9: error:
no member named 'islessgreater' in the global namespace
using ::islessgreater;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:324:9: error:
no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:325:9: error:
no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
13 errors generated.
make[2]: *** [CMakeFiles/main.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2









--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Regression in old build system using CMake 3.12?

VTK - Users mailing list
In reply to this post by BBerco
On Tue, Jan 22, 2019 at 16:31:38 -0700, BBerco wrote:

> I'm sorry for the confusion. Actually, the problem appears to arise when vtk
> and the armadillo library are loaded together. I haven't tried more
> combinations of library to see if the problem only arises in this specific
> case.
>
> Anyways, here's an even more minimal example demonstrating the problem. The
> CMakeLists.txt shows two different ways to find VTK. The call that's relying
> on COMPONENTS works fine, but the non-specific one leads to the error trace
> pasted below.
>
> *CMakeLists.txt*
> cmake_minimum_required(VERSION 3.12)
> project(main CXX)
> # Find VTK Package. The non-specific call leads to +20 errors to be
> generated at compile time
> # find_package(VTK REQUIRED COMPONENTS vtkCommonCore)
> find_package(VTK REQUIRED)
> find_package(armadillo)
> include(${VTK_USE_FILE})
> add_executable(main main.cpp)
> set(library_dependencies ${ARMADILLO_LIBRARIES} ${VTK_LIBRARIES})
> target_link_libraries(main PUBLIC ${library_dependencies})
>
> *
> main.cpp*
> #include <armadillo>
> int main(){
> return 1;
> }
>
> *log.txt
> *
> In file included from /Users/bbercovici/Desktop/testOmp/main.cpp:3:
> In file included from /usr/local/include/armadillo:26:
> /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:313:9: error:
> no member named 'signbit' in the global namespace
> using ::signbit;

This is usually due to the wrong `math.h` being included. If you look at
command line (visible with `make VERBOSE=1` or `ninja -v`) for this
compilation rule and replace `-o path/to/foo.o` with `-E -o
preproc.txt`, the full path to the `math.h` should be output in
`preproc.txt`. Ideally, it should come from the SDK beside the `cmath`
header, but I suspect it is coming from `/usr/include` or somewhere like
that. Basically, something is adding `-isystem /usr/include` or
`-I/usr/include` and the system headers there are conflicting with the
SDK's headers.

--Ben
_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Regression in old build system using CMake 3.12?

David Gobbi
In reply to this post by BBerco
On Tue, Jan 22, 2019 at 4:32 PM BBerco <[hidden email]> wrote:
I'm sorry for the confusion. Actually, the problem appears to arise when vtk
and the armadillo library are loaded together. I haven't tried more
combinations of library to see if the problem only arises in this specific
case.

Anyways, here's an even more minimal example demonstrating the problem. The
CMakeLists.txt shows two different ways to find VTK. The call that's relying
on COMPONENTS works fine, but the non-specific one leads to the error trace
pasted below.

I tried the example with VTK 8.2, cmake 3.13, and armadillo-9.200.7.  For that combination, the example builds without errors.  When I get to work, I can try again with VTK 8.1.

As for COMPONENTS in find_package, the components chosen may change the compile definitions and include directories. For newer versions of cmake, VTK tries to use newer features of cmake for attaching compile definitions and include dirs to the library dependencies that require them.

  David
 

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Regression in old build system using CMake 3.12?

BBerco
Hello David,

I think that the culprit is vtkIOImage, since this inclusion of this
specific module leads to the errors at compile time. Did its definitions &
includes change in 8.1.2?



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Regression in old build system using CMake 3.12?

David Gobbi
On Wed, Jan 23, 2019 at 7:36 AM BBerco <[hidden email]> wrote:
Hello David,

I think that the culprit is vtkIOImage, since this inclusion of this
specific module leads to the errors at compile time. Did its definitions &
includes change in 8.1.2?

No, or at least, none were added to its CMakeLists.txt since 7.1 or even since 6.3.

I just did a build of your example with VTK 8.1.2, armadillo 9.200.7, cmake 3.13.2 and still didn't see any errors.  I'm using the VTK and armadillo that I built from source, though, rather than using homebrew.

  David

_______________________________________________
Powered by www.kitware.com

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

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers