Bug 60434 - 0.15.1 does not build against libtasn1 3.2
Summary: 0.15.1 does not build against libtasn1 3.2
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-02-07 17:54 UTC by Andreas Metzler
Modified: 2013-02-12 14:53 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Use ASN1_DATA_NODE instead of struct asn1_data_node data (331 bytes, patch)
2013-02-07 17:54 UTC, Andreas Metzler
Details | Splinter Review
Don't use struct asn1_node_data (1.22 KB, patch)
2013-02-07 18:07 UTC, Stef Walter
Details | Splinter Review
Remove unnecessary code to be more compatible with various libtasn1 versions (1.02 KB, patch)
2013-02-11 19:30 UTC, Stef Walter
Details | Splinter Review

Description Andreas Metzler 2013-02-07 17:54:11 UTC
Created attachment 74368 [details] [review]
Use ASN1_DATA_NODE instead of struct asn1_data_node data

0.15.1 seems to *only* build against libtasn1 2.14, with version 3.x one gets this error:
------------------------
asn1.c: In function 'p11_asn1_encode':
asn1.c:168:9: error: variable 'data' has initializer but incomplete type
asn1.c:168:9: warning: excess elements in struct initializer [enabled by default]
asn1.c:168:9: warning: (near initialization for 'data') [enabled by default]
asn1.c:168:24: error: storage size of 'data' isn't known
asn1.c:168:24: warning: unused variable 'data' [-Wunused-variable]
make[4]: *** [asn1.lo] Error 1
------------------------

Using "ASN1_DATA_NODE" instead of "struct asn1_data_node data" seems to let the library build with 2.14 and 3.x. I am not sure whether this the right solution, though.
Comment 1 Stef Walter 2013-02-07 18:07:18 UTC
Created attachment 74369 [details] [review]
Don't use struct asn1_node_data
Comment 2 Stef Walter 2013-02-07 18:08:17 UTC
Thanks. What about this latter patch? 

So many build problems surrounding these few lines of debug code :S  ... so I figured I'd simplify it a bit.
Comment 3 Andreas Metzler 2013-02-08 08:01:13 UTC
With "Don't use struct asn1_node_data"-patch I get the following build error with libtasn1 3.2:
asn1.c: In function 'p11_asn1_encode':
asn1.c:188:25: error: dereferencing pointer to incomplete type
asn1.c:188:37: error: dereferencing pointer to incomplete type

cu andreas
Comment 4 Stef Walter 2013-02-11 19:30:20 UTC
Created attachment 74646 [details] [review]
Remove unnecessary code to be more compatible with various libtasn1 versions
Comment 5 Stef Walter 2013-02-11 19:31:28 UTC
So lets just remove the code, since it's just used in debug output. Does this do the trick?
Comment 6 Andreas Metzler 2013-02-12 14:27:37 UTC
Remove-unnecessary-code-to-be-more-compatible-with.patch works for me. Thanks.
Comment 7 Stef Walter 2013-02-12 14:53:23 UTC
Attachment 74646 [details] pushed as 077fd91 - Remove unnecessary code to be more compatible with various libtasn1 versions


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.