Build problem - Cygwin

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Build problem - Cygwin

Philip Peake
Since the only Cygwin binary seems to be quite old and out of date, I decided to try building on  Cygwin.

I have (as far as I know at this stage) all the requisite libraries installed, but don't get quite that far.

In the configure stage I see this warning:
Resolve Portability Issues
checking if msync with MS_ASYNC updates the files mtime... no
configure: WARNING: With mmap access, your platform fails to update the files
configure: WARNING: mtime. RRDtool will work around this problem by calling utime on each
configure: WARNING: file it opens for rw access.

Ok ...

Now when compiling I get this error:
  CC     rrd_open.lo
rrd_open.c:1: warning: -fPIC ignored for target (all code is position independent)
In file included from rrd_tool.h:57,
                 from rrd_open.c:9:
rrd_getopt.h:35: warning: ‘optarg’ redeclared without dllimport attribute: previous dllimport ignored
rrd_getopt.h:49: warning: ‘optind’ redeclared without dllimport attribute: previous dllimport ignored
rrd_getopt.h:54: warning: ‘opterr’ redeclared without dllimport attribute: previous dllimport ignored
rrd_getopt.h:58: warning: ‘optopt’ redeclared without dllimport attribute: previous dllimport ignored
rrd_open.c: In function ‘rrd_open’:
rrd_open.c:105: error: ‘MAP_FAILED’ undeclared (first use in this function)
rrd_open.c:105: error: (Each undeclared identifier is reported only once
rrd_open.c:105: error: for each function it appears in.)
rrd_open.c:153: error: ‘PROT_READ’ undeclared (first use in this function)
rrd_open.c:160: error: ‘MAP_PRIVATE’ undeclared (first use in this function)
rrd_open.c:169: error: ‘MAP_SHARED’ undeclared (first use in this function)
rrd_open.c:170: error: ‘PROT_WRITE’ undeclared (first use in this function)
rrd_open.c:248: warning: implicit declaration of function ‘mmap’
rrd_open.c:248: warning: nested extern declaration of ‘mmap’
rrd_open.c:250: warning: assignment makes pointer from integer without a cast
rrd_open.c:376: warning: implicit declaration of function ‘munmap’
rrd_open.c:376: warning: nested extern declaration of ‘munmap’
rrd_open.c:104: warning: unused variable ‘_page_size’
rrd_open.c: In function ‘rrd_close’:
rrd_open.c:559: warning: implicit declaration of function ‘msync’
rrd_open.c:559: warning: nested extern declaration of ‘msync’
rrd_open.c:559: error: ‘MS_ASYNC’ undeclared (first use in this function)
make[2]: *** [rrd_open.lo] Error 1
make[2]: Leaving directory `/home/Philip/rrdtool-src/rrdtool-1.4.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Philip/rrdtool-src/rrdtool-1.4.4'
make: *** [all] Error 2

Anyone successfully built on Cygwin and have any pointers to resolving these errors?

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Build problem - Cygwin

oetiker
Administrator
Hi Philip,

Today Philip Peake wrote:

>     rrd_open.c:105: error: 'MAP_FAILED' undeclared (first use in this
>     function)

> Anyone successfully built on Cygwin and have any pointers to resolving
> these errors?

try building without mmap support

cheers
tobi

>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Build problem - Cygwin

Philip Peake
On 9/14/2010 7:57 AM, Tobias Oetiker wrote:
Hi Philip,

Today Philip Peake wrote:

    rrd_open.c:105: error: 'MAP_FAILED' undeclared (first use in this
    function)

      
Anyone successfully built on Cygwin and have any pointers to resolving
these errors
try building without mmap support

cheers
tobi


That gets me a little further. BTW, there are a couple of header file where there is a define possible to include sys/mman.h, neither seem to have been set by Confgure.

Anyway ... gets much further. Died trying to build tcl bindings. Since I am not about to use those, I added the flag to drop those.
Now it fails trying to build lua bindings. the cause seem to be the same:
  CC     librrd_th_la-rrd_thread_safe.lo
In file included from rrd_tool.h:57,
                 from rrd_thread_safe.c:16:
rrd_getopt.h:35: warning: ‘optarg’ redeclared without dllimport attribute: previous dllimport ignored
rrd_getopt.h:49: warning: ‘optind’ redeclared without dllimport attribute: previous dllimport ignored
rrd_getopt.h:54: warning: ‘opterr’ redeclared without dllimport attribute: previous dllimport ignored
rrd_getopt.h:58: warning: ‘optopt’ redeclared without dllimport attribute: previous dllimport ignored
  CCLD   librrd_th.la
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries


...

  CCLD   rrd.la

*** Warning: This system can not link to static lib archive /home/Philip/rrdtool-src/rrdtool-1.4.4/src/.libs/librrd.la.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** But as you try to build a module library, libtool will still create
*** a static module, that should work as long as the dlopening application
*** is linked with the -dlopen flag to resolve symbols at runtime.
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries


...

g++  --shared  -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib -fstack-protector RRDs.o -L../../src/.libs/  -lrrd  -o blib/arch/auto/RRDs/RRDs.dll   \
          /usr/lib/perl5/5.10/i686-cygwin/CORE/cygperl5_10.dll          \
         
../../src/.libs//librrd.a(rrd_graph.o): In function `rrd_set_font_desc':
/home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4006: undefined reference to `_pango_font_description_from_string'
../../src/.libs//librrd.a(rrd_graph.o): In function `rrd_graph_options':
/home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4586: undefined reference to `_cairo_font_options_set_antialias'
/home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4588: undefined reference to `_cairo_font_options_set_hint_style'
/home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4581: undefined reference to `_cairo_font_options_set_antialias'
/home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4583: undefined reference to `_cairo_font_options_set_hint_style'
/home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4644: undefined reference to `_pango_layout_get_context'
/home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4644: undefined reference to `_pango_cairo_context_set_font_options'
/home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4645: undefined reference to `_pango_layout_context_changed'


... etc.

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Build problem - Cygwin

oetiker
Administrator
Hi Philip,

you are using the latest rrdtool version ? maybe even the snapshot?

cheers
tobi

Today Philip Peake wrote:

>  On 9/14/2010 7:57 AM, Tobias Oetiker wrote:
> > Hi Philip,
> >
> > Today Philip Peake wrote:
> >
> >>     rrd_open.c:105: error: 'MAP_FAILED' undeclared (first use in this
> >>     function)
> >> Anyone successfully built on Cygwin and have any pointers to resolving
> >> these errors
> > try building without mmap support
> >
> > cheers
> > tobi
> >
>
> That gets me a little further. BTW, there are a couple of header file
> where there is a define possible to include sys/mman.h, neither seem to
> have been set by Confgure.
>
> Anyway ... gets much further. Died trying to build tcl bindings. Since I
> am not about to use those, I added the flag to drop those.
> Now it fails trying to build lua bindings. the cause seem to be the same:
>
>       CC     librrd_th_la-rrd_thread_safe.lo
>     In file included from rrd_tool.h:57,
>                      from rrd_thread_safe.c:16:
>     rrd_getopt.h:35: warning: 'optarg' redeclared without dllimport
>     attribute: previous dllimport ignored
>     rrd_getopt.h:49: warning: 'optind' redeclared without dllimport
>     attribute: previous dllimport ignored
>     rrd_getopt.h:54: warning: 'opterr' redeclared without dllimport
>     attribute: previous dllimport ignored
>     rrd_getopt.h:58: warning: 'optopt' redeclared without dllimport
>     attribute: previous dllimport ignored
>       CCLD   librrd_th.la
>     libtool: link: warning: undefined symbols not allowed in
>     i686-pc-cygwin shared libraries
>
>     ...
>
>       CCLD   rrd.la
>
>     *** Warning: This system can not link to static lib archive
>     /home/Philip/rrdtool-src/rrdtool-1.4.4/src/.libs/librrd.la.
>     *** I have the capability to make that library automatically link in
>     when
>     *** you link to this library.  But I can only do this if you have a
>     *** shared version of the library, which you do not appear to have.
>     *** But as you try to build a module library, libtool will still create
>     *** a static module, that should work as long as the dlopening
>     application
>     *** is linked with the -dlopen flag to resolve symbols at runtime.
>     libtool: link: warning: undefined symbols not allowed in
>     i686-pc-cygwin shared libraries
>
>     ...
>
>     g++  --shared  -Wl,--enable-auto-import -Wl,--export-all-symbols
>     -Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib
>     -fstack-protector RRDs.o -L../../src/.libs/  -lrrd  -o
>     blib/arch/auto/RRDs/RRDs.dll   \
>
>     /usr/lib/perl5/5.10/i686-cygwin/CORE/cygperl5_10.dll          \
>
>     ../../src/.libs//librrd.a(rrd_graph.o): In function `rrd_set_font_desc':
>     /home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4006:
>     undefined reference to `_pango_font_description_from_string'
>     ../../src/.libs//librrd.a(rrd_graph.o): In function `rrd_graph_options':
>     /home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4586:
>     undefined reference to `_cairo_font_options_set_antialias'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4588:
>     undefined reference to `_cairo_font_options_set_hint_style'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4581:
>     undefined reference to `_cairo_font_options_set_antialias'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4583:
>     undefined reference to `_cairo_font_options_set_hint_style'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4644:
>     undefined reference to `_pango_layout_get_context'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4644:
>     undefined reference to `_pango_cairo_context_set_font_options'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4/src/rrd_graph.c:4645:
>     undefined reference to `_pango_layout_context_changed'
>
>     ... etc.
>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Build problem - Cygwin

A Darren Dunham
In reply to this post by Philip Peake
On Tue, Sep 14, 2010 at 07:50:52AM -0700, Philip Peake wrote:
>  Since the only Cygwin binary seems to be quite old and out of date, I
> decided to try building on  Cygwin.
>
> I have (as far as I know at this stage) all the requisite libraries
> installed, but don't get quite that far.

I have no specific answers for you, but I want to give you my
encouragement!  Thanks!

I spent about an hour and a half a few months ago poking at it and
couldn't make much headway, but then it's been a long time since I've
worked on a task like that.  There's a lot of folks that would enjoy
being able to run it easily under cygwin.

Good luck!

--
Darren

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Build problem - Cygwin

Philip Peake
 On 9/14/2010 9:21 AM, A Darren Dunham wrote:

> On Tue, Sep 14, 2010 at 07:50:52AM -0700, Philip Peake wrote:
>>  Since the only Cygwin binary seems to be quite old and out of date, I
>> decided to try building on  Cygwin.
>>
>> I have (as far as I know at this stage) all the requisite libraries
>> installed, but don't get quite that far.
> I have no specific answers for you, but I want to give you my
> encouragement!  Thanks!
>
> I spent about an hour and a half a few months ago poking at it and
> couldn't make much headway, but then it's been a long time since I've
> worked on a task like that.  There's a lot of folks that would enjoy
> being able to run it easily under cygwin.
>
> Good luck!
>
:-)

I will spend some time on this, but don't have a lot of time to dedicate.
I will try the snapshot that tobi pointed to next.

Philip

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Build problem - Cygwin

TheWitness
In reply to this post by A Darren Dunham
The Cairo-pango is/or was not at the right level last time I checked.  I could try it again.  Well, if I get time....

Regards,

Larry Adams
aka TheWitness
http://www.cacti.net

----- Original Message -----
From: "A Darren Dunham" <[hidden email]>
To: [hidden email]
Sent: Tuesday, September 14, 2010 12:21:18 PM
Subject: Re: [rrd-users] Build problem - Cygwin

On Tue, Sep 14, 2010 at 07:50:52AM -0700, Philip Peake wrote:
>  Since the only Cygwin binary seems to be quite old and out of date, I
> decided to try building on  Cygwin.
>
> I have (as far as I know at this stage) all the requisite libraries
> installed, but don't get quite that far.

I have no specific answers for you, but I want to give you my
encouragement!  Thanks!

I spent about an hour and a half a few months ago poking at it and
couldn't make much headway, but then it's been a long time since I've
worked on a task like that.  There's a lot of folks that would enjoy
being able to run it easily under cygwin.

Good luck!

--
Darren

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Build problem - Cygwin

oetiker
Administrator
In reply to this post by oetiker
Hi Philip,

not sure, but could it be that in cygwin mode, somehow the
dependencies for 3rd party libraries get lost ? in the exammple
above, -lrrd_th (although I would actually use -lrrd) should know
that it has to pull in pango, cairo, freetype, libxml ...

cheers
tobi


 Yesterday Philip Peake wrote:

>  On 9/14/2010 9:17 AM, Tobias Oetiker wrote:
> > Hi Philip,
> >
> > Today Philip Peake wrote:
> >
> >>  1.4.4 - downloaded from your website this morning.
> > Try the 1.4 snapshot ...
> >
> >
> Trying with rrdtool-1.4-svn-snap.tar.gz  rrdtool-1.4.4.002129
>
> Basic first attempt,
>
>  ./Configure
>  make
>
> Same as stable release - barfs on mmap defines.
> Notice that configure doesn't explicitly check for sys/mman.h
>
> Next try with --disable-mmap (and --prefix=/usr/local --- I can't see
> that upsetting much)
>
> ------------
>
> Same result - dies with unresolved symbols when building bindings (tcl
> is first).
>
> Its trying to build a shared library when it fails:
>
>     gcc -shared -g -O2 -D_GNU_SOURCE -fno-strict-aliasing -Wall
>     -std=gnu99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align
>     -Wmissing-prototypes -Wmissing-declarations -Wnested-externs
>     -Winline -Wold-style-definition -W  -DDLL_EXPORT -DPIC
>     -L../../src/.libs -L../../src -L/usr/local/lib tclrrd.o -o
>     tclrrd1.4.4.002129.dll -lrrd_th -lm -ltclstub84
>     ../../src/.libs/librrd_th.a(librrd_th_la-rrd_graph.o): In function
>     `rrd_set_font_desc':
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4016:
>     undefined reference to `_pango_font_description_free'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4017:
>     undefined reference to `_pango_font_description_from_string'
>     ../../src/.libs/librrd_th.a(librrd_th_la-rrd_graph.o): In function
>     `rrd_graph_options':
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4599:
>     undefined reference to `_cairo_font_options_set_antialias'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4601:
>     undefined reference to `_cairo_font_options_set_hint_style'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4594:
>     undefined reference to `_cairo_font_options_set_antialias'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4596:
>     undefined reference to `_cairo_font_options_set_hint_style'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4657:
>     undefined reference to `_pango_layout_get_context'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4657:
>     undefined reference to `_pango_cairo_context_set_font_options'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4658:
>     undefined reference to `_pango_layout_context_changed'
>     ../../src/.libs/librrd_th.a(librrd_th_la-rrd_graph.o): In function
>     `rrd_graph_init':
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4047:
>     undefined reference to `_cairo_font_options_create'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4105:
>     undefined reference to `_cairo_image_surface_create'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4106:
>     undefined reference to `_cairo_create'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4118:
>     undefined reference to `_pango_cairo_font_map_create_context'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4120:
>     undefined reference to `_pango_cairo_context_set_resolution'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4122:
>     undefined reference to `_pango_cairo_update_context'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4124:
>     undefined reference to `_pango_layout_new'
>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4125:
>     undefined reference to `_g_object_unref'
>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Build problem - Cygwin

Philip Peake
 Well, the dependencies should be explicit in the makefile - no?

Similarly, the choice between the rrd and rrd_th libs isn't one that I
make, its the configure/make process that determines that.
(I don't even know the difference between the two).

Is the Cygwin build config something you did, or was it contributed??

Philip

------
On 9/14/2010 9:26 PM, Tobias Oetiker wrote:

> Hi Philip,
>
> not sure, but could it be that in cygwin mode, somehow the
> dependencies for 3rd party libraries get lost ? in the exammple
> above, -lrrd_th (although I would actually use -lrrd) should know
> that it has to pull in pango, cairo, freetype, libxml ...
>
> cheers
> tobi
>
>
>  Yesterday Philip Peake wrote:
>
>>  On 9/14/2010 9:17 AM, Tobias Oetiker wrote:
>>> Hi Philip,
>>>
>>> Today Philip Peake wrote:
>>>
>>>>  1.4.4 - downloaded from your website this morning.
>>> Try the 1.4 snapshot ...
>>>
>>>
>> Trying with rrdtool-1.4-svn-snap.tar.gz  rrdtool-1.4.4.002129
>>
>> Basic first attempt,
>>
>>  ./Configure
>>  make
>>
>> Same as stable release - barfs on mmap defines.
>> Notice that configure doesn't explicitly check for sys/mman.h
>>
>> Next try with --disable-mmap (and --prefix=/usr/local --- I can't see
>> that upsetting much)
>>
>> ------------
>>
>> Same result - dies with unresolved symbols when building bindings (tcl
>> is first).
>>
>> Its trying to build a shared library when it fails:
>>
>>     gcc -shared -g -O2 -D_GNU_SOURCE -fno-strict-aliasing -Wall
>>     -std=gnu99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align
>>     -Wmissing-prototypes -Wmissing-declarations -Wnested-externs
>>     -Winline -Wold-style-definition -W  -DDLL_EXPORT -DPIC
>>     -L../../src/.libs -L../../src -L/usr/local/lib tclrrd.o -o
>>     tclrrd1.4.4.002129.dll -lrrd_th -lm -ltclstub84
>>     ../../src/.libs/librrd_th.a(librrd_th_la-rrd_graph.o): In function
>>     `rrd_set_font_desc':
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4016:
>>     undefined reference to `_pango_font_description_free'
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4017:
>>     undefined reference to `_pango_font_description_from_string'
>>     ../../src/.libs/librrd_th.a(librrd_th_la-rrd_graph.o): In function
>>     `rrd_graph_options':
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4599:
>>     undefined reference to `_cairo_font_options_set_antialias'
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4601:
>>     undefined reference to `_cairo_font_options_set_hint_style'
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4594:
>>     undefined reference to `_cairo_font_options_set_antialias'
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4596:
>>     undefined reference to `_cairo_font_options_set_hint_style'
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4657:
>>     undefined reference to `_pango_layout_get_context'
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4657:
>>     undefined reference to `_pango_cairo_context_set_font_options'
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4658:
>>     undefined reference to `_pango_layout_context_changed'
>>     ../../src/.libs/librrd_th.a(librrd_th_la-rrd_graph.o): In function
>>     `rrd_graph_init':
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4047:
>>     undefined reference to `_cairo_font_options_create'
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4105:
>>     undefined reference to `_cairo_image_surface_create'
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4106:
>>     undefined reference to `_cairo_create'
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4118:
>>     undefined reference to `_pango_cairo_font_map_create_context'
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4120:
>>     undefined reference to `_pango_cairo_context_set_resolution'
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4122:
>>     undefined reference to `_pango_cairo_update_context'
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4124:
>>     undefined reference to `_pango_layout_new'
>>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4125:
>>     undefined reference to `_g_object_unref'
>>
>>

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Build problem - Cygwin

oetiker
Administrator
Hi Philip,

Today Philip Peake wrote:

>  Well, the dependencies should be explicit in the makefile - no?

te dependencies are, but normally the generated library (librrd.so)
knows what its dependencies are, so when you link -lrrd you do not
need to link the other dependencies as well because librrd will
pull them in automatically.

> Similarly, the choice between the rrd and rrd_th libs isn't one that I
> make, its the configure/make process that determines that.
> (I don't even know the difference between the two).

rrd_th is for multithreaded use ... but you are right, in the tcl
bindings, they actually do use rrd_th, so this should be fine ...

> Is the Cygwin build config something you did, or was it contributed??

this was contributed, or I would be better able to help you ...
I do not realy use windows for server tasks, so my experiance is
rather anectotal in the area ... but if you want to sponsor a
project, I will be glad to conquer the beast for you :-)

cheers
tobi


> Philip
>
> ------
> On 9/14/2010 9:26 PM, Tobias Oetiker wrote:
> > Hi Philip,
> >
> > not sure, but could it be that in cygwin mode, somehow the
> > dependencies for 3rd party libraries get lost ? in the exammple
> > above, -lrrd_th (although I would actually use -lrrd) should know
> > that it has to pull in pango, cairo, freetype, libxml ...
> >
> > cheers
> > tobi
> >
> >
> >  Yesterday Philip Peake wrote:
> >
> >>  On 9/14/2010 9:17 AM, Tobias Oetiker wrote:
> >>> Hi Philip,
> >>>
> >>> Today Philip Peake wrote:
> >>>
> >>>>  1.4.4 - downloaded from your website this morning.
> >>> Try the 1.4 snapshot ...
> >>>
> >>>
> >> Trying with rrdtool-1.4-svn-snap.tar.gz  rrdtool-1.4.4.002129
> >>
> >> Basic first attempt,
> >>
> >>  ./Configure
> >>  make
> >>
> >> Same as stable release - barfs on mmap defines.
> >> Notice that configure doesn't explicitly check for sys/mman.h
> >>
> >> Next try with --disable-mmap (and --prefix=/usr/local --- I can't see
> >> that upsetting much)
> >>
> >> ------------
> >>
> >> Same result - dies with unresolved symbols when building bindings (tcl
> >> is first).
> >>
> >> Its trying to build a shared library when it fails:
> >>
> >>     gcc -shared -g -O2 -D_GNU_SOURCE -fno-strict-aliasing -Wall
> >>     -std=gnu99 -pedantic -Wundef -Wshadow -Wpointer-arith -Wcast-align
> >>     -Wmissing-prototypes -Wmissing-declarations -Wnested-externs
> >>     -Winline -Wold-style-definition -W  -DDLL_EXPORT -DPIC
> >>     -L../../src/.libs -L../../src -L/usr/local/lib tclrrd.o -o
> >>     tclrrd1.4.4.002129.dll -lrrd_th -lm -ltclstub84
> >>     ../../src/.libs/librrd_th.a(librrd_th_la-rrd_graph.o): In function
> >>     `rrd_set_font_desc':
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4016:
> >>     undefined reference to `_pango_font_description_free'
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4017:
> >>     undefined reference to `_pango_font_description_from_string'
> >>     ../../src/.libs/librrd_th.a(librrd_th_la-rrd_graph.o): In function
> >>     `rrd_graph_options':
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4599:
> >>     undefined reference to `_cairo_font_options_set_antialias'
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4601:
> >>     undefined reference to `_cairo_font_options_set_hint_style'
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4594:
> >>     undefined reference to `_cairo_font_options_set_antialias'
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4596:
> >>     undefined reference to `_cairo_font_options_set_hint_style'
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4657:
> >>     undefined reference to `_pango_layout_get_context'
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4657:
> >>     undefined reference to `_pango_cairo_context_set_font_options'
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4658:
> >>     undefined reference to `_pango_layout_context_changed'
> >>     ../../src/.libs/librrd_th.a(librrd_th_la-rrd_graph.o): In function
> >>     `rrd_graph_init':
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4047:
> >>     undefined reference to `_cairo_font_options_create'
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4105:
> >>     undefined reference to `_cairo_image_surface_create'
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4106:
> >>     undefined reference to `_cairo_create'
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4118:
> >>     undefined reference to `_pango_cairo_font_map_create_context'
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4120:
> >>     undefined reference to `_pango_cairo_context_set_resolution'
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4122:
> >>     undefined reference to `_pango_cairo_update_context'
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4124:
> >>     undefined reference to `_pango_layout_new'
> >>     /home/Philip/rrdtool-src/rrdtool-1.4.4.002129/src/rrd_graph.c:4125:
> >>     undefined reference to `_g_object_unref'
> >>
> >>
>
>

--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [hidden email] ++41 62 775 9902 / sb: -9900

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: Build problem - Cygwin

jphilaire
This post has NOT been accepted by the mailing list yet.
In reply to this post by Philip Peake
Philip Peake wrote
...

Now when compiling I get this error:

      CC     rrd_open.lo
    rrd_open.c:1: warning: -fPIC ignored for target (all code is
    position independent)
    In file included from rrd_tool.h:57,
                     from rrd_open.c:9:
    rrd_getopt.h:35: warning: 'optarg' redeclared without dllimport
    attribute: previous dllimport ignored
    rrd_getopt.h:49: warning: 'optind' redeclared without dllimport
    attribute: previous dllimport ignored
    rrd_getopt.h:54: warning: 'opterr' redeclared without dllimport
    attribute: previous dllimport ignored
    rrd_getopt.h:58: warning: 'optopt' redeclared without dllimport
    attribute: previous dllimport ignored
    rrd_open.c: In function 'rrd_open':
    rrd_open.c:105: error: 'MAP_FAILED' undeclared (first use in this
    function)
    rrd_open.c:105: error: (Each undeclared identifier is reported only once
    rrd_open.c:105: error: for each function it appears in.)
    rrd_open.c:153: error: 'PROT_READ' undeclared (first use in this
    function)
    rrd_open.c:160: error: 'MAP_PRIVATE' undeclared (first use in this
    function)
    rrd_open.c:169: error: 'MAP_SHARED' undeclared (first use in this
    function)
    rrd_open.c:170: error: 'PROT_WRITE' undeclared (first use in this
    function)
    rrd_open.c:248: warning: implicit declaration of function 'mmap'
    rrd_open.c:248: warning: nested extern declaration of 'mmap'
    rrd_open.c:250: warning: assignment makes pointer from integer
    without a cast
    rrd_open.c:376: warning: implicit declaration of function 'munmap'
    rrd_open.c:376: warning: nested extern declaration of 'munmap'
    rrd_open.c:104: warning: unused variable '_page_size'
    rrd_open.c: In function 'rrd_close':
    rrd_open.c:559: warning: implicit declaration of function 'msync'
    rrd_open.c:559: warning: nested extern declaration of 'msync'
    rrd_open.c:559: error: 'MS_ASYNC' undeclared (first use in this
    function)
    make[2]: *** [rrd_open.lo] Error 1
    make[2]: Leaving directory `/home/Philip/rrdtool-src/rrdtool-1.4.4/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/Philip/rrdtool-src/rrdtool-1.4.4'
    make: *** [all] Error 2

