Compilation error: clang?

789 views
Skip to first unread message

Craig Michoski

unread,
Feb 16, 2015, 11:46:57 PM2/16/15
to dea...@googlegroups.com
Hi all,

I'm trying to compile deal.ii on OS X 10.10.2, and running into a problem I have not been able to solve.  I was hoping someone might have some suggestions/advice ...?  

The error I get is:

ld: warning: could not create compact unwind for _sgehrd_: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _shseqr_: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _sormlq_: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _sormql_: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _sormqr_: stack subq instruction is too different from dwarf stack size
Undefined symbols for architecture x86_64:
  "dealii::MultithreadInfo::n_cpus", referenced from:
      dealii::Utilities::MPI::MPI_InitFinalize::MPI_InitFinalize(int&, char**&, unsigned int) in mpi.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libdeal_II.g.8.3.pre.dylib] Error 1
make[1]: *** [source/CMakeFiles/deal_II.g.dir/all] Error 2

Here's a summary of set env variables that might be useful to see, and the detailed log is attached)

Many thanks,
Craig

----------

echo "Building for OS X"
    
export CC=mpicc
export CXX=mpic++
export FC=mpif90 
export ArcOn_DIR=`pwd`

bash p4est-setup.sh p4est-0.3.4.2.tar.gz $ArcOn_DIR/p4est

export PETSC_DIR=$ArcOn_DIR/petsc-3.4.4
export PETSC_ARCH=gcc-openmp-cxx-opt

./configure --with-shared-libraries --with-debugging=false  \
--COPTFLAGS='-O3' --CXXOPTFLAGS='-O3' --FOPTFLAGS='-O3' \
--with-clanguage=C++ --with-shared-libraries \
--with-mumps=true --download-mumps=1 \
--with-metis=true --download-metis=1 \
--with-parmetis=true --download-parmetis=1 \
--with-superlu=true --download-superlu=1 \
--with-blacs=true --download-blacs=1 \
--with-scalapack=true --download-scalapack=1 \
--with-hypre=true --download-hypre=1 \
--with-f-blas-lapack --download-f-blas-lapack

chmod -R g+rwX $PETSC_DIR

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ArcOn_DIR/petsc-3.4.4/$PETSC_ARCH/lib

export BOOST_DIR=/usr/local/Cellar/boost/1.57.0 

CMAKE_CXX_COMPILER=clang++ #(I tried this both on and off)

cmake ../dealii -DP4EST_DIR=$ArcOn_DIR/p4est -DPETSC-DIR=$PETSC_DIR -DCMAKE_INSTALL_PREFIX=$ArcOn_DIR/trigger -DDEAL_II_WITH_THREADS=OFF


detailed.log

Timo Heister

unread,
Feb 17, 2015, 6:27:50 AM2/17/15
to dea...@googlegroups.com
My fault. It should be fixed in 06cc91d.
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dealii+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Timo Heister
http://www.math.clemson.edu/~heister/

Timo Heister

unread,
Feb 17, 2015, 6:35:50 AM2/17/15
to dea...@googlegroups.com
Or you might also need https://github.com/dealii/dealii/pull/560 which
is not merged yet.

Craig Michoski

unread,
Feb 19, 2015, 1:43:20 AM2/19/15
to dea...@googlegroups.com
Thanks Timo.  That got deal.ii compiled.  But now I have a new set of errors when I try to build my project that I am having troubles with.  I think it might have something to do with cmake.

Here's what I get:
-----------------
cmake .
-- The C compiler identification is AppleClang 6.0.0.6000056
-- The CXX compiler identification is AppleClang 6.0.0.6000056
-- Check for working C compiler: /usr/local/bin/mpicc
-- Check for working C compiler: /usr/local/bin/mpicc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/local/bin/mpicxx
-- Check for working CXX compiler: /usr/local/bin/mpicxx -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
###
#
#  WARNING:
#
#  CMAKE_BUILD_TYPE "" unsupported by current installation!
#  deal.II was built with CMAKE_BUILD_TYPE "DebugRelease".
#
#  CMAKE_BUILD_TYPE is forced to "Debug".
#
###
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/michoski/ArcOn-r2/ArcOn
---------------
But then, when I try to make, I get a litany of errors:
============
Scanning dependencies of target ArcOn
[100%] Building CXX object CMakeFiles/./lib/2d/ArcOn.dir/source/Main.cc.o
In file included from /Users/michoski/ArcOn-r2/ArcOn/source/Main.cc:1:
In file included from /Users/michoski/ArcOn-r2/trigger/include/deal.II/base/table.h:24:
In file included from /Users/michoski/ArcOn-r2/trigger/include/deal.II/base/aligned_vector.h:24:
In file included from /Users/michoski/ArcOn-r2/trigger/include/deal.II/base/parallel.h:23:
In file included from /Users/michoski/ArcOn-r2/trigger/include/deal.II/base/synchronous_iterator.h:23:
/Users/michoski/ArcOn-r2/trigger/include/deal.II/base/std_cxx11/tuple.h:28:14: error: no member named 'tuple' in namespace
      'std'
  using std::tuple;
        ~~~~~^
