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

Warning at breakpoint.c:281 in 2.2.0 causes compilation to fail #26

Closed
bartocc opened this issue Sep 24, 2013 · 7 comments
Closed

Warning at breakpoint.c:281 in 2.2.0 causes compilation to fail #26

bartocc opened this issue Sep 24, 2013 · 7 comments

Comments

@bartocc
Copy link

bartocc commented Sep 24, 2013

I can't install 2.2.0 on OS X 10.8.5, XCode 4.6.3 because of a warning caused in breakpoint.c:281

cc1: warnings being treated as errors
breakpoint.c: In function ‘brkpt_remove’:
breakpoint.c:281: warning: unused parameter ‘self’
make: *** [breakpoint.o] Error 1

I believe I can find a flag to avoid treating warnings as errors and have the ext compile, but I'd be great if this warning were fixed.

If it involves too much refactoring to remove self from the method signature, then maybe just adding a dumb line with self could be a workaround ?

@bartocc
Copy link
Author

bartocc commented Sep 24, 2013

my RbConfig::MAKEFILE_CONFIG['CC'] == "/usr/local/bin/gcc-4.2" which points to apple-gcc42 installed with homebrew

deivid-rodriguez pushed a commit that referenced this issue Sep 24, 2013
@deivid-rodriguez
Copy link
Owner

Hi, thanks for reporting this.

This was probably introduced in e602dda, since which we don't override default compiler flags anymore. Probably your compiler has those warnings enabled and mine hasn't...

I enforced those warnings to not be checked anymore in dc08c35. I think that should fix it. Please give it a try and if it works I'll release a new version of byebug.

@teeparham
Copy link

I had the same problem. Now I'm getting this with 2.2.1 via gem install byebug:

make "DESTDIR="
compiling breakpoint.c
compiling byebug.c
cc1: warnings being treated as errors
byebug.c: In function ‘clear_tracepoints’:
byebug.c:425: warning: implicit conversion shortens 64-bit value into a 32-bit value
make: *** [byebug.o] Error 1

I'm on XCode 4.6.3, ruby 2.0.0-p247.

@deivid-rodriguez
Copy link
Owner

Hi @teeparham, could you try my last commit and see if it fixes the problem?

If it doesn't fix it I think I'll just revert e602dda until I'm able to properly test this kind of stuff through cross-compilation or through buying a lot of machines.... :)

@teeparham
Copy link

Thanks! Yes - that worked:

# success:

$ git checkout master
# 725fbafdd2667f

$ rake install
byebug 2.2.1 built to pkg/byebug-2.2.1.gem.
byebug (2.2.1) installed.


# previous install failed:

$ git checkout c49d3f19cdc
HEAD is now at c49d3f1... Prepare for 2.2.1 release

$ rake build
byebug 2.2.1 built to pkg/byebug-2.2.1.gem.

$ gem install pkg/byebug-2.2.1.gem
# ...
make "DESTDIR="
compiling breakpoint.c
compiling byebug.c
cc1: warnings being treated as errors
byebug.c: In function ‘clear_tracepoints’:
byebug.c:425: warning: implicit conversion shortens 64-bit value into a 32-bit value
make: *** [byebug.o] Error 1
``

@deivid-rodriguez
Copy link
Owner

Sweet!

I just released 2.2.2 and now I'm crossing fingers and hoping there are not further issues related to this one...

@deivid-rodriguez
Copy link
Owner

Nobody reported anymore issues and @teeparham confired this works, so I'm closing this. @bartocc or anyone, feel free to reopen if this is still biting you.

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

3 participants