Bug 66015 - p11-kit failing to build with -fno-common due to missing 'extern'
Summary: p11-kit failing to build with -fno-common due to missing 'extern'
Status: RESOLVED FIXED
Alias: None
Product: p11-glue
Classification: Unclassified
Component: p11-kit (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Stef Walter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-21 16:48 UTC by Allison Lortie (desrt)
Modified: 2013-07-10 13:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Build with -fno-common to catch definition problems (1.41 KB, patch)
2013-07-10 13:25 UTC, Stef Walter
Details | Splinter Review

Description Allison Lortie (desrt) 2013-06-21 16:48:24 UTC
I build with -fno-common (which really ought to be the default) and p11-kit is broken for me:

  CCLD     libp11-kit.la
.libs/libp11_kit_la-modules.o: In function `create_mutex':
/home/desrt/.cache/jhbuild/checkout/p11-kit-0.19.1/p11-kit/modules.c:181: multiple definition of `p11_virtual_base'
.libs/libp11_kit_la-log.o:/home/desrt/.cache/jhbuild/checkout/p11-kit-0.19.1/p11-kit/log.c:76: first defined here
.libs/libp11_kit_la-modules.o: In function `free_module_unlocked':
/home/desrt/.cache/jhbuild/checkout/p11-kit-0.19.1/p11-kit/modules.c:239: multiple definition of `p11_virtual_stack'
.libs/libp11_kit_la-log.o:/home/desrt/.cache/jhbuild/checkout/p11-kit-0.19.1/p11-kit/log.c:133: first defined here
.libs/libp11_kit_la-proxy.o: In function `map_slot_unlocked':
/home/desrt/.cache/jhbuild/checkout/p11-kit-0.19.1/p11-kit/proxy.c:111: multiple definition of `p11_virtual_base'
.libs/libp11_kit_la-log.o:/home/desrt/.cache/jhbuild/checkout/p11-kit-0.19.1/p11-kit/log.c:76: first defined here
.libs/libp11_kit_la-proxy.o: In function `map_session_to_real':
/home/desrt/.cache/jhbuild/checkout/p11-kit-0.19.1/p11-kit/proxy.c:162: multiple definition of `p11_virtual_stack'
.libs/libp11_kit_la-log.o:/home/desrt/.cache/jhbuild/checkout/p11-kit-0.19.1/p11-kit/log.c:133: first defined here
.libs/libp11_kit_la-virtual.o:(.data.rel.local+0x0): multiple definition of `p11_virtual_base'
.libs/libp11_kit_la-log.o:/home/desrt/.cache/jhbuild/checkout/p11-kit-0.19.1/p11-kit/log.c:76: first defined here
.libs/libp11_kit_la-virtual.o:(.data.rel.local+0x220): multiple definition of `p11_virtual_stack'
.libs/libp11_kit_la-log.o:/home/desrt/.cache/jhbuild/checkout/p11-kit-0.19.1/p11-kit/log.c:133: first defined here
collect2: error: ld returned 1 exit status


due to missing 'extern' in virtual.h:

CK_X_FUNCTION_LIST      p11_virtual_base;

CK_X_FUNCTION_LIST      p11_virtual_stack;
Comment 1 Stef Walter 2013-07-10 13:25:50 UTC
Created attachment 82274 [details] [review]
Build with -fno-common to catch definition problems

Fix some global variables not declared as extern
Comment 2 Stef Walter 2013-07-10 13:31:54 UTC
Attachment 82274 [details] pushed as d00f6b2 - Build with -fno-common to catch definition problems


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.