/Users/michoski/ArcOn-r2/trigger/include/deal.II/base/std_cxx11/tuple.h:29:14: error: no member named 'make_tuple' in
      namespace 'std'
  using std::make_tuple;
        ~~~~~^
In file included from /Users/michoski/ArcOn-r2/ArcOn/source/Main.cc:1:
==========

And so on.  Any ideas on this?  Maybe I should I open a different thread on this one...?

Craig

Timo Heister

unread,
Feb 19, 2015, 9:30:24 AM2/19/15
to dea...@googlegroups.com
> /Users/michoski/ArcOn-r2/trigger/include/deal.II/base/std_cxx11/tuple.h:28:14:

What kind of folder is that inside base/ and how did it get there?

Matthias Maier

unread,
Feb 19, 2015, 10:25:22 AM2/19/15
to dea...@googlegroups.com

Am 19. Feb 2015, 15:29 schrieb Timo Heister <hei...@clemson.edu>:

>> deal.II/base/std_cxx11/tuple.h

> What kind of folder is that inside base/ and how did it get there?

By virtue of commit b0c80713

Bruno Turcksin

unread,
Feb 19, 2015, 10:26:25 AM2/19/15
to dea...@googlegroups.com
Craig,

it looks like deal.II was compiled using c++11 but your project does not use the flag -std=c++11 Either recompile deal.II with -DDEAL_II_WITH_CXX11=OFF or make sure that your project uses -std=c++11

Best,

Bruno

Craig Michoski

unread,
Feb 19, 2015, 3:21:30 PM2/19/15
to dea...@googlegroups.com
Thanks Bruno,

So when I try compiling deal.ii using that flag -DDEAL_II_WITH_CXX11=OFF, I get a ton of errors about the tensor expression, and it does not complete:

error: invalid operands to binary
      expression ('Tensor<1, 3, typename ProductType<double, typename EnableIfScalar<unsigned int>::type>::type>' and
      'const dealii::Tensor<1, 3, double>')
                = std::make_pair ((old_normal * old_count + q->second.first) / (old_count + 1),
.
.
.

/Users/michoski/ArcOn-r2/dealii/source/grid/tria_accessor.cc:1289:25: error: no viable conversion from 'Tensor<[2 * ...],
      typename ProductType<int, typename EnableIfScalar<double>::type>::type>' to 'const Tensor<[2 * ...], (default)
      double>'
      const Tensor<1,2> face = direction[f]*(
                        ^      ~~~~~~~~~~~~~~
/Users/michoski/ArcOn-r2/dealii/include/deal.II/base/tensor_base.h:382:3: note: candidate constructor not viable: no known
      conversion from 'Tensor<1, 2, typename ProductType<int, typename EnableIfScalar<double>::type>::type>' to
      'const array_type &' (aka 'double const (&)[2]') for 1st argument
  Tensor (const array_type &initializer);
  ^
/Users/michoski/ArcOn-r2/dealii/include/deal.II/base/tensor_base.h:387:3: note: candidate constructor not viable: no known
      conversion from 'Tensor<1, 2, typename ProductType<int, typename EnableIfScalar<double>::type>::type>' to
      'const Tensor<1, 2, double> &' for 1st argument
  Tensor (const Tensor<1,dim,Number> &initializer);
  ^
[ 67%] Building CXX object source/lac/CMakeFiles/obj_lac.debug.dir/petsc_precondition.cc.o
/Users/michoski/ArcOn-r2/dealii/include/deal.II/base/tensor_base.h:1121:15: warning: array index 1 is past the end of the
      array (which contains 1 element) [-Warray-bounds]
              values[1] * p.values[1]);
              ^      ~
/Users/michoski/ArcOn-r2/dealii/include/deal.II/grid/tria_accessor.templates.h:2032:65: note: in instantiation of member
      function 'dealii::Tensor<1, 1, double>::operator*' requested here
          min = std::min(min, (this->vertex(i)-this->vertex(j)) * (this->vertex(i)-this->vertex(j)));
                                                                ^
/Users/michoski/ArcOn-r2/dealii/include/deal.II/base/tensor_base.h:590:3: note: array 'values' declared here
  Number values[(dim!=0) ? (dim) : (dim+1)];
  ^

Any ideas?

Craig

Bruno Turcksin

unread,
Feb 19, 2015, 5:04:34 PM2/19/15
to dea...@googlegroups.com
Are you using the development version of deal.II ? There was a problem with the tensor (yesterday or the day before?) but it is fixed now.
You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/G4pOuHWoDVM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.

Wolfgang Bangerth

unread,
Feb 19, 2015, 5:05:00 PM2/19/15
to dea...@googlegroups.com
On 02/19/2015 09:25 AM, Matthias Maier wrote:
>
>>> >>deal.II/base/std_cxx11/tuple.h
>> >What kind of folder is that inside base/ and how did it get there?
> By virtue of commit b0c80713

Which actually only renamed the folder -- it existed as
include/deal.II/base/std_cxx1x since somewhere around 2008 or so :-)

Cheers
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/

Timo Heister

