Skip to content
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

Compile error on Ubuntu 12.10 #6

Closed
danopia opened this issue Nov 2, 2012 · 3 comments
Closed

Compile error on Ubuntu 12.10 #6

danopia opened this issue Nov 2, 2012 · 3 comments

Comments

@danopia
Copy link

danopia commented Nov 2, 2012

I'm trying to compile this gem on a friend's 64-bit bedside box for my ambient light and movement sensing scripts but I'm getting compile errors no matter what I try (from source or from gem, and both 1.8 and 1.9.1).

This gem is working beautifully on my 12.04 bedside box so I assume that it's the new version of Ubuntu messing with things.

Install log:

media@ClockBook:~$ sudo gem1.9.1 install hornetseye-v4l2
Building native extensions.  This could take a while...
ERROR:  Error installing hornetseye-v4l2:
    ERROR: Failed to build gem native extension.

        rake1.9.1 RUBYARCHDIR=/var/lib/gems/1.9.1/gems/hornetseye-v4l2-1.0.1/lib RUBYLIBDIR=/var/lib/gems/1.9.1/gems/hornetseye-v4l2-1.0.1/lib
Please install 'yard' if you want to generate documentation
g++ -MM ext/v4l2input.cc ext/init.cc ext/v4l2select.cc ext/frame.cc | sed -e :a -e N -e 's/\n/\$/g' -e ta | sed -e 's/ *\\\$ */ /g' -e 's/\$/\n/g' | sed -e 's/^/ext\//' > .depends.mf
g++ -DNDEBUG -D_FORTIFY_SOURCE=2  -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -fno-strict-aliasing -fPIC -I/usr/include/ruby-1.9.1 -I/usr/include/ruby-1.9.1/x86_64-linux -c -o ext/v4l2input.o ext/v4l2input.cc
ext/v4l2input.cc: In constructor ‘V4L2Input::V4L2Input(const string&, int, V4L2SelectPtr)’:
ext/v4l2input.cc:59:5: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses]
ext/v4l2input.cc: In member function ‘v4l2_ctrl_type V4L2Input::featureType(unsigned int)’:
ext/v4l2input.cc:346:20: error: invalid conversion from ‘__u32 {aka unsigned int}’ to ‘v4l2_ctrl_type’ [-fpermissive]
rake aborted!
Command failed with status (1): [g++ -DNDEBUG -D_FORTIFY_SOURCE=2  -D_FORTI...]

Tasks: TOP => default => all => ext/hornetseye_v4l2.so => ext/v4l2input.o
(See full trace by running task with --trace)


Gem files will remain installed in /var/lib/gems/1.9.1/gems/hornetseye-v4l2-1.0.1 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/hornetseye-v4l2-1.0.1/./gem_make.out
media@ClockBook:~$ 
@wedesoft
Copy link
Owner

wedesoft commented Nov 4, 2012

I added an explicit conversion to 'v4l2_ctr_type' and released version 1.0.2. I hope it will work for you now (myself I am still using Kubuntu 12.04).

@danopia
Copy link
Author

danopia commented Nov 4, 2012

This solves the issue. Just for reference I'm using gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1).

Thanks, now I can get additional boxes up for my friends ^.^

@danopia danopia closed this as completed Nov 4, 2012
@wedesoft
Copy link
Owner

wedesoft commented Nov 5, 2012

Ok, cool. Thanks for letting me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants