Coder Social home page Coder Social logo

Comments (56)

ebezault avatar ebezault commented on August 31, 2024 1

Yesterday I fixed these errors:

**** language not recognized: C [macro <ev_gtk.h>] | "eif_argv.h"
[GIAAA] internal error.
----
**** language not recognized: C Macro use <ev_gtk.h>

The CATCALL messages are just warnings.
The Dynamic type set are more problematic, but they should not prevent from generating the executable.
So if you get the latest version of the repository, you should be able to generate an executable.

from gobo.

ebezault avatar ebezault commented on August 31, 2024 1

The semicolon is also missing in the Eiffel code:

	frozen gtk_paned_set_wide_handle (a_paned: POINTER; a_wide: BOOLEAN)
		external
			"C inline use <ev_gtk.h>"
		alias
			"[
				#if GTK_CHECK_VERSION(3,16,0)
				gtk_paned_set_wide_handle ((GtkPaned*) $a_paned, (gboolean) $a_wide)
				#endif
			]"
		ensure
			is_class: class
		end

I'll see what I can do to let the Eiffel compiler add this missing semicolon in the generated C code.

from gobo.

mw66 avatar mw66 commented on August 31, 2024 1

The semicolon is also missing in the Eiffel code:

...
I'll see what I can do to let the Eiffel compiler add this missing semicolon in the generated C code.

I manually add ; at line 274 of

/Eiffel_23.09/library/vision2/implementation/gtk3/support/externals/gtk3.e

as temp fix.

from gobo.

ebezault avatar ebezault commented on August 31, 2024 1

I provide them as needed. Sometimes they don't end up in the right eif_*.h file my assumption was wrong (they were added here because it allowed one ISE library to compile, but they need to be moved somewhere else to compile another ISE library). That's what happened with eif_wean and others.

from gobo.

ebezault avatar ebezault commented on August 31, 2024 1

I figured out what is the equivalent of eif_id_object in Gobo. So I will be able to provide a fix.

from gobo.

mw66 avatar mw66 commented on August 31, 2024 1

FYI, found 27 diamonds in ISE Vision Smart Docking library

library/docking/package.iron

/Eiffel_23.09$ grep "diamond:" diamond.txt  | sort  | uniq 
diamond:  EV_ANY.implementation  =>  SD_DOCKING_ZONE_UPPER
diamond:  EV_ANY.implementation  =>  SD_PLACE_HOLDER_ZONE
diamond:  EV_ANY.implementation  =>  SD_TAB_ZONE_UPPER
diamond:  EV_COLORIZABLE.implementation  =>  SD_DOCKING_ZONE_UPPER
diamond:  EV_COLORIZABLE.implementation  =>  SD_PLACE_HOLDER_ZONE
diamond:  EV_COLORIZABLE.implementation  =>  SD_TAB_ZONE_UPPER
diamond:  EV_DOCKABLE_SOURCE.implementation  =>  SD_DOCKING_ZONE_UPPER
diamond:  EV_DOCKABLE_SOURCE.implementation  =>  SD_PLACE_HOLDER_ZONE
diamond:  EV_DOCKABLE_SOURCE.implementation  =>  SD_TAB_ZONE_UPPER
diamond:  EV_HELP_CONTEXTABLE.implementation  =>  SD_DOCKING_ZONE_UPPER
diamond:  EV_HELP_CONTEXTABLE.implementation  =>  SD_PLACE_HOLDER_ZONE
diamond:  EV_HELP_CONTEXTABLE.implementation  =>  SD_TAB_ZONE_UPPER
diamond:  EV_PICK_AND_DROPABLE.implementation  =>  SD_DOCKING_ZONE_UPPER
diamond:  EV_PICK_AND_DROPABLE.implementation  =>  SD_PLACE_HOLDER_ZONE
diamond:  EV_PICK_AND_DROPABLE.implementation  =>  SD_TAB_ZONE_UPPER
diamond:  EV_PIXMAPABLE.implementation  =>  SD_DOCKING_ZONE_UPPER
diamond:  EV_PIXMAPABLE.implementation  =>  SD_PLACE_HOLDER_ZONE
diamond:  EV_PIXMAPABLE.implementation  =>  SD_TAB_ZONE_UPPER
diamond:  EV_POSITIONED.implementation  =>  SD_DOCKING_ZONE_UPPER
diamond:  EV_POSITIONED.implementation  =>  SD_PLACE_HOLDER_ZONE
diamond:  EV_POSITIONED.implementation  =>  SD_TAB_ZONE_UPPER
diamond:  EV_SENSITIVE.implementation  =>  SD_DOCKING_ZONE_UPPER
diamond:  EV_SENSITIVE.implementation  =>  SD_PLACE_HOLDER_ZONE
diamond:  EV_SENSITIVE.implementation  =>  SD_TAB_ZONE_UPPER
diamond:  EV_WIDGET.implementation  =>  SD_DOCKING_ZONE_UPPER
diamond:  EV_WIDGET.implementation  =>  SD_PLACE_HOLDER_ZONE
diamond:  EV_WIDGET.implementation  =>  SD_TAB_ZONE_UPPER

$ grep "diamond:" diamond.txt  | sort  | uniq | wc
     27     108    1758

If we can make gec compile /Eiffel_23.09/examples/docking/simple, then we can test its behavior under gec.

from gobo.

mw66 avatar mw66 commented on August 31, 2024 1

I'm sure I'm using zig cc now.

and I have tried all the different --gc=no --capability=concurrency=none on / off combination options. they all segfault on my system.

I will try WSL later in my afternoon.

Thank you so much for the help. Hope you have a good night.

from gobo.

mw66 avatar mw66 commented on August 31, 2024 1