unread,
Feb 19, 2015, 5:17:27 PM2/19/15
to dea...@googlegroups.com
>>>> >>deal.II/base/std_cxx11/tuple.h
>>>
>>> >What kind of folder is that inside base/ and how did it get there?
>>
>> By virtue of commit b0c80713
>
> Which actually only renamed the folder -- it existed as
> include/deal.II/base/std_cxx1x since somewhere around 2008 or so :-)

Interesting! I guess I learned something new. ;-)

Craig Michoski

unread,
Feb 19, 2015, 6:01:38 PM2/19/15
to dea...@googlegroups.com
I'm using the master branch patch that Timo suggested I needed to fix my previous problem:

git status
HEAD detached at 06cc91d

Maybe I should go back and use current release at:

18a83feb7b2d9bb7c7b3d7721176a90aa505b1eb

Bruno Turcksin

unread,
Feb 19, 2015, 6:08:49 PM2/19/15
to dea...@googlegroups.com

On 02/19/2015 05:01 PM, Craig Michoski wrote:
I'm using the master branch patch that Timo suggested I needed to fix my previous problem:

git status
HEAD detached at 06cc91d
That version has the bug in Tensor when you don't use C++11 :(


Maybe I should go back and use current release at:

18a83feb7b2d9bb7c7b3d7721176a90aa505b1eb
I think it would be better to simply update your version of deal.II the new HEAD (c3070ea2409af65bb870a98b303b135fc121c8c) has Timo's fix and Tensor works.

Craig Michoski

unread,
Feb 20, 2015, 1:47:44 AM2/20/15
to dea...@googlegroups.com
Cool, thanks, I updated to the new HEAD and things seem to be working.  

Craig Michoski

unread,
Mar 25, 2015, 12:39:51 PM3/25/15
to dea...@googlegroups.com
Hey guys,

We're actually running into this same problem (I think) again on an older mac.  The error is posted below, and occurs during linking after compiling deal.ii. 

I'm using the most recent commit I got working on my newer machine (i7, yosemite 10.10.2) which is:

commit bc3070ea2409af65bb870a98b303b135fc121c8c

The older machine is a Core 2 duo, yosemite 10.10.2. 

Any ideas?

Thanks,
Craig

------------------
Linking CXX shared library ../lib/libdeal_II.dylib
ld: warning: could not create compact unwind for _sgehrd_: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _shseqr_: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _sormlq_: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _sormql_: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _sormqr_: stack subq instruction is too different from dwarf stack size
Undefined symbols for architecture x86_64:
  "__gfortran_concat_string", referenced from:
      _dormtr_ in libflapack.a(dormtr.o)
      _dtrtri_ in libflapack.a(dtrtri.o)
      _shseqr_ in libflapack.a(shseqr.o)
      _sormbr_ in libflapack.a(sormbr.o)
      _sormtr_ in libflapack.a(sormtr.o)
      _strtri_ in libflapack.a(strtri.o)
      _dormql_ in libflapack.a(dormql.o)
      ...
  "__gfortran_st_write", referenced from:
      _slamc2_ in libflapack.a(slamch.o)
  "__gfortran_st_write_done", referenced from:
      _slamc2_ in libflapack.a(slamch.o)
  "__gfortran_transfer_integer_write", referenced from:
      _slamc2_ in libflapack.a(slamch.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libdeal_II.8.3.pre.dylib] Error 1
make[1]: *** [source/CMakeFiles/deal_II.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
ld: warning: could not create compact unwind for _sgehrd_: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _shseqr_: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _sormlq_: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _sormql_: stack subq instruction is too different from dwarf stack size
ld: warning: could not create compact unwind for _sormqr_: stack subq instruction is too different from dwarf stack size
Undefined symbols for architecture x86_64:
  "__gfortran_concat_string", referenced from:
      _dormtr_ in libflapack.a(dormtr.o)
      _dtrtri_ in libflapack.a(dtrtri.o)
      _shseqr_ in libflapack.a(shseqr.o)
      _sormbr_ in libflapack.a(sormbr.o)
      _sormtr_ in libflapack.a(sormtr.o)
      _strtri_ in libflapack.a(strtri.o)
      _dormql_ in libflapack.a(dormql.o)
      ...
  "__gfortran_st_write", referenced from:
      _slamc2_ in libflapack.a(slamch.o)
  "__gfortran_st_write_done", referenced from:
      _slamc2_ in libflapack.a(slamch.o)
  "__gfortran_transfer_integer_write", referenced from:
      _slamc2_ in libflapack.a(slamch.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)



Bruno Turcksin

unread,
Mar 25, 2015, 1:07:35 PM3/25/15
to dea...@googlegroups.com
Craig,

On 03/25/2015 11:39 AM, Craig Michoski wrote:
> We're actually running into this same problem (I think) again on an
> older mac. The error is posted below, and occurs during linking after
> compiling deal.ii.
No, it's a different problem. Are you sure that lapack is installed
correctly ? Deal.ii is in c++ and doesn't care about fortran but your
error message says that there is a problem with a gfortran symbol. Do
you have more than one fortran compiler on this machine ?

Best,

Bruno
Reply all
Reply to author
Forward
0 new messages