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

Can't compile EXTERNAL type #294

Open
immesys opened this issue Sep 11, 2018 · 7 comments · May be fixed by #295
Open

Can't compile EXTERNAL type #294

immesys opened this issue Sep 11, 2018 · 7 comments · May be fixed by #295

Comments

@immesys
Copy link

immesys commented Sep 11, 2018

I'm trying to compile the following:

My-Schema DEFINITIONS ::=
BEGIN

  MyObject ::= EXTERNAL

END

And I get

FATAL: Cannot compile "MyObject" (4a:1) at line 4
FATAL: Cannot compile "MyObject" (4a:1) at line 4

What am I doing wrong?

@velichkov
Copy link
Contributor

Hi @immesys,

See #140. You need to apply b3bdced to the master.
Tomorrow I'll try to rebase it and open a PR.

@velichkov
Copy link
Contributor

@immesys
Copy link
Author

immesys commented Sep 11, 2018

I am struggling with both of those forks. Mouse07410 master gives:

gcc: error: asn1p_l.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.

And the brchiu branch compiles but when run on the snippet above gives:

FATAL: Unknown type "EXTERNAL" referenced by "MyObject" at line 6 in foo.asn

If you manage to rebase an open a PR I would be very grateful. Thanks!

@velichkov velichkov linked a pull request Sep 11, 2018 that will close this issue
@velichkov
Copy link
Contributor

Here it is #295

The EXTERNAL is tested in

TEST DEFINITIONS ::=
BEGIN
T ::= EXTERNAL
END

/* Check exact buf1 */
check(&t, buf1, sizeof(buf1), sizeof(buf1));
compare(&t, buf1_reconstr, sizeof(buf1_reconstr));
asn_fprint(stderr, &asn_DEF_T, &t);
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_T, &t);

And the Travis builds

@mouse07410
Copy link

mouse07410 commented Sep 11, 2018

@velichkov could I ask you to rebase and submit your PR against https://github.com/mouse07410/asn1c/tree/vlm_master ? I tried to apply your PR #295 as-is, but got several conflicts that I can't resolve on my own. :-(

I thought support for EXTERNAL was merged last year - but it appears that it's not there. I'm getting the same error as the OP does:

$ asn1c -v
ASN.1 Compiler, v0.9.29
Copyright (c) 2003-2017 Lev Walkin <[email protected]> and contributors.
$ cat MySchema.asn1 
MySchema DEFINITIONS ::=
BEGIN

  MyObject ::= EXTERNAL

END
$ asn1c MySchema.asn1 
FATAL: Cannot compile "MyObject" (4a:1) at line 4
FATAL: Cannot compile "MyObject" (4a:1) at line 4
$

P.S. https://github.com/mouse07410/asn1c/tree/vlm_master is the current default of my fork, and should be used for all the work. https://github.com/mouse07410/asn1c/tree/master is old, doesn't have the latest updates and fixes merged, and does not have OER support.

@velichkov
Copy link
Contributor

could I ask you to rebase and submit your PR against https://github.com/mouse07410/asn1c/tree/vlm_master ?

Here it is mouse07410#36

I tried to apply your PR #295 as-is, but got several conflicts that I can't resolve on my own. :-(

The way the tests are organized, makes supporting multiple forks very difficult.

@mouse07410
Copy link

Here it is mouse07410#36

Thank you!!

The way the tests are organized, makes supporting multiple forks very difficult.

Is there anything we can do about it? Say, one big radical change that would make life easier down the road?

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

Successfully merging a pull request may close this issue.

3 participants