Skip to content
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

With Intel ifort/ifx, gtkbuilder, gtkbuilder2 and gtkf-sketcher could not open gtkbuilder.glade #236

Open
vmagnin opened this issue Jun 7, 2021 · 14 comments
Assignees
Labels
Crash The application do not run or crash during running ifort|ifx Intel compilers ifort and/or ifx

Comments

@vmagnin
Copy link
Owner

vmagnin commented Jun 7, 2021

Describe the bug
When gtk-fortran is built with ifort, gtkbuilder, gtkbuilder2 and gtkf-sketcher don't work and just print that error:
Could not open gtkbuilder.glade

Your system:

  • OS version: Ubuntu 21.04 64 bits
  • Compiler version: ifort (IFORT) 2021.2.0 20210228
  • GTK branch: tested only in gtk4.

Additional context
No problem with gfortran.

@vmagnin vmagnin added Bug ifort|ifx Intel compilers ifort and/or ifx labels Jun 7, 2021
@vmagnin vmagnin self-assigned this Jun 7, 2021
@vmagnin
Copy link
Owner Author

vmagnin commented Jun 8, 2021

Under MSYS2/Windows 10, and compiled with gfortran, gtkbuilder don't work and prints the same message.
But gtkbuilder2 and gtkf-sketcher have no problem, probably because they contain the GCC$ ATTRIBUTES DLLEXPORT.

@vmagnin vmagnin added Crash The application do not run or crash during running and removed Bug labels Jun 11, 2021
@vmagnin
Copy link
Owner Author

vmagnin commented Jun 14, 2021

gtkbuilder.f90 has been removed from the gtk4 branch, as it is now a duplicate of gtkbuilder2.f90 (they were using two different GTK 3 functions, removed in GTK 4).

@vmagnin
Copy link
Owner Author

vmagnin commented Oct 21, 2021

Same problem with GTK 4.4 and ifort 2021.4.0

@vmagnin
Copy link
Owner Author

vmagnin commented Oct 23, 2021

After replacing gtk_builder_add_from_file() by gtk_builder_new_from_file(), the ifort 2021.4.0 error message is:

(process:24055): Gtk-ERROR **: 18:43:29.082: failed to add UI from file gtkbuilder.glade: No function named `hello`.
Trappe pour point d'arrêt et de trace (core dumped)

although there is a subroutine hello(widget, gdata ) bind(c) in the code.

https://docs.gtk.org/gtk4/class.Builder.html

@vmagnin
Copy link
Owner Author

vmagnin commented Mar 24, 2022

Same error message now with GTK 4.6.2: GFortran 12.0.1 in Fedora Rawhide, GFortran 11.2.0 in FreeBSD 13.

[osboxes@localhost examples]$ ./gtkbuilder2

(process:14648): Gtk-ERROR **: 14:56:45.953: failed to add UI from file gtkbuilder.glade: No function named `hello`.

Program received signal SIGTRAP: Trace/breakpoint trap.

Backtrace for this error:
#0  0x7f0a97623a22 in ???
#1  0x7f0a97622bb5 in ???
#2  0x7f0a97242a2f in ???
#3  0x7f0a9799bd80 in ???
#4  0x7f0a979957f0 in ???
#5  0x7f0a97995a41 in ???
#6  0x7f0a97ed616f in ???
#7  0x4013f7 in gtkbuilder
	at /home/osboxes/gtk-fortran/examples/gtkbuilder2.f90:95
#8  0x401496 in main
	at /home/osboxes/gtk-fortran/examples/gtkbuilder2.f90:86
Trace/breakpoint trap (core dumped)

Line 86 is:

  use handlers

Line 95 is:

builder=gtk_builder_new_from_file("gtkbuilder.glade"//c_null_char)

@vmagnin
Copy link
Owner Author

vmagnin commented Mar 29, 2022

But it works under MSYS2/Windows 10, with GFortran 11.2.0 and GTK 4.6.2.

@vmagnin
Copy link
Owner Author

vmagnin commented Apr 29, 2022

No problem with GTK 4.6.3 and GFortran 12.0.1 in latest Fedora Rawhide.

@vmagnin
Copy link
Owner Author

vmagnin commented Jun 8, 2022

Same problem with ifx 2022.1.0 20220316 ; gtk-fortran 4.2.1, GTK 4.6.3

@vmagnin vmagnin changed the title With Intel ifort, gtkbuilder, gtkbuilder2 and gtkf-sketcher could not open gtkbuilder.glade With Intel ifort/ifx, gtkbuilder, gtkbuilder2 and gtkf-sketcher could not open gtkbuilder.glade Jun 8, 2022
@vmagnin
Copy link
Owner Author

vmagnin commented Jul 12, 2022

The same error message occurs under MSYS2/Windows 10 if I remove the !GCC$ ATTRIBUTES DLLEXPORT :: attributes in gtkbuilder2.f90, and use GFortran to build it.

@vmagnin
Copy link
Owner Author

vmagnin commented Jul 16, 2022

@vmagnin
Copy link
Owner Author

vmagnin commented Sep 29, 2022

Ubuntu 22.04 with GTK 4.6.6 and ifx (IFORT) 2022.1.0 20220316:

$ ./gtkbuilder2

(process:22056): Gtk-ERROR **: 09:29:25.298: failed to add UI from file gtkbuilder.ui: No function named `hello`.

$ gtk4-builder-tool preview gtkbuilder.ui
No function named `hello`.

@vmagnin
Copy link
Owner Author

vmagnin commented Dec 20, 2022

Idem with GTK 4.8.1, ifx 2023.0.0, Ubuntu 22.10.

$ readelf --wide --syms  ./gtkbuilder2 | grep hello
...
Symbol table '.symtab' contains 917 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
...
   818: 0000000000405270    81 FUNC    GLOBAL DEFAULT   16 hello
...

@vmagnin
Copy link
Owner Author

vmagnin commented Feb 18, 2023

@vmagnin
Copy link
Owner Author

vmagnin commented May 11, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Crash The application do not run or crash during running ifort|ifx Intel compilers ifort and/or ifx
Projects
None yet
Development

No branches or pull requests

1 participant