bugPSPP - Bugs: bug #62747, newer glib2 required due to...

 
 

bug #62747: newer glib2 required due to g_memdup2 in psppire-dialog-action-recode.c

Submitter:  Jeremy Lavergne <snc>
Submitted:  Mon 11 Jul 2022 03:20:30 PM UTC
   
 
Category:  Compilation/Portability Severity:  5 - Average
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 01 Apr 2024 10:09:25 AM UTC, comment #5: 

Cannot reproduce the new problem from Carlos on github CI runner with MacOS 13.6.5. So I close this here again.

Friedrich Beckmann <beckmanf>
Group Member
Sat 30 Mar 2024 04:51:09 PM UTC, comment #4: 

There seems to be a problem with g_memdup2 when pspp is compiled on MacOS Ventura in the brew environment related to the compatiblity code.


gl/uniwidth/libgl_la-width.o >/dev/null 2>&1
In file included from src/ui/gui/builder-wrapper.c:21:
In file included from src/ui/gui/builder-wrapper.h:21:
In file included from src/ui/gui/include/gtk/gtk.h:26:
In file included from /usr/local/Cellar/gtk+3/3.24.41/include/gtk-3.0/gtk/gtk.h:30:
In file included from /usr/local/Cellar/gtk+3/3.24.41/include/gtk-3.0/gdk/gdk.h:30:
In file included from /usr/local/Cellar/gtk+3/3.24.41/include/gtk-3.0/gdk/gdkconfig.h:8:
src/ui/gui/include/glib.h:36:1: error: static declaration of 'g_memdup2' follows non-static declaration
g_memdup2 (gconstpointer mem,
^
/usr/local/Cellar/glib/2.80.0_2/include/glib-2.0/glib/gstrfuncs.h:354:23: note: previous declaration is here
gpointer              g_memdup2        (gconstpointer mem,
                      ^
In file included from src/ui/gui/entry-dialog.c:19:
In file included from ./src/ui/gui/entry-dialog.h:20:
In file included from src/ui/gui/include/gtk/gtk.h:26:
In file included from /usr/local/Cellar/gtk+3/3.24.41/include/gtk-3.0/gtk/gtk.h:30:
In file included from /usr/local/Cellar/gtk+3/3.24.41/include/gtk-3.0/gdk/gdk.h:30:
In file included from /usr/local/Cellar/gtk+3/3.24.41/include/gtk-3.0/gdk/gdkconfig.h:8:
src/ui/gui/include/glib.h:36:1: error: static declaration of 'g_memdup2' follows non-static declaration
g_memdup2 (gconstpointer mem,
^
/usr/local/Cellar/glib/2.80.0_2/include/glib-2.0/glib/gstrfuncs.h:354:23: note: previous declaration is here
gpointer              g_memdup2        (gconstpointer mem,
                      ^
clang -DHAVE_CONFIG_H -DEXEEXT=\"\" -I.  -I"./gl" -I"./gl" -DINSTALLDIR=\"/usr/local/Cellar/pspp/2.0.1/bin\" -I"./src" -I"./lib" -Isrc -I"./src/language/commands" -I"/private/tmp/pspp-20240330-55729-geyzop/pspp-2.0.1/src/language/expressions" -I"./src/language/expressions" -Isrc -Isrc/ui/gui/include -I/usr/local/Cellar/glib/2.80.0_2/include -I/usr/local/Cellar/glib/2.80.0_2/include/glib-2.0 -


The problem was discovered by Carlo Bertelli when he used the pspp brew port on MacOS Ventura.

https://github.com/fredowski/homebrew-pspp/issues/7

Friedrich Beckmann <beckmanf>
Group Member
Wed 13 Jul 2022 08:04:46 PM UTC, comment #3: 

Thanks, and yes, confirmed fixed on my end.

Jeremy Lavergne <snc>
Wed 13 Jul 2022 07:35:40 AM UTC, comment #2: 

Hi Jeremy,

g_memdup2 was introduced in glib 2.67.3. A discussion was here:

https://lists.gnu.org/archive/html/pspp-dev/2022-07/msg00004.html

and a workaround for previous versions of glib is fixed since here:

https://git.savannah.gnu.org/cgit/pspp.git/commit/?id=afefc84585152d079b1e4cfad47b6c74c11a0829

Fritz


Friedrich Beckmann <beckmanf>
Group Member
Mon 11 Jul 2022 03:59:16 PM UTC, comment #1: 

It looks like Friedrich fixed this.

Ben Pfaff <blp>
Group administrator
Mon 11 Jul 2022 03:20:30 PM UTC, original submission:  

This is from trying to build g652517.

Using glib2 2.64.4, which seems to be older than expected. What version of glib2 is now required?


src/ui/gui/psppire-dialog-action-recode.c:74:28: error: implicit declaration of function 'g_memdup2' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  struct new_value *copy = g_memdup2 (nv, sizeof (*copy));
                           ^
src/ui/gui/psppire-dialog-action-recode.c:74:28: note: did you mean 'g_memdup'?
/opt/local/include/glib-2.0/glib/gstrfuncs.h:257:23: note: 'g_memdup' declared here
gpointer              g_memdup         (gconstpointer mem,
                      ^

Jeremy Lavergne <snc>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by beckmanf (Posted a comment)
  • -email is unavailable- added by blp (Posted a comment)
  • -email is unavailable- added by snc (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-04-01 beckmanf StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2024-03-30 beckmanf CategoryNone Compilation/Portability
        StatusFixed In Progress
        Open/ClosedClosed Open
    2022-07-11 blp StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code