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 539942 - suncc can not compile gnucash without set "CFLAGS='-xO4'"
suncc can not compile gnucash without set "CFLAGS='-xO4'"
Status: RESOLVED DUPLICATE of bug 554042
Product: GnuCash
Classification: Other
Component: Build system
git-master
Other opensolaris
: Normal normal
: ---
Assigned To: Andreas Köhler
Derek Atkins
Depends on:
Blocks:
 
 
Reported: 2008-06-24 13:12 UTC by Halton Huo
Modified: 2018-06-29 22:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
config.log without setting "CFLAGS='-xO4'" (89.26 KB, text/plain)
2008-06-25 08:23 UTC, Halton Huo
  Details
patch for bug #539942 (431 bytes, patch)
2008-06-27 08:41 UTC, Halton Huo
none Details | Review
Temporarily add GLIB_LIBS to LDLFAGS (787 bytes, patch)
2008-09-21 15:35 UTC, Andreas Köhler
committed Details | Review

Description Halton Huo 2008-06-24 13:12:47 UTC
I'm under Solaris, with Sun Studio 12 to build gnucash trunk code. But fails on configure time.


$./autogen.sh && ./configure --enable-debug --enable-gui
....
checking if unsigned long is at least as big as guint32... no
configure: error: cannot continue
./configure: line 26565: exit: size: numeric argument required
./configure: line 26565: exit: size: numeric argument required

If I set CFLAGS='-xO4', then it can pass
$export CFLAGS='-xO4'
$./autogen.sh && ./configure --enable-debug --enable-gui

I'm wondering why this happen.
Comment 1 Derek Atkins 2008-06-24 19:26:23 UTC
Check config.log?
Comment 2 Halton Huo 2008-06-25 08:23:14 UTC
Created attachment 113384 [details]
config.log without setting "CFLAGS='-xO4'"

As request, attach the config.log
Comment 3 Derek Atkins 2008-06-25 14:11:00 UTC
If you look at the config.log you'll see the problem:

configure:26301: checking if guile long_long is at least as big as gint64
configure:26400: /ws/onnv-tools-prc/SUNWspro/SS12/bin/cc -o conftest  -D_REENTRANT -g -D_REENTRANT -D_PTHREADS -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include     conftest.c -lm  >&5
Undefined			first referenced
 symbol  			    in file
g_atomic_pointer_get                conftest.o
g_once_init_enter_impl              conftest.o
g_string_insert_c                   conftest.o
ld: fatal: Symbol referencing errors. No output written to conftest

But the code used isn't pulling these symbols in.  The program being compiled is just:

|   #include <glib.h>
|   #include <libguile/__scm.h>
|   int main(int argc, char *argv[]) {
|     return(!(sizeof(long_long) >= sizeof(gint64)));
|   }

So something is whacked on your system.  I suggest using config.log as your guide to seeing what is actually wrong and then you can work to fix it.  Or you could just use GCC.  ;)
Comment 4 Halton Huo 2008-06-27 08:41:38 UTC
Created attachment 113513 [details] [review]
patch for bug #539942

Add "-lglib-2.0" will fix this problem, seems GLIB_LIBS should added to LDFLAGS for this test.

Does this patch look good?
Comment 5 Andreas Köhler 2008-08-20 11:40:28 UTC
That should work.  What about saving GNC_OLDLDFLAGS before and restoring it after the test, similar to OLD_CFLAGS?
Comment 6 Andreas Köhler 2008-09-21 15:35:49 UTC
Created attachment 119106 [details] [review]
Temporarily add GLIB_LIBS to LDLFAGS

Halton, does this patch work for you?
Comment 7 Halton Huo 2008-09-27 08:05:19 UTC
(In reply to comment #6)
> Created an attachment (id=119106) [edit]
> Temporarily add GLIB_LIBS to LDLFAGS
> 
> Halton, does this patch work for you?
> 
Andreas,

You patch works fine on my box.

Sorry for late response, I'm stopping at bug #554042, now I have patch for that also, would you take a look?



Comment 8 Christian Stimming 2008-10-25 20:00:57 UTC
Is now solved by the patch from bug#554042.

*** This bug has been marked as a duplicate of 554042 ***
Comment 9 John Ralls 2018-06-29 22:06:03 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=539942. Please update any external references or bookmarks.