Missing g_object_unref

Vlado v.99cygwin@gmail.com
Sun Apr 2 12:17:00 GMT 2017


On 2.4.2017 11:47, Vlado wrote:
> Hello.
>
> Can somebody give advice what library defines g_object_unref function 
> call, please?
> I use x86_64 Cygwin.
>
> I would like to build rrdtool 1.6.0. Building it as Windows native app 
> is near impossible. Building it in Cygwin is much less pain and I hope 
> the "undefined reference to `g_object_unref'" is the last obstacle.
> In Debian I found that g_object_unref is defined in libgobject-2.0.a, 
> but there is no library libgobject-2.0.a in Cygwin.
>
> Vlado
>
>
Answer is: Library libgobject-2.0.dll.a is a part of libglib2.0-devel.

I have installed libglib2.0-devel version 2.50.3-1 now, I added 
-llibglib-2.0 -llibgobject-2.0 to LIBS and still have

Making all in src
make[1]: Entering directory '/usr/src/rrdtool-1.6.0/src'
make  all-am
make[2]: Entering directory '/usr/src/rrdtool-1.6.0/src'
   CCLD     rrdtool.exe
./.libs/librrd.a(librrd_la-rrd_graph.o):rrd_graph.c:(.text+0xcb2): 
undefined reference to `g_object_unref'
./.libs/librrd.a(librrd_la-rrd_graph.o):rrd_graph.c:(.text+0xcb2): 
relocation truncated to fit: R_X86_64_PC32 against undefined symbol 
`g_object_unref'
./.libs/librrd.a(librrd_la-rrd_graph.o):rrd_graph.c:(.text+0x14023): 
undefined reference to `g_object_unref'
./.libs/librrd.a(librrd_la-rrd_graph.o):rrd_graph.c:(.text+0x14023): 
relocation truncated to fit: R_X86_64_PC32 against undefined symbol 
`g_object_unref'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:715: rrdtool.exe] Error 1
make[2]: Leaving directory '/usr/src/rrdtool-1.6.0/src'
make[1]: *** [Makefile:552: all] Error 2
make[1]: Leaving directory '/usr/src/rrdtool-1.6.0/src'
make: *** [Makefile:557: all-recursive] Error 1

Investigating objects in libgobject-2.0:

$ nm --print-file-name --defined-only lib-extract/libgobject-2.0/* | 
grep -F g_object_unref
d000165.o:0000000000000000 I __imp_g_object_unref
d000165.o:0000000000000000 T g_object_unref

"T" means symbol is defined in TEXT (code).

Is the "undefined reference to `g_object_unref'" result of "relocation 
truncated to fit"?



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list