#71494 closed defect (duplicate)
samba4 build error: passing argument 4 of 'quotactl' from incompatible pointer type
| Reported by: | barracuda156 | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.10.5 |
| Keywords: | Cc: | ||
| Port: | samba4 |
Description
[2133/3796] Compiling lib/cmdline/closefrom_except.c
../../source4/librpc/rpc/pyrpc_util.c: In function 'pyrpc_irpc_connect':
../../source4/librpc/rpc/pyrpc_util.c:92:9: warning: 'dcerpc_binding_handle_set_sync_ev' is deprecated [-Wdeprecated-declarations]
92 | dcerpc_binding_handle_set_sync_ev(*binding_handle, event_ctx);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../source4/librpc/rpc/dcerpc.h:33,
from ../../source4/librpc/rpc/pyrpc_util.c:28:
../../source4/../librpc/rpc/rpc_common.h:245:19: note: declared here
245 | _DEPRECATED_ void dcerpc_binding_handle_set_sync_ev(struct dcerpc_binding_handle *h,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2134/3796] Compiling lib/afs/afs_funcs.c
[2135/3796] Linking bin/default/python/libsamba-python.cpython-312-darwin-private-samba.dylib
[2136/3796] Compiling source3/libads/authdata.c
[2137/3796] Compiling source3/smbd/notifyd/notifyd_db.c
[2138/3796] Compiling source3/smbd/notifyd/notifyd_entry.c
[2139/3796] Linking bin/default/lib/cmdline/libcmdline-private-samba.dylib
[2140/3796] Compiling source3/smbd/notifyd/notifyd.c
[2141/3796] Compiling source3/lib/util_namearray.c
[2142/3796] Compiling source3/lib/sysquotas_4B.c
../../source3/lib/sysquotas_4B.c: In function 'sys_quotactl_4B':
../../source3/lib/sysquotas_4B.c:138:39: error: passing argument 4 of 'quotactl' from incompatible pointer type [-Wincompatible-pointer-types]
138 | ret = quotactl(path, cmd, id, qblk);
| ^~~~
| |
| struct dqblk *
In file included from ../../source3/lib/sysquotas_4B.c:43:
/usr/include/sys/quota.h:223:38: note: expected 'caddr_t' {aka 'char *'} but argument is of type 'struct dqblk *'
223 | int quotactl(const char *, int, int, caddr_t);
| ^~~~~~~
Waf: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_samba4/samba4/work/samba-4.21.2/bin/default'
Build failed
-> task in 'sysquotas' failed with exit status 1 (run with -v to display more information)
make: *** [all] Error 1
Change History (6)
comment:1 Changed 14 months ago by mohd-akram (Mohamed Akram)
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
comment:3 Changed 14 months ago by barracuda156
Also broken in tracker.
libtool: compile: /opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I../.. -Wno-unused-variable -Wno-unused-function -Wno-shadow -Wno-format-nonliteral -Wno-sign-compare -Wno-strict-prototypes -DG_LOG_DOMAIN=\"Tracker\" -DTRACKER_COMPILATION -I../../src -I../../src -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -Os -Wno-int-conversion -pipe -isysroot/ -arch ppc -MT tracker-version.lo -MD -MP -MF .deps/tracker-version.Tpo -c tracker-version.c -fno-common -DPIC -o .libs/tracker-version.o
libtool: compile: /opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I../.. -Wno-unused-variable -Wno-unused-function -Wno-shadow -Wno-format-nonliteral -Wno-sign-compare -Wno-strict-prototypes -DG_LOG_DOMAIN=\"Tracker\" -DTRACKER_COMPILATION -I../../src -I../../src -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -Os -Wno-int-conversion -pipe -isysroot/ -arch ppc -MT tracker-builder.lo -MD -MP -MF .deps/tracker-builder.Tpo -c tracker-builder.c -fno-common -DPIC -o .libs/tracker-builder.o
libtool: compile: /opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I../.. -Wno-unused-variable -Wno-unused-function -Wno-shadow -Wno-format-nonliteral -Wno-sign-compare -Wno-strict-prototypes -DG_LOG_DOMAIN=\"Tracker\" -DTRACKER_COMPILATION -I../../src -I../../src -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -Os -Wno-int-conversion -pipe -isysroot/ -arch ppc -MT tracker-uri.lo -MD -MP -MF .deps/tracker-uri.Tpo -c tracker-uri.c -fno-common -DPIC -o .libs/tracker-uri.o
In file included from /opt/local/include/glib-2.0/glib/gthread.h:34,
from /opt/local/include/glib-2.0/glib/gasyncqueue.h:34,
from /opt/local/include/glib-2.0/glib.h:34,
from tracker-uri.c:26:
tracker-uri.c: In function 'tracker_uri_get_type':
/opt/local/include/glib-2.0/glib/gatomic.h:131:5: warning: argument 2 of '__atomic_load' discards 'volatile' qualifier [-Wdiscarded-qualifiers]
131 | __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
| ^~~~~~~~~~~~~
/opt/local/include/glib-2.0/glib/gthread.h:262:7: note: in expansion of macro 'g_atomic_pointer_get'
262 | (!g_atomic_pointer_get (location) && \
| ^~~~~~~~~~~~~~~~~~~~
tracker-uri.c:39:13: note: in expansion of macro 'g_once_init_enter'
39 | if (g_once_init_enter (&g_define_type_id__volatile)) {
| ^~~~~~~~~~~~~~~~~
Tracker-1.0.gir:9:51: warning: element attribute from state 7 is unknown, ignoring
Tracker-1.0.gir:10:63: warning: element attribute from state 7 is unknown, ignoring
Tracker-1.0.gir:11:51: warning: element attribute from state 7 is unknown, ignoring
Tracker-1.0.gir:12:57: warning: element attribute from state 7 is unknown, ignoring
In file included from /opt/local/include/glib-2.0/glib/gthread.h:34,
from /opt/local/include/glib-2.0/glib/gasyncqueue.h:34,
from /opt/local/include/glib-2.0/glib.h:34,
from tracker-builder.c:78:
tracker-builder.c: In function 'tracker_sparql_builder_state_get_type':
/opt/local/include/glib-2.0/glib/gatomic.h:131:5: warning: argument 2 of '__atomic_load' discards 'volatile' qualifier [-Wdiscarded-qualifiers]
131 | __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
| ^~~~~~~~~~~~~
/opt/local/include/glib-2.0/glib/gthread.h:262:7: note: in expansion of macro 'g_atomic_pointer_get'
262 | (!g_atomic_pointer_get (location) && \
| ^~~~~~~~~~~~~~~~~~~~
tracker-builder.c:225:13: note: in expansion of macro 'g_once_init_enter'
225 | if (g_once_init_enter (&tracker_sparql_builder_state_type_id__volatile)) {
| ^~~~~~~~~~~~~~~~~
/home/carlos/Source/gnome/tracker-1.12/src/libtracker-sparql/tracker-builder.vala: In function 'tracker_sparql_builder_object_unvalidated':
/home/carlos/Source/gnome/tracker-1.12/src/libtracker-sparql/tracker-builder.vala:530:49: error: passing argument 3 of 'g_utf8_validate' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from /opt/local/include/glib-2.0/glib/gstring.h:35,
from /opt/local/include/glib-2.0/glib/giochannel.h:36,
from /opt/local/include/glib-2.0/glib.h:56:
/opt/local/include/glib-2.0/glib/gunicode.h:902:41: note: expected 'const gchar **' {aka 'const char **'} but argument is of type 'gchar **' {aka 'char **'}
902 | const gchar **end);
| ~~~~~~~~~~~~~~^~~
/home/carlos/Source/gnome/tracker-1.12/src/libtracker-sparql/tracker-builder.vala: In function 'tracker_sparql_builder_class_init':
/home/carlos/Source/gnome/tracker-1.12/src/libtracker-sparql/tracker-builder.vala:57:2: warning: 'g_type_class_add_private' is deprecated [-Wdeprecated-declarations]
In file included from /opt/local/include/glib-2.0/gobject/gobject.h:26,
from /opt/local/include/glib-2.0/gobject/gbinding.h:31,
from /opt/local/include/glib-2.0/glib-object.h:24,
from tracker-builder.c:79:
/opt/local/include/glib-2.0/gobject/gtype.h:1495:10: note: declared here
1495 | void g_type_class_add_private (gpointer g_class,
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/carlos/Source/gnome/tracker-1.12/src/libtracker-sparql/tracker-builder.vala: In function 'tracker_sparql_builder_instance_init':
/home/carlos/Source/gnome/tracker-1.12/src/libtracker-sparql/tracker-builder.vala:57:13: warning: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
tracker-builder.c: In function 'tracker_sparql_builder_get_type':
/opt/local/include/glib-2.0/glib/gatomic.h:131:5: warning: argument 2 of '__atomic_load' discards 'volatile' qualifier [-Wdiscarded-qualifiers]
131 | __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
| ^~~~~~~~~~~~~
/opt/local/include/glib-2.0/glib/gthread.h:262:7: note: in expansion of macro 'g_atomic_pointer_get'
262 | (!g_atomic_pointer_get (location) && \
| ^~~~~~~~~~~~~~~~~~~~
tracker-builder.c:2466:13: note: in expansion of macro 'g_once_init_enter'
2466 | if (g_once_init_enter (&tracker_sparql_builder_type_id__volatile)) {
| ^~~~~~~~~~~~~~~~~
make[4]: *** [tracker-builder.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
libtool: compile: /opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I../.. -Wno-unused-variable -Wno-unused-function -Wno-shadow -Wno-format-nonliteral -Wno-sign-compare -Wno-strict-prototypes -DG_LOG_DOMAIN=\"Tracker\" -DTRACKER_COMPILATION -I../../src -I../../src -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -Os -Wno-int-conversion -pipe -isysroot/ -arch ppc -MT tracker-version.lo -MD -MP -MF .deps/tracker-version.Tpo -c tracker-version.c -o tracker-version.o >/dev/null 2>&1
libtool: compile: /opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I../.. -Wno-unused-variable -Wno-unused-function -Wno-shadow -Wno-format-nonliteral -Wno-sign-compare -Wno-strict-prototypes -DG_LOG_DOMAIN=\"Tracker\" -DTRACKER_COMPILATION -I../../src -I../../src -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -Os -Wno-int-conversion -pipe -isysroot/ -arch ppc -MT tracker-uri.lo -MD -MP -MF .deps/tracker-uri.Tpo -c tracker-uri.c -o tracker-uri.o >/dev/null 2>&1
mv -f .deps/tracker-version.Tpo .deps/tracker-version.Plo
^Cmake[4]: *** [tracker-uri.lo] Error 1
comment:4 Changed 14 months ago by barracuda156
| Port: | tracker added |
|---|
comment:5 Changed 14 months ago by mohd-akram (Mohamed Akram)
| Port: | tracker removed |
|---|
Replying to barracuda156:
Still broken in 4.22.1.
For the same function? Add more info to #71170.
Replying to barracuda156:
Also broken in
tracker.
Open another ticket for that, the error looks different.
comment:6 Changed 9 months ago by CL-Jeremy (Mike L.)
This is obviously just an oversight by the Samba team since sysquotas_4B.c is only used on BSD-like OSes, for most of which Clang is used for build. Curiously, sysquotas_4A.c uses a bunch of pointer casts since the beginning (when the codebase was first migrated in 2004). It seems GCC 14, while now erroring out for most pointer type mismatches, allows the implicit cast of void * to char * (caddr_t is an alias of the latter). I suppose we need to submit a patch to upstream and explicitly cast the last argument to caddr_t/char * (or void *, which is semantically more correct, it's just standardized after the quotactl() API, which is probably why GCC 14 still allows a mismatch there) for all cases.

Duplicate of #71170