Repository: mlpack/mlpack

Issue #26: Thor Compilation error
Created: 2014-12-28T22:19:32Z
Reported by march on 12 May 40305755 01:46 UTC
On my mac (OS 10.5):
After configuring with these options:
lawn-128-61-121-6:trunk march$ cd build/
lawn-128-61-121-6:build march$ cmake -D CMAKE_INSTALL_PREFIX=/Users/march/fastlib/trunk/build -D WITH_SPARSE=OFF ../
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- The Fortran compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working Fortran compiler: /usr/local/bin/gfortran
-- Check for working Fortran compiler: /usr/local/bin/gfortran  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/local/bin/gfortran supports Fortran 90
-- Checking whether /usr/local/bin/gfortran supports Fortran 90 -- yes
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- Found Pthreads: /usr/lib/libpthread.dylib
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/march/fastlib/trunk/build
I get this compilation error in THOR:
lawn-128-61-121-6:build march$ make
Scanning dependencies of target fastlib
[  1%] Building CXX object fastlib/CMakeFiles/fastlib.dir/base/cc.cc.o
[  2%] Building CXX object fastlib/CMakeFiles/fastlib.dir/base/ccmem.cc.o
[  2%] Building C object fastlib/CMakeFiles/fastlib.dir/base/common.c.o
[  3%] Building C object fastlib/CMakeFiles/fastlib.dir/base/debug.c.o
[  4%] Building CXX object fastlib/CMakeFiles/fastlib.dir/base/otrav.cc.o
[  4%] Building CXX object fastlib/CMakeFiles/fastlib.dir/col/col.cc.o
[  5%] Building CXX object fastlib/CMakeFiles/fastlib.dir/data/dataset.cc.o
[  6%] Building CXX object fastlib/CMakeFiles/fastlib.dir/file/textfile.cc.o
[  7%] Building C object fastlib/CMakeFiles/fastlib.dir/fx/datanode.c.o
[  7%] Building C object fastlib/CMakeFiles/fastlib.dir/fx/fx.c.o
[  8%] Building C object fastlib/CMakeFiles/fastlib.dir/fx/stopwatch.c.o
[  9%] Building CXX object fastlib/CMakeFiles/fastlib.dir/la/uselapack.cc.o
[  9%] Building CXX object fastlib/CMakeFiles/fastlib.dir/math/discrete.cc.o
[ 10%] Building CXX object fastlib/CMakeFiles/fastlib.dir/math/geometry.cc.o
[ 11%] Building CXX object fastlib/CMakeFiles/fastlib.dir/math/statistics.cc.o
[ 12%] Building CXX object fastlib/CMakeFiles/fastlib.dir/mmanager/memory_manager.cc.o
[ 12%] Building CXX object fastlib/CMakeFiles/fastlib.dir/par/thread.cc.o
[ 13%] Building CXX object fastlib/CMakeFiles/fastlib.dir/thor/distribcache.cc.o
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h:346: error: uint does not name a type
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h:347: error: uint does not name a type
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h:363: error: uint does not name a type
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h:371: error: uint does not name a type
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h:379: error: uint does not name a type
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h: In member function void IoStats::OT__TraverseObject_(TVisitor_):
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h:352: error: n_reads_ was not declared in this scope
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h:353: error: n_writes_ was not declared in this scope
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h: In member function void IoStats::Add(const IoStats&):
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h:389: error: n_reads_ was not declared in this scope
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h:389: error: const class IoStats has no member named n_reads_
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h:390: error: n_writes_ was not declared in this scope
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h:390: error: const class IoStats has no member named n_writes_
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h: In member function void IoStats::RecordRead(uint64):
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h:398: error: n_reads_ was not declared in this scope
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h: In member function void IoStats::RecordWrite(uint64):
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h:404: error: n_writes_ was not declared in this scope
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h: In member function void IoStats::Reset():
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h:411: error: n_reads_ was not declared in this scope
/Users/march/fastlib/trunk/fastlib/thor/blockdev.h:411: error: n_writes_ was not declared in this scope
make[* fastlib/CMakeFiles/fastlib.dir/thor/distribcache.cc.o Error 1
make[* fastlib/CMakeFiles/fastlib.dir/all Error 2
make: *_* [all] Error 2

Duplicate issue #55: Segmentation fault when using data::Load method
Created: 2014-12-29T05:54:45Z
Reported by ssharfraz3 on 23 Jul 40320386 06:13 UTC
This crash is observed in the latest fastlib-cmake branch.
allnn/allknn/svm or any of the programs which use data::Load for loading the dataset matrix are crashing. The following is the stack trace.
#0  0x00e7fe61 in vsnprintf () from /lib/tls/i686/cmov/libc.so.6
#1  0x080703e2 in String::InitSprintf(char const*, ...) ()
#2  0x08063ac6 in DatasetInfo::InitFromCsv(TextLineReader_, char const_) ()
#3  0x08063c10 in DatasetInfo::InitFromFile(TextLineReader_, char const_) ()
#4  0x08064a7c in Dataset::InitFromFile(TextLineReader_, char const_) ()
#5  0x080649b8 in Dataset::InitFromFile(char const*) ()
#6  0x08064ece in data::Load(char const_, GenMatrix_) ()
#7  0x0805e92d in main (argc=2, argv=0xbffff444) at /home/shakir/fastlib_boost/mlpack/allnn/main.cc:59

Closing comment (2014-12-29T17:34:15Z): Commented by rcurtin on 9 Oct 40320785 10:40 UTC
Duplicate of #26.  This was my error; I'd fixed it in trunk but not in the fastlib-cmake branch.  [5511] is the fix (very simple).