clang: error: no input files
Closed this issue · 4 comments
When I ran 'perl Makefile.PL && make && make test' I got:
WARNING: Setting ABSTRACT via file 'lib/XSFun.pm' failed
at /System/Library/Perl/5.16/ExtUtils/MakeMaker.pm line 609.
and finally :
cc -mmacosx-version-min=10.9 -arch x86_64 -arch i386 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector -o blib/arch/auto/XSFun/XSFun.bundle
clang: error: no input files
make: *** [blib/arch/auto/XSFun/XSFun.bundle] Error 1
I cut and pasted the file contents from the web pages, the directories and files look good, any suggestions as to what caused this? BTW, I'm new to GitHub and recently to perl, but I am an old C hand.
Thanks
Peter
I have no idea what the differences with clang is. I'm not familiar with it... I'll try to take a look at it.
@Peter-Murphy According to this blogpost and the mailing list perl Makefile.PL CC=/usr/bin/clang
should be used to generate the Makefile.
I also had to install the libchromaprint-dev
package since it was a required dependency, and the Test::MemoryGrowth
CPAN module in order to run the tests.
Compiling the module went well:
user@testing:/tmp/xs-fun/chapter_07/Audio-Chromaprint$ perl Makefile.PL CC=/usr/bin/clang
[..]
Looks good
Generating a Unix-style Makefile
[..]
user@testing:/tmp/xs-fun/chapter_07/Audio-Chromaprint$ make
[..]
/usr/bin/clang -c -I. -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.001\" -DXS_VERSION=\"0.001\" -fPIC "-I/home/user/perl5/perlbrew/perls/perl-5.18.2/lib/5.18.2/x86_64-linux/CORE" Chromaprint.c
rm -f blib/arch/auto/Audio/Chromaprint/Chromaprint.so
LD_RUN_PATH="/usr/lib/x86_64-linux-gnu" cc -shared -O2 -L/usr/local/lib -fstack-protector Chromaprint.o -o blib/arch/auto/Audio/Chromaprint/Chromaprint.so \
-lchromaprint \
[..]
user@testing:/tmp/xs-fun/chapter_07/Audio-Chromaprint$ make test
[..]
Result: PASS
user@testing:/tmp/xs-fun/chapter_07/Audio-Chromaprint$
@wsdookadr I missed your responses. Thank you for taking the time to write this information down. Also, feel free to throw a PR to document it in the tutorial as well.
Thanks.