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

rrc-dump doesn't compile #44

Closed
DerrickMartinez opened this issue Jul 7, 2014 · 4 comments
Closed

rrc-dump doesn't compile #44

DerrickMartinez opened this issue Jul 7, 2014 · 4 comments

Comments

@DerrickMartinez
Copy link

I got the latest spec of 25331 (C10) Rel 12 and copied it into my directory. After several minutes of successful compiled code, it blows up at:

cc -DJUNKTEST -DPDU=DL_DCCH_Message -DASN_PDU_COLLECTION -I. -o PLMNIdentitiesOfNeighbourCells-v860ext.o -c PLMNIdentitiesOfNeighbourCells-v860ext.c
In file included from PLMNIdentitiesOfNeighbourCells-v860ext.h:42:0,
                 from PLMNIdentitiesOfNeighbourCells-v860ext.c:8:
MultiplePLMNsOfIntraFreqCellsList.h:28:528: warning: anonymous struct declared inside parameter list [enabled by default]
MultiplePLMNsOfIntraFreqCellsList.h:28:528: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
MultiplePLMNsOfIntraFreqCellsList.h:28:528: warning: ‘struct multiplePLMN_list’ declared inside parameter list [enabled by default]
MultiplePLMNsOfIntraFreqCellsList.h:28:528: warning: ‘struct MultiplePLMNsOfIntraFreqCellsList__Member’ declared inside parameter list [enabled by default]
In file included from PLMNIdentitiesOfNeighbourCells-v860ext.h:43:0,
                 from PLMNIdentitiesOfNeighbourCells-v860ext.c:8:
MultiplePLMNsOfInterFreqCellsList.h:28:69: error: redefinition of ‘struct multiplePLMN_list’
In file included from PLMNIdentitiesOfNeighbourCells-v860ext.h:42:0,
                 from PLMNIdentitiesOfNeighbourCells-v860ext.c:8:
MultiplePLMNsOfIntraFreqCellsList.h:28:69: note: originally defined here
In file included from PLMNIdentitiesOfNeighbourCells-v860ext.h:43:0,
                 from PLMNIdentitiesOfNeighbourCells-v860ext.c:8:
MultiplePLMNsOfInterFreqCellsList.h:28:528: warning: anonymous struct declared inside parameter list [enabled by default]
MultiplePLMNsOfInterFreqCellsList.h:28:528: warning: ‘struct multiplePLMN_list’ declared inside parameter list [enabled by default]
MultiplePLMNsOfInterFreqCellsList.h:28:528: warning: ‘struct MultiplePLMNsOfInterFreqCellsList__Member’ declared inside parameter list [enabled by default]
make: *** [PLMNIdentitiesOfNeighbourCells-v860ext.o] Error 1

I got it compiled by fixing the code, but I just wanted to make it known here.

@DerrickMartinez DerrickMartinez changed the title RRC doesn't compile rrc-dump doesn't compile Jul 7, 2014
@vlm
Copy link
Owner

vlm commented Oct 13, 2014

Great you got it compiling!

The current code generation approach would not allow me to quickly change the anonymous structures in macro thing which breaks your compiler. One approach would be to use gcc to compile this module, and use this library with the rest of the project using that non-gcc/clang compiler that you're apparently using.

@vlm vlm closed this as completed Oct 13, 2014
@olegarch
Copy link

olegarch commented Feb 5, 2015

Same with gcc:
gcc -DASN_PDU_COLLECTION -I. -o PLMNIdentitiesOfNeighbourCells-v860ext.o -c PLMNIdentitiesOfNeighbourCells-v860ext.c

MultiplePLMNsOfInterFreqCellsList.h:29:10: error: redefinition of ‘struct multiplePLMN_list’
struct multiplePLMN_list {

@msivaprakash
Copy link

Can you share the fix you did?

@brchiu
Copy link
Contributor

brchiu commented Sep 23, 2016

hi, @olegarch and @msivaprakash,

I found that for the two IEs MultiplePLMNsOfInterFreqCellsList and MultiplePLMNsOfIntraFreqCellsList in 25.331's ASN.1 definition :

MultiplePLMNsOfInterFreqCellsList ::=   SEQUENCE (SIZE (1..maxCellMeas)) OF SEQUENCE {
    multiplePLMN-list   SEQUENCE (SIZE (1..6)) OF PLMN-IdentityWithOptionalMCC-r6 OPTIONAL
}

MultiplePLMNsOfIntraFreqCellsList ::=   SEQUENCE (SIZE (1..maxCellMeas)) OF SEQUENCE {
    multiplePLMN-list   SEQUENCE (SIZE (1..6)) OF PLMN-IdentityWithOptionalMCC-r6 OPTIONAL
}

MultiplePLMN-List ::= SEQUENCE (SIZE (1..6)) OF PLMN-IdentityWithOptionalMCC-r6

Since IE MultiplePLMN-List has the same construction as member multiplePLMN-list inside these two IEs. If I replace them as :

MultiplePLMNsOfInterFreqCellsList ::=   SEQUENCE (SIZE (1..maxCellMeas)) OF SEQUENCE {
    multiplePLMN-list   MultiplePLMN-List OPTIONAL
}

MultiplePLMNsOfIntraFreqCellsList ::=   SEQUENCE (SIZE (1..maxCellMeas)) OF SEQUENCE {
    multiplePLMN-list   MultiplePLMN-List OPTIONAL
}

MultiplePLMN-List ::= SEQUENCE (SIZE (1..6)) OF PLMN-IdentityWithOptionalMCC-r6

Then the generated C code can be compiled successfully using gcc 5.4.0 on Lubuntu 16.04

For your reference.

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

5 participants