Skip Menu |

This queue is for tickets about the KeyedMutex CPAN distribution.

Report information
The Basics
Id: 119867
Status: new
Priority: 0/
Queue: KeyedMutex

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.06
Fixed in: (no value)



Subject: Does not compile on Ubuntu 16.04
On a Ubuntu 16.04 I get the following compilation & linker error: cc -fstack-protector-strong -L/usr/local/lib keyedmutexd/keyedmutexd.c -o keyedmutexd/keyedmutexd keyedmutexd/keyedmutexd.c: In function ‘loop’: keyedmutexd/keyedmutexd.c:186:18: warning: implicit declaration of function ‘time’ [-Wimplicit-function-declaration] time_t now = time(NULL); ^ keyedmutexd/keyedmutexd.c: At top level: keyedmutexd/keyedmutexd.c:147:3: warning: ‘conn_key_offsets’ is static but used in inline function ‘setup_conn’ which is not static conn_key_offsets[i] = 0; ^ keyedmutexd/keyedmutexd.c:146:3: warning: ‘conn_states’ is static but used in inline function ‘setup_conn’ which is not static conn_states[i] = CS_KEYREAD; ^ keyedmutexd/keyedmutexd.c:78:19: warning: ‘write_log’ is static but used in inline function ‘close_conn’ which is not static if (! no_log) write_log((fd), (status), (key)); \ ^ keyedmutexd/keyedmutexd.c:141:3: note: in expansion of macro ‘LOG’ LOG(fd, "closed", NULL); ^ keyedmutexd/keyedmutexd.c:78:11: warning: ‘no_log’ is static but used in inline function ‘close_conn’ which is not static if (! no_log) write_log((fd), (status), (key)); \ ^ keyedmutexd/keyedmutexd.c:141:3: note: in expansion of macro ‘LOG’ LOG(fd, "closed", NULL); ^ keyedmutexd/keyedmutexd.c:136:23: warning: ‘conns_length’ is static but used in inline function ‘close_conn’ which is not static if (conn_states[conns_length - 1] != CS_NOCONN) { ^ keyedmutexd/keyedmutexd.c:136:11: warning: ‘conn_states’ is static but used in inline function ‘close_conn’ which is not static if (conn_states[conns_length - 1] != CS_NOCONN) { ^ keyedmutexd/keyedmutexd.c:135:48: warning: ‘conns_length’ is static but used in inline function ‘close_conn’ which is not static for (conns_length -= 1; conns_length != 0; conns_length--) { ^ keyedmutexd/keyedmutexd.c:135:29: warning: ‘conns_length’ is static but used in inline function ‘close_conn’ which is not static for (conns_length -= 1; conns_length != 0; conns_length--) { ^ keyedmutexd/keyedmutexd.c:135:10: warning: ‘conns_length’ is static but used in inline function ‘close_conn’ which is not static for (conns_length -= 1; conns_length != 0; conns_length--) { ^ keyedmutexd/keyedmutexd.c:134:16: warning: ‘conns_length’ is static but used in inline function ‘close_conn’ which is not static if (i + 1 == conns_length) { ^ keyedmutexd/keyedmutexd.c:133:3: warning: ‘conn_states’ is static but used in inline function ‘close_conn’ which is not static conn_states[i] = CS_NOCONN; ^ keyedmutexd/keyedmutexd.c:131:16: warning: ‘listen_fd’ is static but used in inline function ‘close_conn’ which is not static int fd = i + listen_fd + 1; ^ /var/tmp/cpansmoker-1002/2017011515/ccA7ndSU.o: In function `notify_nonowners': keyedmutexd.c:(.text+0x203): undefined reference to `close_conn' keyedmutexd.c:(.text+0x22c): undefined reference to `setup_conn' /var/tmp/cpansmoker-1002/2017011515/ccA7ndSU.o: In function `loop': keyedmutexd.c:(.text+0x51e): undefined reference to `nodelay' keyedmutexd.c:(.text+0x5aa): undefined reference to `setup_conn' keyedmutexd.c:(.text+0x72b): undefined reference to `close_conn' keyedmutexd.c:(.text+0x78e): undefined reference to `key2i' keyedmutexd.c:(.text+0x9bc): undefined reference to `close_conn' keyedmutexd.c:(.text+0x9ce): undefined reference to `setup_conn' keyedmutexd.c:(.text+0xa77): undefined reference to `close_conn' keyedmutexd.c:(.text+0xaca): undefined reference to `close_conn' /var/tmp/cpansmoker-1002/2017011515/ccA7ndSU.o: In function `main': keyedmutexd.c:(.text+0xf38): undefined reference to `reuse_addr' keyedmutexd.c:(.text+0xf4a): undefined reference to `nonblock' keyedmutexd.c:(.text+0xfe0): undefined reference to `nonblock' collect2: error: ld returned 1 exit status <builtin>: recipe for target 'keyedmutexd/keyedmutexd' failed make: *** [keyedmutexd/keyedmutexd] Error 1 Maybe it's a problem of the newer compiler used here (gcc 5.4.0)?
On 2017-01-15 14:50:44, SREZIC wrote: Show quoted text
> On a Ubuntu 16.04 I get the following compilation & linker error: > > cc -fstack-protector-strong -L/usr/local/lib > keyedmutexd/keyedmutexd.c -o keyedmutexd/keyedmutexd > keyedmutexd/keyedmutexd.c: In function ‘loop’: > keyedmutexd/keyedmutexd.c:186:18: warning: implicit declaration of > function ‘time’ [-Wimplicit-function-declaration] > time_t now = time(NULL); > ^ > keyedmutexd/keyedmutexd.c: At top level: > keyedmutexd/keyedmutexd.c:147:3: warning: ‘conn_key_offsets’ is > static but used in inline function ‘setup_conn’ which is not > static > conn_key_offsets[i] = 0; > ^ > keyedmutexd/keyedmutexd.c:146:3: warning: ‘conn_states’ is static > but used in inline function ‘setup_conn’ which is not static > conn_states[i] = CS_KEYREAD; > ^ > keyedmutexd/keyedmutexd.c:78:19: warning: ‘write_log’ is static > but used in inline function ‘close_conn’ which is not static > if (! no_log) write_log((fd), (status), (key)); \ > ^ > keyedmutexd/keyedmutexd.c:141:3: note: in expansion of macro ‘LOG’ > LOG(fd, "closed", NULL); > ^ > keyedmutexd/keyedmutexd.c:78:11: warning: ‘no_log’ is static but > used in inline function ‘close_conn’ which is not static > if (! no_log) write_log((fd), (status), (key)); \ > ^ > keyedmutexd/keyedmutexd.c:141:3: note: in expansion of macro ‘LOG’ > LOG(fd, "closed", NULL); > ^ > keyedmutexd/keyedmutexd.c:136:23: warning: ‘conns_length’ is > static but used in inline function ‘close_conn’ which is not > static > if (conn_states[conns_length - 1] != CS_NOCONN) { > ^ > keyedmutexd/keyedmutexd.c:136:11: warning: ‘conn_states’ is static > but used in inline function ‘close_conn’ which is not static > if (conn_states[conns_length - 1] != CS_NOCONN) { > ^ > keyedmutexd/keyedmutexd.c:135:48: warning: ‘conns_length’ is > static but used in inline function ‘close_conn’ which is not > static > for (conns_length -= 1; conns_length != 0; conns_length--) { > ^ > keyedmutexd/keyedmutexd.c:135:29: warning: ‘conns_length’ is > static but used in inline function ‘close_conn’ which is not > static > for (conns_length -= 1; conns_length != 0; conns_length--) { > ^ > keyedmutexd/keyedmutexd.c:135:10: warning: ‘conns_length’ is > static but used in inline function ‘close_conn’ which is not > static > for (conns_length -= 1; conns_length != 0; conns_length--) { > ^ > keyedmutexd/keyedmutexd.c:134:16: warning: ‘conns_length’ is > static but used in inline function ‘close_conn’ which is not > static > if (i + 1 == conns_length) { > ^ > keyedmutexd/keyedmutexd.c:133:3: warning: ‘conn_states’ is static > but used in inline function ‘close_conn’ which is not static > conn_states[i] = CS_NOCONN; > ^ > keyedmutexd/keyedmutexd.c:131:16: warning: ‘listen_fd’ is static > but used in inline function ‘close_conn’ which is not static > int fd = i + listen_fd + 1; > ^ > /var/tmp/cpansmoker-1002/2017011515/ccA7ndSU.o: In function > `notify_nonowners': > keyedmutexd.c:(.text+0x203): undefined reference to `close_conn' > keyedmutexd.c:(.text+0x22c): undefined reference to `setup_conn' > /var/tmp/cpansmoker-1002/2017011515/ccA7ndSU.o: In function `loop': > keyedmutexd.c:(.text+0x51e): undefined reference to `nodelay' > keyedmutexd.c:(.text+0x5aa): undefined reference to `setup_conn' > keyedmutexd.c:(.text+0x72b): undefined reference to `close_conn' > keyedmutexd.c:(.text+0x78e): undefined reference to `key2i' > keyedmutexd.c:(.text+0x9bc): undefined reference to `close_conn' > keyedmutexd.c:(.text+0x9ce): undefined reference to `setup_conn' > keyedmutexd.c:(.text+0xa77): undefined reference to `close_conn' > keyedmutexd.c:(.text+0xaca): undefined reference to `close_conn' > /var/tmp/cpansmoker-1002/2017011515/ccA7ndSU.o: In function `main': > keyedmutexd.c:(.text+0xf38): undefined reference to `reuse_addr' > keyedmutexd.c:(.text+0xf4a): undefined reference to `nonblock' > keyedmutexd.c:(.text+0xfe0): undefined reference to `nonblock' > collect2: error: ld returned 1 exit status > <builtin>: recipe for target 'keyedmutexd/keyedmutexd' failed > make: *** [keyedmutexd/keyedmutexd] Error 1 > > > Maybe it's a problem of the newer compiler used here (gcc 5.4.0)?
Also does not compile with Ubuntu 18.04 or Debian/stretch (current stable).