denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Denemo-devel] Windows build failure


From: Richard Shann
Subject: Re: [Denemo-devel] Windows build failure
Date: Sat, 16 Nov 2013 12:46:56 +0000

On Sat, 2013-11-16 at 11:54 +0100, Éloi Rivard wrote:
> This is fixed.
About this fix, this bit of code (kbd-custom.c) now looks very
suspicious:


void register_command_row(keymap* the_keymap, command_row* command){
  gint *idx = g_malloc(sizeof(gint));
  *idx = g_hash_table_size (the_keymap->commands);

  //This code is only relevant to developers, to check that no action
  //entry masks another. Users cannot add actions. THIS IS CHANGING NOW...
  if (g_hash_table_contains (the_keymap->commands, idx))
    g_debug ("Command %s is inserted more than once...\n", command->name);
....

I think this has gotten into a bad state some while ago. It looks to me
like it was checking that a new command did not have the same name as
one already present; the comment was written before users could add
commands (and then re-commented while I was adding that facility, and
then not finally re-commented when this facility became available). I am
not quite sure what the code is doing now - I think it must be that
getting the hash table size gets the next command index value to be
assigned, in which case no check is being made for duplicate names and
the test will never succeed.

> 
> Windows build should be added to Travis to avoid such things. Do you
> still use gub to build denemo ?

Yes, there is a script on Jeremiah's machine which I tried for the first
time yesterday and which reported the failure.

Richard


> 
> 2013/11/16 Richard Shann <address@hidden>
>         Eloi,
>         
>         It seems that g_hash_table_contains() is causing the windows
>         build to
>         barf. Looking up the docs I see it is only
>         Since 2.32
>         You may be able to substitute g_hash_table_lookup () if you
>         are not
>         storing NULL pointers or the value 0, otherwise
>         g_hash_table_lookup_extended () could be used I think. This
>         could be
>         conditional on the glib version so that we can easily drop it
>         when we
>         manage to advance the windows libraries to more modern values.
>         
>         Richard
>         
>         On Fri, 2013-11-15 at 16:40 -0600, Jeremiah Benham wrote:
>         > I tried to rebuild and it does bard on denemo.
>         > Here is the log:
>         >
>         > http://denemo.org/~rshann/gub/target/mingw/log/denemo.log
>         >
>         > Here is the error:
>         > kbd-custom.o:kbd-custom.c:(.text+0x14a2): undefined
>         reference to `_g_hash_table_contains'
>         > kbd-custom.o:kbd-custom.c:(.text+0x1609): undefined
>         reference to `_g_hash_table_contains'
>         > keyboard.o:keyboard.c:(.text+0x70d): undefined reference to
>         `_g_hash_table_contains'
>         > collect2: ld returned 1 exit status
>         >
>         > Jeremiah
>         
>         
>         
> 
> 
> 
> -- 
> Éloi Rivard - address@hidden
>         
> « On perd plus à être indécis qu'à se tromper. »
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]