confirmed working on WSL with plain gcc:

$ cat /etc/issue
Ubuntu 18.04.5 LTS \n \l

$ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

/Eiffel/examples/docking/simple$ gec docking_simple.ecf
Degree 6: 0/0/0 0:0:0.039
Degree 5: 0/0/0 0:0:0.565
Degree 4: 0/0/0 0:0:0.222
Degree 3: 0/0/0 0:0:0.188
Degree -2: 0/0/0 0:0:1.894
Degree -3: 0/0/0 0:0:6.254
docking_simple6.c: In function ‘T243s45’:
docking_simple6.c:86227:1: warning: format not a string literal and no format arguments [-Wformat-security]
 printf((char*) a1);
 ^~~~~~
Degree -4: 0/0/0 0:0:20.596
Total Time: 0/0/0 0:0:29.759

/Eiffel/examples/docking/simple$ ./docking_simple
Hello, diamond!
0x7F3B6A89B400
0x7F3B6A89B600

So it's not working on native Linux :-) :-(

from gobo.

ebezault avatar ebezault commented on August 31, 2024

I just fixed these external routine issues.

But when I see these messages:

Dynamic type set not built for external feature [detachable] EV_TITLED_WINDOW_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_RICH_TEXT_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_GTK_CALLBACK_MARSHAL.c_get_eif_reference_from_object_id
Dynamic type set not built for external feature detachable EV_ANY_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_CELL_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_VIEWPORT_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_FIXED_IMP.eif_object_from_c
Dynamic type set not built for external feature detachable EV_VERTICAL_BOX_IMP.eif_object_from_c
Dynamic type set not built for external feature detachable EV_POPUP_WINDOW_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_BUTTON_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] MEMORY.find_instance_of
Dynamic type set not built for external feature [detachable] EV_HORIZONTAL_BOX_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_DIALOG_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_FRAME_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] SD_DRAWING_AREA_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_SCROLLABLE_AREA_IMP.eif_object_from_c
Dynamic type set not built for external feature detachable EV_PIXMAP_IMP.eif_object_from_c
Dynamic type set not built for external feature detachable EV_WINDOW_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_TEXT_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_LABEL_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_HORIZONTAL_SPLIT_AREA_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_VERTICAL_SPLIT_AREA_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_LIST_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_DRAWING_AREA_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] SD_WINDOW_IMP.eif_object_from_c
Dynamic type set not built for external feature detachable EV_TOOL_BAR_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_DOCKABLE_SOURCE_HINT_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_TEXT_FIELD_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_MENU_IMP.eif_object_from_c

there is a good chance that the program will not work as expected (and probably crash).
I can see how to figure out what would be the dynamic type set of eif_object_from_c, but it will take some time and effort to implement it in gec.

from gobo.

mw66 avatar mw66 commented on August 31, 2024

OK, thanks.

from gobo.

mw66 avatar mw66 commented on August 31, 2024

On a second thought: I don't need the GUI application to run (correctly), I only need to be able to build the project binary: I will just create a object, and do some reference equality check and print, that's all.

Esp., I'm trying this example now: /Eiffel_23.09/examples/docking/simple

Is it possible to make the gec build work for this project?

Currently the error is:

/Eiffel_23.09/examples/docking/simple$ gec ./docking_simple.ecf
Degree 6: 0/0/0 0:0:0.130
Degree 5: 0/0/0 0:0:0.481
Degree 4: 0/0/0 0:0:0.440
Degree 3: 0/0/0 0:0:0.226
Dynamic type set not built for external feature [detachable] EV_TITLED_WINDOW_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_RICH_TEXT_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_GTK_CALLBACK_MARSHAL.c_get_eif_reference_from_object_id
Dynamic type set not built for external feature [detachable] EV_CELL_IMP.eif_object_from_c
Dynamic type set not built for external feature detachable EV_ANY_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_VIEWPORT_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_FIXED_IMP.eif_object_from_c
Dynamic type set not built for external feature detachable EV_VERTICAL_BOX_IMP.eif_object_from_c
Dynamic type set not built for external feature detachable EV_POPUP_WINDOW_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_BUTTON_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] MEMORY.find_instance_of
Dynamic type set not built for external feature [detachable] EV_HORIZONTAL_BOX_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_DIALOG_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_FRAME_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] SD_DRAWING_AREA_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_SCROLLABLE_AREA_IMP.eif_object_from_c
Dynamic type set not built for external feature detachable EV_PIXMAP_IMP.eif_object_from_c
Dynamic type set not built for external feature detachable EV_WINDOW_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_TEXT_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_LABEL_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_HORIZONTAL_SPLIT_AREA_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_VERTICAL_SPLIT_AREA_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_LIST_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_DRAWING_AREA_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] SD_WINDOW_IMP.eif_object_from_c
Dynamic type set not built for external feature detachable EV_TOOL_BAR_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_DOCKABLE_SOURCE_HINT_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_TEXT_FIELD_IMP.eif_object_from_c
Dynamic type set not built for external feature [detachable] EV_MENU_IMP.eif_object_from_c
[CATCALL] class detachable SD_TOOL_BAR_ZONE (592,14): type '[detachable] SD_TOOL_BAR_NARROW_BUTTON' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `has' in class '[detachable] SD_MENU_BAR'
[CATCALL] class detachable SD_TOOL_BAR_ZONE (592,14): type '[detachable] SD_TOOL_BAR_BUTTON' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `has' in class '[detachable] SD_MENU_BAR'
[CATCALL] class detachable SD_TOOL_BAR_ZONE (592,14): type '[detachable] SD_TOOL_BAR_SEPARATOR' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `has' in class '[detachable] SD_MENU_BAR'
[CATCALL] class detachable SD_TOOL_BAR_ZONE (592,14): type '[detachable] SD_TOOL_BAR_WIDTH_BUTTON' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `has' in class '[detachable] SD_MENU_BAR'
[CATCALL] class detachable SD_TOOL_BAR_ZONE (592,14): type '[detachable] SD_TOOL_BAR_FONT_BUTTON' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `has' in class '[detachable] SD_MENU_BAR'
[CATCALL] class detachable SD_TOOL_BAR_ZONE (464,4): type '[detachable] SD_TOOL_BAR_NARROW_BUTTON' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `prune' in class '[detachable] SD_MENU_BAR'
[CATCALL] class detachable SD_TOOL_BAR_ZONE (464,4): type '[detachable] SD_TOOL_BAR_BUTTON' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `prune' in class '[detachable] SD_MENU_BAR'
[CATCALL] class detachable SD_TOOL_BAR_ZONE (464,4): type '[detachable] SD_TOOL_BAR_SEPARATOR' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `prune' in class '[detachable] SD_MENU_BAR'
[CATCALL] class detachable SD_TOOL_BAR_ZONE (464,4): type '[detachable] SD_TOOL_BAR_WIDTH_BUTTON' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `prune' in class '[detachable] SD_MENU_BAR'
[CATCALL] class detachable SD_TOOL_BAR_ZONE (464,4): type '[detachable] SD_TOOL_BAR_FONT_BUTTON' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `prune' in class '[detachable] SD_MENU_BAR'
[CATCALL] class [detachable] SD_TOOL_BAR_ZONE_ASSISTANT (174,7): type '[detachable] SD_TOOL_BAR_NARROW_BUTTON' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `extend' in class '[detachable] SD_MENU_BAR'
[CATCALL] class [detachable] SD_TOOL_BAR_ZONE_ASSISTANT (172,7): type '[detachable] SD_TOOL_BAR_NARROW_BUTTON' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `prune' in class '[detachable] SD_MENU_BAR'
[CATCALL] class detachable SD_TOOL_BAR_ZONE (803,5): type '[detachable] SD_TOOL_BAR_NARROW_BUTTON' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `extend' in class '[detachable] SD_MENU_BAR'
[CATCALL] class detachable SD_TOOL_BAR_ZONE (803,5): type '[detachable] SD_TOOL_BAR_BUTTON' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `extend' in class '[detachable] SD_MENU_BAR'
[CATCALL] class detachable SD_TOOL_BAR_ZONE (803,5): type '[detachable] SD_TOOL_BAR_SEPARATOR' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `extend' in class '[detachable] SD_MENU_BAR'
[CATCALL] class detachable SD_TOOL_BAR_ZONE (803,5): type '[detachable] SD_TOOL_BAR_WIDTH_BUTTON' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `extend' in class '[detachable] SD_MENU_BAR'
[CATCALL] class detachable SD_TOOL_BAR_ZONE (803,5): type '[detachable] SD_TOOL_BAR_FONT_BUTTON' of actual argument #1 does not conform to type '[attached] SD_TOOL_BAR_MENU_ITEM' of formal argument in feature `extend' in class '[detachable] SD_MENU_BAR'
Degree -2: 0/0/0 0:0:2.119
**** language not recognized: C [macro <ev_gtk.h>] | "eif_argv.h"
[GIAAA] internal error.
----
**** language not recognized: C Macro use <ev_gtk.h>
Degree -3: 0/0/0 0:0:1.156
Total Time: 0/0/0 0:0:4.553

from gobo.

mw66 avatar mw66 commented on August 31, 2024

So if you get the latest version of the repository, you should be able to generate an executable.

Thanks. I will give it a try tomorrow.

from gobo.

mw66 avatar mw66 commented on August 31, 2024

With the latest github repo, got this error

Degree -3: 0/0/0 0:0:0.569
docking_simple5.c: In function ‘T596s6’:
docking_simple5.c:57248:58: error: expected ‘;’ before ‘}’ token
57248 | gtk_paned_set_wide_handle ((GtkPaned*) a1, (gboolean) a2)
      |                                                          ^
      |                                                          ;
57249 | #endif
57250 |         }
      |         ~                                                 

we can see the gtk_paned_set_wide_handle(...) statement missing ;:

/* GTK3.gtk_paned_set_wide_handle */
void T596s6(TC* ac, T479 a1, T453 a2)
{
        {
#if GTK_CHECK_VERSION(3,16,0)
gtk_paned_set_wide_handle ((GtkPaned*) a1, (gboolean) a2)
#endif
        }
}

from gobo.

mw66 avatar mw66 commented on August 31, 2024

Also got error:

docking_simple4.c: In function ‘T211f2sc1’:
docking_simple4.c:49016:17: error: ‘t1’ undeclared (first use in this function); did you mean ‘tr’?
49016 |                 t1 = (T444)(GE_int8(2));
      |                 ^~

I checked that generated C func, var t1 indeed is undeclared.

from gobo.

ebezault avatar ebezault commented on August 31, 2024

It looks like an inlining problem. I need to investigate. In the meantime, add this command-line option to gec:

--setting=inlining=False

from gobo.

mw66 avatar mw66 commented on August 31, 2024

added --setting=inlining=False, now the remaining errors:

In file included from docking_simple3.c:1:
docking_simple3.c: In function ‘T691f211’:
docking_simple3.c:13715:39: error: ‘eif_argc’ undeclared (first use in this function); did you mean ‘eif_proc’?
13715 |         R = EIF_TEST(gtk_init_check (&eif_argc, &eif_argv));
      |                                       ^~~~~~~~
docking_simple.h:259:23: note: in definition of macro ‘EIF_TEST’
  259 | #define EIF_TEST(x) ((x) ? EIF_TRUE : EIF_FALSE)
      |                       ^
docking_simple3.c:13715:39: note: each undeclared identifier is reported only once for each function it appears in
13715 |         R = EIF_TEST(gtk_init_check (&eif_argc, &eif_argv));
      |                                       ^~~~~~~~
docking_simple.h:259:23: note: in definition of macro ‘EIF_TEST’
  259 | #define EIF_TEST(x) ((x) ? EIF_TRUE : EIF_FALSE)
      |                       ^
docking_simple3.c:13715:50: error: ‘eif_argv’ undeclared (first use in this function)
13715 |         R = EIF_TEST(gtk_init_check (&eif_argc, &eif_argv));
      |                                                  ^~~~~~~~
docking_simple.h:259:23: note: in definition of macro ‘EIF_TEST’
  259 | #define EIF_TEST(x) ((x) ? EIF_TRUE : EIF_FALSE)
      |                       ^
Degree -4: 0/0/0 0:0:8.089
Total Time: 0/0/0 0:0:10.131

from gobo.

ebezault avatar ebezault commented on August 31, 2024

added --setting=inlining=False, now the remaining errors:

In file included from docking_simple3.c:1:
docking_simple3.c: In function ‘T691f211’:
docking_simple3.c:13715:39: error: ‘eif_argc’ undeclared (first use in this function); did you mean ‘eif_proc’?
13715 |         R = EIF_TEST(gtk_init_check (&eif_argc, &eif_argv));
      |                                       ^~~~~~~~
docking_simple.h:259:23: note: in definition of macro ‘EIF_TEST’
  259 | #define EIF_TEST(x) ((x) ? EIF_TRUE : EIF_FALSE)
      |                       ^
docking_simple3.c:13715:39: note: each undeclared identifier is reported only once for each function it appears in
13715 |         R = EIF_TEST(gtk_init_check (&eif_argc, &eif_argv));
      |                                       ^~~~~~~~
docking_simple.h:259:23: note: in definition of macro ‘EIF_TEST’
  259 | #define EIF_TEST(x) ((x) ? EIF_TRUE : EIF_FALSE)
      |                       ^
docking_simple3.c:13715:50: error: ‘eif_argv’ undeclared (first use in this function)
13715 |         R = EIF_TEST(gtk_init_check (&eif_argc, &eif_argv));
      |                                                  ^~~~~~~~
docking_simple.h:259:23: note: in definition of macro ‘EIF_TEST’
  259 | #define EIF_TEST(x) ((x) ? EIF_TRUE : EIF_FALSE)
      |                       ^
Degree -4: 0/0/0 0:0:8.089
Total Time: 0/0/0 0:0:10.131

It looks like you chose some Eiffel application which uses C code which itself relies on ISE Eiffel's runtime. Not the best choice to start with :-)
I'll address this issues one after the other...

from gobo.

mw66 avatar mw66 commented on August 31, 2024

added --setting=inlining=False, now the remaining errors:

In file included from docking_simple3.c:1:
docking_simple3.c: In function ‘T691f211’:
docking_simple3.c:13715:39: error: ‘eif_argc’ undeclared (first use in this function); did you mean ‘eif_proc’?
13715 |         R = EIF_TEST(gtk_init_check (&eif_argc, &eif_argv));
      |                                       ^~~~~~~~
docking_simple.h:259:23: note: in definition of macro ‘EIF_TEST’
  259 | #define EIF_TEST(x) ((x) ? EIF_TRUE : EIF_FALSE)
      |                       ^
docking_simple3.c:13715:39: note: each undeclared identifier is reported only once for each function it appears in
13715 |         R = EIF_TEST(gtk_init_check (&eif_argc, &eif_argv));
      |                                       ^~~~~~~~
docking_simple.h:259:23: note: in definition of macro ‘EIF_TEST’
  259 | #define EIF_TEST(x) ((x) ? EIF_TRUE : EIF_FALSE)
      |                       ^
docking_simple3.c:13715:50: error: ‘eif_argv’ undeclared (first use in this function)
13715 |         R = EIF_TEST(gtk_init_check (&eif_argc, &eif_argv));
      |                                                  ^~~~~~~~
docking_simple.h:259:23: note: in definition of macro ‘EIF_TEST’
  259 | #define EIF_TEST(x) ((x) ? EIF_TRUE : EIF_FALSE)
      |                       ^
Degree -4: 0/0/0 0:0:8.089
Total Time: 0/0/0 0:0:10.131

It looks like you chose some Eiffel application which uses C code which itself relies on ISE Eiffel's runtime. Not the best choice to start with :-) I'll address this issues one after the other...

Since I won't pass in any program args, I will just hard code 0 and null.

Please let me know which file to change?

from gobo.

ebezault avatar ebezault commented on August 31, 2024

Since I won't pass in any program args, I will just hard code 0 and null.

Please let me know which file to change?

Here, in EV_APPLICATION_IMP.gtk_init_check.

from gobo.

mw66 avatar mw66 commented on August 31, 2024

OK, I change it to return 1 (as boolean):

                        "/* gtk_init_check (&eif_argc, &eif_argv) */ 1"

Now, the final problem:

/usr/bin/ld: /lib/x86_64-linux-gnu/libgtk-3.so: undefined reference to symbol 'gdk_window_hide'
/usr/bin/ld: /lib/x86_64-linux-gnu/libgdk-3.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Degree -4: 0/0/0 0:0:9.261

Do you know which lib have gdk_window_hide defined?

from gobo.

ebezault avatar ebezault commented on August 31, 2024

Do you know which lib have gdk_window_hide defined?

No.

from gobo.

mw66 avatar mw66 commented on August 31, 2024

