Project

General

Profile

Actions

Bug #5717

closed

Problem building pkcs11 library

Added by r a over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Category:
-
Target version:
-
Start date:
2015-03-14
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

While trying to build the pkcs11 library pk11-kit in order to build gnutls as a dependancy library for VLC I experienced a error.
I am using the OpenIndiana Hipster release with gcc

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/gcc/4.8/lib/gcc/i386-pc-solaris2.11/4.8.3/lto-wrapper
Target: i386-pc-solaris2.11
Configured with: /jenkins/jobs/oi-userland/workspace/components/gcc48/gcc-4.8.3/configure CC=/usr/gcc/4.8/bin/gcc CXX=/usr/gcc/4.8/bin/g++ F77=/usr/gcc/4.8/bin/gfortran FC=/usr/gcc/4.8/bin/gfortran CFLAGS='-g -O2' CXXFLAGS=' ' FFLAGS=' ' FCFLAGS= LDFLAGS=-m32 PKG_CONFIG_PATH=/usr/lib/pkgconfig --prefix=/usr/gcc/4.8 --mandir=/usr/gcc/4.8/share/man --bindir=/usr/gcc/4.8/bin --libdir=/usr/gcc/4.8/lib --sbindir=/usr/gcc/4.8/sbin --sbindir=/usr/gcc/4.8/bin --libdir=/usr/gcc/4.8/lib --libexecdir=/usr/gcc/4.8/lib --host i386-pc-solaris2.11 --build i386-pc-solaris2.11 --target i386-pc-solaris2.11 --with-boot-ldflags=-R/usr/gcc/4.8/lib --enable-plugins --enable-objc-gc --enable-languages=c,c++,fortran,lto,objc --without-gnu-ld --with-ld=/usr/bin/ld --with-build-time-tools=/usr/gnu/i386-pc-solaris2.11/bin --disable-libitm --with-gnu-as --with-as=/usr/bin/gas LDFLAGS=-R/usr/gcc/4.8/lib
Thread model: posix
gcc version 4.8.3 (GCC)

p11-kit-0.23.1$ CC=gcc CFLAGS='-std=c99' CPPFLAGS=-I/opt/gnu/include LDFLAGS=-L/opt/gnu/lib ./configure --prefix=/opt/gnu --enable-shared --without-trust-paths

I have tried to use the CFLAGS set with -std=c99 and -std=gnu89 and -std=gnu99 but -std=c99 does provide the most compilation as can be seen below

