silicontrip / SkyReader

A Skylander portal reader/editor/writer for OSX.
87 stars 55 forks source link

Ho Do You make This Under Linux #22

Open rebeltaz opened 6 years ago

rebeltaz commented 6 years ago

How do you compile this under linux? I tried the @capull0 fork and I tried running the link command ahead of running make, but that one won't install either. For that one, for which I cannot find an [issue] tab, I get this when running make:

make: Makefile: No such file or directory make: *** No rule to make target 'Makefile'. Stop.

silicontrip commented 6 years ago

Are you in the correct directory? A Makefile is included in the github repository. You may want to check that it is linked to the correct makefile. Should look something like this

lrwxrwxrwx 1 root root 14 Oct 30 10:55 Makefile -> Makefile.linux -rwxrwxrwx 1 root root 552 Oct 30 10:54 Makefile.linux -rwxrwxrwx 1 root root 762 Oct 30 10:54 Makefile.mingw -rwxrwxrwx 1 root root 491 Oct 30 10:54 Makefile.osx

rebeltaz commented 6 years ago

Wow... that was odd. I had extracted the file from the original SkyReader to ~/downloads/SkyReader-master using Nemo. I changed to that in a terminal and when I couldn't figure out how to compile that, I removed that directory with Nemo and extracted the fork, again with Nemo. I didn't change directories in terminal, so it still thought the same file list was active. Changing to .. and then back worked, sort of. Now I get this:

hid.c:25:36: fatal error: IOKit/hid/IOHIDManager.h: No such file or directory compilation terminated. Makefile:19: recipe for target 'hid.o' failed make: *** [hid.o] Error 1

Is there something else that I need to install first? I know the readme gives a link to hidapi, but the comment on the linux fork says that "hid_libusb is already included"

silicontrip commented 6 years ago

Looks like the Makefile is linked to the OSX make file. delete it and link it to the linux Makefile

rebeltaz commented 6 years ago

It looked like it was linked correctly, but I deleted the Makefile and re-linked it. Now I get a different error.

g++ -I/usr/include/libusb-1.0 -g -pthread -m32 -std=c++11 -c toynames.cpp In file included from /usr/include/string.h:25:0, from skylander.h:3, from toynames.cpp:1: /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory compilation terminated. Makefile:23: recipe for target 'toynames.o' failed make: *** [toynames.o] Error 1

This is what's in my directory:

-rw-rw-r-- 1 derek derek 8768 Jan 22 2017 checksum.cpp -rw-rw-r-- 1 derek derek 547 Jan 22 2017 checksum.h -rw-rw-r-- 1 derek derek 14000 Oct 29 19:42 checksum.o -rw-rw-r-- 1 derek derek 3469 Jan 22 2017 crypt.cpp -rw-rw-r-- 1 derek derek 841 Jan 22 2017 crypt.h -rw-rw-r-- 1 derek derek 10728 Oct 29 19:42 crypt.o -rw-rw-r-- 1 derek derek 6077 Jan 22 2017 fileio.cpp -rw-rw-r-- 1 derek derek 1324 Jan 22 2017 fileio.h -rw-rw-r-- 1 derek derek 34032 Oct 29 19:42 fileio.o -rw-rw-r-- 1 derek derek 13870 Jan 22 2017 hidapi.h -rw-rw-r-- 1 derek derek 28424 Jan 22 2017 hid.c -rw-rw-r-- 1 derek derek 40277 Jan 22 2017 hid_libusb.c -rw-rw-r-- 1 derek derek 24172 Jan 22 2017 hid_win.c -rw-rw-r-- 1 derek derek 9096 Jan 22 2017 main.cpp -rw-rw-r-- 1 derek derek 53504 Oct 29 19:42 main.o lrwxrwxrwx 1 derek derek 14 Oct 29 20:34 Makefile -> Makefile.linux -rw-rw-r-- 1 derek derek 552 Jan 22 2017 Makefile.linux -rw-rw-r-- 1 derek derek 762 Jan 22 2017 Makefile.mingw -rw-rw-r-- 1 derek derek 491 Jan 22 2017 Makefile.osx -rw-rw-r-- 1 derek derek 8644 Jan 22 2017 md5.cpp -rw-rw-r-- 1 derek derek 1390 Jan 22 2017 md5.h -rw-rw-r-- 1 derek derek 14456 Oct 29 19:42 md5.o -rw-rw-r-- 1 derek derek 14615 Jan 22 2017 portalio.cpp -rw-rw-r-- 1 derek derek 1214 Jan 22 2017 portalio.h -rw-rw-r-- 1 derek derek 6683 Jan 22 2017 portalio_hidapi.cpp -rw-rw-r-- 1 derek derek 13731 Jan 22 2017 portalio_iokit.cpp -rw-rw-r-- 1 derek derek 10810 Jan 22 2017 portalio_libusb.cpp -rw-rw-r-- 1 derek derek 1649 Jan 22 2017 README.md -rw-rw-r-- 1 derek derek 54333 Jan 22 2017 rijndael.cpp -rw-rw-r-- 1 derek derek 623 Jan 22 2017 rijndael.h -rw-rw-r-- 1 derek derek 55024 Oct 29 19:42 rijndael.o -rw-rw-r-- 1 derek derek 11442 Jan 22 2017 skylander.cpp -rw-rw-r-- 1 derek derek 1820 Jan 22 2017 skylander.h -rw-rw-r-- 1 derek derek 31848 Oct 29 19:42 skylander.o drwx------ 2 derek derek 4096 Oct 29 17:30 SkyReader.xcodeproj -rw-rw-r-- 1 derek derek 141824 Jan 22 2017 toydata.xls -rw-rw-r-- 1 derek derek 12092 Jan 22 2017 toynames.cpp -rw-rw-r-- 1 derek derek 5279 Jan 22 2017 usbtest.c

silicontrip commented 6 years ago

This appears to be a Ubuntu issue. the solution is apparently in this post. I can't test it however. https://askubuntu.com/questions/470796/fatal-error-sys-cdefs-h-no-such-file-or-directory

rebeltaz commented 6 years ago

After installing libc6-dev-i386, I was getting new errors. Deleting the entire directory and starting over fresh from a newly extracted copy worked. Thank you so much!

parkerlreed commented 6 years ago

Umm

[parker@yoga710 SkyReader]$ find . -name "Makefile*"
./Makefile
./Makefile.mingw

The only regular Makefile is the Mac OSX one. Where's this supposed Linux Makefile?

silicontrip commented 6 years ago

Check the OP question, he's talking about the @capull0 fork, he's posting here because there is no issue tab in that fork.

I've deleted the linux Makefile and re-added it just incase.

~/Development/SkyReader$ git remote -v origin https://github.com/capull0/SkyReader.git (fetch) origin https://github.com/capull0/SkyReader.git (push) ~/Development/SkyReader$ ls -la Makefile* lrwxrwxrwx 1 root root 14 Oct 30 10:55 Makefile -> Makefile.linux -rwxrwxrwx 1 root root 552 Jan 16 11:40 Makefile.linux -rwxrwxrwx 1 root root 762 Oct 30 10:54 Makefile.mingw -rwxrwxrwx 1 root root 491 Oct 30 10:54 Makefile.osx

parkerlreed commented 6 years ago

@silicontrip Ahh thanks. I thought I had tried that fork but just tried again and it compiled.

As a small unrelated side note: I don't have any actual Skylanders to mess with but have been playing with the LED. I see the message format is C then the 3 byte RGB value. I've been struggling to recreate this in Python + PyUSB. I'm essentially just trying to make a small program to only control the LED (maybe pass it the RGB values). Any ideas on where to proceed? I've tried the out interrupt but cannot for the life of me figure out the correct stuff to pass it.

https://gist.github.com/parkerlreed/ad9bdb42d66a1489330e666bd6125d7f

The actual command being sent I'm aware isn't long enough. I'm just not sure if I'm even going about it the right way.

ghost commented 6 years ago

https://github.com/Ph4n70mh4x0r/SkyReader just run make when cloned

kominoshja commented 5 years ago

Depack this and run it with sudo editor.zip

silicontrip commented 4 years ago

I'm not sure what you've done wrong;

somnio~/Downloads% unzip -l editor.zip 
Archive:  editor.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
   191756  11-30-2018 11:04   editor
---------                     -------
   191756                     1 file
somnio~/Downloads% unzip editor.zip
Archive:  editor.zip
  inflating: editor                  
somnio~/Downloads% file editor
editor: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 3.2.0, 
BuildID[sha1]=d98e633799bcb65122a851b5fd21d9ba3c72fff7, with debug_info, not stripped

I can't run this because I'm on OSX and not linux, but I see nothing wrong with the archive.