Attempting to Build a Module in RHEL Returns Error: "FATAL: modpost: GPL-incompatible module <module>.ko uses GPL-only symbol '<symbol_name>'"

Solution Verified - Updated -

Issue

  • Attempting to build a custom module against a RHEL kernel fails with the error:

    "FATAL: modpost: GPL-incompatible module <module>.ko uses GPL-only symbol '<symbol_name>'"
    

Environment

  • Red Hat Enterprise Linux, version 8
  • Red Hat Enterprise Linux, version 7
  • Red Hat Enterprise Linux, version 6
  • Red Hat Enterprise Linux, version 5
  • Red Hat Enterprise Linux, version 4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content