p11-kit-0.23.1$ gmake
gmake all-recursive
gmake[1]: Entering directory `/home/downloads/gnu/vlc/libs/p11-kit-0.23.1'
Making all in .
gmake[2]: Entering directory `/home/downloads/gnu/vlc/libs/p11-kit-0.23.1'
CC p11-kit/libp11_kit_la-util.lo
p11-kit/util.c: In function '_p11_get_progname_unlocked':
p11-kit/util.c:235:3: warning: implicit declaration of function 'getprogname' [-Wimplicit-function-declaration]
_p11_set_progname_unlocked (getprogname ());
^
p11-kit/util.c:235:3: warning: nested extern declaration of 'getprogname' [-Wnested-externs]
p11-kit/util.c:235:3: warning: passing argument 1 of '_p11_set_progname_unlocked' makes pointer from integer without a cast [enabled by default]
p11-kit/util.c:221:1: note: expected 'const char ' but argument is of type 'int'
_p11_set_progname_unlocked (const char *progname)
^
CC p11-kit/libp11_kit_la-conf.lo
p11-kit/conf.c: In function '_p11_conf_merge_defaults':
p11-kit/conf.c:83:3: warning: implicit declaration of function 'strdup' [-Wimplicit-function-declaration]
key = strdup (key);
^
p11-kit/conf.c:83:3: warning: nested extern declaration of 'strdup' [-Wnested-externs]
p11-kit/conf.c:83:7: warning: assignment makes pointer from integer without a cast [enabled by default]
key = strdup (key);
^
p11-kit/conf.c:85:9: warning: assignment makes pointer from integer without a cast [enabled by default]
value = strdup (value);
^
p11-kit/conf.c: In function 'load_config_from_file':
p11-kit/conf.c:345:7: warning: assignment makes pointer from integer without a cast [enabled by default]
key = strdup (name);
^
CC p11-kit/libp11_kit_la-iter.lo
CC p11-kit/libp11_kit_la-log.lo
CC p11-kit/libp11_kit_la-modules.lo
p11-kit/modules.c: In function 'p11_kit_module_get_name':
p11-kit/modules.c:1149:5: warning: implicit declaration of function 'strdup' [-Wimplicit-function-declaration]
name = strdup (mod->name);
^
p11-kit/modules.c:1149:5: warning: nested extern declaration of 'strdup' [-Wnested-externs]
p11-kit/modules.c:1149:10: warning: assignment makes pointer from integer without a cast [enabled by default]
name = strdup (mod->name);
^
p11-kit/modules.c: In function 'p11_kit_registered_option':
p11-kit/modules.c:1354:11: warning: assignment makes pointer from integer without a cast [enabled by default]
option = strdup (value);
^
p11-kit/modules.c: In function 'p11_kit_config_option':
p11-kit/modules.c:1401:9: warning: assignment makes pointer from integer without a cast [enabled by default]
ret = strdup (value);
^
p11-kit/modules.c: In function 'p11_kit_modules_initialize':
p11-kit/modules.c:2013:10: warning: assignment makes pointer from integer without a cast [enabled by default]
name = strdup ("(unknown)");
^
CC p11-kit/libp11_kit_la-pin.lo
p11-kit/pin.c: In function 'register_callback_unlocked':
p11-kit/pin.c:181:2: warning: implicit declaration of function 'strdup' [-Wimplicit-function-declaration]
name = strdup (pin_source);
^
p11-kit/pin.c:181:2: warning: nested extern declaration of 'strdup' [-Wnested-externs]
p11-kit/pin.c:181:7: warning: assignment makes pointer from integer without a cast [enabled by default]
name = strdup (pin_source);
^
CC p11-kit/libp11_kit_la-proxy.lo
CC p11-kit/libp11_kit_la-messages.lo
CC p11-kit/libp11_kit_la-rpc-transport.lo
In file included from ./common/argv.h:38:0,
from p11-kit/rpc-transport.c:38:
p11-kit/rpc-transport.c: In function 'rpc_exec_wait_or_terminate':
./common/compat.h:222:9: warning: implicit declaration of function 'nanosleep' [-Wimplicit-function-declaration]
struct timespec _ts = { _ms / 1000, (_ms % 1000) * 1000 * 1000 }; \\
^
p11-kit/rpc-transport.c:655:3: note: in expansion of macro 'p11_sleep_ms'
p11_sleep_ms (100);
^
./common/compat.h:222:9: warning: nested extern declaration of 'nanosleep' [-Wnested-externs]
struct timespec _ts = { _ms / 1000, (_ms % 1000) * 1000 * 1000 }; \\
^
p11-kit/rpc-transport.c:655:3: note: in expansion of macro 'p11_sleep_ms'
p11_sleep_ms (100);
^
p11-kit/rpc-transport.c:660:3: warning: implicit declaration of function 'kill' [-Wimplicit-function-declaration]
kill (pid, SIGTERM);
^
p11-kit/rpc-transport.c:660:3: warning: nested extern declaration of 'kill' [-Wnested-externs]
p11-kit/rpc-transport.c: In function 'rpc_exec_connect':
p11-kit/rpc-transport.c:746:3: warning: implicit declaration of function 'fdwalk' [-Wimplicit-function-declaration]
fdwalk (set_cloexec_on_fd, &max_fd);
^
p11-kit/rpc-transport.c:746:3: warning: nested extern declaration of 'fdwalk' [-Wnested-externs]
p11-kit/rpc-transport.c: In function 'on_argv_parsed':
p11-kit/rpc-transport.c:783:2: warning: implicit declaration of function 'strdup' [-Wimplicit-function-declaration]
if (!p11_array_push (argv, strdup (argument)))
^
p11-kit/rpc-transport.c:783:2: warning: nested extern declaration of 'strdup' [-Wnested-externs]
p11-kit/rpc-transport.c:783:2: warning: passing argument 2 of 'p11_array_push' makes pointer from integer without a cast [enabled by default]
In file included from p11-kit/virtual.h:40:0,
from p11-kit/rpc.h:41,
from p11-kit/rpc-transport.c:45:
./common/array.h:60:22: note: expected 'void *' but argument is of type 'int'
bool p11_array_push (p11_array *array,
^
CC p11-kit/libp11_kit_la-rpc-message.lo
CC p11-kit/libp11_kit_la-rpc-client.lo
CC p11-kit/libp11_kit_la-rpc-server.lo
CC p11-kit/libp11_kit_la-uri.lo
p11-kit/uri.c: In function 'p11_kit_uri_set_pin_value':
p11-kit/uri.c:572:2: warning: implicit declaration of function 'strdup' [-Wimplicit-function-declaration]
uri->pin_value = pin ? strdup (pin) : NULL;
^
p11-kit/uri.c:572:2: warning: nested extern declaration of 'strdup' [-Wnested-externs]
p11-kit/uri.c:572:38: warning: pointer/integer type mismatch in conditional expression [enabled by default]
uri->pin_value = pin ? strdup (pin) : NULL;
^
p11-kit/uri.c: In function 'p11_kit_uri_set_pin_source':
p11-kit/uri.c:618:53: warning: pointer/integer type mismatch in conditional expression [enabled by default]
uri->pin_source = pin_source ? strdup (pin_source) : NULL;
^
CC p11-kit/libp11_kit_la-virtual.lo
CC common/argv.lo
common/argv.c: In function 'p11_argv_parse':
common/argv.c:56:2: warning: implicit declaration of function 'strdup' [-Wimplicit-function-declaration]
src = dup = strdup (string);
^
common/argv.c:56:2: warning: nested extern declaration of 'strdup' [-Wnested-externs]
common/argv.c:56:12: warning: assignment makes pointer from integer without a cast [enabled by default]
src = dup = strdup (string);
^
CC common/attrs.lo
common/attrs.c: In function 'buffer_append_printf':
common/attrs.c:538:2: warning: implicit declaration of function 'vasprintf' [-Wimplicit-function-declaration]
if (vasprintf (&string, format, va) < 0)
^
common/attrs.c:538:2: warning: nested extern declaration of 'vasprintf' [-Wnested-externs]
CC common/array.lo
CC common/buffer.lo
CC common/compat.lo
common/compat.c: In function 'getauxval':
common/compat.c:820:3: warning: implicit declaration of function 'issetugid' [-Wimplicit-function-declaration]
secure = issetugid ();
^
common/compat.c:820:3: warning: nested extern declaration of 'issetugid' [-Wnested-externs]
CC common/constants.lo
CC common/debug.lo
common/debug.c: In function 'p11_debug_message':
common/debug.c:134:3: warning: format '%d' expects argument of type 'int', but argument 3 has type 'pid_t' [-Wformat=]
fprintf (stderr, "(p11-kit:%d) ", getpid());
^
CC common/dict.lo
common/dict.c: In function 'p11_dict_str_hash':
common/dict.c:332:2: warning: missing sentinel in function call [-Wformat=]
p11_hash_murmur3 (&hash, string, strlen (string), NULL);
^
CC common/hash.lo
CC common/lexer.lo
common/lexer.c: In function 'p11_lexer_init':
common/lexer.c:66:2: warning: implicit declaration of function 'strdup' [-Wimplicit-function-declaration]
lexer->filename = strdup (filename);
^
common/lexer.c:66:2: warning: nested extern declaration of 'strdup' [-Wnested-externs]
common/lexer.c:66:18: warning: assignment makes pointer from integer without a cast [enabled by default]
lexer->filename = strdup (filename);
^
common/lexer.c: In function 'p11_lexer_next':
common/lexer.c:114:4: warning: implicit declaration of function 'strnstr' [-Wimplicit-function-declaration]
pos = strnstr (lexer->at, "\\n-----END ", lexer->remaining);
^
common/lexer.c:114:4: warning: nested extern declaration of 'strnstr' [-Wnested-externs]
common/lexer.c:114:8: warning: assignment makes pointer from integer without a cast [enabled by default]
pos = strnstr (lexer->at, "\\n-----END ", lexer->remaining);
^
common/lexer.c:161:5: warning: implicit declaration of function 'strndup' [-Wimplicit-function-declaration]
part = strndup (line, end - line);
^
common/lexer.c:161:5: warning: nested extern declaration of 'strndup' [-Wnested-externs]
common/lexer.c:161:10: warning: assignment makes pointer from integer without a cast [enabled by default]
part = strndup (line, end - line);
^
common/lexer.c:170:28: warning: assignment makes pointer from integer without a cast [enabled by default]
lexer->tok.section.name = strndup (line + 1, (end - line) - 2);
^
common/lexer.c:178:9: warning: assignment makes pointer from integer without a cast [enabled by default]
part = strndup (line, end - line);
^
common/lexer.c:194:25: warning: assignment makes pointer from integer without a cast [enabled by default]
lexer->tok.field.name = strndup (line, colon - line);
^
common/lexer.c:195:26: warning: assignment makes pointer from integer without a cast [enabled by default]
lexer->tok.field.value = strndup (value, end - value);
^
CC common/message.lo
CC common/path.lo
common/path.c: In function 'p11_path_base':
common/path.c:91:2: warning: implicit declaration of function 'strndup' [-Wimplicit-function-declaration]
return strndup (beg, end - beg);
^
common/path.c:91:2: warning: nested extern declaration of 'strndup' [-Wnested-externs]
common/path.c:91:2: warning: return makes pointer from integer without a cast [enabled by default]
common/path.c: In function 'expand_homedir':
common/path.c:125:4: warning: missing sentinel in function call [-Wformat=]
return p11_path_build (env, remainder + 8, NULL);
^
common/path.c:130:3: warning: missing sentinel in function call [-Wformat=]
return p11_path_build (env, remainder, NULL);
^
common/path.c:140:3: error: too many arguments to function 'getpwuid_r'
ret = getpwuid_r (getuid (), &pws, buf, sizeof (buf), &pwd);
^
In file included from common/path.c:52:0:
/usr/include/pwd.h:166:23: note: declared here
extern struct passwd *getpwuid_r(uid_t, struct passwd *, char *, int);
^
common/path.c:140:7: warning: assignment makes integer from pointer without a cast [enabled by default]
ret = getpwuid_r (getuid (), &pws, buf, sizeof (buf), &pwd);
^
common/path.c:152:3: warning: missing sentinel in function call [-Wformat=]
return p11_path_build (pwd->pw_dir, remainder, NULL);
^
common/path.c: In function 'p11_path_expand':
common/path.c:179:3: warning: implicit declaration of function 'strdup' [-Wimplicit-function-declaration]
return strdup (path);
^
common/path.c:179:3: warning: nested extern declaration of 'strdup' [-Wnested-externs]
common/path.c:179:3: warning: return makes pointer from integer without a cast [enabled by default]
common/path.c: In function 'p11_path_parent':
common/path.c:286:10: warning: assignment makes pointer from integer without a cast [enabled by default]
parent = strdup ("/");
^
common/path.c:288:10: warning: assignment makes pointer from integer without a cast [enabled by default]
parent = strndup (path, (e - path) + 1);
^
gmake[2]:
[common/path.lo] Error 1
gmake[2]: Leaving directory `/home/downloads/gnu/vlc/libs/p11-kit-0.23.1'
gmake[1]:
[all-recursive] Error 1
gmake[1]: Leaving directory `/home/downloads/gnu/vlc/libs/p11-kit-0.23.1'
gmake: *
* [all] Error 2
Actions #1

Updated by Alexander Pyhalov over 7 years ago

  • Status changed from New to Feedback

It's not OI bug or issue.
Illumos has two getpwuid_r() functions - legacy and standard-conforming. Legacy one is default. To get standard behavior, add -D_POSIX_PTHREAD_SEMANTICS to CFLAGS or CPPFLAGS.

Actions #2

Updated by Alexander Pyhalov over 7 years ago

  • Status changed from Feedback to Rejected
  • Assignee set to Alexander Pyhalov
Actions

Also available in: Atom PDF