Public bug reported:

Currently, Ubuntu 24.04 provides different versions of certain parts of
ANTLR:

$ dpkg -l | grep antlr
ii  antlr4                                         4.9.2-2                      
              all          ANTLR Parser Generator
ii  libantlr3-runtime-java                         3.5.3-2                      
              all          Runtime library for ANTLR 3
ii  libantlr4-runtime-dev:amd64                    4.10+dfsg-1                  
              amd64        ANTLR Parser Generator - C++ runtime support 
(development files)
ii  libantlr4-runtime-java                         4.9.2-2                      
              all          Runtime library for ANTLR 4
ii  libantlr4-runtime4.10:amd64                    4.10+dfsg-1                  
              amd64        ANTLR Parser Generator - C++ runtime support (shared 
library)

Unfortunately, versions 4.9.2 and 4.10 are not fully compatible. In a
typical workflow, the programmer creates the .cpp and .h files by using
the antlr4 package (from version 4.9.2) with input files given in .g4
format. Then, by including the created files in the main .cpp file, the
headers from the package libantlr4-runtime-dev are included. Now,
version 4.9.2 creates incompatible .cpp and .h files with the headers
from version 4.10.

Example: I get the following error message (and a couple of other ones)
when trying to compile the main .cpp file:

error: ‘virtual const std::vector<std::__cxx11::basic_string<char> >& 
ExprLexer::getTokenNames() const’ marked ‘override’, but does not override
   49 |   virtual const std::vector<std::string>& getTokenNames() const 
override; // deprecated, use vocabulary instead

Suggested solution: either provide the version 4.10 of antlr4 or allow
using an old version 4.9.2 of libantlr4-runtime-dev.

** Affects: antlr4 (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: antlr4-cpp-runtime (Ubuntu)
     Importance: Undecided
         Status: New

** Also affects: antlr4 (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2078040

Title:
  4.9.2 and 4.10 are incompatible

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/antlr4/+bug/2078040/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to