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

  1. bartoszkosiorek commented on Apr 5, 2023

    @bartoszkosiorek
    Author

    @jsonn Do you know with who I could contact to help adding support for GCC 11?

  2. changed the title [-]pkgtools/libnbcompat: unable to compile with GCC 11 and G++ 11 (default compilers Ubuntu 22.04) [/-] [+]pkgtools/libnbcompat: unable to compile with GCC 11 (default compilers Ubuntu 22.04) [/+] on Apr 5, 2023
  3. jsonn commented on Apr 5, 2023

    @jsonn
    Member

    config.log please, the real problem is elsewhere.

  4. added a commit that references this issue on Apr 28, 2023
  5. 129 remaining items

  6. added a commit that references this issue on Jun 29, 2026
  7. added a commit that references this issue on Jul 30, 2026
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