Andreas, I took a look at the error messages and they seem to be coming from octave interface rather than "tmo" commands.
The problem seems to be with "mkoctfile" from one of the Octave packages. The line: "/usr/bin/../lib/gcc/x86_64-linux-gnu/7.1.0/../../../../include/c++/7.1.0/bits/c++0x_warning.h" suggests that it is using gcc rather than clang. mkoctfile does not seem to enable c++11 mode. You could add "-std=gnu++11" to: add_custom_command( OUTPUT ${OCT_NAME}.oct COMMAND ${MKOCTFILE} "${CMAKE_CURRENT_SOURCE_DIR}/${OCT_NAME}.cpp" ARGS -I${HEADERS} -I${CMAKE_CURRENT_SOURCE_DIR}/help_files -L${PROJECT_BINARY_DIR}/src/pfs -lpfs -std=gnu++11 DEPENDS ${OCT_NAME}.cpp COMMENT "Generating ${OCT_NAME}.oct" VERBATIM) in src/octave/CMakeList.txt, which works for me. Adding -std=c++11 does not work because octave interface uses a few functions outside ANSC C standard. It may or may not work with clang. Let me know what version of Octave you have installed. Best, Rafal On Sun, Aug 6, 2017 at 2:47 PM, Andreas Metzler <ametz...@bebt.de> wrote: > Control: tags -1 - patch > Control: retitle -1 pfstools: FTBFS with clang instead of gcc > > On 2014-05-24 Alexander Ovchinnikov <sanek23...@gmail.com> wrote: >> Package: pfstmo >> Severity: minor >> Tags: patch >> User: pkg-llvm-t...@lists.alioth.debian.org >> Usertags: clang-ftbfs > >> Hello, > >> Using the rebuild infrastructure, your package fails to build with clang >> (instead of gcc). >> See build logs here: >> http://clang.debian.net/logs/2014-01-14/pfstmo_1.4-1_unstable_clang.log > [...] > > Hello, > > pfstmo is now included in pfstools. It still does not build with clang. > The first issue > > /usr/bin/ld: CMakeFiles/pfsglview.dir/pfsglview.cpp.o: undefined > reference to symbol 'pthread_create@@GLIBC_2.2.5' > > seems to be easily fixed by > --- pfstools-2.0.6.orig/src/pfsglview/CMakeLists.txt > +++ pfstools-2.0.6/src/pfsglview/CMakeLists.txt > @@ -12,7 +12,8 @@ endif() > add_executable(pfsglview pfsglview.cpp picture_io.cpp module.cpp > m_histogram.cpp m_status.cpp m_on_screen_display.cpp) > > # TODO: Use ${GLUT_LIBRARY} instead. > -target_link_libraries(pfsglview ${OPENGL_LIBRARIES} ${GLUT_glut_LIBRARY} pfs) > +target_link_libraries(pfsglview ${OPENGL_LIBRARIES} ${GLUT_glut_LIBRARY} > + pfs pthread) > > However further errors follow with the octave suprt files: > ------------ > cd /tmp/PFS/pfstools-2.0.6/obj-x86_64-linux-gnu/src/octave && > /usr/bin/mkoctfile /tmp/PFS/pfstools-2.0.6/src/octave/pfswrite.cpp > -I/tmp/PFS/pfstools-2.0.6/src/pfs/ > -I/tmp/PFS/pfstools-2.0.6/src/octave/help_files > -L/tmp/PFS/pfstools-2.0.6/obj-x86_64-linux-gnu/src/pfs -lpfs > In file included from /tmp/PFS/pfstools-2.0.6/src/octave/pfswrite.cpp:29: > In file included from /usr/include/octave-4.2.1/octave/../octave/oct.h:26: > In file included from /usr/include/octave-4.2.1/octave/octave-config.h:64: > In file included from > /usr/bin/../lib/gcc/x86_64-linux-gnu/7.1.0/../../../../include/c++/7.1.0/cstdint:35: > /usr/bin/../lib/gcc/x86_64-linux-gnu/7.1.0/../../../../include/c++/7.1.0/bits/c++0x_warning.h:32:2: > error: This file requires compiler and library support for the ISO C++ 2011 > standard. This support must be enabled with the -std=c++11 or -std=gnu++11 > compiler options. > #error This file requires compiler and library support \ > ^ > In file included from /tmp/PFS/pfstools-2.0.6/src/octave/pfswrite.cpp:29: > In file included from /usr/include/octave-4.2.1/octave/../octave/oct.h:30: > In file included from /usr/include/octave-4.2.1/octave/Matrix.h:32: > In file included from /usr/include/octave-4.2.1/octave/mx-base.h:30: > In file included from /usr/include/octave-4.2.1/octave/MatrixType.h:29: > In file included from /usr/include/octave-4.2.1/octave/MSparse.h:31: > In file included from /usr/include/octave-4.2.1/octave/Sparse.h:37: > In file included from /usr/include/octave-4.2.1/octave/Array.h:37: > /usr/include/octave-4.2.1/octave/dim-vector.h:205:21: warning: variadic > templates are a C++11 extension [-Wc++11-extensions] > template <typename... Ints> > ^ > /usr/include/octave-4.2.1/octave/dim-vector.h:209:10: error: no member named > 'initializer_list' in namespace 'std' > std::initializer_list<octave_idx_type> all_lengths = {r, c, lengths...}; > ~~~~~^ > /usr/include/octave-4.2.1/octave/dim-vector.h:209:27: error: unexpected type > name 'octave_idx_type': expected expression > std::initializer_list<octave_idx_type> all_lengths = {r, c, lengths...}; > ^ > /usr/include/octave-4.2.1/octave/dim-vector.h:209:44: error: use of > undeclared identifier 'all_lengths' > std::initializer_list<octave_idx_type> all_lengths = {r, c, lengths...}; > ^ > /usr/include/octave-4.2.1/octave/dim-vector.h:209:58: error: expected > expression > std::initializer_list<octave_idx_type> all_lengths = {r, c, lengths...}; > ^ > /usr/include/octave-4.2.1/octave/dim-vector.h:210:33: warning: range-based > for loop is a C++11 extension [-Wc++11-extensions] > for (const octave_idx_type l: all_lengths) > ^ > /usr/include/octave-4.2.1/octave/dim-vector.h:210:35: error: use of > undeclared identifier 'all_lengths' > for (const octave_idx_type l: all_lengths) > ^ > /usr/include/octave-4.2.1/octave/dim-vector.h:212:12: error: use of > undeclared identifier 'all_lengths' > rep -= all_lengths.size (); > ^ > In file included from /tmp/PFS/pfstools-2.0.6/src/octave/pfswrite.cpp:29: > In file included from /usr/include/octave-4.2.1/octave/../octave/oct.h:30: > In file included from /usr/include/octave-4.2.1/octave/Matrix.h:32: > In file included from /usr/include/octave-4.2.1/octave/mx-base.h:30: > In file included from /usr/include/octave-4.2.1/octave/MatrixType.h:29: > In file included from /usr/include/octave-4.2.1/octave/MSparse.h:31: > In file included from /usr/include/octave-4.2.1/octave/Sparse.h:37: > In file included from /usr/include/octave-4.2.1/octave/Array.h:38: > In file included from /usr/include/octave-4.2.1/octave/idx-vector.h:38: > /usr/include/octave-4.2.1/octave/oct-inttypes-fwd.h:35:20: error: use of > undeclared identifier 'uint8_t' > typedef octave_int<uint8_t> octave_uint8; > ^ > /usr/include/octave-4.2.1/octave/oct-inttypes-fwd.h:36:20: error: use of > undeclared identifier 'uint16_t' > typedef octave_int<uint16_t> octave_uint16; > ^ > /usr/include/octave-4.2.1/octave/oct-inttypes-fwd.h:37:20: error: use of > undeclared identifier 'uint32_t' > typedef octave_int<uint32_t> octave_uint32; > ^ > /usr/include/octave-4.2.1/octave/oct-inttypes-fwd.h:38:20: error: use of > undeclared identifier 'uint64_t' > typedef octave_int<uint64_t> octave_uint64; > ^ > .... > ---------------------------- > > cu Andreas > > -- > `What a good friend you are to him, Dr. Maturin. His other friends are > so grateful to you.' > `I sew his ears on from time to time, sure' >