Public bug reported:

The build fails with the following errors:

---
1: all warnings being treated as errors
make[2]: *** [make_linux.mak:180: cairo.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [make_linux.mak:203: atk.o] Error 1
cairo_structs.c: In function ‘getcairo_path_tFields’:
cairo_structs.c:85:26: error: cast to pointer from integer of different size 
[-Werror=int-to-pointer-cast]
   85 |         lpStruct->data = (cairo_path_data_t *)(*env)->GetLongField(env, 
lpObject, cairo_path_tFc.data);
      |                          ^
cairo_structs.c: In function ‘setcairo_path_tFields’:
cairo_structs.c:94:66: error: cast from pointer to integer of different size 
[-Werror=pointer-to-int-cast]
   94 |         (*env)->SetLongField(env, lpObject, cairo_path_tFc.data, 
(jlong)lpStruct->data);
      |                                                                  ^
cc1: all warnings being treated as errors
make[2]: *** [make_linux.mak:182: cairo_structs.o] Error 1
cc1: all warnings being treated as errors
make[2]: *** [make_linux.mak:205: atk_structs.o] Error 1
--- [1]

Note:
On 32-bit arches the sizeof(void*) == 4 and sizeof(jlong)=8 bytes
The JNI code uses jlong to store pointer values and then assigns them back to 
the pointers. 
In this case we can disable those warnings.


[1] 
https://launchpadlibrarian.net/720137763/buildlog_ubuntu-noble-armhf.swt4-gtk_4.26.0-2build1_BUILDING.txt.gz

** Affects: swt4-gtk (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2058559

Title:
  Unable to build swt4-gtk on armhf due to int-to-pointer and point-to-
  int cast warnings

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/swt4-gtk/+bug/2058559/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to