daokoder / dao-modules

Dao Standard Modules
http://daovm.net
12 stars 5 forks source link

daotest is not getting compiled #70

Open dumblob opened 9 years ago

dumblob commented 9 years ago

The generated Makefile from dao/makefile.dao contains empty target daotest:

stream: /home/test/dao/lib/libdao.so 
    cd modules/stream && $(MAKE) -f Makefile

daomake: /home/test/dao/lib/libdao.a 
    cd tools/daomake && $(MAKE) -f Makefile

daotest: 

clangdao: 
    cd tools/clangdao && $(MAKE) -f Makefile

modules: /home/test/dao/lib/libdao.a /home/test/dao/bin/dao 
    cd modules && $(MAKE) -f Makefile

and thus the build fails due to all tests failing:

make[2]: Entering directory '/home/test/dao/tests'
LD_LIBRARY_PATH=/home/test/dao/lib/ /home/test/dao/bin/daotest /home/test/dao/tests/examples.dao --log DaoMake.Objs/examples.dao.2947.test
/bin/sh: /home/test/dao/bin/daotest: No such file or directory
Makefile:57: recipe for target 'DaoMake.Objs/examples.dao.2947.test' failed
make[2]: [DaoMake.Objs/examples.dao.2947.test] Error 127 (ignored)
...
daokoder commented 9 years ago

Please make clean rebuild.

dumblob commented 9 years ago

It was clean build. Now I did a clean build once again, but with daomake running in valgrind (from the main Makefile.daomake). I'm not sure if the sigsegv has something to do with the issue above, but it must be fixed anyway.

valgrind ./tools/daomake/bootstrap/daomake --platform linux --mode debug --option-INSTALL-PATH /usr/local --option-STATIC OFF --reset --option-INSTALL-PATH '/usr' --no-local-rpath .
==17628== Memcheck, a memory error detector
==17628== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==17628== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==17628== Command: ./tools/daomake/bootstrap/daomake --platform linux --mode debug --option-INSTALL-PATH /usr/local --option-STATIC OFF --reset --option-INSTALL-PATH /usr --no-local-rpath .
==17628== 
DaoMake: using Unix settings!
DaoMake: using Linux settings!
Checking: cc -I. /home/test/dao/DaoMake.Objs/source_ac029017050c.c -o /home/test/dao/DaoMake.Objs/binary_ac029017050c -lreadline 
==17628== Invalid read of size 1
==17628==    at 0x4C30099: __memcmp_sse4_1 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17628==    by 0x405523: DMBString_Find (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x405737: DString_Find (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x4C5C9B: DString_RepaceVariable (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x4C5D4C: DaoMakeProject_ReplaceVariables (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x4C6185: DaoMakeProject_MakeFindPackage (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x4C8C2D: DAOMAKE_FindPackage (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x429CA5: DaoProcess_CallFunction (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x4397CC: DaoProcess_DoCxxCall (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x439C58: DaoProcess_DoCall2 (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x43AFAD: DaoProcess_DoCall (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x42C399: DaoProcess_Start (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==  Address 0x616bf4e is 2 bytes before a block of size 868 alloc'd
==17628==    at 0x4C2C29E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17628==    by 0x44AE99: dao_realloc (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x4041ED: DString_Realloc (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x404699: DString_Reserve (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x405151: DString_AppendBytes (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x405250: DString_Append (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x4C615F: DaoMakeProject_MakeFindPackage (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x4C8C2D: DAOMAKE_FindPackage (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x429CA5: DaoProcess_CallFunction (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x4397CC: DaoProcess_DoCxxCall (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x439C58: DaoProcess_DoCall2 (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628==    by 0x43AFAD: DaoProcess_DoCall (in /home/test/dao/tools/daomake/bootstrap/daomake)
==17628== 
Executing: llvm-config --cppflags
Executing: llvm-config --ldflags
Executing: llvm-config --libs
Executing: llvm-config --system-libs
Checking: cc -I/home/test/dao/modules/cblas/ /home/test/dao/DaoMake.Objs/source_e73a11634bd8.c -o /home/test/dao/DaoMake.Objs/binary_e73a11634bd8 -lcblas 
Checking: cc -I/usr/include /home/test/dao/DaoMake.Objs/source_db4a0392725b.c -o /home/test/dao/DaoMake.Objs/binary_db4a0392725b -L/usr/lib -lmysqlclient 
Checking: cc -I/usr/include /home/test/dao/DaoMake.Objs/source_d9220312ad8c.c -o /home/test/dao/DaoMake.Objs/binary_d9220312ad8c -L/usr/lib -lmariadbclient -lssl -lz 
==17628== 
==17628== HEAP SUMMARY:
==17628==     in use at exit: 586,436 bytes in 11,471 blocks
==17628==   total heap usage: 398,058 allocs, 386,587 frees, 60,533,866 bytes allocated
==17628== 
==17628== LEAK SUMMARY:
==17628==    definitely lost: 2,672 bytes in 56 blocks
==17628==    indirectly lost: 9,216 bytes in 243 blocks
==17628==      possibly lost: 103,228 bytes in 1,713 blocks
==17628==    still reachable: 471,320 bytes in 9,459 blocks
==17628==         suppressed: 0 bytes in 0 blocks
==17628== Rerun with --leak-check=full to see details of leaked memory
==17628== 
==17628== For counts of detected and suppressed errors, rerun with: -v
==17628== ERROR SUMMARY: 18744 errors from 1 contexts (suppressed: 0 from 0)
daokoder commented 9 years ago

The memory error was fixed. But there seems to be a problem of using the --no-local-rpath option for DaoMake.