Comments (3)
Stupid standards writers really abuse ASN.1, making it impossible for their definitions to compile with "normal" tools.
This seems to be yet another example of that. I think the cause is circular dependency similar to #78 that you hit in XNAP. I suspect the solution would be similar too...
Maybe re-ordering the ASN.1 files that were concatenated together could help? I don't know.
Wish I could help more. But extending asn1c
to handle this is beyond my skill and available time.
from asn1c.
@gatopeich I checked the generated *.[ch]
files, and observed this:
$ rg asn_PER_memb_id_constr_282 *.[ch]
ProtocolExtensionField.c
12103:static asn_per_constraints_t asn_PER_memb_id_constr_282 CC_NOTUSED = {
23585: &asn_PER_memb_id_constr_282,
ProtocolIE-Field.c
18573:static asn_per_constraints_t asn_PER_memb_id_constr_282 CC_NOTUSED = {
30409: &asn_PER_memb_id_constr_282,
Perhaps your problem is caused by CC_NOTUSED
? If CC_NOTUSED
is present - perhaps you can manually remove it from the definition, and try to compile again?
Also, I tried to compile the converter-example
, but apparently the order of the includes and their circular dependencies are in the way. Do you have a way past this?
$ make -f converter-example.mk
clang -O3 -std=gnu18 -march=native -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -DASN_PDU_COLLECTION -I. -o F1AP-PDU.o -c F1AP-PDU.c
In file included from F1AP-PDU.c:8:
In file included from ./F1AP-PDU.h:58:
In file included from ./InitiatingMessage.h:20:
In file included from ./Reset.h:15:
In file included from ./ProtocolIE-Container.h:528:
In file included from ./ProtocolIE-Field.h:23:
In file included from ./UE-associatedLogicalF1-ConnectionItem.h:48:
In file included from ./ProtocolExtensionContainer.h:1375:
In file included from ./ProtocolExtensionField.h:54:
In file included from ./CP-TransportLayerAddress.h:59:
./ProtocolIE-SingleContainer.h:22:9: error: unknown type name 'F1AP_PDU_ExtIEs_t'
typedef F1AP_PDU_ExtIEs_t ProtocolIE_SingleContainer_4949P0_t;
^
./ProtocolIE-SingleContainer.h:23:9: error: unknown type name 'ResetType_ExtIEs_t'
typedef ResetType_ExtIEs_t ProtocolIE_SingleContainer_4949P1_t;
^
./ProtocolIE-SingleContainer.h:24:9: error: unknown type name 'UE_associatedLogicalF1_ConnectionItemRes_t'; did you mean 'UE_associatedLogicalF1_ConnectionItem_t'?
typedef UE_associatedLogicalF1_ConnectionItemRes_t ProtocolIE_SingleContainer_4949P2_t;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UE_associatedLogicalF1_ConnectionItem_t
./UE-associatedLogicalF1-ConnectionItem.h:38:3: note: 'UE_associatedLogicalF1_ConnectionItem_t' declared here
} UE_associatedLogicalF1_ConnectionItem_t;
^
In file included from F1AP-PDU.c:8:
In file included from ./F1AP-PDU.h:58:
In file included from ./InitiatingMessage.h:20:
In file included from ./Reset.h:15:
In file included from ./ProtocolIE-Container.h:528:
In file included from ./ProtocolIE-Field.h:23:
In file included from ./UE-associatedLogicalF1-ConnectionItem.h:48:
In file included from ./ProtocolExtensionContainer.h:1375:
In file included from ./ProtocolExtensionField.h:54:
In file included from ./CP-TransportLayerAddress.h:59:
./ProtocolIE-SingleContainer.h:25:9: error: unknown type name 'UE_associatedLogicalF1_ConnectionItemResAck_t'; did you mean 'UE_associatedLogicalF1_ConnectionItem_t'?
typedef UE_associatedLogicalF1_ConnectionItemResAck_t ProtocolIE_SingleContainer_4949P3_t;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UE_associatedLogicalF1_ConnectionItem_t
./UE-associatedLogicalF1-ConnectionItem.h:38:3: note: 'UE_associatedLogicalF1_ConnectionItem_t' declared here
} UE_associatedLogicalF1_ConnectionItem_t;
^
In file included from F1AP-PDU.c:8:
In file included from ./F1AP-PDU.h:58:
In file included from ./InitiatingMessage.h:20:
In file included from ./Reset.h:15:
In file included from ./ProtocolIE-Container.h:528:
In file included from ./ProtocolIE-Field.h:23:
In file included from ./UE-associatedLogicalF1-ConnectionItem.h:48:
In file included from ./ProtocolExtensionContainer.h:1375:
In file included from ./ProtocolExtensionField.h:54:
In file included from ./CP-TransportLayerAddress.h:59:
./ProtocolIE-SingleContainer.h:26:9: error: unknown type name 'GNB_DU_Served_Cells_ItemIEs_t'
typedef GNB_DU_Served_Cells_ItemIEs_t ProtocolIE_SingleContainer_4949P4_t;
^
./ProtocolIE-SingleContainer.h:27:9: error: unknown type name 'Cells_to_be_Activated_List_ItemIEs_t'
typedef Cells_to_be_Activated_List_ItemIEs_t ProtocolIE_SingleContainer_4949P5_t;
^
./ProtocolIE-SingleContainer.h:28:9: error: unknown type name 'Served_Cells_To_Add_ItemIEs_t'
typedef Served_Cells_To_Add_ItemIEs_t ProtocolIE_SingleContainer_4949P6_t;
^
./ProtocolIE-SingleContainer.h:29:9: error: unknown type name 'Served_Cells_To_Modify_ItemIEs_t'
typedef Served_Cells_To_Modify_ItemIEs_t ProtocolIE_SingleContainer_4949P7_t;
^
./ProtocolIE-SingleContainer.h:30:9: error: unknown type name 'Served_Cells_To_Delete_ItemIEs_t'
typedef Served_Cells_To_Delete_ItemIEs_t ProtocolIE_SingleContainer_4949P8_t;
^
./ProtocolIE-SingleContainer.h:31:9: error: unknown type name 'Cells_Status_ItemIEs_t'
typedef Cells_Status_ItemIEs_t ProtocolIE_SingleContainer_4949P9_t;
^
./ProtocolIE-SingleContainer.h:32:9: error: unknown type name 'Dedicated_SIDelivery_NeededUE_ItemIEs_t'
typedef Dedicated_SIDelivery_NeededUE_ItemIEs_t ProtocolIE_SingleContainer_4949P10_t;
^
./ProtocolIE-SingleContainer.h:33:9: error: unknown type name 'GNB_DU_TNL_Association_To_Remove_ItemIEs_t'
typedef GNB_DU_TNL_Association_To_Remove_ItemIEs_t ProtocolIE_SingleContainer_4949P11_t;
^
./ProtocolIE-SingleContainer.h:34:9: error: unknown type name 'Cells_to_be_Deactivated_List_ItemIEs_t'
typedef Cells_to_be_Deactivated_List_ItemIEs_t ProtocolIE_SingleContainer_4949P12_t;
^
./ProtocolIE-SingleContainer.h:35:9: error: unknown type name 'GNB_CU_TNL_Association_To_Add_ItemIEs_t'
typedef GNB_CU_TNL_Association_To_Add_ItemIEs_t ProtocolIE_SingleContainer_4949P13_t;
^
./ProtocolIE-SingleContainer.h:36:9: error: unknown type name 'GNB_CU_TNL_Association_To_Remove_ItemIEs_t'
typedef GNB_CU_TNL_Association_To_Remove_ItemIEs_t ProtocolIE_SingleContainer_4949P14_t;
^
./ProtocolIE-SingleContainer.h:37:9: error: unknown type name 'GNB_CU_TNL_Association_To_Update_ItemIEs_t'
typedef GNB_CU_TNL_Association_To_Update_ItemIEs_t ProtocolIE_SingleContainer_4949P15_t;
^
./ProtocolIE-SingleContainer.h:38:9: error: unknown type name 'Cells_to_be_Barred_ItemIEs_t'
typedef Cells_to_be_Barred_ItemIEs_t ProtocolIE_SingleContainer_4949P16_t;
^
./ProtocolIE-SingleContainer.h:39:9: error: unknown type name 'Protected_EUTRA_Resources_ItemIEs_t'
typedef Protected_EUTRA_Resources_ItemIEs_t ProtocolIE_SingleContainer_4949P17_t;
^
./ProtocolIE-SingleContainer.h:40:9: error: unknown type name 'Cells_Failed_to_be_Activated_List_ItemIEs_t'
typedef Cells_Failed_to_be_Activated_List_ItemIEs_t ProtocolIE_SingleContainer_4949P18_t;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [converter-example.mk:23: F1AP-PDU.o] Error 1
$
from asn1c.
Yep, I worked around the (apparent) circular deps by manually reordering ProtocolIE-Field file, like explained in #78
The dependencies are not really circular, but they are badly ordered when generating Protocol-XXX files.
from asn1c.
Related Issues (20)
- Buffer overflow in ASN.1 deserializer HOT 12
- Bug with JUNKTEST with Random values on MSYS2 and Cygwin HOT 1
- Decode expectedUEBehaviour IE failed HOT 1
- Type with (size) constraint HOT 4
- Join LFC? HOT 1
- Output from encoding an OpenType extension is wrong (APER) HOT 5
- Help debugging "Segmentation fault (core dumped)" HOT 7
- Problem compiling. HOT 4
- Question about v1.0.0. HOT 1
- Problem compiling: contains no objects HOT 4
- APER encoding failed on a 32-bit machine HOT 8
- INTEGER_decode_aper decode failed for 3GPP 38.473 f1ap ASN HOT 4
- Using fuzzing with asn1c HOT 1
- safe_fwrite: warning: 'ret' may be used uninitialized HOT 4
- Several defects detected by coverity HOT 1
- (token "::="): syntax error and (token "}"): syntax error HOT 4
- ImportError: undefined symbols in Shared Library HOT 3
- Circular Reference in Generated C Code for NodeOffsetPointXY structure HOT 6
- Typedef error and not included code HOT 3
- aper_support.c error parsing BMPString HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asn1c.