danomatika / joyosc

(maintained) hid device to osc event daemon used in the robotcowboy project
http://robotcowboy.com
GNU General Public License v3.0
44 stars 3 forks source link

Code does not compile because config/config.sub is a symbolic link into your private local filesystem #3

Closed edgecode closed 8 years ago

edgecode commented 8 years ago

Hey danomatika,

Thanks for your software and your electronic art stuff! For a project I currently need "gamepad to OSC" functionality and came across joyosc. It looks promising, so i wanted to give it a try.

Unfortunately joysoc did not even compile. The reason is config/config.sub and other automake resources being symbolic links into your local filesystem.

$ ./configure 
...
configure: error: cannot run /bin/bash ./config/config.sub

$ ls -al ./config/config.sub
./config/config.sub -> /usr/local/Cellar/automake/1.15/share/automake-1.15/config.sub

IIRC you should only distribute the configure script and a Makefile.in generated from the autotools package. Details the-magic-behind-configure-make-make-install

If joysoc is obsolete and you are aware of a good replacement I would be happy to hear about it. The code needs to compile and run on Linux.

Thanks + cheers, Edgar

danomatika commented 8 years ago

Try running the autogen.sh script which will regenerate configure using autoconf. Then run configure.

danomatika commented 8 years ago

IIRC you should only distribute the configure script and a Makefile.in generated from the autotools package. Details the-magic-behind-configure-make-make-install

I've very aware of maintaining and distributing an autotools project. You're cloning the development repository instead of a proper distribution tarball so problems like this come up, hence the autogen script. As you note, I simply forgot to ignore the generated configure file.

If joysoc is obsolete and you are aware of a good replacement I would be happy to hear about it. The code needs to compile and run on Linux.

If is definitely not obsolete.

danomatika commented 8 years ago

You can grab a release tarball created via make dist here: http://docs.danomatika.com/releases/joyosc/

danomatika commented 8 years ago

Yeah, looks like you're right. I somehow checked in a bunch of generated autotools files. I've removed them from the main project but will need to remove them from the subprojects as well. If you have the time, can you check that both running autopen.sh and the release build configure ok? There are some autoconf errors when creating configure and I'll fix those later.

danomatika commented 8 years ago

Ok, all removed from sub projects as well.

edgecode commented 8 years ago

Hi Dan,

thanks for your quick reply and work on joyosc.

I appreciate your work as a coder and musician. And open-sourcing your work is really awesome.

I've very aware of maintaining and distributing an autotools project.

Sorry, I surely did not want to question your expertise in the GNU build system. As it turns out, I am the one who needs a dive into the GNU build system ;-)

Anyway, for testing your latest changes I created a vanilla Debian jessy LXC container on my Ubuntu 14.04 machine. lxc-create -n lxc_debian8_001 -t debian

And installed the necessary packages: apt-get install wget vim-tiny unzip build-essential libsdl2-dev liblo-dev libtinyxml2-dev

BTW in https://github.com/danomatika/joyosc/blob/master/README.md - QuickStart: sudo apt-get install libsdl-dev liblo-dev libtinyxml2-dev should be: sudo apt-get install libsdl2-dev liblo-dev libtinyxml2-dev libsdl2-dev instead of libsdl-dev

Then I built joyosc from two sources:

  1. Using the release tarball: joyosc-0.4.0# ./configure runs fine and generates a Makefile. joyosc-0.4.0# ./make however fails. I attached logs of the configure and make runs and the generated Makefile: joyosc_release_0.4.0_configure.log.txt joyosc_release_0.4.0_make.log.txt Makefile.txt

  2. Using the git zip-archive: joyosc-master# ./autogen.sh ./autogen.sh: line 6: ./autogen.sh: No such file or directory ./autogen.sh: line 7: cd: lib/tinyobject: No such file or directory ./autogen.sh: line 10: autoreconf: command not found \ Line 6 of autogen.sh: cd lib/lopack && ./autogen.sh && cd ../../ \ joyosc-master# ls -al lib/lopack/autogen.sh ls: cannot access lib/lopack/autogen.sh: No such file or directory

I would like to further look into why the release tarball fails. Today, I cannot. I hope to find some time tomorrow.

thanks again for your great work, best, Edgar

danomatika commented 8 years ago

Thanks for testing. I have fixes for both issues:

  1. Release tarball was showing some fancy stuff I was doing in the code wasn't building with gcc. I've fixed that and uploaded a version 0.4.1 tarball.

  2. Don't use the git-zip archive, it will not work since it doesn't include the git submodules which is why the script fails since there is nothing in the lib subdirectories. If you want to work from the git repo, you have to clone and checkout the submodules. This info is added to the Readme. It's a common problem with GitHub.

edgecode commented 8 years ago

Hi Dan,

thanks for all your work and your prompt replies.

Like before I tested in a vanilla Debian jessy LXC container. make goes beyond Config.cpp now, so your fixes work.

However, make does not compile the code successfully. Details attached:

AFAIS the issue must be fixed in: src/joyosc/JoystickRemapping.cpp src/joyosc/JoystickIgnore.cpp src/joyosc/GameControllerRemapping.cpp src/joyosc/GameControllerIgnore.cpp

I have some time later in the evening. If you are not faster, I will extend my C++ knowledge and try to fix the issue.

thanks + cheers, Edgar

danomatika commented 8 years ago

Looks like gcc needs to be told to use C++11. Should be an easy fix.

danomatika commented 8 years ago

Ok, new version should hopefully fix this. I put up a new tarball as well.

edgecode commented 8 years ago

Hello Dan,

works :-) I fetched joyosc-0.4.2.tar.gz Using ./configure && make && make install it compiles and installs flawlessly under Debian Jessy 8.6.

Dan, thanks for your efforts! You did a fantastic job.

best, Edgar

danomatika commented 8 years ago

Thanks for testing. Previous versions were originally developed on Linux but the last version was a major update I did on OS X and didn't fully test on Linux obviously.

edgecode commented 8 years ago

Glad to help out as the Linux testing guy :-)