Patch: suppress duplicate Fl_Printer::class_id
Hello All, Building commit 317f010 (two days ago) of dillo, I got a duplicate symbol on OSX 10.6.8 with gcc 4.2.1. Here is the diff that suppresses it. ---------------- $ hg diff diff -r c09473fb7311 dw/fltkplatform.cc --- a/dw/fltkplatform.cc Sat Sep 13 09:46:28 2014 +0000 +++ b/dw/fltkplatform.cc Sat Sep 13 23:49:26 2014 +1200 @@ -37,10 +37,10 @@ * any need for currently. This stub prevents that. */ class FL_EXPORT Fl_Printer : public Fl_Paged_Device { public: - static const char *class_id; +// static const char *class_id; Fl_Printer(void) {}; }; -const char *Fl_Printer::class_id = "Fl_Printer"; +//const char *Fl_Printer::class_id = "Fl_Printer"; /* Tooltips */ static Fl_Menu_Window *tt_window = NULL; --------------- I have no idea what it will turn out that I've broken. If having this as a pull request will help, then I will try to work out how. Regards, James.
James wrote:
Building commit 317f010 (two days ago) of dillo, I got a duplicate symbol on OSX 10.6.8 with gcc 4.2.1. Here is the diff that suppresses it.
---------------- $ hg diff diff -r c09473fb7311 dw/fltkplatform.cc --- a/dw/fltkplatform.cc Sat Sep 13 09:46:28 2014 +0000 +++ b/dw/fltkplatform.cc Sat Sep 13 23:49:26 2014 +1200 @@ -37,10 +37,10 @@ * any need for currently. This stub prevents that. */ class FL_EXPORT Fl_Printer : public Fl_Paged_Device { public: - static const char *class_id; +// static const char *class_id; Fl_Printer(void) {}; }; -const char *Fl_Printer::class_id = "Fl_Printer"; +//const char *Fl_Printer::class_id = "Fl_Printer";
To refresh my memory of the magnitude of what printer stuff we pull in without the stub, I commented out the stub -- and saw nothing to do with Fl_Printer with nm. I thought maybe this somehow had to do with the changes that Lauri Kasanen made to fltk last month like http://www.fltk.org/newsgroups.php?s10767+gfltk.commit+v10781 http://www.fltk.org/newsgroups.php?s10787+gfltk.commit+v10787 but I see that Manolo took out the Fl_Printer::class_id check in Fl_Text_Display in March 2012. 1.3.2 came out in...let's see... December 2012. So we should probably remove the stub altogether.
Removing the stub on OSX 10.6.8 with fltk 1.3.2 does not make dillo grow. Sizes of dillo image; the first line counts shared libraries, and the second overestimates, perhaps consistently, the size of the to-run code: - with Fl_Printer stub without class_id: $ otool -L src/dillo | wc 14 92 1370 $ ls -l src/dillo -rwxr-xr-x 1 ... staff 2407760 15 Sep 21:21 src/dillo - without Fl_Printer stub: $ otool -L src/dillo | wc 14 92 1370 $ ls -l src/dillo -rwxr-xr-x 1 ... staff 2407760 17 Sep 00:05 src/dillo If it's purpose has been overtaken by events, and it increases the brittleness of the code, then I would be happy for it to be removed. On 9/16/14, eocene <eocene at gmx.com> wrote:
James wrote:
Building commit 317f010 (two days ago) of dillo, I got a duplicate symbol on OSX 10.6.8 with gcc 4.2.1. Here is the diff that suppresses it.
---------------- $ hg diff diff -r c09473fb7311 dw/fltkplatform.cc --- a/dw/fltkplatform.cc Sat Sep 13 09:46:28 2014 +0000 +++ b/dw/fltkplatform.cc Sat Sep 13 23:49:26 2014 +1200 @@ -37,10 +37,10 @@ * any need for currently. This stub prevents that. */ class FL_EXPORT Fl_Printer : public Fl_Paged_Device { public: - static const char *class_id; +// static const char *class_id; Fl_Printer(void) {}; }; -const char *Fl_Printer::class_id = "Fl_Printer"; +//const char *Fl_Printer::class_id = "Fl_Printer";
To refresh my memory of the magnitude of what printer stuff we pull in without the stub, I commented out the stub -- and saw nothing to do with Fl_Printer with nm.
I thought maybe this somehow had to do with the changes that Lauri Kasanen made to fltk last month like http://www.fltk.org/newsgroups.php?s10767+gfltk.commit+v10781 http://www.fltk.org/newsgroups.php?s10787+gfltk.commit+v10787 but I see that Manolo took out the Fl_Printer::class_id check in Fl_Text_Display in March 2012. 1.3.2 came out in...let's see... December 2012.
So we should probably remove the stub altogether.
_______________________________________________ Dillo-dev mailing list Dillo-dev at dillo.org http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev
participants (2)
-
eocene@gmx.com
-
james.from.wellington@gmail.com