Skip to content

pkgtools/libnbcompat: unable to compile with GCC 11 (default compilers Ubuntu 22.04)  #120

Description

@bartoszkosiorek

Steps to introduce on Ubuntu 22.04:

sudo apt-get update && sudo apt-get install gcc-multilib g++-multilib

More info about package:
https://packages.ubuntu.com/jammy/gcc-multilib

When I tried to compile pkgtools/libnbcompat with GCC 11 and G++ 11 (default compiler Ubuntu 22.04) I had following compilation error:

 getopt_long.c: In function ‘getopt_internal’:
 getopt_long.c:194:6: error: ‘optreset’ undeclared (first use in this function); did you mean ‘optopt’?
   if (optreset)
       ^~~~~~~~
       optopt
 getopt_long.c:194:6: note: each undeclared identifier is reported only once for each function it appears in
 *** [getopt_long.o] Error code 1

After installing gcc 9/g++ 9 the build is successfull:

sudo apt-get update && sudo apt-get install gcc-9-multilib g++-9-multilib

More info about package:
https://packages.ubuntu.com/jammy-updates/gcc-9-multilib

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions