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 376487 - The glib does not compile
The glib does not compile
Status: RESOLVED DUPLICATE of bug 353694
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal critical
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2006-11-17 22:13 UTC by Wim Eijsenga
Modified: 2006-12-04 14:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Wim Eijsenga 2006-11-17 22:13:06 UTC
Steps to reproduce:
1. Typing make gives
2.  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -pthread -g -O2 -Wall -MT gtimer.lo -MD -MP -MF .deps/gtimer.Tpo -c gtimer.c  -fPIC -DPIC -o .libs/gtimer.o
gtimer.c: In function 'g_timer_elapsed':
gtimer.c:264: error: 'struct timeval' has no member named 'tv_nsec'
gtimer.c:264: error: 'struct timeval' has no member named 'tv_nsec'
gtimer.c:266: error: 'struct timeval' has no member named 'tv_nsec'
gtimer.c:270: error: 'struct timeval' has no member named 'tv_nsec'
gtimer.c:270: error: 'struct timeval' has no member named 'tv_nsec'
gtimer.c:270: error: 'struct timeval' has no member named 'tv_nsec'
gtimer.c:273: error: 'struct timeval' has no member named 'tv_nsec'
gtimer.c:282: error: 'struct timeval' has no member named 'tv_nsec'
make[2]: *** [gtimer.lo] Error 1
make[2]: Leaving directory `/home/wilhelm/glib-2.12.4/glib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/wilhelm/glib-2.12.4/glib'
make: *** [all] Error 2
wil
3. 


Stack trace:
Again the output of make, the problem is located in the function
gtimer.c. The parameter tv_sec is not recognized

 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -pthread -g -O2 -Wall -MT gthreadpool.lo -MD -MP -MF .deps/gthreadpool.Tpo -c gthreadpool.c  -fPIC -DPIC -o .libs/gthreadpool.o
gthreadpool.c: In function 'g_thread_pool_wait_for_new_pool':
gthreadpool.c:145: warning: passing argument 2 of 'g_async_queue_push' discards qualifiers from pointer target type
gthreadpool.c: In function 'g_thread_pool_set_max_unused_threads':
gthreadpool.c:781: warning: passing argument 2 of 'g_async_queue_push_unlocked' discards qualifiers from pointer target type
gthreadpool.c: In function 'g_thread_pool_set_max_idle_time':
gthreadpool.c:916: warning: passing argument 2 of 'g_async_queue_push_unlocked' discards qualifiers from pointer target type
if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION   -pthread  -g -O2 -Wall -MT gtimer.lo -MD -MP -MF ".deps/gtimer.Tpo" \
          -c -o gtimer.lo `test -f 'gtimer.c' || echo './'`gtimer.c; \
        then mv -f ".deps/gtimer.Tpo" ".deps/gtimer.Plo"; \
        else rm -f ".deps/gtimer.Tpo"; exit 1; \
        fi
 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -pthread -g -O2 -Wall -MT gtimer.lo -MD -MP -MF .deps/gtimer.Tpo -c gtimer.c  -fPIC -DPIC -o .libs/gtimer.o
gtimer.c: In function 'g_timer_elapsed':
gtimer.c:264: error: 'struct timeval' has no member named 'tv_nsec'
gtimer.c:264: error: 'struct timeval' has no member named 'tv_nsec'
gtimer.c:266: error: 'struct timeval' has no member named 'tv_nsec'
gtimer.c:270: error: 'struct timeval' has no member named 'tv_nsec'
gtimer.c:270: error: 'struct timeval' has no member named 'tv_nsec'
gtimer.c:270: error: 'struct timeval' has no member named 'tv_nsec'
gtimer.c:273: error: 'struct timeval' has no member named 'tv_nsec'
gtimer.c:282: error: 'struct timeval' has no member named 'tv_nsec'
make[2]: *** [gtimer.lo] Error 1
make[2]: Leaving directory `/home/wilhelm/glib-2.12.4/glib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/wilhelm/glib-2.12.4/glib'
make: *** [all] Error 2
wilhel


Other information:
I am using SUSE Linux, I have installed pkg-config, it is located
in /usr/local/bin

If a do a grep to tv_nsec like grep tv_nsec *
the parameter is NOT included in an include function *.h

The parameter seems to be UNKNOWN for the function


wilhelm@wim:~/glib-2.12.4/glib> grep tv_nsec *
aap:gtimer.c:  total = elapsed.tv_sec + ((gdouble) elapsed.tv_nsec / (gdouble) G_NSEC_PER_SEC);
aap:tmp1:gtimer.c:  total = elapsed.tv_sec + ((gdouble) elapsed.tv_nsec / (gdouble) G_NSEC_PER_SEC);
grep: glib-mirroring-tab: Is a directory
grep: gnulib: Is a directory
gtimer.c:  if (timer->start.tv_nsec > timer->end.tv_nsec)
gtimer.c:      timer->end.tv_nsec += G_NSEC_PER_SEC;
gtimer.c:  elapsed.tv_nsec = timer->end.tv_nsec - timer->start.tv_nsec;
gtimer.c:  if (timer->start.tv_nsec < elapsed.tv_nsec)
gtimer.c:      timer->start.tv_nsec += G_NSEC_PER_SEC;
gtimer.c:  timer->start.tv_nsec -= elapsed.tv_nsec;
gtimer.c:  if (timer->start.tv_nsec > timer->end.tv_nsec)
gtimer.c:      timer->end.tv_nsec += G_NSEC_PER_SEC;
gtimer.c:  elapsed.tv_nsec = timer->end.tv_nsec - timer->start.tv_nsec;
gtimer.c:  total = elapsed.tv_sec + ((gdouble) elapsed.tv_nsec / (gdouble) G_NSEC_PER_SEC);
gtimer.c:    *microseconds = elapsed.tv_nsec / 1000;
gtimer.c:  request.tv_nsec = 1000 * (microseconds % G_USEC_PER_SEC);
gtimer.c:  request.tv_nsec = 1000 * (microseconds % G_USEC_PER_SEC);
grep: libcharset: Is a directory
tmp1:gtimer.c:  total = elapsed.tv_sec + ((gdouble) elapsed.tv_nsec / (gdouble) G_NSEC_PER_SEC);
wilh
Comment 1 Michael Schumacher 2006-11-17 23:15:12 UTC
GIMP is not Glib. But you want to ask this on a mailing list anyway, Bugzilla is not a help forum.
Comment 2 j.abt 2006-11-21 15:01:30 UTC
Some problem on AIX 5.1 with xlc_r for 2.12.4.
Comment 3 Jens Granseuer 2006-12-04 14:26:42 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


*** This bug has been marked as a duplicate of 353694 ***