After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 539947 - OpenSolaris: __FUNCTION__ not defined in sun cc
OpenSolaris: __FUNCTION__ not defined in sun cc
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Build system
git-master
Other opensolaris
: Normal blocker
: ---
Assigned To: Andreas Köhler
Derek Atkins
Depends on:
Blocks: backport
 
 
Reported: 2008-06-24 13:27 UTC by Halton Huo
Modified: 2018-06-29 22:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for bug #539947 (526 bytes, patch)
2008-06-24 13:29 UTC, Halton Huo
none Details | Review
patch for bug #539947 (17.07 KB, patch)
2008-06-24 15:00 UTC, Halton Huo
rejected Details | Review
new patch for bug #539947 with using G_STRFUNC (22.10 KB, patch)
2008-06-25 16:39 UTC, Halton Huo
committed Details | Review

Description Halton Huo 2008-06-24 13:27:13 UTC
I'm build gnucash trunk (r17246) with sun cc under Solaris, but get following fails :

/ws/onnv-tools-prc/SUNWspro/SS12/bin/cc -DHAVE_CONFIG_H -I. -I../../.. -DG_LOG_DOMAIN=\"qof\" -D_REENTRANT -D_PTHREADS -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I../../../lib/libc -xO4 -g -c gnc-date.c  -KPIC -DPIC -o .libs/gnc-date.o
"gnc-date.c", line 330: warning: argument mismatch
"gnc-date.c", line 330: undefined symbol: __FUNCTION__
"gnc-date.c", line 330: warning: improper pointer/integer combination: arg #1
"gnc-date.c", line 821: warning: argument #1 is incompatible with prototype:
	prototype: pointer to char : "gnc-date.h", line 359
	argument : pointer to unsigned char
"gnc-date.c", line 1095: undefined symbol: __FUNCTION__
"gnc-date.c", line 1095: warning: improper pointer/integer combination: arg #1
"gnc-date.c", line 1117: warning: argument mismatch
"gnc-date.c", line 1117: undefined symbol: __FUNCTION__
"gnc-date.c", line 1117: warning: improper pointer/integer combination: arg #1
"gnc-date.c", line 1141: undefined symbol: __FUNCTION__
"gnc-date.c", line 1141: warning: improper pointer/integer combination: arg #1
cc: acomp failed for gnc-date.c
Comment 1 Halton Huo 2008-06-24 13:29:22 UTC
Created attachment 113329 [details] [review]
patch for bug #539947

Use G_GNUC_PRETTY_FUNCTION instead of __FUNCTION__ will fix this build error.

If it is okay, can I commit?
Comment 2 Halton Huo 2008-06-24 15:00:12 UTC
Created attachment 113333 [details] [review]
patch for bug #539947

Offer a new patch with more files:
trunk/lib/libqof/qof/qoflog.h
trunk/src/engine/kvp-scm.c
trunk/src/engine/engine-helpers.c
trunk/src/app-utils/gnc-exp-parser.c
trunk/src/app-utils/gnc-helpers.c
trunk/src/app-utils/option-util.c
trunk/src/gnome-utils/dialog-options.c
trunk/src/report/report-system/gnc-report.c
trunk/src/report/report-gnome/dialog-column-view.c
trunk/src/report/report-gnome/gnc-plugin-page-report.c
trunk/src/gnome/gnc-plugin-page-register.c
trunk/src/business/business-core/gncBusGuile.c
trunk/src/business/business-utils/business-options.c
trunk/src/business/business-gnome/business-options-gnome.c
trunk/src/business/business-gnome/dialog-invoice.c
Comment 3 Derek Atkins 2008-06-24 19:33:04 UTC
__FUNCTION__ is wrapped by G_GNUC_FUNCTION, not G_GNUC_PRETTY_FUNCTION.

However, usage of these macros is not recommended by glib, and indeed glib only supplies these macros with valid data if GNUC < 3 which is definitely not good.

So no, this patch isn't good.  Sorry.

Fix your compiler?
Comment 4 Halton Huo 2008-06-25 13:00:09 UTC
Refer to bug #539947, is it acceptable to G_STRFUNC instead? 

I test on Solaris, suncc and gcc goes okay with this macro.
Comment 5 Halton Huo 2008-06-25 13:01:55 UTC
Sorry, I mean bug #524344.
Comment 6 Derek Atkins 2008-06-25 13:56:49 UTC
Yes, G_STRFUNC would be acceptable.
Comment 7 Halton Huo 2008-06-25 16:39:21 UTC
Created attachment 113415 [details] [review]
new patch for bug #539947 with using G_STRFUNC

Use G_STRFUNC replace __FUNCTION__.
Comment 8 Andreas Köhler 2008-09-21 15:25:57 UTC
Applied to trunk as r17585.
Awaiting backport to branches/2.2 to avoid FTBFS.
Thanks a lot!
Comment 9 Halton Huo 2008-09-27 08:26:53 UTC
Close this bug cause patch is committed.
Comment 10 Derek Atkins 2008-09-27 09:08:49 UTC
Halton, please do not close bugs.  This bug should not have been closed because this patch has NOT made it into a 2.2 release.
Comment 11 Halton Huo 2008-09-27 09:12:46 UTC
Sure, sorry for miss information in comment #8.
Comment 12 Christian Stimming 2008-11-27 11:26:22 UTC
2.2-branch, r17733
Comment 13 John Ralls 2018-06-29 22:06:05 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=539947. Please update any external references or bookmarks.