Wireshark mailing list archives

Re: ASN1 now builds with cmake - open points


From: Pascal Quantin <pascal.quantin () gmail com>
Date: Mon, 13 May 2013 14:32:07 +0200

2013/5/13 Joerg Mayer <jmayer () loplof de>

Hello Pascal,

On Sun, May 12, 2013 at 11:06:44PM +0200, Pascal Quantin wrote:
2013/5/12 Joerg Mayer <jmayer () loplof de>

I've finished adding the necessary code to generate the dissectors in
the
asn1 subdirectory.
To build and copy a single dissector, just go into the subdirectory and
type "make".
To regenerate and copy all dissectors, go into the asn1 directory and
type
"make".
I'm using different make targets for each dissector because cmake does
not
like
it if I use the same target for different objects (this can be changed,
but the
reason it behaves this way by default is that most build systems don't
support
this, e.g. vs). Just go into the subdirectory and type "make help".
E.g.
the
targets for asn1/dap/ are:
dap-exp.cnf
generate_dissector-dap

There are two open points:
- I can't find the bug that is about this topic (IIRC it was assigned
to
krj)
- When building the dap dissector, I need to run make twice, because
some
cnf
  file(s) are not complete after the first run. Can anyone with
knowledge
of
  asn2wrs please take a look?

the problem is that when using CMake, the dependencies for
x509sat-exp.cnf
are checked before all other dependencies thus not respecting the order
defined in set (EXTRA_CNF). As x509sat depends on x509if, it fails and
you
need a second run to generate it.

I just tried to verify your analysis and failed: I did
cd asn1
find . -name "*-exp.cnf" | xargs rm
cd xf509if
make x509if-exp.cnf
cd ../dap
make
And still see the same problem.
If it really is a problem in which order we generate the dependencies (and
I
tend to agree with that part of your analysis) we need to explicitly code
that
dependency in both cmake and autofoo world, everything is just betting your
luck, think of doing a parallel make ("make -C asn1 -j").


Hi,

when doing make in dap folder, I get:

Scanning dependencies of target x509sat-exp.cnf
ASN.1 to Wireshark dissector compiler
:0: UserWarning: Missing tag information for imported type
MAPPING-BASED-MATCHING from InformationFramework (InformationFramework)
Built target x509sat-exp.cnf
Scanning dependencies of target acse-exp.cnf
ASN.1 to Wireshark dissector compiler
:0: UserWarning: Missing tag information for imported type Name from
InformationFramework (InformationFramework)
:0: UserWarning: Missing tag information for imported type
RelativeDistinguishedName from InformationFramework (InformationFramework)
Built target acse-exp.cnf
[...]
Built target x509if-exp.cnf
Scanning dependencies of target generate_dissector-dap
ASN.1 to Wireshark dissector compiler
Built target generate_dissector-dap

The MAPPING-BASED-MATCHING definition comes from x509if dissector.

When running it a second time, we do not have anymore this warning:
ASN.1 to Wireshark dissector compiler
Built target x509sat-exp.cnf
ASN.1 to Wireshark dissector compiler
Built target acse-exp.cnf
[...]

When building with autofoo, we do not have those warnings displayed but the
build order is different:
/usr/bin/python ../../tools/asn2wrs.py \
        -E -b -L \
        -p dap \
        -c ./dap.cnf \
        -D . \
         dap.asn DirectoryAccessProtocol.asn
ASN.1 to Wireshark dissector compiler
:0: UserWarning: Missing tag information for imported type DirectoryString
from SelectedAttributeTypes (SelectedAttributeTypes)
(cd ./../acse && make generate_export)
make[1]: Entering directory `/home/pascal/wireshark/trunk/asn1/acse'
[...]
make[1]: Leaving directory `/home/pascal/wireshark/trunk/asn1/x509af'
(cd ./../x509if && make generate_export)
make[1]: Entering directory `/home/pascal/wireshark/trunk/asn1/x509if'
/usr/bin/python ../../tools/asn2wrs.py \
        -E -b \
        -p x509if \
        -c ./x509if.cnf \
        -D . \
         InformationFramework.asn ServiceAdministration.asn
ASN.1 to Wireshark dissector compiler
[...]
make[1]: Leaving directory `/home/pascal/wireshark/trunk/asn1/x509if'
(cd ./../x509sat && make generate_export)
make[1]: Entering directory `/home/pascal/wireshark/trunk/asn1/x509sat'
/usr/bin/python ../../tools/asn2wrs.py \
        -E -b -r Syntax \
        -p x509sat \
        -c ./x509sat.cnf \
        -D . \
         SelectedAttributeTypes.asn
ASN.1 to Wireshark dissector compiler
make[1]: Leaving directory `/home/pascal/wireshark/trunk/asn1/x509sat'


So I assumed your issue was related to the build order but I might be
wrong. I do not have enough knowledge on cmake / autofoo to investigate it
further.

Regards,
Pascal.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: