New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling from git master on Mac OS error: 'cpu_temp_retry_max' undeclared #828

Closed
njh opened this Issue Nov 30, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@njh
Contributor

njh commented Nov 30, 2014

Hello,

I am now seeing this error when compiling on Mac OS X, with the CPU plugin enabled:

cpu.c: In function 'init':
cpu.c:235: error: 'cpu_temp_retry_max' undeclared (first use in this function)
cpu.c:235: error: (Each undeclared identifier is reported only once
cpu.c:235: error: for each function it appears in.)

I am not sure what the cpu_temp_retry_max variable is actually for. There is no reference to it anywhere else in the codebase and Google only finds references to it in collectd codebase. Deleting the line fixes compilation.

@mfournier

This comment has been minimized.

Show comment
Hide comment
@mfournier

mfournier Nov 30, 2014

Contributor

Mmh, last week I merged the bugfix branches into master. There was this merge conflict I had to solve on cpu.c involving f710030. I possibly screw up, or maybe f710030 was incomplete.

Could you please try building the collectd-5.3 branch, as you seem to have an OS X ?

My feeling, considering the purpose of f710030, is that anything related to temperature on OS X should be deleted from cpu.c.

Contributor

mfournier commented Nov 30, 2014

Mmh, last week I merged the bugfix branches into master. There was this merge conflict I had to solve on cpu.c involving f710030. I possibly screw up, or maybe f710030 was incomplete.

Could you please try building the collectd-5.3 branch, as you seem to have an OS X ?

My feeling, considering the purpose of f710030, is that anything related to temperature on OS X should be deleted from cpu.c.

@mfournier mfournier self-assigned this Nov 30, 2014

@njh

This comment has been minimized.

Show comment
Hide comment
@njh

njh Nov 30, 2014

Contributor

Yes, sorry same problem with collectd-5.3 branch.

