Opened 13 days ago

Last modified 8 days ago

#70956 assigned defect

Togl-2.0 @2.0: error: incompatible function pointer types assigning to 'void (*)(Tk_Window, Tk_ClassProcs *, ClientData)' (aka 'void (*)(struct Tk_Window_ *, struct Tk_ClassProcs *, void *)') from 'void (*const)(Tk_Window, const Tk_ClassProcs *, ClientData)' (aka 'void (*const)(struct Tk_Window_ *, const struct Tk_ClassProcs *, void *)') [-Wincompatible-function-pointer-types]

Reported by: arai-kai Owned by: dstrubbe (David Strubbe)
Priority: Normal Milestone:
Component: ports Version: 2.10.1
Keywords: sequoia Cc: Chengcheng-Xiao (Chengcheng Xiao)
Port: Togl-2.0

Description (last modified by jmroot (Joshua Root))

Dear MacPorts support team,

I installed MacPorts and then attempted installing xcrysden. I resolved the Command Line issue form the Hotlist. I was able to install all dependencies of xcrysden except for Togl-2.0. I tried "sudo port clean Togl-2.0" followed by "sudo port install Togl-2.0" and it still fails. When I used -v in the install, I get the following error message:

togl.c:928:26: error: incompatible function pointer types assigning to 'void (*)(Tk_Window, Tk_ClassProcs *, ClientData)' (aka 'void (*)(struct Tk_Window_ *, struct Tk_ClassProcs *, void *)') from 'void (*const)(Tk_Window, const Tk_ClassProcs *, ClientData)' (aka 'void (*const)(struct Tk_Window_ *, const struct Tk_ClassProcs *, void *)') [-Wincompatible-function-pointer-types]
  928 |         SetClassProcsPtr = tkStubsPtr->tk_SetClassProcs;
      |                          ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [togl.o] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_Togl-2.0/Togl-2.0/work/Togl2.0'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_Togl-2.0/Togl-2.0/work/Togl2.0" && /usr/bin/make -j12 -w all 
Exit code: 2
Error: Failed to build Togl-2.0: command execution failed

I am unsure whether it has something to do with Togl vs Togl-2.0 versions. Please provide instructions on how to resolve the issue.

I am using MacPorts-2.10.1-15-Sonoma, Xcode 16.0.

Thank you!

Change History (4)

comment:1 Changed 13 days ago by jmroot (Joshua Root)

Description: modified (diff)
Owner: set to dstrubbe
Port: Togl-2.0 added
Status: newassigned
Summary: Failed to build Togl-2.0: command execution failedTogl-2.0: Failed to build with Xcode 16

comment:2 in reply to:  description Changed 12 days ago by ryandesign (Ryan Carsten Schmidt)

Keywords: sequoia added
Summary: Togl-2.0: Failed to build with Xcode 16Togl-2.0 @2.0: error: incompatible function pointer types assigning to 'void (*)(Tk_Window, Tk_ClassProcs *, ClientData)' (aka 'void (*)(struct Tk_Window_ *, struct Tk_ClassProcs *, void *)') from 'void (*const)(Tk_Window, const Tk_ClassProcs *, ClientData)' (aka 'void (*const)(struct Tk_Window_ *, const struct Tk_ClassProcs *, void *)') [-Wincompatible-function-pointer-types]

Replying to arai-kai:

I am unsure whether it has something to do with Togl vs Togl-2.0 versions.

I am not yet running macOS 15 but I tried building Togl-2.0 @2.0 on macOS 12 with MacPorts clang-18 and it failed as you described, but Togl @2.1 built fine. This suggests there may be a fix in Togl @2.1 that can be backported to Togl-2.0 @2.0.

comment:3 Changed 10 days ago by Chengcheng-Xiao (Chengcheng Xiao)

Cc: Chengcheng-Xiao added

comment:4 Changed 8 days ago by Chengcheng-Xiao (Chengcheng Xiao)

This error can be ignored by adding -Wno-error=incompatible-pointer-types to CFLAGS in TOGL_OPTIONS in Make.sys. While I'm not sure if it's safe to do so, with this fix, xcrysden can be built and I haven't found any thing out of the ordinary. Hope this helps.

Version 0, edited 8 days ago by Chengcheng-Xiao (Chengcheng Xiao) (next)
Note: See TracTickets for help on using tickets.