ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] ASN1 now builds with cmake - open points

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Mon, 13 May 2013 13:36:51 +0200
Hello Pascal,

On Sun, May 12, 2013 at 11:06:44PM +0200, Pascal Quantin wrote:
> 2013/5/12 Joerg Mayer <jmayer@xxxxxxxxx>
> 
> > 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").

Ciao
      Jörg
-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.