cpu.c: In function 'init':
cpu.c:160: error: 'cpu_temp_retry_max' undeclared (first use in this function)
cpu.c:160: error: (Each undeclared identifier is reported only once
cpu.c:160: error: for each function it appears in.)
make[3]: *** [cpu_la-cpu.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
~/Projects/collectd(collectd-5.3) $ 

Deleting this line fixes the build:

cpu_temp_retry_max = 86400 / CDTIME_T_TO_TIME_T (plugin_get_interval ());
Contributor

njh commented Nov 30, 2014

Yes, sorry same problem with collectd-5.3 branch.

cpu.c: In function 'init':
cpu.c:160: error: 'cpu_temp_retry_max' undeclared (first use in this function)
cpu.c:160: error: (Each undeclared identifier is reported only once
cpu.c:160: error: for each function it appears in.)
make[3]: *** [cpu_la-cpu.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
~/Projects/collectd(collectd-5.3) $ 

Deleting this line fixes the build:

cpu_temp_retry_max = 86400 / CDTIME_T_TO_TIME_T (plugin_get_interval ());

mfournier added a commit that referenced this issue Dec 1, 2014

cpu: remove legacy assignment to undefiend variable
This finishes up the cleanup done by f710030. It also fixes #828
(build error on Mac OS).

Many thanks to @njh for pointing that out !
@mfournier

This comment has been minimized.

Show comment
Hide comment
@mfournier

mfournier Dec 1, 2014

Contributor

Closed via 9f5ea03. Thanks a lot Nicholas ! The patch will eventually be merged into master, but currently is only applied to the collectd-5.3 bugfix branch.

Contributor

mfournier commented Dec 1, 2014

Closed via 9f5ea03. Thanks a lot Nicholas ! The patch will eventually be merged into master, but currently is only applied to the collectd-5.3 bugfix branch.

@mfournier mfournier closed this Dec 1, 2014

arielshaqed added a commit to arielshaqed/collectd that referenced this issue Jan 27, 2015

Squashed commit of the following:
commit 778a811
Author: Ariel Shaqed (Scolnicov) <arielshaqed@google.com>
Date:   Mon Jan 26 10:27:54 2015 +0200

    Add tcp_connections_perf types: perf_smoothed_rtt gauge

commit 775ac90
Author: Ariel Shaqed (Scolnicov) <arielshaqed@google.com>
Date:   Mon Jan 26 10:25:31 2015 +0200

    Fix compilation when tcp_diag interface *not* available.

commit d2728b2
Author: Ariel Shaqed (Scolnicov) <arielshaqed@google.com>
Date:   Mon Jan 26 10:05:52 2015 +0200

    Update collectd.conf documentation.

commit 047be81
Author: Ariel Shaqed (Scolnicov) <arielshaqed@google.com>
Date:   Tue Jan 13 16:39:46 2015 +0200

    "Last ACK sent" not filled by kernel, can't use it to check liveness

commit ea7190b
Author: Ariel Shaqed (Scolnicov) <arielshaqed@google.com>
Date:   Tue Jan 13 16:01:43 2015 +0200

    New TCPConns option "ConnectionsAgeLimitSecs"

    Reports statistics only from newer connections.

commit e5413d7
Merge: 31582c4 7af18f5
Author: arielshaqed <arielshaqed@users.noreply.github.com>
Date:   Thu Jan 8 15:27:32 2015 +0200

    Merge pull request #1 from collectd/master

    Pull collectd/collectd

commit 7af18f5
Merge: ca316d9 c40bed7
Author: Pierre-Yves Ritschard <pyr@spootnik.org>
Date:   Thu Jan 8 10:14:48 2015 +0100

    Merge pull request #870 from ifesdjeen/bugfix/absolute-in-multivalue-dispatch

    Change "plugin_dispatch_multivalue" to accept any metric type.

commit ca316d9
Merge: 681a607 ecbcaad
Author: Marc Fournier <marc.fournier@camptocamp.com>
Date:   Thu Jan 8 00:18:57 2015 +0100

    Merge branch 'collectd-5.4'

commit ecbcaad
Merge: 6c72fa0 443afca
Author: Marc Fournier <marc.fournier@camptocamp.com>
Date:   Thu Jan 8 00:17:37 2015 +0100

    Merge branch 'collectd-5.3' into collectd-5.4

commit 443afca
Merge: 7e86633 631874e
Author: Marc Fournier <marc.fournier@camptocamp.com>
Date:   Wed Jan 7 23:32:21 2015 +0100

    Merge branch 'collectd-4.10' into collectd-5.3

commit 7e86633
Author: Manuel Luis Sanmartin Rozada <manuel.luis@gmail.com>
Date:   Mon Mar 31 21:08:05 2014 +0200

    Fix check for htonll in configure.ac

commit 681a607
Merge: 359b83c 49193e9
Author: Pierre-Yves Ritschard <pyr@spootnik.org>
Date:   Wed Jan 7 11:42:04 2015 +0100

    Merge pull request #847 from mihu/bind_zone_fix

    bind-plugin: fix zones iteratation upper limit

commit 631874e
Author: Marc Fournier <marc.fournier@camptocamp.com>
Date:   Wed Dec 31 14:54:37 2014 +0100

    types_list: fix carriage return sign

    Many thanks to @NsLib for mentioning this !

commit ba55ad9
Author: Marc Fournier <marc.fournier@camptocamp.com>
Date:   Tue Dec 23 12:59:44 2014 +0100

    RPM specfile: avoid packaging some files twice

    Fixes #874

commit 3acf4aa
Author: Yoga Ramalingam <yramalingam1@bloomberg.net>
Date:   Mon Dec 8 13:09:47 2014 -0500

    configure: Fixed check for AM_PATH_LIBCCRYPT

commit c40bed7
Author: Alex Petrov <oleksandr.petrov@gmail.com>
Date:   Wed Dec 17 12:43:24 2014 +0100

    Change "plugin_dispatch_multivalue" to accept any metric type.

    Currently, "plugin_dispatch_multivalue" works only with
    "gauge_t" metric type. This commit changes it to accept a
    "store_type" (one of "DS_TYPE_{GAUGE|COUTNTER|ABSOLUTE|DERIVE}").

commit 31582c4
Author: Ariel Shaqed (Scolnicov) <arielshaqed@google.com>
Date:   Wed Dec 17 13:42:35 2014 +0200

    Support ReportByPorts, ReportByConnections

    Default ReportByPorts is true, default ReportByConnections is false.
    So running just TcpConns yields exactly the same behaviour.

commit c33be83
Author: Ariel Shaqed (Scolnicov) <arielshaqed@google.com>
Date:   Wed Dec 17 13:17:22 2014 +0200

    Report per-connection TCP state.

commit e9272e2
Author: Ariel Shaqed (Scolnicov) <arielshaqed@google.com>
Date:   Wed Dec 17 11:44:43 2014 +0200

    Merge tcpconns plugin with per-connection RTT reporting.

commit b8f53c8
Author: Marc Fournier <marc.fournier@camptocamp.com>
Date:   Mon Dec 15 16:10:41 2014 +0100

    collectd.conf example: remove erroneous quotes

    Thanks to @ymettier for pointing that out !

commit c1318b0
Merge: e86ddf6 7d6d1fa
Author: Marc Fournier <marc.fournier@camptocamp.com>
Date:   Fri Dec 12 23:13:15 2014 +0100

    Merge branch 'collectd-4.10' into collectd-5.3

    Conflicts:
    	src/libvirt.c

commit 7d6d1fa
Author: Ruben Kerkhof <ruben@rubenkerkhof.com>
Date:   Tue Dec 9 17:06:43 2014 +0100

    virt plugin: only gather stats for running domains

    Conflicts:
    	src/libvirt.c

commit 49193e9
Author: Michal Humpula <michal.humpula@heureka.cz>
Date:   Tue Dec 9 13:08:36 2014 +0100

    bind-plugin: fix zones iteratation upper limit

commit 6c72fa0
Author: Marc Fournier <marc.fournier@camptocamp.com>
Date:   Fri Dec 5 13:52:09 2014 +0100

    redhat initscript: move restart block to a function

    This ensures the "condrestart" option will work.

commit f6c89c1
Author: Marc Fournier <marc.fournier@camptocamp.com>
Date:   Wed Dec 3 16:15:28 2014 +0100

    netlink: ensure size_t portability in DEBUG() statement

    This prevents the following error when building on 32bit systems with
    gcc 4.7.2:

    netlink.c: In function 'ir_read':
    netlink.c:783:7: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' [-Werror=format]

commit e86ddf6
Merge: b7addce 082c59b
Author: trenkel <github@semidefinite.de>
Date:   Wed Dec 3 20:59:29 2014 +0100

    Merge pull request #839 from yogeswaran/python

    Fix Py list length check in cpy_build_meta()

commit 082c59b
Author: Yoga Ramalingam <yramalingam1@bloomberg.net>
Date:   Wed Dec 3 14:37:06 2014 -0500

    Fixed indentation and decreased reference count

commit f0cb933
Author: Yoga Ramalingam <yramalingam1@bloomberg.net>
Date:   Wed Dec 3 12:20:17 2014 -0500

    Fix Py list length check in cpy_build_meta()

commit b7addce
Merge: 99953c7 ca450c5
Author: Pierre-Yves Ritschard <pyr@spootnik.org>
Date:   Wed Dec 3 16:06:13 2014 +0100

    Merge pull request #827 from yogeswaran/collectdctl

    collectdctl command hangs on AIX and returns error 0 on Solaris.

commit ca450c5
Author: Yoga Ramalingam <yramalingam1@bloomberg.net>
Date:   Wed Dec 3 08:40:18 2014 -0500

    Removed extra semicolon

commit 99953c7
Author: Marc Fournier <marc.fournier@camptocamp.com>
Date:   Tue Dec 2 23:42:06 2014 +0100

    RPM specfile: require package providing ltdl.h

commit 5416295
Author: Yoga Ramalingam <yramalingam1@bloomberg.net>
Date:   Mon Dec 1 09:55:10 2014 -0500

    Wrap the content of macro with do/while to make it safer as per code review comment

commit 9f5ea03
Author: Marc Fournier <marc.fournier@camptocamp.com>
Date:   Mon Dec 1 09:07:30 2014 +0100

    cpu: remove legacy assignment to undefiend variable

    This finishes up the cleanup done by f710030. It also fixes #828
    (build error on Mac OS).

    Many thanks to @njh for pointing that out !

commit 993900f
Author: Yoga Ramalingam <yramalingam1@bloomberg.net>
Date:   Wed Nov 12 16:07:15 2014 -0500

    collectdctl command hangs on AIX and returns error 0 on Solaris.

    Summary:
    Problem: collectdctl command hangs on AIX and returns error 0 on Solaris.

    Root cause - client (collectdctl) and server (collectd daemon) are using fprintf to communicate using Unix domain socket, Since fprintf buffers, command sent by client did not reach server, since client does not get the response, it closes the socket which forces the client to flush the command, now server receives the command, when responding, it gets socket error because the client already closed the socket.

    Solution: Added flush after all fprintf calls.

    Test Plan: Tested collectdctl on AIX and SunOS for listval, getval commands

    Reviewers: skhajamo

    Reviewed By: skhajamo

    CC: arcyd

    Differential Revision: https://all.phab.dev.bloomberg.com/D155584
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment