bengtmartensson/IRremote-SIL

Fails to build

Closed this issue · 10 comments

z3t0 commented

I can't seem to build IRremote-SIL. I am using the correct version of the library, and this is the error I get.

➜  IRremote-SIL git:(master) make
make: *** No rule to make target `ir_Aiwa.o', needed by `irremote'.  Stop.

Probably IRREMOTE_DIR in the Makefile is not correct. This is described in README.md.

What is your environment/operating system?

z3t0 commented

I'm running on macOS. The IRREMOTE_DIR in the makefile points to a copy of the library at the commit mentioned in the readme.

➜  IRremote git:(18f12d3) l
total 464
drwxr-xr-x  41 z3t0  staff   1.4K 10 Aug 17:31 .
drwxr-xr-x   7 z3t0  staff   238B 10 Aug 17:31 ..
-rw-r--r--@  1 z3t0  staff   6.0K 10 Aug 17:31 .DS_Store
drwxr-xr-x  13 z3t0  staff   442B 10 Aug 17:40 .git
-rw-r--r--   1 z3t0  staff    43B 10 Aug 17:31 .gitignore
-rw-r--r--   1 z3t0  staff   1.3K 10 Aug 17:31 .travis.yml
-rw-r--r--   1 z3t0  staff   1.5K 10 Aug 17:31 Contributing.md
-rw-r--r--   1 z3t0  staff   1.5K 10 Aug 17:31 Contributors.md
-rw-r--r--   1 z3t0  staff   7.6K 10 Aug 17:31 IRremote.cpp
-rw-r--r--   1 z3t0  staff    11K 10 Aug 17:31 IRremote.h
-rw-r--r--   1 z3t0  staff   3.8K 10 Aug 17:31 IRremoteInt.h
-rw-r--r--   1 z3t0  staff   850B 10 Aug 17:31 ISSUE_TEMPLATE.md
-rw-r--r--   1 z3t0  staff    24K 10 Aug 17:31 LICENSE.txt
-rw-r--r--   1 z3t0  staff   5.4K 10 Aug 17:31 README.md
-rw-r--r--   1 z3t0  staff   4.8K 10 Aug 17:31 arduino-irremote.sublime-workspace
-rw-r--r--   1 z3t0  staff    18K 10 Aug 17:31 boarddefs.h
-rw-r--r--   1 z3t0  staff   2.4K 10 Aug 17:31 changelog.md
drwxr-xr-x  18 z3t0  staff   612B 10 Aug 17:31 examples
-rw-r--r--   1 z3t0  staff    15K 10 Aug 17:31 irPronto.cpp
-rw-r--r--   1 z3t0  staff   6.4K 10 Aug 17:31 irRecv.cpp
-rw-r--r--   1 z3t0  staff   3.2K 10 Aug 17:31 irSend.cpp
-rw-r--r--   1 z3t0  staff   3.5K 10 Aug 17:31 ir_Aiwa.cpp
-rw-r--r--   1 z3t0  staff   3.2K 10 Aug 17:31 ir_Denon.cpp
-rw-r--r--   1 z3t0  staff   1.7K 10 Aug 17:31 ir_Dish.cpp
-rw-r--r--   1 z3t0  staff   2.9K 10 Aug 17:31 ir_JVC.cpp
-rw-r--r--   1 z3t0  staff   2.4K 10 Aug 17:31 ir_LG.cpp
-rw-r--r--   1 z3t0  staff   1.3K 10 Aug 17:31 ir_Lego_PF.cpp
-rw-r--r--   1 z3t0  staff   3.5K 10 Aug 17:31 ir_Lego_PF_BitStreamEncoder.h
-rw-r--r--   1 z3t0  staff   3.0K 10 Aug 17:31 ir_Mitsubishi.cpp
-rw-r--r--   1 z3t0  staff   2.8K 10 Aug 17:31 ir_NEC.cpp
-rw-r--r--   1 z3t0  staff   2.7K 10 Aug 17:31 ir_Panasonic.cpp
-rw-r--r--   1 z3t0  staff   5.9K 10 Aug 17:31 ir_RC5_RC6.cpp
-rw-r--r--   1 z3t0  staff   2.8K 10 Aug 17:31 ir_Samsung.cpp
-rw-r--r--   1 z3t0  staff   2.6K 10 Aug 17:31 ir_Sanyo.cpp
-rw-r--r--   1 z3t0  staff   2.3K 10 Aug 17:31 ir_Sharp.cpp
-rw-r--r--   1 z3t0  staff   2.8K 10 Aug 17:31 ir_Sony.cpp
-rw-r--r--   1 z3t0  staff   5.7K 10 Aug 17:31 ir_Template.cpp
-rw-r--r--   1 z3t0  staff   2.9K 10 Aug 17:31 ir_Whynter.cpp
-rw-r--r--   1 z3t0  staff   1.0K 10 Aug 17:31 keywords.txt
-rw-r--r--   1 z3t0  staff   504B 10 Aug 17:31 library.json
-rw-r--r--   1 z3t0  staff   297B 10 Aug 17:31 library.properties

Hmm, "this cannot happen". Something appears to be broken either with your make or your environment. I just checked in a new Makefile; please update your repos and then try

make version
make env
make -r -d ir_Aiwa.o

and post the result.

z3t0 commented

Output .. sorry my env is very messy.

Your IRREMOTE_DIR does not contain spaces, right?

From your output:

git -C /Users/z3t0/Arduino/libraries/IRremote log | head -1
fatal: Cannot change to '/Users/z3t0/Arduino/libraries/IRremote': No such file or directory

Something is seriously flawed here.

➜  IRremote-SIL git:(master) make -r -d ir_Aiwa.o
.... 
Considering target file `ir_Aiwa.o'.
File `ir_Aiwa.o' does not exist.
Looking for an implicit rule for `ir_Aiwa.o'.
Trying pattern rule with stem `ir_Aiwa'.
Trying implicit prerequisite `ir_Aiwa.cpp'.
Trying pattern rule with stem `ir_Aiwa'.
Trying implicit prerequisite `ir_Aiwa.cpp'.
Looking for a rule with intermediate file `ir_Aiwa.cpp'.
 Avoiding implicit rule recursion.
 No implicit rule found for `ir_Aiwa.o'.
Finished prerequisites of target file `ir_Aiwa.o'.
Must remake target `ir_Aiwa.o'.
make: *** No rule to make target `ir_Aiwa.o'. Stop.

It appears that Apple's make (just 11 years old...) does not handle VPATH correctly. Possibly you can try installing current Gnu make from gnu.org.

Any progress?

z3t0 commented
z3t0 commented

Reformatted... Email does not support markdown?