Anyone successfully built on Cygwin and have any pointers to resolving
these errors?
Hi Philip,

To compile on Cygwin the lastest version (currently 1.4.7), you have to install the following packages from the Cygwin setup tool:

Packages needed :
   - cygwin: The UNIX emulation engine (+ sources) -> needed for the mmap
   - libxml2 & libxml2-devel
   - libpango1.0_0 & libpango1.0-devel
   - libcairo2 & libcairo-devel
   - libpng1.4 & libpng1.4-devel
   - libglib2.0_0 & libglib2.0-devel
   - gobject-introspection
   - girepository-GLib2.0: GLib GOjbectIntrospection data (???)
   - pkg-config

Update source file: src/rrd_open.c

add the line:

#include <sys/mman.h>

All undefined symbol (MAP_PRIVATE, ...) are defined in the mman.h header file.

Update the file : rrdtool-1.4.7\bindings\perl-shared\Makefile.PL


  $librrd = "-L../../src/.libs/ $R -lrrd";

to :

  $librrd = "-L../../src/.libs/ $R -lrrd -lxml2 -lpango-1.0 -lcairo -lpangocairo-1.0 -lpng -lglib-2.0 -lgobject-2.0";


Update the file : rrdtool-1.4.7\bindings\python\setup.py

    libraries=['rrd'],

to :

    libraries=['rrd', 'xml2', 'pango-1.0', 'cairo', 'pangocairo-1.0', 'png', 'glib-2.0', 'gobject-2.0'],

Now, you are ready to compile it !

./configure
make
make install

$ /opt/rrdtool-1.4.7/bin/rrdtool.exe --version
RRDtool 1.4.7  Copyright 1997-2012 by Tobias Oetiker <tobi@oetiker.ch>
               Compiled Jun 22 2012 22:11:47
...

Hope it can help.

Jean-Philippe Hilaire