periscop / clay

Clay, the Chunky Loop Alteration wizardrY
2 stars 5 forks source link

Cannot build Clay! #21

Closed thiagotei closed 6 years ago

thiagotei commented 6 years ago

I've used the following steps:

git clone 
./get_submodules.sh
./autogen.sh
./configure --prefix=/home/user/Documents/periscop/clay/install --with-osl=bundled  --with-clan=bundled --with-cloog=bundled --with-candl=bundled
make

Make stops with an error:

   ^
  CCLD     libclay.la
ar: `u' modifier ignored since `D' is the default (see `U')
  CC       source/clay-clay.o
In file included from ./candl/include/candl/piplib-wrapper.h:45:0,
                 from ./candl/include/candl/candl.h:44,
                 from source/clay.c:70:
./candl/include/candl/piplib.h:40:30: fatal error: piplib/piplibMP.h: No such file or directory
compilation terminated.
Makefile:899: recipe for target 'source/clay-clay.o' failed
make[1]: *** [source/clay-clay.o] Error 1
make[1]: Leaving directory '/home/thiago/Documents/periscop/clay/src-git'
Makefile:956: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
ftynse commented 6 years ago

looks like a build system problem, piplibMP.h is there but it won't find it. Can you please run make V=1 and paste the last line starting with gcc before the error?

thiagotei commented 6 years ago
$ make V=1
gcc -DPACKAGE_NAME=\"clay\" -DPACKAGE_TARNAME=\"clay\" -DPACKAGE_VERSION=\"0.0.1\" -DPACKAGE_STRING=\"clay\ 0.0.1\" -DPACKAGE_BUGREPORT=\"cedric.bastoul@u-psud.fr\" -DPACKAGE_URL=\"\" -DPACKAGE=\"clay\" -DVERSION=\"0.0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_ERRNO_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRTOL=1 -I.  -I./osl/include -Iosl/include -I./clan/include -Iclan/include -DCLAN_LINKED -I./cloog/include -Icloog/include -DCLOOG_LINKED -I./candl/include -Icandl/include -DCANDL_LINKED -I. -I./include -I./include  -Wall -std=c99 -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math -MT source/clay-clay.o -MD -MP -MF source/.deps/clay-clay.Tpo -c -o source/clay-clay.o `test -f 'source/clay.c' || echo './'`source/clay.c
In file included from ./candl/include/candl/piplib-wrapper.h:45:0,
                 from ./candl/include/candl/candl.h:44,
                 from source/clay.c:70:
./candl/include/candl/piplib.h:40:30: fatal error: piplib/piplibMP.h: No such file or directory
compilation terminated.
Makefile:899: recipe for target 'source/clay-clay.o' failed
make[1]: *** [source/clay-clay.o] Error 1
make[1]: Leaving directory '/home/thiago/Documents/periscop/clay/src-git'
Makefile:956: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
thiagotei commented 6 years ago

I've added by hand -I./candl/piplib/include -Icandl/piplib/include to the Makefile and it passed. However it stopped in another point:

gcc -DPACKAGE_NAME=\"clay\" -DPACKAGE_TARNAME=\"clay\" -DPACKAGE_VERSION=\"0.0.1\" -DPACKAGE_STRING=\"clay\ 0.0.1\" -DPACKAGE_BUGREPORT=\"cedric.bastoul@u-psud.fr\" -DPACKAGE_URL=\"\" -DPACKAGE=\"clay\" -DVERSION=\"0.0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_ERRNO_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRTOL=1 -I.  -I./osl/include -Iosl/include -I./clan/include -Iclan/include -DCLAN_LINKED -I./cloog/include -Icloog/include -DCLOOG_LINKED -I./candl/piplib/include  -Icandl/piplib/include -I./candl/include -Icandl/include -DCANDL_LINKED -I. -I./include -I./include  -Wall -std=c99 -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math -MT source/clay-clay.o -MD -MP -MF source/.deps/clay-clay.Tpo -c -o source/clay-clay.o `test -f 'source/clay.c' || echo './'`source/clay.c
source/clay.c: In function ‘main’:
source/clay.c:81:20: warning: variable ‘last’ set but not used [-Wunused-but-set-variable]
   osl_generic_p x, last;
                    ^
mv -f source/.deps/clay-clay.Tpo source/.deps/clay-clay.Po
/bin/bash ./libtool  --tag=CC   --mode=link gcc -Wall -std=c99 -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math   -o clay source/clay-clay.o ./osl/libosl.la ./clan/libclan.la ./cloog/libcloog-isl.la ./candl/libcandl.la libclay.la 
libtool: link: gcc -Wall -std=c99 -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math -o .libs/clay source/clay-clay.o  ./osl/.libs/libosl.so ./clan/.libs/libclan.so ./cloog/.libs/libcloog-isl.so ./candl/.libs/libcandl.so ./.libs/libclay.so -Wl,-rpath -Wl,/home/thiago/Documents/periscop/clay/install/lib
./.libs/libclay.so: undefined reference to `osl_relation_remove_part'
./.libs/libclay.so: undefined reference to `osl_int_gt'
./.libs/libclay.so: undefined reference to `osl_int_lcm'
collect2: error: ld returned 1 exit status
Makefile:741: recipe for target 'clay' failed
make[1]: *** [clay] Error 1
make[1]: Leaving directory '/home/thiago/Documents/periscop/clay/src-git'
Makefile:956: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
thiagotei commented 6 years ago

The submodule used here, osl @ fe12623, apparently does not implement these functions:

osl_relation_remove_part
osl_int_gt
osl_int_lcm
ftynse commented 6 years ago

I updated that ef32f63afcde7f06538ec25b38a6ded90fbdd2f7. Generally speaking, the "fully bundled" mode is not stable. I recommend compiling and installing osl, then cloog+clan+candl, then clay separately so that each stage sees the outcome of the previous one.

thiagotei commented 6 years ago

Ok Thanks!