You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[47/51] Compiling C object 'test/test@@glx_alias_prefer_same_name@exe/dlwrap.c.o'.
FAILED: test/test@@glx_alias_prefer_same_name@exe/dlwrap.c.o
clang -Itest/test@@glx_alias_prefer_same_name@exe -Itest -I../../source/libepoxy-1.5.1/test -Iinclude -I../../source/libepoxy-1.5.1/include -Isrc -I../../source/libepoxy-1.5.1/src -Iinclude/epoxy -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O0 -g -march=corei7 -B/home/lantw44/.local/bin -g3 -O0 -D_THREAD_SAFE -pthread -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -Wno-int-conversion -D_XOPEN_SOURCE -D_POSIX_C_SOURCE=200809L -MD -MQ 'test/test@@glx_alias_prefer_same_name@exe/dlwrap.c.o' -MF 'test/test@@glx_alias_prefer_same_name@exe/dlwrap.c.o.d' -o 'test/test@@glx_alias_prefer_same_name@exe/dlwrap.c.o' -c ../../source/libepoxy-1.5.1/test/dlwrap.c
../../source/libepoxy-1.5.1/test/dlwrap.c:166:9: error: implicit declaration of function 'asprintf' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (asprintf(&wrap_name, "override_%s_%s", prefix, name) < 0) {
^
../../source/libepoxy-1.5.1/test/dlwrap.c:166:9: warning: this function declaration is not a prototype [-Wstrict-prototypes]
../../source/libepoxy-1.5.1/test/dlwrap.c:250:41: error: implicit declaration of function 'dlvsym' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
real_dlsym = (fips_dlsym_t) dlvsym(RTLD_NEXT, "dlsym", version[i]);
^
../../source/libepoxy-1.5.1/test/dlwrap.c:250:41: note: did you mean 'dlsym'?
../../source/libepoxy-1.5.1/test/dlwrap.c:184:1: note: 'dlsym' declared here
dlsym(void *handle, const char *name)
^
../../source/libepoxy-1.5.1/test/dlwrap.c:250:41: warning: this function declaration is not a prototype [-Wstrict-prototypes]
real_dlsym = (fips_dlsym_t) dlvsym(RTLD_NEXT, "dlsym", version[i]);
^
../../source/libepoxy-1.5.1/test/dlwrap.c:250:26: error: cast to 'fips_dlsym_t' (aka 'void *(*)(void *, const char *)') from smaller integer type 'int' [-Werror,-Wint-to-pointer-cast]
real_dlsym = (fips_dlsym_t) dlvsym(RTLD_NEXT, "dlsym", version[i]);
^
../../source/libepoxy-1.5.1/test/dlwrap.c:250:41: warning: cast from function call of type 'int' to non-matching type 'fips_dlsym_t' (aka 'void *(*)(void *, const char *)') [-Wbad-function-cast]
real_dlsym = (fips_dlsym_t) dlvsym(RTLD_NEXT, "dlsym", version[i]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings and 3 errors generated.
ninja: build stopped: subcommand failed.
FreeBSD does support the non-standard asprintf and dlvsym functions. However, test/meson.build defines _POSIX_C_SOURCE, which causes declarations of non-standard functions to be hidden.
Sorry, I don't understand how can it be fixed by using add_project_arguments. The problem here is that we cannot define _XOPEN_SOURCE or _POSIX_C_SOURCE when compiling a source file which uses non-POSIX extensions, so the change I proposed in the description is to remove these two options, not to apply them to more files.
libepoxy currently fails to compile on FreeBSD:
FreeBSD does support the non-standard
asprintf
anddlvsym
functions. However,test/meson.build
defines_POSIX_C_SOURCE
, which causes declarations of non-standard functions to be hidden.The easiest fix I found is to replace
with
so all extensions are kept enabled.
The text was updated successfully, but these errors were encountered: