Bug #6789

parse.y compilation error due not updated id.h

Added by Luis Lavena over 2 years ago. Updated over 2 years ago.

[ruby-core:46741]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
ruby -v:ruby 2.0.0dev (2012-07-25 trunk 36527) [x64-mingw32] Backport:

Description

=begin
Hello,

After r36524, compilation with existing build tree will fail due id.h not being regenerated:

compiling ../dmyversion.c
generating parse.c
parse.h updated
compiling ../array.c
...
compiling parse.c
In file included from ../parse.y:27:0:
id.h:165:1: error: size of array 'checking_for_idNULL' is negative
id.h:166:1: error: size of array 'checking_for_idRespond_to' is negative
id.h:167:1: error: size of array 'checking_for_idIFUNC' is negative
id.h:168:1: error: size of array 'checking_for_idCFUNC' is negative
id.h:169:1: error: size of array 'checking_for_id_core_set_method_alias' is negative
id.h:170:1: error: size of array 'checking_for_id_core_set_variable_alias' is negative
id.h:171:1: error: size of array 'checking_for_id_core_undef_method' is negative
id.h:172:1: error: size of array 'checking_for_id_core_define_method' is negative
id.h:173:1: error: size of array 'checking_for_id_core_define_singleton_method' is negative
id.h:174:1: error: size of array 'checking_for_id_core_set_postexe' is negative
id.h:175:1: error: size of array 'checking_for_id_core_hash_from_ary' is negative
id.h:176:1: error: size of array 'checking_for_id_core_hash_merge_ary' is negative
id.h:177:1: error: size of array 'checking_for_id_core_hash_merge_ptr' is negative
id.h:178:1: error: size of array 'checking_for_id_core_hash_merge_kwd' is negative
id.h:179:1: error: size of array 'checking_for_tLAST_TOKEN' is negative
make: *** [parse.o] Error 1

It required a forced removal of id.h to properly compile after.

This caused a build failure when building RubyInstaller from existing compilation:

http://ci.rubyinstaller.org/job/ruby-trunk-x64/44/console
http://ci.rubyinstaller.org/job/ruby-trunk-x86/45/console

Perhaps id.h generation needs to be marked as dependency of parse.c itself?

=end

noname (500 Bytes) Anonymous, 07/26/2012 08:53 AM

parse_dependency.patch Magnifier (574 Bytes) Tomoyuki Chikanaga, 07/29/2012 02:53 AM

Associated revisions

Revision 36571
Added by Tomoyuki Chikanaga over 2 years ago

  • common.mk: add a dependency. [Bug #6789]

Revision 36571
Added by Tomoyuki Chikanaga over 2 years ago

  • common.mk: add a dependency. [Bug #6789]

Revision 36661
Added by Nobuyoshi Nakada over 2 years ago

common.mk: id.h dependency

  • common.mk (.y.h): split from .y.c rule to manage dependency on parse.h. [Bug #6789]
  • common.mk (id.h): keep old file unless changed.

Revision 36661
Added by Nobuyoshi Nakada over 2 years ago

common.mk: id.h dependency

  • common.mk (.y.h): split from .y.c rule to manage dependency on parse.h. [Bug #6789]
  • common.mk (id.h): keep old file unless changed.

History

#1 Updated by Luis Lavena over 2 years ago

  • Status changed from Open to Assigned

#2 Updated by Anonymous over 2 years ago

On Wed, Jul 25, 2012 at 07:13:27AM +0900, luislavena (Luis Lavena) wrote:

It required a forced removal of id.h to properly compile after.

Doesn't make clean take care of this?

This caused a build failure when building RubyInstaller from existing compilation:

http://ci.rubyinstaller.org/job/ruby-trunk-x64/44/console
http://ci.rubyinstaller.org/job/ruby-trunk-x86/45/console

Perhaps id.h generation needs to be marked as dependency of parse.c itself?

Urgh. If so, I think this should be assigned to Nobu. I am extremely
terrible at our autotools / Makefile build system.

--
Aaron Patterson
http://tenderlovemaking.com/

#3 Updated by Luis Lavena over 2 years ago

  • Assignee changed from Aaron Patterson to Nobuyoshi Nakada

#4 Updated by Luis Lavena over 2 years ago

On Wed, Jul 25, 2012 at 8:45 PM, Aaron Patterson
tenderlove@ruby-lang.org wrote:

On Wed, Jul 25, 2012 at 07:13:27AM +0900, luislavena (Luis Lavena) wrote:

It required a forced removal of id.h to properly compile after.

Doesn't make clean take care of this?

Yes, it does, but the current CI setup is not doing clean before "all
test", will change that.

But others might be building in-tree and not doing clean before
building, expecting dependencies get resolved and files properly
generated.

Urgh. If so, I think this should be assigned to Nobu. I am extremely
terrible at our autotools / Makefile build system.

Will reassign, thank you.

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

#5 Updated by Tomoyuki Chikanaga over 2 years ago

Well, doesn't this patch fix this issue?

#6 Updated by Luis Lavena over 2 years ago

nagachika (Tomoyuki Chikanaga) wrote:

Well, doesn't this patch fix this issue?

Yes, it did.

Can you commit it?

Thank you.

#7 Updated by Tomoyuki Chikanaga over 2 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r36571.
Luis, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • common.mk: add a dependency. [Bug #6789]

#8 Updated by Nobuyoshi Nakada over 2 years ago

  • Status changed from Closed to Open
  • % Done changed from 100 to 0

#9 Updated by Nobuyoshi Nakada over 2 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r36661.
Luis, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


common.mk: id.h dependency

  • common.mk (.y.h): split from .y.c rule to manage dependency on parse.h. [Bug #6789]
  • common.mk (id.h): keep old file unless changed.

Also available in: Atom PDF