Compilation on OSX10.8

Issue #169 invalid
David Rogers created an issue

I successfully built dolfin 1.2.0 on OSX 10.8 by compiling individual packages, only to find a problem writing pvd output files.

$ pwd
/sw/share/dolfin/demo/pde/poisson/cpp
$ cmake -DCMAKE_CXX_COMPILER=/sw/bin/g++-fsf-4.8 .
-- Configuring done
-- Generating done
-- Build files have been written to: /sw/share/dolfin/demo/pde/poisson/cpp
$ make
Scanning dependencies of target demo_poisson
[100%] Building CXX object CMakeFiles/demo_poisson.dir/main.cpp.o
Linking CXX executable demo_poisson
[100%] Built target demo_poisson
$ otool -L demo_poisson 
demo_poisson:
    /sw/lib/libdolfin.1.2.dylib (compatibility version 1.2.0, current version 1.2.0)
    /sw/lib/libxml2.2.dylib (compatibility version 12.0.0, current version 12.1.0)
    /sw/lib/libarmadillo.3.dylib (compatibility version 3.0.0, current version 3.6.2)
    /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
    /sw/lib/libsatlas.dylib (compatibility version 0.0.0, current version 3.10.1)
    /sw/lib/libboost_filesystem-mt-1_53.dylib (compatibility version 1.53.0, current version 1.53.0)
    /sw/lib/libboost_program_options-mt-1_53.dylib (compatibility version 1.53.0, current version 1.53.0)
    /sw/lib/libboost_system-mt-1_53.dylib (compatibility version 1.53.0, current version 1.53.0)
    /sw/lib/libboost_thread-mt-1_53.dylib (compatibility version 1.53.0, current version 1.53.0)
    /sw/lib/libboost_iostreams-mt-1_53.dylib (compatibility version 1.53.0, current version 1.53.0)
    /sw/lib/libboost_mpi-mt-1_53.dylib (compatibility version 1.53.0, current version 1.53.0)
    /sw/lib/libboost_serialization-mt-1_53.dylib (compatibility version 1.53.0, current version 1.53.0)
    /sw/lib/libboost_timer-mt-1_53.dylib (compatibility version 1.53.0, current version 1.53.0)
    /sw/lib/libboost_chrono-mt-1_53.dylib (compatibility version 1.53.0, current version 1.53.0)
    /sw/lib/petsc-3.2/lib/libpetsc.dylib (compatibility version 0.0.0, current version 0.0.0)
    /sw/lib/libumfpack.5.dylib (compatibility version 5.6.1, current version 5.6.1)
    /sw/lib/libamd.2.dylib (compatibility version 2.3.1, current version 2.3.1)
    /sw/lib/libcholmod.2.dylib (compatibility version 2.0.1, current version 2.0.1)
    /sw/lib/libcamd.2.dylib (compatibility version 2.3.1, current version 2.3.1)
    /sw/lib/libcolamd.2.dylib (compatibility version 2.8.0, current version 2.8.0)
    /sw/lib/libccolamd.2.dylib (compatibility version 2.8.0, current version 2.8.0)
    /sw/lib/libsuitesparseconfig.4.dylib (compatibility version 4.0.2, current version 4.0.2)
    /sw/lib/libCGAL.10.dylib (compatibility version 10.0.0, current version 10.0.0)
    /sw/lib/gmp5/libgmp.10.dylib (compatibility version 12.0.0, current version 12.2.0)
    /sw/lib/libmpfr.4.dylib (compatibility version 6.0.0, current version 6.2.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
    /sw/lib/libcppunit-1.12.1.dylib (compatibility version 2.0.0, current version 2.0.0)
    /sw/lib/openmpi/libmpi_cxx.1.dylib (compatibility version 2.0.0, current version 2.1.0)
    /sw/lib/openmpi/libmpi.1.dylib (compatibility version 2.0.0, current version 2.7.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
    /sw/lib/qt4-mac/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0, current version 4.7.3)
    /sw/lib/qt4-mac/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.3)
    /sw/lib/vtk58/libvtkCommon.5.8.dylib (compatibility version 5.8.0, current version 5.8.0)
    /sw/lib/vtk58/libvtkFiltering.5.8.dylib (compatibility version 5.8.0, current version 5.8.0)
    /sw/lib/vtk58/libvtkImaging.5.8.dylib (compatibility version 5.8.0, current version 5.8.0)
    /sw/lib/vtk58/libvtkGraphics.5.8.dylib (compatibility version 5.8.0, current version 5.8.0)
    /sw/lib/vtk58/libvtkGenericFiltering.5.8.dylib (compatibility version 5.8.0, current version 5.8.0)
    /sw/lib/vtk58/libvtkIO.5.8.dylib (compatibility version 5.8.0, current version 5.8.0)
    /sw/lib/vtk58/libvtkRendering.5.8.dylib (compatibility version 5.8.0, current version 5.8.0)
    /sw/lib/vtk58/libvtkVolumeRendering.5.8.dylib (compatibility version 5.8.0, current version 5.8.0)
    /sw/lib/vtk58/libvtkHybrid.5.8.dylib (compatibility version 5.8.0, current version 5.8.0)
    /sw/lib/vtk58/libvtkWidgets.5.8.dylib (compatibility version 5.8.0, current version 5.8.0)
    /sw/lib/vtk58/libvtkParallel.5.8.dylib (compatibility version 5.8.0, current version 5.8.0)
    /sw/lib/vtk58/libvtkInfovis.5.8.dylib (compatibility version 5.8.0, current version 5.8.0)
    /sw/lib/vtk58/libvtkGeovis.5.8.dylib (compatibility version 5.8.0, current version 5.8.0)
    /sw/lib/vtk58/libvtkViews.5.8.dylib (compatibility version 5.8.0, current version 5.8.0)
    /sw/lib/vtk58/libvtkCharts.5.8.dylib (compatibility version 5.8.0, current version 5.8.0)
    /sw/lib/gcc4.8/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.18.0)
    /sw/lib/gcc4.8/lib/libgomp.1.dylib (compatibility version 2.0.0, current version 2.0.0)
    /sw/lib/gcc4.8/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
$ ./demo_poisson 
Solving linear variational problem.
  *** Warning: Using PETSc native LU solver. Consider configuring PETSc with an efficient LU solver (e.g. UMFPACK, MUMPS).
demo_poisson(41286,0x7fff741df180) malloc: *** error for object 0x7fff73221570: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
[C02KWF8WF5V8:41286] *** Process received signal ***
[C02KWF8WF5V8:41286] Signal: Abort trap: 6 (6)
[C02KWF8WF5V8:41286] Signal code:  (0)
[C02KWF8WF5V8:41286] *** End of error message ***
Abort trap: 6
$ python
Python 2.7.5 (default, Aug  8 2013, 10:00:58) 
[GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.57))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from dolfin import *
>>> mesh = UnitSquareMesh(4,4)
>>> show(mesh)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'show' is not defined
>>> plot(mesh)
<dolfin.cpp.io.VTKPlotter; proxy of <Swig Object of type 'boost::shared_ptr< dolfin::VTKPlotter > *' at 0x10fa282a0> >
>>> # plot works, JIT works
>>> File("test.pvd")
python(60650,0x7fff741df180) malloc: *** error for object 0x7fff73221570: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
[C02KWF8WF5V8:60650] *** Process received signal ***
[C02KWF8WF5V8:60650] Signal: Abort trap: 6 (6)
[C02KWF8WF5V8:60650] Signal code:  (0)
[C02KWF8WF5V8:60650] *** End of error message ***
Abort trap: 6

File breaks by freeing a bad pointer. There are no debug symbols to be found showing where the free happens:

Breakpoint 1 at 0x7fff8c645588
Pending breakpoint 1 - "malloc_error_break" resolved
Solving linear variational problem.
  *** Warning: Using PETSc native LU solver. Consider configuring PETSc with an efficient LU solver (e.g. UMFPACK, MUMPS).
demo_poisson(27242,0x7fff741df180) malloc: *** error for object 0x7fff73221570: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

Breakpoint 1, 0x00007fff8c645588 in malloc_error_break ()
(gdb) bt
#0  0x00007fff8c645588 in malloc_error_break ()
#1  0x00007fff8c646942 in free ()

I've recompiled everything using gcc-fsf-4.8 (since CLANG 4 chokes on -gomp and JIT fails.) Any thoughts on finding the culprit?

Comments (2)

  1. Log in to comment