Tomasz Kupczyk created THRIFT-3163:
--------------------------------------

             Summary: Build failure due to ylwrap being called with wrong 
arguments
                 Key: THRIFT-3163
                 URL: https://issues.apache.org/jira/browse/THRIFT-3163
             Project: Thrift
          Issue Type: Bug
         Environment: Ubuntu 15.04
automake 1.14.1
GNU Make 4.0
ylwrap 2013-01-12.17
            Reporter: Tomasz Kupczyk
            Priority: Minor


Hey, when trying to build on fresh Ubuntu 15.04 installation I got this problem:

floyd@floyd-VirtualBox:~/thrift$ make
make  all-recursive
make[1]: Entering directory '/home/floyd/thrift'
Making all in compiler/cpp
make[2]: Entering directory '/home/floyd/thrift/compiler/cpp'
make  all-am
make[3]: Entering directory '/home/floyd/thrift/compiler/cpp'
\
 \
/bin/bash ../../ylwrap `test -f 'src/thriftl.ll' || echo './'`src/thriftl.ll .c 
thriftl.cc -- /bin/bash /home/floyd/thrift/missing flex  
/home/floyd/thrift/compiler/cpp/src/thriftl.ll:266: warning, rule cannot be 
matched
/home/floyd/thrift/compiler/cpp/src/thriftl.ll:285: warning, rule cannot be 
matched
/home/floyd/thrift/compiler/cpp/src/thriftl.ll:413: warning, rule cannot be 
matched
lex.yythriftl.cc is unchanged
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../lib/cpp/src/thrift  -I./src  -Wall 
-Wno-sign-compare -Wno-unused -g -O2 -std=c++11 -MT libparse_a-thriftl.o -MD 
-MP -MF .deps/libparse_a-thriftl.Tpo -c -o libparse_a-thriftl.o `test -f 
'thriftl.cc' || echo './'`thriftl.cc
g++: error: ./thriftl.cc: No such file or directory
g++: fatal error: no input files
compilation terminated.
Makefile:790: recipe for target 'libparse_a-thriftl.o' failed
make[3]: *** [libparse_a-thriftl.o] Error 4
make[3]: Leaving directory '/home/floyd/thrift/compiler/cpp'
Makefile:579: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/floyd/thrift/compiler/cpp'
Makefile:600: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/floyd/thrift'
Makefile:521: recipe for target 'all' failed
make: *** [all] Error 2

I found the problem is in this command:

/bin/bash ../../ylwrap `test -f 'src/thriftl.ll' || echo './'`src/thriftl.ll .c 
thriftl.cc -- /bin/bash /home/floyd/thrift/missing flex

Exactly in second argument to ylwrap which above is just string '.c'. The 
proper command to run should be:

floyd@floyd-VirtualBox:~/thrift$ cd compiler/cpp/
floyd@floyd-VirtualBox:~/thrift/compiler/cpp$ /bin/bash ../../ylwrap `test -f 
'src/thriftl.ll' || echo './'`src/thriftl.ll lex.yy.c thriftl.cc -- /bin/bash 
/home/floyd/thrift/missing flex

So instead of '.c' it should have 'lex.yy.c' name which is the default name for 
lex generated filenames AFAIK. After manually running this command the build 
continues and even finishes (hurray!).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to