Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem compiling: contains no objects #171

Open
JSKim-Ranix opened this issue Jan 17, 2024 · 4 comments
Open

Problem compiling: contains no objects #171

JSKim-Ranix opened this issue Jan 17, 2024 · 4 comments

Comments

@JSKim-Ranix
Copy link

There is a "v2x.asn" file like below.

===================================================================================

V2X DEFINITIONS AUTOMATIC TAGS::= BEGIN

CommTxPDU ::= SEQUENCE {
index INTEGER (1..2147483647),
payload OCTET STRING
}

CommRxPDU ::= SEQUENCE {
psid INTEGER (0..270549119),
payload OCTET STRING
}

V2X-MESSAGE ::= CLASS {
&id OBJECT IDENTIFIER,
&MessageBody
}

Message V2X-MESSAGE ::= {
{&id {1 0 15784 1 0 1}, &MessageBody SEQUENCE OF CommTxPDU} |
{&id {1 0 15784 1 0 2}, &MessageBody SEQUENCE OF CommRxPDU}
}

EndApplicationMessage ::= SEQUENCE
{
endApplication-Message-id V2X-MESSAGE.&id ({Message}),
endApplication-Message-msg V2X-MESSAGE.&MessageBody ({Message}{@endApplication-Message-id})
}
END

===================================================================================

When I run compile, the following error occurs.

===================================================================================

./asn1c -S ./share/asn1c -D ./src -fcompound-names -fincludes-quoted -fline-refs -fwide-types -gen-autotools -pdu=EndApplicationMessage v2x.asn

FATAL: Information Object Set Message contains no objects at line 18
FATAL: Cannot compile "EndApplicationMessage" (20:1) at line 25
FATAL: Cannot compile "EndApplicationMessage" (20:1) at line 25

===================================================================================

The cause of the error is adding "({Message})" and "({Message}{@endApplication-Message-id})".
However, I am unable to delete the part or request modification.
First, it has been determined based on specification(standard) and is already being used by other companies.
Another reason is that the syntex check shows no problems, and compilation proceeds well with other compilers (Obj-system).
And, we've already done so much with the asn1c compiler.
Thank you to everyone who helps.
The share folder is attached.
share.zip

v2x.asn.zip

@mouse07410
Copy link
Owner

mouse07410 commented Jan 17, 2024

The cause of error is (as I understand it) inability of the free compilers like asn1c to process the new ASN.1 constructs added to the language in mid-2000.

I personally consider those additions an absolute abomination, but some standards are misguided enough to utilize them. As a result, you may be forced to use those commercial compilers - I don't have either time or skills to enhance asn1c to support them.

@v0-e
Copy link

v0-e commented Jan 17, 2024

Out of curiosity @JSKim-Ranix, which standard is this?

@JSKim-Ranix
Copy link
Author

JSKim-Ranix commented Jan 18, 2024

Out of curiosity @JSKim-Ranix, which standard is this?

It is a modification of the ISO 14827(DATEX-ASN) standard to suit C2X (Center to Everything) for C-ITS(Cooperative-Intelligent Transport Systems).

The cause of error is (as I understand it) inability of the free compilers like asn1c to process the new ASN.1 constructs added to the language in mid-2000.

I personally consider those additions an absolute abomination, but some standards are misguided enough to utilize them. As a result, you may be forced to use those commercial compilers - I don't have either time or skills to enhance asn1c to support them.

I have a question.
I tested v2x.asn with the master branch, and compile was completed. Couldn't we find a way to solve the problem by compare the vlm_master branch and master branch?
After developing using asn1c for 3 years, it is a very difficult decision to change to a commercial compilers.
The master branch solves this problem, but has many other problems that make it difficult to use.
We really want to use vlm_master branch.

@v0-e
Copy link

v0-e commented Jan 22, 2024

@JSKim-Ranix, the master branch may allow you to compile, but I'm doubtful that the output associated with EndApplicationMessage is useful.
If you don't mind, please try my branch associated with PR #172, to see if it compiles successfully.
I'm concerned about the &id's type being a OBJECT IDENTIFIER and I'm not sure if it is being compiled correctly. But that would probably be a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants