tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: New Linux build breakage: at-spi2-core
Benny Siegert <bsiegert%gmail.com@localhost> wrote:
> Hi!
>
> I am currently running pkgrrxx on my Linux box, and I get this build
> failure for devel/at-spi2-core:
>
> [111/287] Compiling C object
> tests/at-spi2-atk/dummyatk/libdummyatk.a.p/my-atk-action.c.o
> FAILED: [code=1]
> tests/at-spi2-atk/dummyatk/libdummyatk.a.p/my-atk-action.c.o
> cc -Itests/at-spi2-atk/dummyatk/libdummyatk.a.p
> -Itests/at-spi2-atk/dummyatk -I../tests/at-spi2-atk/dummyatk -I. -I..
> -Iatk -I../atk -I/usr/pkg/include/glib-2.0
> -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include
> -I/usr/pkg/include/gio-unix-2.0 -I/usr/include
> -I/usr/pkg/include/libxml2 -fdiagnostics-color=always
> -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c99
> -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -O2 -fPIC -MD
> -MQ tests/at-spi2-atk/dummyatk/libdummyatk.a.p/my-atk-action.c.o -MF
> tests/at-spi2-atk/dummyatk/libdummyatk.a.p/my-atk-action.c.o.d -o
> tests/at-spi2-atk/dummyatk/libdummyatk.a.p/my-atk-action.c.o -c
> ../tests/at-spi2-atk/dummyatk/my-atk-action.c
> ../tests/at-spi2-atk/dummyatk/my-atk-action.c: In function
> 'my_atk_action_description_get':
> ../tests/at-spi2-atk/dummyatk/my-atk-action.c:124:10: error: implicit
> declaration of function 'strdup'; did you mean 'g_strdup'?
> [-Wimplicit-function-declaration]
> 124 | return strdup (info->description);
> | ^~~~~~
> | g_strdup
> ../tests/at-spi2-atk/dummyatk/my-atk-action.c:124:10: error: returning
> 'int' from a function with return type 'const gchar *' {aka 'const char
> *'} makes pointer from integer without a cast [-Wint-conversion]
> 124 | return strdup (info->description);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> ../tests/at-spi2-atk/dummyatk/my-atk-action.c: In function
> 'my_atk_action_name_get':
> ../tests/at-spi2-atk/dummyatk/my-atk-action.c:161:10: error: returning
> 'int' from a function with return type 'const gchar *' {aka 'const char
> *'} makes pointer from integer without a cast [-Wint-conversion]
> 161 | return strdup (info->name);
> | ^~~~~~~~~~~~~~~~~~~
> ../tests/at-spi2-atk/dummyatk/my-atk-action.c: In function
> 'my_atk_action_localized_name_get':
> ../tests/at-spi2-atk/dummyatk/my-atk-action.c:178:10: error: returning
> 'int' from a function with return type 'const gchar *' {aka 'const char
> *'} makes pointer from integer without a cast [-Wint-conversion]
> 178 | return strdup (info->name);
> | ^~~~~~~~~~~~~~~~~~~
> ../tests/at-spi2-atk/dummyatk/my-atk-action.c: In function
> 'my_atk_action_get_keybinding':
> ../tests/at-spi2-atk/dummyatk/my-atk-action.c:207:10: error: returning
> 'int' from a function with return type 'const gchar *' {aka 'const char
> *'} makes pointer from integer without a cast [-Wint-conversion]
> 207 | return strdup (info->keybinding);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> The file in question does include string.h. If I fix this file (by
> replacing strdup with g_strdup), there are more errors about undefined
> functions in other files.
>
> Has anyone seen this? I never had build failures in this package before.
strdup wasn't part of ISO C until C23, but the compile flags include
-std=c99, which hides the strdup declaration by default.
The error is perhaps due to the recently added patch-meson.build
which removed -D_POSIX_C_SOURCE=200809L and -D_DEFAULT_SOURCE from
the compile flags.
See https://mail-index.netbsd.org/pkgsrc-users/2025/09/24/msg042013.html
for more discussion.
I believe c_std=c99 is coming from the top of meson.build
(`default_options: ['c_std=c99']`).
With -std=c99, adding -D_GNU_SOURCE would likely work on Linux, but
according to that mail, it doesn't cause timersub to be exposed on
NetBSD.
Home |
Main Index |
Thread Index |
Old Index