➜  IRremote-SIL git:(master) gmake version
make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0
g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
uname -a
Darwin Rafis-MacBook-Pro.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
git log | head -1
commit d4ce5e1fab62d186f8a7c04b200fa4d00ececfd3
git -C /Users/z3t0/Arduino/libraries/IRremote log | head -1
fatal: Cannot change to '/Users/z3t0/Arduino/libraries/IRremote': No such file or directory
➜  IRremote-SIL git:(master) gmake env
env
RUBY_VERSION=ruby-2.3.1
LC_CTYPE=en_CA.UTF-8
rvm_path=/Users/z3t0/.rvm
SHELL=/bin/zsh
_=/usr/local/bin/gmake
_system_version=10.12
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.Q73h4Md7hL/Render
PATH=/Users/z3t0/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/share/dotnet:/usr/local/MacGPG2/bin:/Library/TeX/texbin:/Applications/Wireshark.app/Contents/MacOS:/Users/z3t0/.rvm/gems/ruby-2.3.1/bin:/Users/z3t0/.rvm/gems/ruby-2.3.1@global/bin:/Users/z3t0/.rvm/rubies/ruby-2.3.1/bin:/Users/z3t0/.cargo/bin:/usr/local/CrossPack-AVR/bin:/Users/z3t0/.rvm/bin
LSCOLORS=Gxfxcxdxbxegedabagacad
_system_name=OSX
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.qdz1fmft8K/Listeners
TMUX_PANE=%7
rvm_bin_path=/Users/z3t0/.rvm/bin
PWD=/Users/z3t0/dev/IRremote-SIL
GEM_HOME=/Users/z3t0/.rvm/gems/ruby-2.3.1
HOME=/Users/z3t0
TMUX_PLUGIN_MANAGER_PATH=/Users/z3t0/.tmux/plugins/
LOGNAME=z3t0
ZSH=/Users/z3t0/.oh-my-zsh
GEM_PATH=/Users/z3t0/.rvm/gems/ruby-2.3.1:/Users/z3t0/.rvm/gems/ruby-2.3.1@global
XPC_FLAGS=0x0
IRBRC=/Users/z3t0/.rvm/rubies/ruby-2.3.1/.irbrc
SHLVL=2
USER=z3t0
TERM_SESSION_ID=w0t0p1:BD77A853-355A-4E5B-83A3-F184858BA567
rvm_version=1.27.0 (latest)
LESS=-R
OLDPWD=/Users/z3t0/dev
TERM_PROGRAM=iTerm.app
TMPDIR=/var/folders/76/0gyn58w961v6sgtzr3kxsct80000gn/T/
MAKEFLAGS=
MFLAGS=
TERM_PROGRAM_VERSION=3.0.20160822-nightly
XPC_SERVICE_NAME=0
TMUX=/private/tmp/tmux-501/default,836,1
MAKE_TERMOUT=/dev/ttys001
ITERM_SESSION_ID=w0t0p1:BD77A853-355A-4E5B-83A3-F184858BA567
COLORFGBG=7;0
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0xF
_system_type=Darwin
ITERM_PROFILE=Default
PAGER=less
rvm_prefix=/Users/z3t0
_system_arch=x86_64
MAKE_TERMERR=/dev/ttys001
LANG=en_CA.UTF-8
TERM=xterm
MY_RUBY_HOME=/Users/z3t0/.rvm/rubies/ruby-2.3.1
MAKELEVEL=1
IRREMOTE_DIR=/Users/z3t0/Arduino/libraries/IRremote
➜  IRremote-SIL git:(master) gmake -r -d ir_Aiwa.o
GNU Make 4.2.1
Built for x86_64-apple-darwin16.5.0
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile 'Makefile'...
Updating makefiles....
 Considering target file 'Makefile'.
  Looking for an implicit rule for 'Makefile'.
  No implicit rule found for 'Makefile'.
  Finished prerequisites of target file 'Makefile'.
 No need to remake target 'Makefile'.
Updating goal targets....
Considering target file 'ir_Aiwa.o'.
 File 'ir_Aiwa.o' does not exist.
 Looking for an implicit rule for 'ir_Aiwa.o'.
 Trying pattern rule with stem 'ir_Aiwa'.
 Trying implicit prerequisite 'ir_Aiwa.cpp'.
 Trying pattern rule with stem 'ir_Aiwa'.
 Trying implicit prerequisite 'ir_Aiwa.cpp'.
 Looking for a rule with intermediate file 'ir_Aiwa.cpp'.
  Avoiding implicit rule recursion.
 No implicit rule found for 'ir_Aiwa.o'.
 Finished prerequisites of target file 'ir_Aiwa.o'.
Must remake target 'ir_Aiwa.o'.
gmake: *** No rule to make target 'ir_Aiwa.o'.  Stop.

Let's start with

gmake version
...
git -C /Users/z3t0/Arduino/libraries/IRremote log | head -1
fatal: Cannot change to '/Users/z3t0/Arduino/libraries/IRremote': No such file or directory

Why is this failing? Does the directory mentioned exist? ... and is readable? What happens if you execute the command (git -C /Users/z3t0/Arduino/libraries/IRremote log) from the command line?

z3t0 commented

Feeling kind of stupid... I miswrote the path above... should be /Users/z3t0/Documents/Arduino ... All is working now