Closed jiapei100 closed 8 years ago
Not sure what you mean by this. If you don't put "matlab" in the Halide target, then nothing matlab-related ever gets generated, and I don't think our matlab support introduces any dependencies. What are you trying to do?
Sorry... I'm using ccmake ../ to do the out of source compilation. There seems to be NOTHING related to Matlab, namely, I couldn't DISABLE Matlab, which is automatically configured by default. So, how do you build Halide? Don't you use cmake or ccmake ?
Cheers Pei
There's no way to disable matlab support in the build system because it doesn't introduce any extra build dependencies or any extra code in the generated files, so there's no reason to disable it. Are you seeing a build error relating to it?
There are build instructions for make and cmake here: https://github.com/halide/Halide/blob/master/README.md
Yes, I met some error messages while building Halide.. I'm using Ubuntu 16.04 Beta2 with GCC 5.3.1 . My LLVM is 3.8 . It's weird the outcomes are different while I do "make -j8" and "make-j4"
for make -j8
[ 99%] Linking CXX executable ../bin/generator_aot_c_plus_plus_name_mangling cd /home/jiapei/Downloads/imageprocessing/Halide/build/test && /usr/bin/cmake -E cmake_link_script CMakeFiles/generator_aot_c_plus_plus_name_mangling.dir/link.txt --verbose=1 /usr/bin/c++ -D_FORCE_INLINES -L /home/jiapei/Downloads/imageprocessing/Halide/build/test/scratch_c_plus_plus_name_mangling CMakeFiles/generator_aot_c_plus_plus_name_mangling.dir/generator/c_plus_plus_name_mangling_aottest.cpp.o -o ../bin/generator_aot_c_plus_plus_name_mangling -rdynamic scratch_c_plus_plus_name_mangling/c_plus_plus_name_mangling.a -ldl -lpthread -lz make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' [ 99%] Built target generator_aot_user_context make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' [ 99%] Built target generator_aot_c_plus_plus_name_mangling make[1]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' Makefile:86: recipe for target 'all' failed make: *\ [all] Error 2
for make -j4
[ 98%] Built target generator_aot_user_context make -f apps/bilateral_grid/CMakeFiles/filter.dir/build.make apps/bilateral_grid/CMakeFiles/filter.dir/depend make[2]: Entering directory '/home/jiapei/Downloads/imageprocessing/Halide/build' collect2: error: ld returned 1 exit status test/CMakeFiles/generator_aot_c_plus_plus_name_mangling_define_extern.dir/build.make:98: recipe for target 'bin/generator_aot_c_plus_plus_name_mangling_define_extern' failed make[2]: * [bin/generator_aot_c_plus_plus_name_mangling_define_extern] Error 1 make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' CMakeFiles/Makefile2:3035: recipe for target 'test/CMakeFiles/generator_aot_c_plus_plus_name_mangling_define_extern.dir/all' failed make[1]: * [test/CMakeFiles/generator_aot_c_plus_plus_name_mangling_define_extern.dir/all] Error 2 make[1]: * Waiting for unfinished jobs.... make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' make -f test/CMakeFiles/generator_aot_c_plus_plus_name_mangling.dir/build.make test/CMakeFiles/generator_aot_c_plus_plus_name_mangling.dir/build make[2]: Entering directory '/home/jiapei/Downloads/imageprocessing/Halide/build' make[2]: Nothing to be done for 'test/CMakeFiles/generator_aot_c_plus_plus_name_mangling.dir/build'. make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' [ 98%] Generating bilateral_grid cd /home/jiapei/Downloads/imageprocessing/Halide/build/apps/bilateral_grid && /home/jiapei/Downloads/imageprocessing/Halide/build/bin/bilateral_grid 8 [ 99%] Built target generator_aot_c_plus_plus_name_mangling Halide pipeline compiled, but not yet run. cd /home/jiapei/Downloads/imageprocessing/Halide/build/tutorial/scratch_lesson_10_aot_compilation_generate && /usr/bin/ar r lesson_10_halide.a /home/jiapei/Downloads/imageprocessing/Halide/build/tutorial/scratch_lesson_10_aot_compilation_generate/lesson_10_halide.o /usr/bin/ar: creating lesson_10_halide.a make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' [ 99%] Built target exec_generator_lesson_10_aot_compilation_generate_lesson_10_halide cd /home/jiapei/Downloads/imageprocessing/Halide/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/jiapei/Downloads/imageprocessing/Halide /home/jiapei/Downloads/imageprocessing/Halide/apps/bilateral_grid /home/jiapei/Downloads/imageprocessing/Halide/build /home/jiapei/Downloads/imageprocessing/Halide/build/apps/bilateral_grid /home/jiapei/Downloads/imageprocessing/Halide/build/apps/bilateral_grid/CMakeFiles/filter.dir/DependInfo.cmake --color= Scanning dependencies of target filter make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' make -f apps/bilateral_grid/CMakeFiles/filter.dir/build.make apps/bilateral_grid/CMakeFiles/filter.dir/build make[2]: Entering directory '/home/jiapei/Downloads/imageprocessing/Halide/build' [ 99%] Building CXX object apps/bilateral_grid/CMakeFiles/filter.dir/filter.cpp.o cd /home/jiapei/Downloads/imageprocessing/Halide/build/apps/bilateral_grid && /usr/bin/c++ -I/home/jiapei/Downloads/imageprocessing/Halide/apps/support -I/home/jiapei/Downloads/imageprocessing/Halide/build/include -I/home/jiapei/Downloads/imageprocessing/Halide/tools -I/home/jiapei/Downloads/imageprocessing/Halide/build/apps/bilateral_grid -D_FORCE_INLINES -Wall -Wno-unused-function -Wcast-qual -Woverloaded-virtual -Wignored-qualifiers -Werror -std=c++11 -o CMakeFiles/filter.dir/filter.cpp.o -c /home/jiapei/Downloads/imageprocessing/Halide/apps/bilateral_grid/filter.cpp [ 99%] Linking CXX executable ../../bin/filter cd /home/jiapei/Downloads/imageprocessing/Halide/build/apps/bilateral_grid && /usr/bin/cmake -E cmake_link_script CMakeFiles/filter.dir/link.txt --verbose=1 /usr/bin/c++ -D_FORCE_INLINES CMakeFiles/filter.dir/filter.cpp.o -o ../../bin/filter -rdynamic bilateral_grid.o -lpng -lz -ldl -lpthread make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' [ 99%] Built target filter make[1]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' Makefile:86: recipe for target 'all' failed make: * [all] Error 2
cheers Pei
This looks like VERBOSE=1 output, but I don't see the actual link errors here. Is this both stdout and stderr?
I can't tell if the errors are just with the name mangling tests or other stuff is failing too. I do not see any mention of Matlab in the output.
-Z-
On Sun, Apr 3, 2016 at 10:43 AM, JIA Pei notifications@github.com wrote:
Yes, I met some error messages while building Halide.. I'm using Ubuntu 16.04 Beta2 with GCC 5.3.1 . My LLVM is 3.8 . It's weird the outcomes are different while I do "make -j8" and "make-j4"
for make -j8
[ 99%] Linking CXX executable ../bin/generator_aot_c_plus_plus_name_mangling cd /home/jiapei/Downloads/imageprocessing/Halide/build/test && /usr/bin/cmake -E cmake_link_script CMakeFiles/generator_aot_c_plus_plus_name_mangling.dir/link.txt --verbose=1 /usr/bin/c++ -D_FORCE_INLINES -L /home/jiapei/Downloads/imageprocessing/Halide/build/test/scratch_c_plus_plus_name_mangling CMakeFiles/generator_aot_c_plus_plus_name_mangling.dir/generator/c_plus_plus_name_mangling_aottest.cpp.o -o ../bin/generator_aot_c_plus_plus_name_mangling -rdynamic scratch_c_plus_plus_name_mangling/c_plus_plus_name_mangling.a -ldl -lpthread -lz make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' [ 99%] Built target generator_aot_user_context make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' [ 99%] Built target generator_aot_c_plus_plus_name_mangling make[1]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' Makefile:86: recipe for target 'all' failed make: *\ [all] Error 2
for make -j4
[ 98%] Built target generator_aot_user_context make -f apps/bilateral_grid/CMakeFiles/filter.dir/build.make apps/bilateral_grid/CMakeFiles/filter.dir/depend make[2]: Entering directory '/home/jiapei/Downloads/imageprocessing/Halide/build' collect2: error: ld returned 1 exit status test/CMakeFiles/generator_aot_c_plus_plus_name_mangling_define_extern.dir/build.make:98: recipe for target 'bin/generator_aot_c_plus_plus_name_mangling_define_extern' failed make[2]: * [bin/generator_aot_c_plus_plus_name_mangling_define_extern] Error 1 make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' CMakeFiles/Makefile2:3035: recipe for target 'test/CMakeFiles/generator_aot_c_plus_plus_name_mangling_define_extern.dir/all' failed make[1]: [test/CMakeFiles/generator_aot_c_plus_plus_name_mangling_define_extern.dir/all] Error 2 make[1]: \ Waiting for unfinished jobs.... make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' make -f test/CMakeFiles/generator_aot_c_plus_plus_name_mangling.dir/build.make test/CMakeFiles/generator_aot_c_plus_plus_name_mangling.dir/build make[2]: Entering directory '/home/jiapei/Downloads/imageprocessing/Halide/build' make[2]: Nothing to be done for 'test/CMakeFiles/generator_aot_c_plus_plus_name_mangling.dir/build'. make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' [ 98%] Generating bilateral_grid cd /home/jiapei/Downloads/imageprocessing/Halide/build/apps/bilateral_grid && /home/jiapei/Downloads/imageprocessing/Halide/build/bin/bilateral_grid 8 [ 99%] Built target generator_aot_c_plus_plus_name_mangling Halide pipeline compiled, but not yet run. cd /home/jiapei/Downloads/imageprocessing/Halide/build/tutorial/scratch_lesson_10_aot_compilation_generate && /usr/bin/ar r lesson_10_halide.a /home/jiapei/Downloads/imageprocessing/Halide/build/tutorial/scratch_lesson_10_aot_compilation_generate/lesson_10_halide.o /usr/bin/ar: creating lesson_10_halide.a make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' [ 99%] Built target exec_generator_lesson_10_aot_compilation_generate_lesson_10_halide cd /home/jiapei/Downloads/imageprocessing/Halide/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/jiapei/Downloads/imageprocessing/Halide /home/jiapei/Downloads/imageprocessing/Halide/apps/bilateral_grid /home/jiapei/Downloads/imageprocessing/Halide/build /home/jiapei/Downloads/imageprocessing/Halide/build/apps/bilateral_grid /home/jiapei/Downloads/imageprocessing/Halide/build/apps/bilateral_grid/CMakeFiles/filter.dir/DependInfo.cmake --color= Scanning dependencies of target filter make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' make -f apps/bilateral_grid/CMakeFiles/filter.dir/build.make apps/bilateral_grid/CMakeFiles/filter.dir/build make[2]: Entering directory '/home/jiapei/Downloads/imageprocessing/Halide/build' [ 99%] Building CXX object apps/bilateral_grid/CMakeFiles/filter.dir/filter.cpp.o cd /home/jiapei/Downloads/imageprocessing/Halide/build/apps/bilateral_grid && /usr/bin/c++ -I/home/jiapei/Downloads/imageprocessing/Halide/apps/support -I/home/jiapei/Downloads/imageprocessing/Halide/build/include -I/home/jiapei/Downloads/imageprocessing/Halide/tools -I/home/jiapei/Downloads/imageprocessing/Halide/build/apps/bilateral_grid -D_FORCE_INLINES -Wall -Wno-unused-function -Wcast-qual -Woverloaded-virtual -Wignored-qualifiers -Werror -std=c++11 -o CMakeFiles/filter.dir/filter.cpp.o -c /home/jiapei/Downloads/imageprocessing/Halide/apps/bilateral_grid/filter.cpp [ 99%] Linking CXX executable ../../bin/filter cd /home/jiapei/Downloads/imageprocessing/Halide/build/apps/bilateral_grid && /usr/bin/cmake -E cmake_link_script CMakeFiles/filter.dir/link.txt --verbose=1 /usr/bin/c++ -D_FORCE_INLINES CMakeFiles/filter.dir/filter.cpp.o -o ../../bin/filter -rdynamic bilateral_grid.o -lpng -lz -ldl -lpthread make[2]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' [ 99%] Built target filter make[1]: Leaving directory '/home/jiapei/Downloads/imageprocessing/Halide/build' Makefile:86: recipe for target 'all' failed make: * [all] Error 2
cheers Pei
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/halide/Halide/issues/1093#issuecomment-205020993
Ok, this is the build result without enable VERBOSE...
[ 98%] Building CXX object test/CMakeFiles/generator_aot_user_context.dir/generator/user_context_aottest.cpp.o scratch_c_plus_plus_name_mangling_define_extern/c_plus_plus_name_mangling_define_extern.a(c_plus_plus_name_mangling_define_extern.o): In function
__c_plus_plus_name_mangling_define_extern': c_plus_plus_name_mangling_define_extern:(.text.__c_plus_plus_name_mangling_define_extern+0x19b): undefined reference to
HalideTest::c_plus_plus_name_mangling(buffert, signed char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, bool, float, double, int, int const, buffert)' c_plus_plus_name_mangling_define_extern:(.text.c_plus_plus_name_mangling_define_extern+0x305): undefined reference to `HalideTest::c_plus_plus_name_mangling(buffer_t, signed char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, bool, float, double, int, int const, buffer_t)' c_plus_plus_name_mangling_define_extern:(.text.c_plus_plus_name_mangling_define_extern+0x536): undefined reference to`HalideTest::c_plus_plus_name_mangling(buffert, signed char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, bool, float, double, int, int const, buffert)' collect2: error: ld returned 1 exit status test/CMakeFiles/generator_aot_c_plus_plus_name_mangling_define_extern.dir/build.make:95: recipe for target 'bin/generator_aot_c_plus_plus_name_mangling_define_extern' failed make[2]: * [bin/generator_aot_c_plus_plus_name_mangling_define_extern] Error 1 CMakeFiles/Makefile2:3032: recipe for target 'test/CMakeFiles/generator_aot_c_plus_plus_name_mangling_define_extern.dir/all' failed make[1]: * [test/CMakeFiles/generator_aot_c_plus_plus_name_mangling_define_extern.dir/all] Error 2 make[1]: * Waiting for unfinished jobs.... [ 98%] Built target exec_generator_acquire_release_acquire_release [ 98%] Built target exec_generator_error_codes_error_codes [ 98%] Linking CXX executable ../bin/generator_aot_gpu_only [ 98%] Built target exec_generator_argvcall_argvcall [ 98%] Built target exec_generator_matlab_matlab [ 98%] Built target generator_aot_gpu_only [ 98%] Linking CXX executable ../bin/generator_aot_pyramid [ 98%] Linking CXX executable ../bin/generator_aot_user_context [ 98%] Built target generator_aot_pyramid [ 98%] Built target generator_aot_user_context Makefile:83: recipe for target 'all' failed make: * [all] Error 2
If I do make instead of make -j8, I got
[ 61%] Linking CXX executable ../bin/generator_aot_c_plus_plus_name_mangling_define_extern scratch_c_plus_plus_name_mangling_define_extern/c_plus_plus_name_mangling_define_extern.a(c_plus_plus_name_mangling_define_extern.o): In function
__c_plus_plus_name_mangling_define_extern': c_plus_plus_name_mangling_define_extern:(.text.__c_plus_plus_name_mangling_define_extern+0x19b): undefined reference to
HalideTest::c_plus_plus_name_mangling(buffert, signed char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, bool, float, double, int, int const, buffert)' c_plus_plus_name_mangling_define_extern:(.text.c_plus_plus_name_mangling_define_extern+0x305): undefined reference to `HalideTest::c_plus_plus_name_mangling(buffer_t, signed char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, bool, float, double, int, int const, buffer_t)' c_plus_plus_name_mangling_define_extern:(.text.c_plus_plus_name_mangling_define_extern+0x536): undefined reference to`HalideTest::c_plus_plus_name_mangling(buffert, signed char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, bool, float, double, int, int const, buffert)' collect2: error: ld returned 1 exit status test/CMakeFiles/generator_aot_c_plus_plus_name_mangling_define_extern.dir/build.make:95: recipe for target 'bin/generator_aot_c_plus_plus_name_mangling_define_extern' failed make[2]: * [bin/generator_aot_c_plus_plus_name_mangling_define_extern] Error 1 CMakeFiles/Makefile2:3032: recipe for target 'test/CMakeFiles/generator_aot_c_plus_plus_name_mangling_define_extern.dir/all' failed make[1]: * [test/CMakeFiles/generator_aot_c_plus_plus_name_mangling_define_extern.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *\ [all] Error 2
This has nothing to do with Matlab and likely everything to do with the specific version of gcc. It looks like gcc is doing something differently with the templates that establish the type info for arguments. I.e. the name mangling is is probably correct, it is just working on incorrect types in one context. To verify this it would be helpful to get the output of nm for c_plus_plus_name_mangling_define_extern.o and c_plus_plus_name_mangling.o to see what symbols are actually in each.
That said, I'll likely need to pull down the latest gcc and build form source to see what is going on. (That tends to be tricky because one can't actually build complete programs without the full include and library environment being installed.)
Pending a conversation with Andrew, I will change or disable the test that is failing if we can't resolve this fairly quickly. Nothing should be broken other than name mangling, which is brand new.
Thank you, -Z-
On Sun, Apr 3, 2016 at 1:30 PM, JIA Pei notifications@github.com wrote:
If I do make instead of make -j8, I got
[ 61%] Linking CXX executable ../bin/generator_aot_c_plus_plus_name_mangling_define_extern scratch_c_plus_plus_name_mangling_define_extern/c_plus_plus_name_mangling_define_extern.a(c_plus_plus_name_mangling_define_extern.o): In function c_plus_plus_name_mangling_define_extern': c_plus_plus_name_mangling_define_extern:(.text.c_plus_plus_name_mangling_define_extern+0x19b): undefined reference toHalideTest::c_plus_plus_name_mangling(buffert, signed char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, bool, float, double, int, int const, buffert)' c_plus_plus_name_mangling_define_extern:(.text.c_plus_plus_name_mangling_define_extern+0x305): undefined reference to HalideTest::c_plus_plus_name_mangling(buffert, signed char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, bool, float, double, int, int const, buffert)' c_plus_plus_name_mangling_define_extern:(.text.c_plus_plus_name_mangling_define_extern+0x536): undefined reference toHalideTest::c_plus_plus_name_mangling(buffert, signed char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, bool, float, double, int, int const, buffert)' collect2: error: ld returned 1 exit status test/CMakeFiles/generator_aot_c_plus_plus_name_mangling_define_extern.dir/build.make:95: recipe for target 'bin/generator_aot_c_plus_plus_name_mangling_define_extern' failed make[2]: * [bin/generator_aot_c_plus_plus_name_mangling_define_extern] Error 1 CMakeFiles/Makefile2:3032: recipe for target 'test/CMakeFiles/generator_aot_c_plus_plus_name_mangling_define_extern.dir/all' failed make[1]: * [test/CMakeFiles/generator_aot_c_plus_plus_name_mangling_define_extern.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *\ [all] Error 2
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/halide/Halide/issues/1093#issuecomment-205048483
Could this be related to #1095?
fwiw, all the linux buildbots are currently green, and they test against gccs 4.8, 4.9, 5.1, 5.2 and 5.3
Yes, abadams: You are right. add "list(SORT TESTS)" after line 105 solved my problem....
How to disable matlab from current Halide-git?