fixed by add to /gobo/tool/gec/backend/c/config/gcc.cfg link:

`pkg-config --libs gdk-3.0` `pkg-config --libs gtk+-3.0` `pkg-config --libs glib-2.0` `pkg-config --libs gmodule-2.0` `pkg-config --libs x11`

from gobo.

mw66 avatar mw66 commented on August 31, 2024
(.text+0x45): undefined reference to `eif_adopt'
/usr/bin/ld: (.text+0x57): undefined reference to `eif_wean'
(.text+0x8b): undefined reference to `eif_id_object'
(.text+0x6c9): undefined reference to `eif_protect'

I saw /gobo/tool/gec/runtime/c/ge_gc.h macro for eif_protect eif_wean eif_adopt

How to let the build see these macros first? (Ideally, GOBO should also define these as functions instead of macros, so user won't have link error when compile ISE project.)

And what's the GOBO equivalent of eif_id_object?

from gobo.

ebezault avatar ebezault commented on August 31, 2024

fixed by add to /gobo/tool/gec/backend/c/config/gcc.cfg link:

`pkg-config --libs gdk-3.0` `pkg-config --libs gtk+-3.0` `pkg-config --libs glib-2.0` `pkg-config --libs gmodule-2.0` `pkg-config --libs x11`

I wonder what they do for that in the ISE Eiffel compiler. It should be somewhere in the ECF files!
Ideally gec should add all these on the fly when needed, and not all the time even for non-gtk applications.

from gobo.

mw66 avatar mw66 commented on August 31, 2024

fixed by add to /gobo/tool/gec/backend/c/config/gcc.cfg link:

`pkg-config --libs gdk-3.0` `pkg-config --libs gtk+-3.0` `pkg-config --libs glib-2.0` `pkg-config --libs gmodule-2.0` `pkg-config --libs x11`

I wonder what they do for that in the ISE Eiffel compiler. It should be somewhere in the ECF files! Ideally gec should add all these on the fly when needed, and not all the time even for non-gtk applications.

(I know I'm just hacking here).

./docking_simple.ecf does not have these libraries.

from gobo.

ebezault avatar ebezault commented on August 31, 2024
(.text+0x45): undefined reference to `eif_adopt'
/usr/bin/ld: (.text+0x57): undefined reference to `eif_wean'
(.text+0x8b): undefined reference to `eif_id_object'
(.text+0x6c9): undefined reference to `eif_protect'

I saw /gobo/tool/gec/runtime/c/ge_gc.h macro for eif_protect eif_wean eif_adopt

How to let the build see these macros first?

And what's the GOBO equivalent of eif_id_object?

For eif_adopt, eif_protect and eif_wean, you should get and build the latest version of gec. It works for the cURL example.
For eif_id_object I need to look at the ISE Eiffel code to see what it does in order to provide an equivalent implementation in gec.

from gobo.

mw66 avatar mw66 commented on August 31, 2024

For eif_adopt, eif_protect and eif_wean, you should get and build the latest version of gec. It works for the cURL example.

I'm using the latest version of gec:

$ gec --version
gec version xx.xx.xx+xxxxxxxxx

Ideally, GOBO should also define these as functions instead of macros, so user won't have link error when compiling ISE project.

from gobo.

ebezault avatar ebezault commented on August 31, 2024

I'm using the latest version of gec:

SHA 824c7e7

Ideally, GOBO should also define these as functions instead of macros, so user won't have link error when compiling ISE project.

Why? You would still have to make sure that the C code of these functions are compiled into the resulting executable.
They are also macros in the ISE Eiffel implementation.

from gobo.

mw66 avatar mw66 commented on August 31, 2024

I'm using the latest version of gec:

SHA 824c7e7

Yes, I'm using this, just synced 10-minutes ago. Maybe you want to update gec version xx.xx.xx+xxxxxxxxx with some stamp even during dev.

Ideally, GOBO should also define these as functions instead of macros, so user won't have link error when compiling ISE project.

Why? You would still have to make sure that the C code of these functions are compiled into the resulting executable. They are also macros in the ISE Eiffel implementation.

Oh, then why we have link error here? For macros, it will be expanded on the spot, at most compile error, but not link error.

Basically what I mean is the GOBO external C impl structure better to match ISE external C impl structure, so no link surprise.

from gobo.

ebezault avatar ebezault commented on August 31, 2024

Basically what I mean is the GOBO external C impl structure better to match ISE external C impl structure, so no link surprise.

Yes, so they are macros in ISE. You get links error because I did not include these macros in the right header files. But this can be fixed easily. The eif_*.h in Gobo are just here to make ISE's code compile with gec. But I will certainly not replicate ISE's runtime in Gobo.

from gobo.

mw66 avatar mw66 commented on August 31, 2024

But I will certainly not replicate ISE's runtime in Gobo.

Yes, that I know. They are just stubs in GOBO.

from gobo.

ebezault avatar ebezault commented on August 31, 2024

In other worlds, the eif_*.h files are a bridge between the Gobo Eiffel runtime and what is expected to compile ISE's libraries.

from gobo.

mw66 avatar mw66 commented on August 31, 2024

Hi @ebezault I saw to commits about eif_id_object

7e6102c

is this done or not?

with the latest git pull update, I still saw undefined symbols:

/usr/bin/ld: /Eiffel/library/vision2/spec/linux-x86-64/lib/gtk3_eiffel.o: in function `add_watch_callback':
(.text+0x45): undefined reference to `eif_adopt'
/usr/bin/ld: (.text+0x57): undefined reference to `eif_wean'
/usr/bin/ld: /Eiffel/library/vision2/spec/linux-x86-64/lib/gtk3_eiffel.o: in function `c_ev_any_imp_c_object_dispose':
(.text+0x8b): undefined reference to `eif_id_object'
/usr/bin/ld: /Eiffel/library/vision2/spec/linux-x86-64/lib/gtk3_eiffel.o: in function `c_ev_any_imp_get_eif_reference_from_object_id':
(.text+0xec): undefined reference to `eif_id_object'
/usr/bin/ld: /Eiffel/library/vision2/spec/linux-x86-64/lib/gtk3_eiffel.o: in function `gclosure_notify_eif_wean':
(.text+0x5ea): undefined reference to `eif_wean'
/usr/bin/ld: /Eiffel/library/vision2/spec/linux-x86-64/lib/gtk3_eiffel.o: in function `gdestroy_notify_eif_wean':
(.text+0x60a): undefined reference to `eif_wean'
/usr/bin/ld: /Eiffel/library/vision2/spec/linux-x86-64/lib/gtk3_eiffel.o: in function `c_ev_gtk_callback_marshal_init':
(.text+0x6c9): undefined reference to `eif_protect'
/usr/bin/ld: /Eiffel/library/vision2/spec/linux-x86-64/lib/gtk3_eiffel.o: in function `c_ev_gtk_callback_marshal_signal_connect':
(.text+0x73a): undefined reference to `eif_adopt'
/usr/bin/ld: /Eiffel/library/vision2/spec/linux-x86-64/lib/gtk3_eiffel.o: in function `c_ev_gtk_callback_marshal_timeout_connect':
(.text+0x79b): undefined reference to `eif_adopt'
collect2: error: ld returned 1 exit status
Degree -4: 0/0/0 0:0:9.258

Thanks.

from gobo.

ebezault avatar ebezault commented on August 31, 2024

Try version 5b11010

I should fix:

  • the dynamic type set messages
  • the CAT-call messages
  • the missing semicolon, added on the fly
  • the missing functions (eif_wean, eif_argc, etc.)
  • the issue with inlining
ericb@yate:~/ise/Eiffel_23.09/examples/docking/simple$ gec docking_simple.ecf
Degree 6: 0/0/0 0:0:0.041
Degree 5: 0/0/0 0:0:0.504
Degree 4: 0/0/0 0:0:0.174
Degree 3: 0/0/0 0:0:0.066
Degree -2: 0/0/0 0:0:1.168
Degree -3: 0/0/0 0:0:0.900
docking_simple6.c:86033:8: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
 86033 | printf((char*) a1);
       |        ^       ~~
docking_simple6.c:86033:8: note: treat the string as an argument to avoid this
 86033 | printf((char*) a1);
       |        ^
       |        "%s",
1 warning generated.
Degree -4: 0/0/0 0:0:14.821
Total Time: 0/0/0 0:0:17.675

ericb@yate:~/ise/Eiffel_23.09/examples/docking/simple$ ./docking_simple

(docking_simple:19671): Gtk-WARNING **: 18:19:53.195: gtk_widget_event(): unhandled event type: 34
Gdk-Message: 18:19:56.207: Unable to load fleur from the cursor theme

(docking_simple:19671): GLib-GObject-CRITICAL **: 18:19:56.207: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

I don't know if the messages that I get when executing are expected. I'm not running on a native Linux box but from WSL Ubuntu on Windows. I'll try compiling with ISE Eiffel to see if I get the same messages.

from gobo.

mw66 avatar mw66 commented on August 31, 2024

Thanks. Trying now, will keep you updated ...

(BTW, ISE runs fine; but for my purpose, I don't need the GUI, I just want to print out some info during program init.)

Unfortunately, it Segmentation fault:

/Eiffel_23.09/examples/docking/simple$ make gobo 
gec --setting=inlining=False ./docking_simple.ecf
Degree 6: 0/0/0 0:0:0.075
Degree 5: 0/0/0 0:0:0.294
Degree 4: 0/0/0 0:0:0.168
Degree 3: 0/0/0 0:0:0.099
Degree -2: 0/0/0 0:0:1.359
Degree -3: 0/0/0 0:0:0.676
docking_simple6.c: In function ‘T243s45’:
docking_simple6.c:15241:1: warning: format not a string literal and no format arguments [-Wformat-security]
15241 | printf((char*) a1);
      | ^~~~~~
Degree -4: 0/0/0 0:0:11.004
Total Time: 0/0/0 0:0:13.676

/Eiffel_23.09/examples/docking/simple$ ./docking_simple
Segmentation fault (core dumped)

/Eiffel_23.09/examples/docking/simple$ gdb ./docking_simple
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
(gdb) r
....

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff5f14640 (LWP 2574041)]
[New Thread 0x7ffff5713640 (LWP 2574042)]
[New Thread 0x7ffff4f12640 (LWP 2574043)]
[New Thread 0x7ffff4711640 (LWP 2574044)]
[New Thread 0x7ffff3f10640 (LWP 2574045)]
[New Thread 0x7ffff370f640 (LWP 2574046)]
[New Thread 0x7ffff2f0e640 (LWP 2574047)]
[New Thread 0x7ffff26fd640 (LWP 2574048)]

Thread 1 "docking_simple" received signal SIGSEGV, Segmentation fault.
0x00007ffff738ccf4 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
(gdb) where
#0  0x00007ffff738ccf4 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#1  0x00007ffff73a4664 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#2  0x00007ffff7396754 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#3  0x00007ffff7bd7f83 in g_type_create_instance () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#4  0x00007ffff7bbf0ed in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#5  0x00007ffff7bc034d in g_object_new_with_properties () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#6  0x00007ffff7bc0e51 in g_object_new () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#7  0x00007ffff759d2d8 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#8  0x00007ffff7bd7f83 in g_type_create_instance () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9  0x00007ffff7bbf0ed in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff7bc034d in g_object_new_with_properties () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff7bc0e51 in g_object_new () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x000055555577d7f4 in T441s5 ()
#13 0x0000555555c04263 in T708f241 ()
#14 0x0000555555be3e7a in T708c231 ()
#15 0x0000555555be37db in T596f5 ()
#16 0x0000555555be2c36 in T596f6 ()
#17 0x000055555576b4a8 in T581f26 ()
#18 0x000055555576b216 in T581f23 ()
#19 0x0000555555b5e2b1 in T581c22 ()
#20 0x00005555557b1553 in GE_main ()
#21 0x00005555557b5d96 in main ()

from gobo.

mw66 avatar mw66 commented on August 31, 2024

BTW, if you want to try: my small modification of the program to test diamond is:

in main_window.e, method prepare_content_1(), add

local
                       zone: SD_PLACE_HOLDER_ZONE
                        impl, impl2: EV_WIDGET_I

and append at the end of do:

                        io.put_string ("Hello, diamond!%N")
                        create zone.make(content_1, manager)
                        impl := zone.implementation
                        impl2 := zone.implementation_upper_zone
                        print($impl)
                        io.put_string("%N")
                        print($impl2)
                        io.put_string("%N")
                        if zone.implementation /= Void then
                                if zone.implementation = zone.implementation_upper_zone then
                                        io.put_string ("zone.implementation = zone.implementation_upper_zone%N")
                                end
                                if zone.implementation_upper_zone.is_equal(zone.implementation) then
                                        io.put_string ("zone.implementation_upper_zone.is_equal(zone.implementation)%N")
                                end
                        end

With ISE compiler it outputs:

/Eiffel/examples/docking/simple$ Hello, diamond!
0x7FA55E6F6018
0x7FA55E6F6018
zone.implementation = zone.implementation_upper_zone
zone.implementation_upper_zone.is_equal(zone.implementation)

from gobo.

ebezault avatar ebezault commented on August 31, 2024

Unfortunately, it Segmentation fault:

Try gec --gc=no docking_simple.ecf

from gobo.

ebezault avatar ebezault commented on August 31, 2024

And also:

 gec --capability=concurrency=none docking_simple.ecf

or both.

from gobo.

mw66 avatar mw66 commented on August 31, 2024

Unfortunately, it Segmentation fault:

Try gec --gc=no docking_simple.ecf

Same problem:

/Eiffel/examples/docking/simple$ make
gec --gc=no ./docking_simple.ecf
Degree 6: 0/0/0 0:0:0.073
Degree 5: 0/0/0 0:0:0.267
Degree 4: 0/0/0 0:0:0.175
Degree 3: 0/0/0 0:0:0.091
Degree -2: 0/0/0 0:0:1.378
Degree -3: 0/0/0 0:0:0.837
docking_simple5.c: In function ‘T243s45’:
docking_simple5.c:86171:1: warning: format not a string literal and no format arguments [-Wformat-security]
86171 | printf((char*) a1);
      | ^~~~~~
Degree -4: 0/0/0 0:0:10.740
Total Time: 0/0/0 0:0:13.562

...

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff6014640 (LWP 2575162)]

Thread 1 "docking_simple" received signal SIGSEGV, Segmentation fault.
0x00007ffff738ccf4 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
(gdb) where
#0  0x00007ffff738ccf4 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#1  0x00007ffff73a4664 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#2  0x00007ffff7396754 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#3  0x00007ffff7bd7f83 in g_type_create_instance () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#4  0x00007ffff7bbf0ed in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#5  0x00007ffff7bc034d in g_object_new_with_properties () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#6  0x00007ffff7bc0e51 in g_object_new () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#7  0x00007ffff759d2d8 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#8  0x00007ffff7bd7f83 in g_type_create_instance () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9  0x00007ffff7bbf0ed in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff7bc034d in g_object_new_with_properties () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff7bc0e51 in g_object_new () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00005555557edd43 in T441s5 ()
#13 0x0000555555c03c99 in T708f241 ()
#14 0x0000555555be42f1 in T708c231 ()
#15 0x0000555555be3bd5 in T596f5 ()
#16 0x0000555555be3030 in T596f6 ()
#17 0x00005555557dbd87 in T581f26 ()
#18 0x00005555557dbad0 in T581f23 ()
#19 0x0000555555b5c883 in T581c22 ()
#20 0x000055555572c207 in GE_main ()
#21 0x0000555555730975 in main ()

from gobo.

mw66 avatar mw66 commented on August 31, 2024

And also:

 gec --capability=concurrency=none docking_simple.ecf

or both.

ok, trying ...

from gobo.

ebezault avatar ebezault commented on August 31, 2024

Note that on my machine (WSL Ubuntu under Windows 11) I don't get a Segmentation fault and it displays a small window on the screen. Did you get this window?

I'm using zig cc as C compiler, not gcc.

from gobo.

mw66 avatar mw66 commented on August 31, 2024

Note that on my machine (WSL Ubuntu under Windows 11) I don't get a Segmentation fault and it displays a small window on the screen. Did you get this window?

I'm using zig cc as C compiler, not gcc.

No, I didn't get any window.

Can you try my small modification, and copy the output here?

I will try zig cc myself ...

from gobo.

mw66 avatar mw66 commented on August 31, 2024

BTW, what's the command to gec to use zig cc?

from gobo.

ebezault avatar ebezault commented on August 31, 2024

To install zig cc, download it from https://ziglang.org/download/ (use the latest version).
Unzip it in $GOBO/tool/gec/backend/c. Make sure to rename the folder as $GOBO/tool/gec/backend/c/zig.
Update $GOBO/tool/gec/backend/c/config/default.cfg to be just zig.
Recompile the docking example with gec.

from gobo.

ebezault avatar ebezault commented on August 31, 2024

No environment variable to be set, no need to change $PATH, and no new command-line argument to use zig cc.

from gobo.

ebezault avatar ebezault commented on August 31, 2024

Can you try my small modification, and copy the output here?

Hello, diamond!
0x2964560
0x29608B0

from gobo.

mw66 avatar mw66 commented on August 31, 2024

Can you try my small modification, and copy the output here?

Hello, diamond!
0x2964560
0x29608B0

OK, verified in real code, that ISE and GOBO use different semantics in this diamond field renaming. Thanks.

from gobo.

ebezault avatar ebezault commented on August 31, 2024

I wonder whether there is a real (i.e. chosen) semantics, or whether it depends on the order in the inherit clause.

from gobo.

mw66 avatar mw66 commented on August 31, 2024

To install zig cc, download it from https://ziglang.org/download/ (use the latest version). Unzip it in $GOBO/tool/gec/backend/c. Make sure to rename the folder as $GOBO/tool/gec/backend/c/zig. Update $GOBO/tool/gec/backend/c/config/default.cfg to be just zig. Recompile the docking example with gec.

I followed this instruction on

$ cat /etc/issue
Ubuntu 22.04.3 LTS \n \l

/Eiffel/examples/docking/simple$ make
gec ./docking_simple.ecf
Degree 6: 0/0/0 0:0:0.078
Degree 5: 0/0/0 0:0:0.291
Degree 4: 0/0/0 0:0:0.198
Degree 3: 0/0/0 0:0:0.085
Degree -2: 0/0/0 0:0:1.368
Degree -3: 0/0/0 0:0:0.882
docking_simple6.c:86171:8: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
 86171 | printf((char*) a1);
       |        ^       ~~
docking_simple6.c:86171:8: note: treat the string as an argument to avoid this
 86171 | printf((char*) a1);
       |        ^
       |        "%s", 
1 warning generated.
Degree -4: 0/0/0 0:0:12.760
Total Time: 0/0/0 0:0:15.663

From the 2nd note message, (which is absent in gcc) looks like the backend is using zig cc.

But the result is the same:

Thread 1 "docking_simple" received signal SIGSEGV, Segmentation fault.

I will try on WSL as your system later. BTW, which WSL version you are using?

from gobo.

ebezault avatar ebezault commented on August 31, 2024

WSL 2:

PS C:\> wsl --list --verbose
  NAME      STATE           VERSION
* Ubuntu    Running         2
ericb@yate:~$ cat /etc/issue
Ubuntu 20.04.2 LTS \n \l

from gobo.

ebezault avatar ebezault commented on August 31, 2024

From the 2nd note message, (which is absent in gcc) looks like the backend is using zig cc.

If you recompile, the Degree -4 should be faster, and it will not show the C warning messages.

from gobo.

ebezault avatar ebezault commented on August 31, 2024

Thread 1 "docking_simple" received signal SIGSEGV, Segmentation fault.

If you use:

gec --gc=no --capability=concurrency=none docking_simple.ecf

not thread should be created.

from gobo.

mw66 avatar mw66 commented on August 31, 2024

I wonder whether there is a real (i.e. chosen) semantics, or whether it depends on the order in the inherit clause.

It's due to the conflict between ECMA Eiffel standard 8.16.2, and 8.6.16, as discussed in Sec 2.2 on page 5

https://github.com/joortcom/eiffel_rename/blob/main/eiffel_rename.pdf

BTW, for a new solution to the diamond problem of MI (which works across a wide spectrum of industry-strength OOP languages: including C++, Python, OCaml, Lisp, Eiffel, Java, C#, D, Scala, etc. Yes, clean MI diamond problem solution even in the current Java and C#!) Please check and try the source code here:

https://github.com/joortcom/DDIFI/blob/main/ddifi.pdf

https://github.com/joortcom/DDIFI

(which contains the implementation source code of this design pattern DDIFI in these 9 languages.)

from gobo.

mw66 avatar mw66 commented on August 31, 2024

You can also compare the ISE and GOBO output here:

With ISE compiler it outputs:

Hello, diamond!
0x7FA55E6F6018
0x7FA55E6F6018
zone.implementation = zone.implementation_upper_zone
zone.implementation_upper_zone.is_equal(zone.implementation)

with GOBO

/Eiffel/examples/docking/simple$ ./docking_simple
Hello, diamond!
0x7F3B6A89B400
0x7F3B6A89B600

from gobo.

ebezault avatar ebezault commented on August 31, 2024

And with ISE in finalized mode, what do you get?

from gobo.

mw66 avatar mw66 commented on August 31, 2024

with ISE workbench mode:

W_code$ ./docking_simple 
Hello, diamond!
0x7FF74CDA4FF8
0x7FF74CDA4FF8
zone.implementation = zone.implementation_upper_zone
zone.implementation_upper_zone.is_equal(zone.implementation)

with finalized mode:

/F_code$ ./docking_simple 

docking_simple: system execution failed.
Following is the set of recorded exceptions:

******************************** Thread exception *****************************
In thread           Root thread            0x0 (thread id)
*******************************************************************************
-------------------------------------------------------------------------------
Class / Object      Routine                Nature of exception           Effect
-------------------------------------------------------------------------------
VISION2_APPLICATION root's creation        Segmentation fault:          
<00007FD8F6781558>                         Operating system signal.      Exit
-------------------------------------------------------------------------------
VISION2_APPLICATION root's creation                                     
<00007FD8F6781558>                         Routine failure.              Exit
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

This is a ISE compiler bug.

from gobo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.