-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Texplay fails to install under Ruby 2.1 #22
Comments
I can confirm this issue. |
Let me know if you find a resolution to this issue. |
The sync issue was easy to resolve (renamed to sync_) as was another to do with macros. There is a last error still, which I'm not sure how to resolve though:
Where KLASS_OF is defined: #define KLASS_OF(c) (RBASIC(c)->klass) Didn't look too hard for a solution though. Thought it might be related to: antw/ruby-deepclone@2f05690 |
I just received an email from someone trying to run on of my projects that depends on texplay and he got the error because he his using 2.1.2. I might try to look into it. @spooner I see you have also submitted a partial fix in an unmerged PR. @banister If someone would submit a fix for 2.1 would it get merged in? |
@gilles-leblanc sure, i'll merge it. If you want, i can give you a commit bit and you could even merge it yourself ;) |
@banister Sure that would be great! |
Thanks for the fix in pre. |
Ruby 2 and later needs to use the texplay 0.4.4.pre gem banister/texplay#22 While this does not compile on windows so we need to use the older gem. Though the version number is not specific this could cause some issues in the future.
@burtlo I would love some help getting this to compile on windows (if possible) |
@shawn42 I can definitely run it on there and post a stacktrace. After that I will do my best to assist. |
Great! Thanks @burtlo |
Same error with texplay 0.4.4-pre on OSX 10.9
|
@byterussian what version of Ruby were you installing this into? Were you using any ruby switcher like rvm or rbenv? |
Ruby 2.1.2p96 with rbenv. This happens only if I have in Gemfile: If in Gemfile write only
|
@byterussian I'm not sure why installing from the github repo is not building at the moment, but that is different than installing the pre gem from rubygems. Have you tried: I'm able to reproduce the error you're reporting when installing from the github repo, but it works fine with the version specified in the Gemfile as '0.4.4.pre' |
@shawn42 Tried now, with |
@byterussian glad to help. @burtlo anything on the windows front so we can get this issue closed out? |
I'll give it a shot on Windows 8. Downloaded and install Ruby 2.1 x32 and the DevKit.
I'll play more with it tomorrow. |
thanks @burtlo |
On Ubuntu, I encounter the same problem trying to install the lasted version (ea3cd6c) from github: $ rake rake aborted! Don't know how to build task 'default' (See full trace by running task with --trace) tpasch2@muccpw-tp:~/ruby/texplay$ rake compile cd tmp/x86_64-linux-gnu/texplay/2.1.2 make compiling ../../../../ext/texplay/bindings.c ../../../../ext/texplay/bindings.c: In function ‘m_clone_image’: ../../../../ext/texplay/bindings.c:318:32: error: assignment of read-only member ‘klass’ KLASS_OF(cloned_image) = rb_singleton_class_clone(self); ^ Makefile:224: recipe for target 'bindings.o' failed make: *** [bindings.o] Error 1 rake aborted! Command failed with status (2): [make...] /var/lib/gems/2.1.0/gems/rake-compiler-0.9.3/lib/rake/extensiontask.rb:152:in `block (2 levels) in define_compile_tasks' /var/lib/gems/2.1.0/gems/rake-compiler-0.9.3/lib/rake/extensiontask.rb:151:in `block in define_compile_tasks' Tasks: TOP => compile => compile:x86_64-linux-gnu => compile:texplay:x86_64-linux-gnu => copy:texplay:x86_64-linux-gnu:2.1.2 => tmp/x86_64-linux-gnu/texplay/2.1.2/texplay.so (See full trace by running task with --trace) I SOLVED the problem with the following patch: $ git diff -u -w diff --git a/ext/texplay/bindings.c b/ext/texplay/bindings.c index e7c2937..9475f4f 100644 --- a/ext/texplay/bindings.c +++ b/ext/texplay/bindings.c @@ -308,7 +308,7 @@ m_clone_image(VALUE self) cloned_image = m_dup_image(self); replace: #if RUBY_API_VERSION_MAJOR <= 1 \|\| \(RUBY_API_VERSION_MAJOR == 2 \&\& RUBY_API_VERSION_MINOR == 0\) with: \#if RUBY_API_VERSION_MAJOR <= 1 \|\| \(RUBY_API_VERSION_MAJOR == 2 \&\& RUBY_API_VERSION_MINOR >= 0\) |
Hm, diff is flacky/wrong here because of some obscure markdown problems. Hence create the pull request https://github.com/banister/texplay/pull/31/files |
Getting this error on Ubuntu 15.04, Ruby 2.2.2p95 with rbenv:
|
You should use the ruby -1.9.1 or -1.8.6!For that,please execute rvm default 1.9.1 or rvm default 1.8.6 in command line.After this,execute sudo gem install texplay.Hopefully,you will have already installed texplay! @lobo-tuerto |
@dukuikui Thanks for the info, hope this gets migrated to Ruby 2.x+ ! Working with Ruby 1.8.6 (or Ruby < 2 for that matter) is a no-no for the moment. |
Failed to build on
Is this because of |
Building native extensions. This could take a while...
ERROR: Error installing texplay-0.4.3.gem:
ERROR: Failed to build gem native extension.
checking for main() in -lglut... yes
checking for main() in -lGL... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling texplay.c
In file included from texplay.c:9:0:
texplay.h:41:3: error: ‘sync’ redeclared as different kind of symbol
/usr/include/unistd.h:997:13: note: previous declaration of ‘sync’ was here
make: *** [texplay.o] Error 1
make failed, exit code 2
The text was updated successfully, but these errors were encountered: