-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
meson bug with vala #10517
Comments
What does your Meson build look like? |
its a simple meson.build 👍 project('calculatrice', ['vala', 'c'])
vala_dep = [dependency('gtk4'), dependency('glib-2.0'), dependency('gobject-2.0')]
executable('calculatrice',
'main.vala',
dependencies : vala_dep,
install : true) and my command compilation is just : |
@hydrasho could you provide a symbol dump of your executable? You can use |
Do you not need to annotate your Vala function with |
He dont work when i add [GtkCallback] in my code :/ |
@eli-schwartz didn't you recently make a change regarding the default value of @hydrasho please provide a symbol dump using |
Wait, this is an undefined symbol issue, we’re probably injecting a command line option to make that happen. What is the command line for vala in the ninja.build file? |
build calculatrice.p/main.c: vala_COMPILER ../main.vala
ARGS = -C --debug --debug --pkg gtksourceview-5 --pkg gobject-2.0 --pkg glib-2.0 --pkg gtk4 --color=always --directory calculatrice.p --basedir ../
build calculatrice.p/meson-generated_main.c.o: c_COMPILER calculatrice.p/main.c
DEPFILE = calculatrice.p/meson-generated_main.c.o.d
DEPFILE_UNQUOTED = calculatrice.p/meson-generated_main.c.o.d
ARGS = -Icalculatrice.p -I. -I.. -I/usr/include/gtk-4.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/graphene-1.0 -I/usr/lib/graphene-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/gtksourceview-5 -I/usr/include/libxml2 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O0 -g -mfpmath=sse -msse -msse2 -pthread -mfpmath=sse -msse -msse2
build calculatrice: c_LINKER calculatrice.p/meson-generated_main.c.o | /usr/lib/libcairo-gobject.so /usr/lib/libcairo.so /usr/lib/libgdk_pixbuf-2.0.so /usr/lib/libgio-2.0.so /usr/lib/libglib-2.0.so /usr/lib/libgobject-2.0.so /usr/lib/libgraphene-1.0.so /usr/lib/libgtk-4.so /usr/lib/libgtksourceview-5.so /usr/lib/libharfbuzz.so /usr/lib/libpango-1.0.so /usr/lib/libpangocairo-1.0.so
LINK_ARGS = -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group /usr/lib/libgtk-4.so /usr/lib/libpangocairo-1.0.so /usr/lib/libpango-1.0.so /usr/lib/libharfbuzz.so /usr/lib/libgdk_pixbuf-2.0.so /usr/lib/libcairo-gobject.so /usr/lib/libcairo.so /usr/lib/libgraphene-1.0.so /usr/lib/libgio-2.0.so /usr/lib/libgobject-2.0.so /usr/lib/libglib-2.0.so /usr/lib/libgtksourceview-5.so -Wl,--end-group |
With Meson
Without Meson : (valac main.vala --pkg=gtk4)
|
|
I don't want to make a Makefile just for that :/ |
Can you try configuring |
Executable also has an export_dynamic keyword argument |
with: |
that should be either executable('calculatrice',
'main.vala',
dependencies : vala_dep,
export_dynamic : true,
install : true) |
I recomend the second, as Meson will just Do The Right Thing™ |
it works now the functions are no longer ignored! thank you |
So what is the solution on Meson's part here? Seemingly this used to work and now it doesn't unless you set export_dynamic. |
hello, i found a bug in meson.build with vala.
when i give the name of a function in glade then it can call it. the problem is that it gives me the following error in vala with meson.
however it is in my code:
Whereas if I compile my vala file manually (valac main.vala --pkg=gtk4) then run it it works.
why with meson I have the error?
The text was updated successfully, but these errors were encountered: